Opinionated tool for infrastructure and code.
This tool is designed as a simple wrapper around popular tools, so they can be easily integrated in one infra: terraform, ECS deployment, serverless, and others.
It combines infra, build and deploy workflows in one and is too simple to be considered sophisticated. So let's not do it but rather embrace the simplicity and minimalism.
Homebrew is used on MacOS. Add a tap and install the latest stable version:
brew tap hazelops/ize
brew install ize
Add public apt repository, update the apt cache and install the latest stable version:
echo "deb [trusted=yes] https://apt.fury.io/hazelops/ /" | sudo tee /etc/apt/sources.list.d/fury.list
sudo apt-get update
sudo apt-get install ize
More information on other platforms
Enable autocompletion
echo "autoload -U compinit; compinit" >> ~/.zshrc
Load autocompletion on every session
ize gen completion zsh > /usr/local/share/zsh/site-functions/_ize
More information on other platforms & shells
If starting from scratch, create a git repo and init a new project. Follow the setup
mkdir squirrelcorp-backend
cd squirrelcorp-backend
git init
ize init --template ecs-apps-monorepo
_Template in this example has testnut
as an example environment. Feel free to rename it.
export ENV=testnut
export AWS_PROFILE=<name of your aws profile>
ize up infra
ize up squibby
ize up goblin
Let's imagine we're deploying a terraform-based infra and a Go-based app named goblin
.
The general workflow that ❯ize dictates is the following:
Currently it supports Terraform, for which it generates a minimal backend config for terraform and runs it. Think of it as a minimalistic Terragrunt, but it's always possible switch to a vanilla Terraform. Examples are available.
ize up infra
It uses Go AWS SDK to push secrets to SSM
ize secrets push goblin
It runs a simple logic of updating the task definitions to a new docker image (and rolling back in case ELB/ALB fails).
This command includes ize build
, ize push
and ize deploy
, but it's possible to use them separately.
ize up goblin
If there is a bastion host used in the infrastructure, it's possible to establish a tunnel to access the private resources, like Postgres or Redis. This feature is using Amazon SSM and SSH tunneling underneath. Simple, yet effective.
ize tunnel up
ize tunnel down
_To execute a command in the ECS-hosted docker container the following command can be used:
ize exec goblin -- ps aux