Builds and configures an AMI with:
Infra
- Updates to latest packages and enables auto update of security packages
- firewall allowing only ssh incoming
Tools
- docker
- kubectl
- aws cli
- gitlab runner
- jq
- docker cleanup jobs
Initialisation
- Gitlab runner configuration
- Kubectl configuration setup
See Packer Readme for more details
A sample terraform project to show how to deploy the AMI into AWS.
See Terraform Readme for more details
- a AWS account (Be careful this template implies creating billable resources on AWS cloud) You will need an AWS access key and enough admin permissions to create AWS ressources
- a SSH Key pair to connect to Gitlab and AWS instances (see Github help for examples)
- Packer >= 1.1.3
- Terraform >= v0.11.2
- Build the iamge
cd packer; packer build -var 'aws_region=us-east-1' template.json
. See Packer Readme for more details - Create
kube-config
file which contains configuration to access your cluster. - Run
terrafrom init; terraform apply
, set variables, review changes and confirm by typingyes
. See Terraform Readme for more details