Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ohbus/ops-interview-task
Zerodha Ops Task
https://github.com/ohbus/ops-interview-task
docker docker-compose golang kubernetes redis vagrant
Last synced: 12 days ago
JSON representation
Zerodha Ops Task
- Host: GitHub
- URL: https://github.com/ohbus/ops-interview-task
- Owner: ohbus
- Created: 2020-03-17T16:23:42.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-03-18T19:18:16.000Z (almost 5 years ago)
- Last Synced: 2023-03-04T15:44:03.262Z (almost 2 years ago)
- Topics: docker, docker-compose, golang, kubernetes, redis, vagrant
- Language: Go
- Size: 4.88 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Zerodha Ops Task
## Description
This is a sample `Go` application which connects to Redis. The app increments a `counter` on an incoming request.
### Setting up the app
- Use `make build` to compile the binary.
- Set the environment variables:
- `DEMO_APP_ADDR`: Address where the app should listen to
- `DEMO_REDIS_ADDR`: Address where Redis is running## Tasks
- Create a `Dockerfile` for the app.
- Create a `docker-compose.yml` for the app which includes
- `redis` service, with the data directory of `redis` mounted at `/data` in your VM.
- `app` service running with port `8000` exposed to the host.- Write a bash script that creates and boots [Vagrant box](https://vagrant.io) with Ubuntu.
- Using Ansible provision the VM to:
- Setup hostname of VM as `demo-ops`
- Create a user `demo`
- Configure `sysctl` for sane defaults. For eg: increasing open files limit. Configure a variety of `sysctl` settings to make the VM a production grade one.
- Set the system's timezone to "Asia/Kolkata"
- Install Docker and Docker-Compose
- Configure Docker Daemon to have sane defaults. For eg: to keep logs size in check.
- Deploy the `docker-compose.yml` in `/etc/demo-ops` and start the services- Commit the scripts to Github and share the link.
### Bonus Section
If you have experience working with Kubernetes, you can attempt the bonus scenario:
- Create a namespace `demo-ops`
- Create a deployment and service manifest for the app.
- Configure liveliness check, resource quotas for the deployment.