Today is a working session. Two items you should be working on.
- Make sure your "First Flask Web Server" is complete.
You should have:
- Changes made to your
docker-cloud-testthat pass the python unit test. - Changes have been made via a PR
- The docker-cloud integration has validated the changes. (Last commit in your PR should have a check mark on it.)
- You have merged your pull request.
- You have submitted the link to the closed pull request as your assignment.
- Setting up your Flask server in AWS.
As always, you may want to keep notes on how you're doing things as you do them.
Task 1) You each should have recieved an email containing a private ssh key. I have setup a group of t2.micro instances for your use.
- Review the different instance types here: https://aws.amazon.com/ec2/instance-types/
Task 2) Each of you has their own dedicated instance. It is a linux server running Ubuntu Xenial.
- Research how to ssh into a linux server using an ssh key.
- You should login via the command line.
Task 3) Congifure the server..
- Setup the server to be able to run Docker.
- You should be able to run the following command on your server to verify that it's funcitioning correctly.
docker run ubuntu:xenial echo "hello world"- Git clone a copy of your docker-cloud-test repo onto the server.
- You should be able to run the following commands.
# This will build a local image of your docker cloud Flask server
docker build -t test /path/to/Dockerfile
# Verify that git works
git log --oneline --decorateTask 4) Pull the latest copy of your public docker-cloud-test image.
- Verify that you have the correct image.
docker imagesTask 5) Start a container using your public docker-cloud-test image.
- Figure out how to start a docker container and keep it running in the background.
# Check for running instances with
docker ps- Figure out how to expose the port from the container.
# Exposed ports are visible with
docker ps
# You should see something like 0.0.0.0:####->####/tcpTask 6) Test your web server.
- Figure out the URL you need to load from your laptop to see your running Flask server!!!
Task 7) Submit the URL to canvas for credit.