CKI AWS Deployment
This is a work in progress.
The CKI infrastructure can be deployed on AWS. The necessary tooling can be found in the aws-deployment repository on GitLab.
Before running the playbooks, be sure you are fully authenticated with AWS.
You must setup the following environment variables before starting any of the scripts:
GITLAB_TOKEN: GitLab API token
GITLAB_REGISTRATION_TOKEN: GitLab runner registration token
GITLAB_COM_SSH_ACCOUNTS: space-separated list of usernames on gitlab.com which ssh keys should be allowed for access to the GitLab runner
Verify that the
aws_region is set properly in
The default region is
Ensure Ansible and the
boto3 python module are installed.
Run the playbook with the following command:
ansible-playbook -i hosts PLAYBOOK_NAME
PLAYBOOK_NAME is one of the following:
deploy_iam.yml: Deploy or update roles and policies
deploy_common_infrastructure.yml: Deploy or update VPCs, S3 buckets, and EC2 security groups
deploy_gitlab_runner.yml: Deploy or update the gitlab-runner
deploy_tear_down.yml: Remove all EC2 instances and common infrastructure
Normally, the deployment is scoped to the user name and the subnet defined in
For production, override the
cki_cidr_base variables, e.g. with
ansible-playbook \ deploy_gitlab_runner.yml \ -i hosts \ -e cki_cidr_base=10.10 \ -e cki_environment=production
To apply a certain role to a host at a fixed IP address, you can use
ansible-playbook \ deploy_gitlab_runner.yml \ -i gitlab_runner, \ -e ansible_host=188.8.131.52