The intention is to create a go-to demo from deploying underlying infra environment to deploying Tetrate Service Express and additional addons around the application use-cases.
The Makefile
in this directory provides ability to fast-forward to any point of the automated provisioning of the demo
graph TD;
all[make all] --> infra[make deploy_infra]
subgraph infra[make deploy_infra]
infra_aws[make deploy_infra_aws] -->
aws-load-balancer-controller[make deploy_addons_aws-load-balancer-controller] -->
fluxcd[make deploy_addons_fluxcd]
end
- terraform >= 1.5.0
- k8s >= 1.24
- AWS role configured and assumed for terraform to deploy
- Clone the repo
git clone https://github.com/smarunich/tetrate-istio-sandbox.git
- Copy
terraform.tfvars.json.sample
to the root directory asterraform.tfvars.json
{
"name_prefix": "<YOUR UNIQUE PREFIX NAME TO BE CREATED>",
"k8s_clusters": {
"aws": [
{
"name": "demo1",
"region": "us-west-1",
"version": "1.26"
}
]
}
}
All Make
commands should be executed from root of repo as this is where the Makefile
is.
# Build full demo
make all
# Setup underlying clusters, registries, jumpboxes
make deploy_infra
# Describe the complete demo stack
make describe_demo
# Deploy the demo application
make demo_01-deploy-application
# Fast-forward - Setup all demos
make demo_all
The completion of the above steps will result in:
- all the generated outputs will be provided under
./outputs
folder - output kubeconfig files for all the created aks clusters in format of: $cluster_name-kubeconfig
- output IP address and private key for the jumpbox (ssh username: tetrate-admin), using shell scripts login to the jumpbox, for example to reach gcp jumpbox just run the script
ssh-to-gcp-jumpbox.sh
When you are done with the environment, you can destroy it by running:
make destroy
For a quicker destroy for development purposes, you can:
- manually delete the clusters via CLI or web consoles
- run
make destroy_local
to delete the terraform data
- Terraform destroys only the resources it created (
make destroy
) - Terraform stores the
state
across workspaces in different folders locally - Cleanup of aws objects created by K8s load balancer services (ELB+SGs) is automated, however based on AWS API timeouts it may require manual cleanup
Directory | Description |
---|---|
infra | Infrastructure deployment modules. Provisioning of networking, jumpboxes and k8s clusters. |
addons | Terraform modules to deploy addons such as FluxCD, etc. |
modules | Generic and reusable terraform modules. These should not contain any specific configuration. |
make | Makefile helpers. |
outputs | Terraform output values for the provisioned modules. |