Skip to content

CloudNua/ckad-infra

Repository files navigation

ckad-infra

AWS Infrastructure for CKAD

Install / Config

Set up

Terraform Config

  • Add a terraform.tfvars to project root. Below is an example:
profile = "ckad-account"
region = "eu-west-1"
lab_solution_url = "https://training.linuxfoundation.org/cm/LFD259/LFD259_V2022-11-23_SOLUTIONS.tar.xz"
lab_solution_username = "???????"
lab_solution_password = "???????"
enable_registry = true

EC2 PEM

aws ec2 create-key-pair \
    --key-name ckad \
    --key-type rsa \
    --key-format pem \
    --query "KeyMaterial" \
    --output text > ~/.ssh/ckad.pem

Create

Init

terraform init

Validate

terraform validate

Plan

terraform plan -input=false -var-file='./config/dev.tfvars'

Apply

terraform apply -auto-approve -var-file='./config/dev.tfvars'

Destroy

terraform destroy -auto-approve -var-file='./config/dev.tfvars'

Local Clean up

rm -rf .terraform && rm terraform.tfstate && rm .terraform.lock.hcl