RevoTask is a tiny python based API solution for greeting a user based on their number of days to their birthday.
- A user posts their username with a payload of their birthdate.
- Based on their birthdate provided, the user is greated with
"Hello, username! Your birthday is in N day(s)"
- in the case where the birthdate is on the current day, the user is greated with
Hello, username! Happy birthday!"
The GitHub repository holding the main implementation of this tool and its infrastructure configuration is available at RevTask
the quickest way to do this would be using docker and docker-compose. with these 2 setup, you can proceed to the following steps below.
clone the git repository
git clone https://github.com/sonlinux/revotask.git
change path into the project directory
cd revotask
Spin up the docker developer container (this has live code reload during development):
$ docker-compose up --build
- To read the API browsable documentation, open the browser at
and
- To interact with the API endpoints in the browser, open
When you are ready to deploy to production environment you need the following tools to be installed
- Kubernetes engine
- kubectl for interacting with the kubernetes cluster
- Helm for templating deployment environment
- Make for easy command option interaction
Firstly you will need a running kubernetes cluster and ensuring that you have access to it via kubectl.
- Create a namespace called api in using
kubectl
within your kubernetes cluster
kubectl create namespace api
- Build the docker image that the helm chart is expecting to use
make build
- Update the helm chart manifest to ensure its pointing to the most recent updates
make render
- Deploy the workload to your cluster namespace below
make deploy
At this point you should have your kubernetes pod running and your service accessible in the browser at http://localhost:8000
Congratulations! 🎉