Code Monkey home page Code Monkey logo

domashku's Introduction

DevOps Survival Camp: Winter 2020

How to submit your homework?

  • For passing any home task you need to fork this repo.
  • In your repo you need to create a folder named as your full name (Ivan_Ivanov)
  • Each home task should be done in a separate branch and in a separate folder under your named folder. For example, your first homework should be in (Ivan_Ivanov/0/).
  • If you think that the task is done - create pull request to master branch.
  • If everything is great - mentor will merge your PR.

HomeWork #0

Setup

  1. Download and install virtualbox.
  2. Download and install vagrant.
  3. Download virtualbox base image.

Summary

This test simulates real world problems a Dev/Ops Engineer may face and have to solve. You will have to learn how to use (potentially) new tools, diagnose system health issues, write some utilities, and automate the whole process to end up with a reproducible image.

At the end of this you should be able to send a new Vagrantfile and associated scripts/configs that will allow the mentor to recreate your completed and fixed test environment from the same base image provided in the test Vagrantfile.

Instructions

  1. Get home task related files from folder _hw#0.
  2. Learn the basics of how to use Vagrant, launch the vagrant VM, and login to it via SSH (Note: this will take some time to download the VM image the first time)
  3. Analyze the health of the system. Note anything you find and fix if there are issues.
  4. Ensure apache is running. If is is not, diagnose and fix.
  5. Reconfigure apache to run using HTTPS rather than HTTP. Any HTTP links should redirect to HTTPS.
    • You should be able to see the exact same test page as above by going here in your browser: https://localhost:8443/app
    • You will get an exception about an insecure connection due to the self-signed cert. Feel free to ignore this.
    • The redirection should work from the client's perspective. Do not worry about proper redirection from inside the VM. (Port 443 vs 8443)
  6. Install memcached
  7. Add a cronjob that runs /home/vagrant/exercise-memcached.sh once per minute
  8. Write your own vagrant file and provisioning scripts/configs that recreate everything you just did.
  9. Prepare PR with your new vagrant file with any associated provisioning scripts/configs.

The mentor should be able to simply use your files, run vagrant up, and have your completed and fixed environment running for review.

Optional task: Write a python web application that outputs memcached stats

  • Please try not use any 3rd party libraries outside of the python standard library.
  • It should additionally calculate the "get" hit rate and show it as a percentage ("X% of gets missed the cache")
  • It should additionally show the percentage of memcached memory used (From the API. Not the percentage of the OS memory.)
  • Don't worry about the look and style of the page. Just make it functional.
  • There is a basic python Flask app in /var/www/app you can use as a starting template

domashku's People

Contributors

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