Website - A Hedge-Ops DevOps Project
This project is inspired by Hedge-Ops. The full blog post can be found here: DevOps Project.
Phase 1: Simple Website
- Create an account on https://github.com/
- Create a repository named
website
on Github - Clone your
website
repository locally using your terminal (Terminal on a mac or PowerShell on windows) - Create a branch called
feature_index
- Add an
index.html
to the branch that saysHello, World!
in the text. You’ll want to make the change with Visual Studio Code - Check that in
- Create a pull request for your branch to be merged into
master
- Merge your pull request into
master
after it’s approved
Phase 2: Simple Webserver
- Create an account on Azure and activate free trial
- Create an ubuntu virtual machine on Azure
- SSH to that machine
- Set up nginx on the machine
- Clone your git repository to
/var/www/html
on the server - Using the public ip assigned to your ubuntu server, access the website
Resources
Phase 3: Deploy a Change
- Create a new branch on your repository named
feature_myname
- Update
index.html
to say “Hello, Michael!” - Create a pull request, get it reviewed, and merge it
- On your webserver, update your
index.html
file from GitHub.
Phase 4: Create a Chef Cookbook to Automate Machine Setup
- On GitHub create a repository called
my_website
- Clone that repository locally and switch to a branch called
feature_nginx
- Set up
nginx
using the package resource - Use Test Kitchen to make sure your cookbook installs the package. Use kitchen with a Policyfile. There will be a
Policyfile.rb
in the cookbook that defines your run list if you’re doing this right. - Write an Inspec Test that ensures the package is installed
- Create a PR and get it merged
- Create another branch called
feature_website
- Using the git resource clone your repository on GitHub
- Write another inspec test to make sure that the website is served when you go to
http://localhost
and that the contents contain “Hello, Michael!” - Make sure that
kitchen test
works - Create a Pull Request and Merge into master