This project is a fork from nodejs-hello-world.
I have added the additional configurations to ensure that the project can be deployed to a kubernetes cluster.
Install node and run npm start
to view the application. You must also install everything mentioned in the [Project uses](#Project uses:).
You can then create a new ec2 instance which has at least 2 cores, this would be used as the Jenkins server. Minikube
requires at least 2 cores to start.
The application runs on port 80
These environment variables are required to be set on your system before running the ansible script.
CAPSTONE_AWS_ACCESS_KEY_ID
, CAPSTONE_AWS_SECRET_ACCESS_KEY
, CAPSTONE_AWS_DEFAULT_REGION
, CAPSTONE_DOCKER_USERNAME
,
CAPSTONE_DOCKER_USERNAME
, CAPSTONE_DOCKER_PASSWORD
.
You can configure your jenkins server by specifying your ec2 ip in the jenkins_inventory.txt file. Then you can follow the instructions in the [Building on Jenkins](#Building on Jenkins) section.
The Jenkins server is initialized using the create_jenkins_server script. This simply proxies to ansible to perform the necessary intializations which would ensure that building, liniting and deploying the project would be possible on the server.
This project uses a rolling deployment strategy, this can be seen in the Deploy app on cluster
stage in the Jenkinsfile
This is done using eksctl which has eliminated most of the cumbersome steps required to set up a k8 cluster. The create_k8_cluster.sh file creates the cluster where the apps would be deployed to.
- Ansible
- Nodejs
- Docker
- Jenkins
- eksctl
- kubectl
- hadolint