Install Docker and Docker Compose and run docker-compose up from project root
https://www.atlassian.com/git/tutorials/comparing-workflows/feature-branch-workflow https://0xc0d1.com/blog/git-stack/
https://github.com/pyenv/pyenv https://github.com/nvm-sh/nvm
- Go to
cdk-ec2-instagram - Run
npm i - If needed, ensure you have the prerequisites for working with AWS
- Run
cdk deploy - Run the following command to download your private key-pair needed for connecting to the EC2 instance through SSH:
aws secretsmanager get-secret-value \ --secret-id ec2-ssh-key/cdk-ec2-instagram/private \ --query SecretString \ --output text > cdk-ec2-instagram.pem - Run
cdk destroywhen you're done playing with the cloud to remove the infrastructure and avoid incuring excessive charges.
- Got to AWS EC2 console
- Create a micro EC2 instance
- Create a new default VPC
- Download the key-pair file (*.pem)
cd {project_root}mv ~/Downloads/mypair.pem .chmod 400 mypair.pemzip -r instagram.zip .scp -r -i mypair.pem ./instagram.zip ec2-user@54.173.189.173:~/ssh -i mypair.pem ec2-user@54.173.189.173
unzip instagram.zip -d instagramcd instagramsudo yum updatesudo yum install dockersudo curl -L https://github.com/docker/compose/releases/download/1.21.0/docker-compose-`uname -s`-`uname -m` | sudo tee /usr/local/bin/docker-compose > /dev/nullsudo chmod +x /usr/local/bin/docker-composesudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-composesudo service docker startsudo docker-compose up
- Based on the docs it looks like it's not possible to share EC2 instances (https://docs.aws.amazon.com/ram/latest/userguide/shareable.html)