Giter Site home page Giter Site logo

devops-challenge-e's Introduction

devops-challenge

A small coding challenge for our open devops position. This is intended to be completed independently, without consulting other developers or any Plotly employees. Consulting online references is fine! If you're really unsure about something, make an assumption and state it when you submit the pull request.

A partial solution...

Two playbooks are given. Production.yml deploys nginx with reverse proxy, using vars.yml and proxy.conf.tpl Development.yml deploys a regular nginx web server, using nginx.conf.tpl

No testing has been done yet. To test:

  • deploy two free-tier Ubuntu 14.04 VMs on gcp or aws
  • get static IPs of VMs, and replace -i "host" argument in playbook command
  • verify that placekitten.com loads static html from nginx served site /meow/
  • verify that development site loads static html at static IP

To deploy production nginx: /meow/ redirects to http://placekitten.com/

ansible-playbook -i "gcphost" -u root production.yml

To deploy development nginx

ansible-playbook -i "localhost" -u root development.yml

/////////////////////

Basic steps to complete this challenge:

  1. Fork this repo.
  2. Create and test your solution.
  3. Update this README to explain how to deploy to various environments with this solution.
  4. Open a pull request on our repo. Explain how you've tested it, and what further testing you feel would be needed before putting this into production. (We realize you may not have the servers set up to test this as much as you'd like in a reasonable amount of time.)

Requirements:

This repo uses Ansible to install and configure nginx to serve static content from a directory. The target host is expected to be running Ubuntu 14.04 (but other Ubuntu versions will likely work).

We need to add a reverse proxy to the site, but only for our production site. When the code is deployed on a development or test site, the reverse proxy should be disabled. The location /meow/ on the production site should proxy requests to http://placekitten.com/ .

Usage instructions:

To deploy to a machine, run:

ansible-playbook playbook.yml -i "HOST," --extra-vars="user=USER"

Replace HOST by the hostname or IP address, and USER by the username (must have sudo access).

For example, for a machine with IP 52.0.228.95 and a username of ubuntu:

ansible-playbook playbook.yml -i "52.0.228.95," --extra-vars="user=ubuntu"

Resources:

devops-challenge-e's People

Contributors

scjody avatar ted-strauss-k1 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.