Skip to content

amit7itz/devops-exercise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BigPanda DevOps Exercise

INTRO

Good morning, Mr. Panda. Your mission, should you choose to accept it, involves the development and deployment of two nanoservices. Please read the following instructions before starting to implament your mission, you don't want to miss any important instruction, especially those in General Guidelines

Get your environment ready

You'll need a linux machine with the ability to run vms.

  1. Install Ansible (Any version above 1.8 and below 2.0 should be fine).
  2. Install Vagrant.
  3. Install VirtualBox.
  4. Mirror this git repo using the instructions here. Then clone it locally. (Please DO NOT fork the repo)
  5. Run vagrant up base and make sure you can ssh into the machine using vagrant ssh base.
  6. Inside the vm execute nodejs /tmp/bamboo-app/bamboo.js.
  7. Open your browser, go to http://localhost:8080, you should get some information about how much we love bamboo.

Ready for action?

Great.
Your project is simple, as a DevOps panda you need to have the ability to develop nanoservices and create a mechanism for deploying them.
Below, you can find the description of your tasks.

NodeJS/Python services

Create two basic NodeJs/Python services, the first is panda-service which should serve static files from a directory called resources. The directory should contain two files, small.png and medium.png. You may use any image that you like, as long as there is a panda over there.
The second service shall be called big-service, and should just maintain a counter of the amount of GET requests it served, and return it on every GET request it gets. A sample NodeJS service named bamboo-app already exists here

Deployment

Create an ansible role for each of the services. The role should install the service and make sure it's ready to be used in production (see General Guidelines). A sample role for bamboo-app already exists for your convenience. (Please note: samples are not full, and do not contain all relevant the details, you're expected to improve them, and add missing tasks). We understand there might be a short service downtime when re-deploying a service, that’s fine.

Wrapper

This part is a BONUS part, if you find this exercise simple and short, feel free to do it.
Create a simple utility for deploying both services. Your utility should support deploying a single service, or all of them.
Please make sure you have a decent --help in your script.

Deliverables

A GitHub Pull-Request to YOUR DUPLICATED REPO, containing:

  1. The code for both big-service and panda-service.
  2. Ansible roles which takes care of provisioning both services.
  3. Modified base.yml which install ONLY the newly written services on the base VM.
  4. BONUS A wrapper script on top of ansible-playbook which deploys the latest version of those services.

The Pull-Request should contain a short description of the roles you created, and any other comment you’d like us to know of.

General Guidelines

Your code should be as simple as possible, yet well documented and robust.
Spend some time on designing your solution. Think about operational use cases from the real world. Few examples:

  1. Can you run the playbook multiple times without any problem?
  2. What happens if a service crashes?
  3. How much effort will it take to create a new service?

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published