- 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.
- Download and install virtualbox.
- Download and install vagrant.
- Download virtualbox base image.
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.
- Get home task related files from folder
_hw#0. - 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)
- Analyze the health of the system. Note anything you find and fix if there are issues.
- Ensure apache is running. If is is not, diagnose and fix.
- You should be able to see a test page going here in your browser: http://localhost:8080/app
- 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)
- Install memcached
- Add a cronjob that runs /home/vagrant/exercise-memcached.sh once per minute
- Write your own vagrant file and provisioning scripts/configs that recreate everything you just did.
- 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.
- 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
Download and install minikube or setup kubernetes using Docker Desktop.
Probably all you heard about Nginx and Rambler story. Today you will try to implement stub page in support of Igor Sysoev
- Get home task related files from folder
_hw#1. - Learn the basics of how to use Minikube, configure and deploy kubernetes service with Nginx.
- Install Nginx as ingress controller. Nginx should be avialible on http://localhost:8080/
- Configure Nginx to made it show stub page instead of default web page on custom date.
- Add to header "Powered by nginx"
- Add the HTML-file nginx-blackout folder somewhere to the server (e.g. /var/www/nginx-blackout/index.html) Edit your root location in the nginx config to be like this:
location /nginx-blackout {
root /var/www;
break;
}
location / {
if ($time_iso8601 ~ ^2019-12-31T09:[0-2][0-9]:[0-9][0-9] ) {
return 302 /nginx-blackout;
}
# ... usual location config
}
- Check that it works with the current date.
- Prepare PR with your setup.
The mentor should be able to simply use your files, run kubectl create -f yourfile.yaml, and have your completed and fixed environment running for review.
Fork github repo
It's time to check whether you will to be in the camp! All you need is to deploy the app from the forked repo, but as usually you have to face some difficulties.
- Get the repo and run it locally. After the launch, just open the root route. You can use this command to launch the app:
rackup
