Skip to content

antoniogomezalvarado/devops-exercise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 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 implement 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. Make sure you have python 2.7 installed. (Ubuntu 14.04 is highly recommended).
  2. Install Ansible (version 2.1).
  3. Install Vagrant.
  4. Install VirtualBox.
  5. Mirror this git repo using the instructions here. Then clone it locally. (Please DO NOT fork the repo)
  6. Run vagrant up base and make sure you can ssh into the machine using vagrant ssh base.
  7. Inside the vm execute nodejs /tmp/bamboo-app/bamboo.js.
  8. Open your browser, go to http://localhost:8080, you should get some information about how much we love bamboo.

Important note: the infrastracture should work out of the box. There's no hidden part of the excersice in which you need to debug vagrant/virtualbox.

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 or Python services, the first is img-panda which should serve static files from a directory called resources. The directory should contain a random number of files. You may use any image that you like, as long as there is a panda over there. The service should return a random image on every GET request.

The second service shall be called smart-panda, and should just maintain a counter of the amount of POST 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, run it 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 img-panda and smart-panda.
  2. Ansible roles which takes care of provisioning both services on a VM called base.
  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.

PLEASE make sure your Pull Request contains all the requirments above, and doesn't contain any code you didn't change.

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? D.R.Y!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages