diff --git a/Makefile b/Makefile index 4943566..34a0995 100644 --- a/Makefile +++ b/Makefile @@ -30,18 +30,20 @@ help: Katenary is statically built (in Go), so there is no library to install. To build for others OS: - $$ make GOOS=linux GOARCH=amd64 + $$ make build GOOS=linux GOARCH=amd64 This will build the binary for linux amd64. - $$ make GOOS=linux GOARCH=arm + + $$ make build GOOS=linux GOARCH=arm This will build the binary for linux arm. - $$ make GOOS=windows GOARCH=amd64 + + $$ make build GOOS=windows GOARCH=amd64 This will build the binary for windows amd64. - $$ make GOOS=darwin GOARCH=amd64 + + $$ make build GOOS=darwin GOARCH=amd64 This will build the binary for darwin amd64. - + Or you can build all versions: $$ make build-all - EOF @@ -51,8 +53,10 @@ build: pull katenary build-all: pull dist dist/katenary-linux-amd64 dist/katenary-linux-arm64 dist/katenary.exe dist/katenary-darwin pull: +ifneq ($(GO),local) @echo -e "\033[1;32mPulling $(BUILD_IMAGE) docker image\033[0m" @$(CTN) pull $(BUILD_IMAGE) +endif dist: mkdir -p dist @@ -110,5 +114,6 @@ uninstall: clean: rm -f katenary + rm -rf dist diff --git a/README.md b/README.md index 5c64c29..0877cac 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,10 @@ -![Logo](misc/logo.png) +
+Katenary Logo +
Katenary is a tool to help transforming `docker-compose` files to a working Helm Chart for Kubernetes. -> **Important Note** Katenary is a tool to help building Helm Chart from a docker-compose file, but docker-compose doesn't propose as many features as what can do Kubernetes. So, we strongly recommend to use Katenary as a "bootstrap" tool and then to manually enhance the generated helm chart. +> **Important Note:** Katenary is a tool to help building Helm Chart from a docker-compose file, but docker-compose doesn't propose as many features as what can do Kubernetes. So, we strongly recommend to use Katenary as a "bootstrap" tool and then to manually enhance the generated helm chart. This project is partially made at [Smile](https://www.smile.eu) @@ -14,6 +16,23 @@ This project is partially made at [Smile](https://www.smile.eu) You can download the binaries from the [Release](https://github.com/metal3d/katenary/releases) section. Copy the binary and rename it to `katenary`. Place the binary inside your `PATH`. You should now be able to call the `katenary` command. + +You can use this commands on Linux: + +```bash +uname -m | grep -P "x86_64|amd64" && _arch="amd64" || _arch="arm64" +echo "$PATH" | grep $HOME/.local/bin && _prefix=~/.local/bin || _prefix=/usr/local/bin + +curl -s https://api.github.com/repos/metal3d/katenary/releases/latest | \ + grep -wo "https.*katenary-linux-$(_arch)" | \ + xargs curl -L -o $_prefix/katenary +chmod +x $_prefix/katenary + +unset _prefix _arch +``` + +# Else... Build yourself + If you've got `podman` or `docker`, you can build `katenary` by using: ```bash @@ -31,6 +50,17 @@ It will use the default PREFIX (`~/.local/`) to install the binary in the `bin` sudo make install PREFIX=/usr/local ``` +If that goes wrong, you can use your local Go compiler: + +```bash +make build GO=local + +# To force OS or architecture +make build GO=local GOOS=linux GOARCH=arm64 +``` + +Then place the `katenary` binary file inside your PATH. + # Tips