GitXplorerGitXplorer
r

Zerodha-Ops-Assignment

public
1 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
fe23c4b12a088da1998cfa0d161e9afd1269d6b0

remove redundant update caches

rrusrushal13 committed 5 years ago
Unverified
c2f35896298d909af1cfb40911bae097d17749a1

single copy command for Dockerfile

rrusrushal13 committed 5 years ago
Unverified
32a100ee287c237470d709b2e71893bec4876236

Merge branch 'master' of https://github.com/rusrushal13/Zerodha-Ops-Assignment

rrusrushal13 committed 5 years ago
Verified
175d35b0c958b9d7bf827d4bda6f1ed30b497d4a

Initial commit

rrusrushal13 committed 5 years ago
Unverified
8e665feb5a6b84ffe320c7138c55bf9dd956932a

init commit; automation setup

rrusrushal13 committed 5 years ago

README

The README file for this repository.

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 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.