Jenkins is runnind in a GCP VM instance. Has one node configured (GCP VM instance) and it does not run jobs on the built-in node.
Main branch is protected by two checks.
- At least one review approved
- Jenkins continuous-integration/jenkins/pr-head must pass
Since this is mono repository each service has it's own Jenkinsfile in their directory. There is also a Jenkinsfile for the entire repository.
Code is scanned by Sonar.
Jenkins sends build result to Slack via the Slack plugin.
The last stage of the master pipeline is to trigger ArgoCD. This stage modifies the lastest version in the GitOps repo Kubernetes declarative files. ArgoCD will pickup change and synchronize our current configuration to our new version. This is deployed to a GCP Kubernetes cluster.
Download Docker. If you are on Mac or Windows, Docker Compose will be automatically installed. On Linux, make sure you have the latest version of Compose. If you're using Docker for Windows on Windows 10 pro or later, you must also switch to Linux containers.
Run in this directory:
docker-compose up
The app will be running at http://localhost:5000, and the results will be at http://localhost:5001.
Alternately, if you want to run it on a Docker Swarm, first make sure you have a swarm. If you don't, run:
docker swarm init
Once you have your swarm, in this directory run:
docker stack deploy --compose-file docker-stack.yml vote
The folder k8s-specifications contains the yaml specifications of the Voting App's services.
Run the following command to create the deployments and services objects:
$ kubectl create -f k8s-specifications/
deployment "db" created
service "db" created
deployment "redis" created
service "redis" created
deployment "result" created
service "result" created
deployment "vote" created
service "vote" created
deployment "worker" created
The vote interface is then available on port 31000 on each host of the cluster, the result one is available on port 31001.
- A Python webapp which lets you vote between two options
- A Redis queue which collects new votes
- A .NET worker which consumes votes and stores them in…
- A Postgres database backed by a Docker volume
- A Node.js webapp which shows the results of the voting in real time
The voting application only accepts one vote per client. It does not register votes if a vote has already been submitted from a client.