The script deploys a Ubuntu EC2 Instance within your AWS Environment with a single-node k3s cluster and sample Guestbook PHP web application and configures the Illumio Breach Containment Platform with segmentation policies to protect your K8s application.
There are three directories and "steps" to this deployment
- illumio_terraform_demo/illumio: deploys Illumio resources
- illumio_terraform_demo/aws: deploys an AWS EC2 instance
- illumio_terraform_demo/post-deploy: performs post-deployment activities to onboard Kubernetes Cluster into Illumio
- A Linux shell (if using Windows, you can load WSLv2)
- RSA SSH Keys generated using
ssh-keygen -t rsacommand to populate ~/.ssh/ directory (if not available) - Terraform
- AWS CLI with credentials to AWS environment (ref. README.md in
awsdirectory)
ls ~/.ssh
The output should show the following two files: id_rsa id_rsa.pub
ssh-keygen -t rsa
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
Download and run the AWS CLI MSI installer for Windows (64-bit): https://awscli.amazonaws.com/AWSCLIV2.msi
curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg"
sudo installer -pkg AWSCLIV2.pkg -target /
Login to the your AWS Console.
Navigate to IAM > Users > Select User > Security Credentials Tab > Access Keys, select Create Access Key
On the next screen, select Command Line Interface, click through to create the access key.
Copy the Access key and Secret access key.
Configure AWS credentials using the following command:
aws configure
Populate prompts with AWS access key id, AWS secret access key, and AWS region. Leave the output format as blank (default is json)
Clone this repository
git clone https://github.com/jyanagi/illumio_terraform_demo.git
Modify variables in shared.tfvars
NOTE: AMI ID is region specific!
Run the following command to initiate the deployment:
chmod +x deploy.sh
./deploy.sh
The Terraform scripts also generate an output of the public FQDN and IP address. When completed, copy either into your browser. You should be able to successfully access the guestbook web application.