The goal of this document is to provide a step-by-step guide to setting up
Airy Core on a Kubernetes Cluster using the infrastructure-as-code tool Terraform. Terraform takes care of provisioning, updating, and cleaning up virtual resources.
Currently, we only support the AWS Elastic Kubernetes Service (AWS-EKS) as a provider. Terraform modules for other providers (and on different architectures) such as Google Cloud and Digital Ocean will soon be added.
The local file structure for the installation is as follows:
The installation takes place in two steps, each in a separate Terraform environment organized by directories:
aws-eks) - where you create the cluster.
Airy Coreis installed on the cluster.
When you run a cloud installation with the Airy CLI with
airy create --provider cloud-provider, the CLI will run all the following steps in a sequence. Currently, only the AWS EKS (aws-eks) provider is supported.
If you already have a cluster installed without Terraform, i.e. via Helm, skip Step 4 and place the Kubernetes config file in the installation directory. Remember to specify the location of this file in the
Create a directory with an
cli.yaml file. If you skip this step, the CLI will create it for you.
airy-core and the relevant provider directory from airy/infrastructure/terraform/install.
This can be done by
git clone email@example.com:airyhq/airy.git and then moving the relevant files.
Or grab the files inside your installation directory directly (and select the provider directory).
Every provider has its own requirements for creating and accessing the Kubernetes cluster. For AWS check the following requirements.
Change into your
This will ask for the provider environmental variables, in the case of AWS:
aws_region. You can provide these values when prompted on the Command Line or do one of the following alternatives:
- export them as AWS_REGION and AWS_PROFILE,
- export them as TF_VAR_aws_region and TF_VAR_aws_profile,
- store them, in a
terraform.tfvarsfile in the same provider directory.
This step will take time, depending on the provider and architecture. Provisioning a full Kubernetes Cluster takes between 5 - 10 mins. On completion, it will output a
kube.conf in the installation directory.
Terraform will look for a Kube Config to connect to the cluster provisioned in Step 4. (or which you already have provisioned), and
airy-core onto it.
This will output a link to your UI, API, and source URLs.
Connect to your new instance using
kube.conf file inside your installation directory.
kubectl get pods --kubeconfig ./kube.conf
To uninstall, simply run
terraform destroy in the
airy-core directory first, and then once again in the
For uninstalling Airy you need to destroy both of the environments that you have created. First destroy the
Then destroy the PROVIDER environment:
In the airy/infrastructure/terraform/install, there are scripts:
These scripts provide a simple interface for the installation/uninstallation process. They are also used by the Airy CLI and are useful to check the file structure as well as ensure correct install/uninstall order.