Skip to content

Commit

Permalink
Merge pull request sivajavatechie#1 from chef-cft/ncjohnosn/update-in…
Browse files Browse the repository at this point in the history
…structions

Ncjohnosn/update instructions
  • Loading branch information
ncjohnson authored Apr 4, 2017
2 parents 76035a0 + cf0267d commit 1085872
Show file tree
Hide file tree
Showing 15 changed files with 178 additions and 430 deletions.
Binary file added .DS_Store
Binary file not shown.
Binary file not shown.
103 changes: 43 additions & 60 deletions Awesome_Appliance_Repair/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,81 +2,64 @@

[Awesome Appliance Repair](https://github.com/learnchef/Awesome-Appliance-Repair) is a sample web application written in Python. The application includes [instructions for installing and initializing the application](https://github.com/learnchef/Awesome-Appliance-Repair/blob/master/AARinstall.py) on Ubuntu using MySQL as the database and Apache as the web server.

You goal with this project is to transform [AARinstall.py](https://github.com/learnchef/Awesome-Appliance-Repair/blob/master/AARinstall.py) into one or more Chef recipes that will install and initialize the application.

## Objectives

Your goal with this project is to transform [AARinstall.py](https://github.com/learnchef/Awesome-Appliance-Repair/blob/master/AARinstall.py) into one or more Chef recipes that will install and initialize the application.

After successfully completing this workshop, you will be able to:

* Build something in Chef with very little guidance
* Write custom Chef recipes.
* Use the [Chef Documentation](http://docs.opscode.com) to identify and use resources that will help you model the desired state of your infrastructure.
* Include [guards](http://docs.getchef.com/chef/resources.html#guards) in Chef resources.
* Install and configure the Awesome Appliance Repair site using Chef.
* Use the [Chef Documentation](http://docs.chef.io) to identify and use resources that will help you model the desired state of your infrastructure.


## Pre-requisites

Before beginning you will need:

* A virtual machine or server running Ubuntu 12.04 or later
* Some experience using Chef such as:
* completing the exercises on [Learn Chef](http://learn.getchef.com)
* completing a Chef Fundamentals workshop
* completing the exercises on [Learn Chef](http://learn.chef.io/tutorials)
* completing a Chef Essentials workshop
* real-world experience working with Chef
* Chef DK or chef-client installed
* A text editor
* A version control system
* Chef DK or chef-client installed on your local workstation to develop and test your Chef code.
* A text editor (i.e. Atom, SublimeTest, VisualStudio Code)
* A version control system (i.e. Github)
* A virtual machine running Ubuntu 12.04 or later

## Instructions

* Use the ChefDK and text editor to develop and test your Chef code on your local workstation.
* Use the instructions provided in the file `aar.rb` and `AwesomeApplianceRepair.pdf` to construct your Chef cookbook that mirrors the installation instructions. Use the Chef Resources reference to find the most appropriate Chef Resources to use for each task. [Chef resources reference][https://docs.chef.io/resources.html]

* There are a couple of ways that you can write, test and run your cookbook.
* Using the steps outlined [here](https://learn.chef.io/tutorials/local-development/ubuntu/), write and test your cookbook locally using Vagrant + Virtualbox
* Use your Ubuntu 12.04 (or later) virtual machine. Write your cookbook in vim, nano or emacs, and run `chef-client` in `--local-mode`.

## Completion Criteria

You'll know this project is complete when:
Store your work in a Github repository.

* You can interact with the Awesome Appliance Repair application in a browser.
* You can run chef-client multiple times without failures.
* Your source code repository shows the history of your work.
You should be able to explain the following:

* Steps taken to achieve the end result.
* Build and test process of Chef code.
* Tools used in the process.

You'll know this project is complete when:

* Your Chef cookbook successfully compiles and executes on a target node.
* You can interact with the Awesome Appliance Repair site in a browser.
* You can run chef-client multiple times without failures.
* Your source code repository shows the history of your work.

## Next steps

You can take expand on this project a number of ways including:

* Testing
* Use [Test Kitchen](http://kitchen.ci) to validate your chef-client runs.
* Add static code analysis using [Rubocop](https://github.com/bbatsov/rubocop) and [Food Critic](foodcritic.io).
* Add [ChefSpec](http://sethvargo.github.io/chefspec/) tests.
* Add [Serverspec](http://serverspec.org/) tests.
* Add a continuous integration server, such as Jenkins
* Multi-tier implementation
* move the database to a separate node
* add a load balancer and additional web server
* Community Cookbooks - What cookbooks in the [Supermarket](http://supermarket.getchef.com) might help?
* Multi-OS support - what changes are required to deploy the application to CentOS?
* Cloud deployment
* Can you deploy this applicaiton to another infrastructure as a service environment? (AWS, Azure, Rackspace, Digital Ocean, etc.)
* Operationalize
* Add monitoring (nagios, sensu, etc.)
* Add central logging (splunk, logstash, etc.)
* Schedule database backups
* Add an additional database for replication (master / slave)
* Applicaiton Deployments
* How do you deploy updates to the Awesome Appliance Repair application?

## Examples of this project

Here are some examples of this project being implemented by other workshop participants. (See the "Contributing" section of the README for details on how to add your example.)

* Cut-n-paste the AARinstall.py into a recipe, comment everything, add Chef resources. [Nathen Harvey](https://github.com/nathenharvey/awesome_appliance_repair_chef/tree/round_00)
* Another working but not repeatable implementation. [John Fitzpatrick](https://github.com/johnfitzpatrick/aar)
* Chef to manage pre-requisites and then run the AARinstall.py. [Elon Bar-Evan](https://github.com/elon01/aar)
* A start with intentions on refactoring. [Chris Webber](https://github.com/cwebberOps/aar-cookbook)
* Starts from a [working](https://github.com/burtlo/chef-aar), but not repeatable implementation, all the way through to a solution with LWRP. Each further extension is defined on a separate branch and are represented as open [pull requests](https://github.com/burtlo/chef-aar/pulls). [Franklin Webber](https://github.com/burtlo/chef-aar)
* Work in progress from the hack day following the Chef Community Summit in London 2014 - [Nathen Harvey](https://github.com/nathenharvey/london-aar-chef)
* [Jose Luis Salas' work](https://github.com/josacar/chef-hack-day-london) following the Chef Community Summit in London 2014.

## To Do

* Add AARinstall.py scripts for additional operating systems
* CentOS
* Windows
* Reimplement Awesome Appliance Repair in different languages
* .NET
* Java
* Ruby on Rails
You can expand on this project a number of ways including:

* Testing
* Add [Inspec](http://inspec.io/) tests
* Add static code analysis using [Rubocop](https://github.com/bbatsov/rubocop) and [Food Critic](foodcritic.io)
* Add [ChefSpec](http://sethvargo.github.io/chefspec/) unit tests

* Utilize community cookbooks inside of your cookbook [Community Cookbooks](http://supermarket.chef.io)

The community has created cookbooks that accomplish similar goals. Select a group of resources, recipe, or cookbook and replace it with the equivalent community cookbook.
Binary file removed InSpec/InSpec_Workshop.pdf
Binary file not shown.
Binary file removed InSpec/InSpec_Workshop.pptx
Binary file not shown.
218 changes: 0 additions & 218 deletions InSpec/README.md

This file was deleted.

Loading

0 comments on commit 1085872

Please sign in to comment.