ok
The ok
tool helps you get started with writing Terraform code and manage different environments.
Installation
We recommend using brew
for installing ok
. Homebrew is supported on MacOS, Linux and WSL.
Run the following command:
Run the following commands:
BIN_DIR="$HOME/bin"
PLATFORM=$(uname | tr '[:upper:]' '[:lower:]')
ARCH=$(uname -m)
case $ARCH in
x86_64)
ARCH="amd64"
;;
aarch64|arm64)
ARCH="arm64"
;;
*)
echo "Unsupported architecture: $ARCH"
exit 1
;;
esac
gh release download \
--repo "oslokommune/ok" \
--pattern "ok_*_${PLATFORM}_${ARCH}.tar.gz" \
--output - | tar -xzOf - ok > "$BIN_DIR/ok"
chmod +x "$BIN_DIR/ok"
"$BIN_DIR/ok" version
Verify that the ok
command is available by running the following command:
Authenticate to GitHub (for teams not using Boilerplate)
If you don't use Boilerplate, you need to authenticate to GitHub. Then you can use the ok
tool to fetch templates:
Verify that it works by running:
If you don't get an error, you can cancel the operation and then you're good to go.
Updating
To update the ok
tool, run the following command:
To check which version you have, you can run ok version
.
Delete ok
To delete the ok
tool, run the follow the following command
If you can't find ok
in the location above, check out