mudmuseum / terraform-stacks

A repository to collect *aC related resources.
0 stars 2 forks source link

Create and deploy IaC to build EC2 Image for services #1

Open nswarner opened 3 years ago

nswarner commented 3 years ago

IaC should leverage EC2 Image Builder on a monthly cadence. The following configuration should be adhered to:

The following yum packages should be installed:

Run a series of commands to setup Docker

sudo yum update -y
sudo amazon-linux-extras install docker
sudo systemctl enable docker
sudo systemctl start docker
sudo usermod -aG docker ec2-user
docker ps
sudo reboot

Setup a prompt inside ~/.bashrc

STARTCOLOR='\[\033[1;34m\]';
TIMECOLOR='\[\033[1;32m\]';
SYSTEMCOLOR='\[\033[1;33m\]';
DIRCOLOR='\[\033[1;35m\]';
ENDCOLOR='\[\033[1;0m\]';
export PS1="[$TIMECOLOR\d \t$STARTCOLOR] $STARTCOLOR\u@\h $DIRCOLOR\w$STARTCOLOR |$SYSTEMCOLOR WSL $STARTCOLOR|> $ENDCOLOR"

Set bash history saving inside ~/.bashrc

HISTSIZE=
HISTFILESIZE=
HISTTIMEFORMAT="%F %T "

Set up ~/.gitconfig

Setup SSH config for GitHub

Output VM should have the date and region included in the VM name.

References:

nswarner commented 3 years ago

Long term consideration on whether Terraform or CloudFormation best suits this purpose. The intent is for Terraform to be the standard IaC in use, but this may be best served by CloudFormation as an exception. Needs further analysis.