This repository is associated with Cloud DevOps ND - Course 04 - Microservices at Scale using AWS & Kubernetes.
- A summary of the project
- Instructions on how to run the web app
- A short explanation of the files in the repository
The parts of the project that have been completed by me are as follows:
- Cloning this Repository
- Creating and Activating the
.devops
Environment - Installing other Dependencies (Docker, Hadolint, Kubernetes, Minikube)
- Completing the Project Tasks:
- Completing the
Dockerfile
- Completing
run_docker.sh
- Completing
make_prediction.sh
- Improving the Logging of
app.py
- Completing
upload_docker.sh
- Configuring Kubernetes to Run Locally
- Completing
run_kubernetes.sh
- CircleCI Integration
- Writing this
README.md
- Completing the
Firstly if you plan to upload the Docker image to your personal Docker Hub you have to add a docker_pw.txt
file
to the project-ml-microservice-kubernetes
folder which contains only your Docker Hub password. Then change the
vitaspm
in upload_docker.sh
to your own Docker Hub username.
To use the scripts in this repository, firstly change into the project folder using:
cd project-ml-microservice-kubernetes
Create a venv and install the dependencies using:
make setup
make install
Also install the additional dependencies: Docker, Hadolint, Kubernetes, Minikube
You can then:
./run_docker.sh
to build a Docker container containing the web app./upload_docker.sh
to upload the Docker container to your Docker Hub account./run_kubernetes.sh
to run the Docker container on a Kubernetes cluster
Once the container with your app is running you can run ./make_prediction.sh
to create a prediction using the app.
Firstly the folders other than project-ml-microservice-kubernetes
can be ignored since they are part of
the repository but not related to the project. With the exception of .circleci
which contains the
config.yml
which specifies the instructions of the CircleCI pipeline.
The project folder contains:
app.py and model_data
which are the necessary files for the prediction app to workoutput_txt_files
which contains two logs of app tests using docker and kubernetes deploymentsDockerfile
which is used to build the Docker container to run the applicationMakefile
which contains definitions of commands used by the circleci config and in the terminalrequirements.txt
which contains the libraries the app needs to work.sh files
which can be used as explained in 2. Instructions