diff --git a/TUTORIAL.md b/TUTORIAL.md index f092ca82..befdc534 100644 --- a/TUTORIAL.md +++ b/TUTORIAL.md @@ -1,65 +1,84 @@ # Tutorial -## Deutsche Telekom AG +If you start with chef for the first time, we advise you to use a virtual machine for testing. -### Debian / Ubuntu +## Debian / Ubuntu for testing with ChefDK -1. Install ruby +1. Install [ChefDK client](https://www.chef.io/download-chef-client/) - apt-get install ruby1.9.1-full +We recommend to use Chef client in production environments instead of the ChefDK -2. Install chef +```bash +apt-get install -y wget +wget https://opscode-omnibus-packages.s3.amazonaws.com/ubuntu/12.04/x86_64/chefdk_0.3.5-1_amd64.deb +dpkg -i chefdk_0.3.5-1_amd64.deb +``` - gem1.9.1 install chef +3. Download the chef cookbook -3. May be you have to adjust the `$PATH` variable +```bash +apt-get install git +git clone https://github.com/TelekomLabs/chef-os-hardening.git chef-os-hardening +``` - export PATH=$PATH:/var/lib/gems/1.9.1/bin/ +4. Download cookbook dependences with [Berkshelf](http://berkshelf.com/) -4. Download the chef cookbook +```bash +cd chef-os-hardening +berks vendor ../cookbooks +cd .. +mv chef-os-hardening/ cookbooks/os-hardening +``` - git clone ......./chef-os-hardening - -5. Move hardening to `cookbooks` - - mkdir cookbooks - mv chef-os-hardening cookbooks/os-hardening - -6. Download some dependences for the os-hardening cookbook - - cd cookbooks - git clone https://github.com/onehealth-cookbooks/sysctl - git clone https://github.com/opscode-cookbooks/apt.git - git clone https://github.com/opscode-cookbooks/yum.git - git clone https://github.com/opscode-cookbooks/ohai.git - cd .. - -7. Create `solo.rb` +5. Create `solo.rb` This file is used to specify the configuration details for chef-solo. So create a `solo.rb` that include the `cookbook_path`. - cookbook_path "cookbooks" +```bash +cat > solo.rb < solo.json <