This project aims at creating and deploying a simole Go applicationm which connects to redis and increments counter by one on each hit.
The idea is to deploy the app using docker on Vagrant VM which is configured using Ansible. Once deployed the application can be accessed on curl http://localhost:8000
.
The same app is also deployable in Kubernetes in order to provide HA and Self tolerance. The application can be accessed here through LoadBalancer IP.
- Vagrant.
- Ansible.
- kubectl 1.15+(Optional).
- Build and push the Docker image in goapp by following the instructions in README.md.
- Once done using Vagrantfile boot the Virtual Machine and configure it using Ansibe.
- Once the VM configured the application can be accessed on
curl http://localhost:8000
.
- Use
vagrant up
to provision the VM which will be configured by ansible. - The values of the variables can be configured in ansible/roles/vagrant/vars/main.yaml.
- The vm can be reconfigured again post setup and the same can be applied by using
vagrant provision
.