Contents

03) Launch Monitor VM

@announce

In order to launch a Zenoss server As a admin/developer I want to define the Chef configuration via executable features

Background:

  • Given the Chef root directory "/tmp/chef" exists
  • And the state of VM "chef" is "running"
  • And I switch Vagrant environment
  • And the Chef root directory "/tmp/monitor" exists
  • And the state of VM "monitor" is not "running"

Scenario: Download Cookbooks from one Cookbooks URI

  • Given the remote Cookbooks URI "git://github.com/cookbooks/"
  • When I clone the Cookbooks:
    cookbookbranchtagrefdestination
    aptmastermonitor/cookbooks/apt
    opensshmaster9a8ce8ce44monitor/cookbooks/openssh
    opensslmastermonitor/cookbooks/openssl
    yummastermonitor/cookbooks/yum
  • And these local Cookbooks exist:
    cookbook
    apt
    openssh
    openssl
    yum
  • Then I place all in "monitor" in "/tmp/monitor"

Scenario: Download Site-Cookbooks from another Cookbooks URI

  • Given the remote Cookbooks URI "git@github.com:hedgehog/"
  • When I clone the Cookbooks:
    cookbookbranchdestination
    zenossqamonitor/site-cookbooks/zenoss
  • And these local Cookbooks exist:
    site-cookbook
    zenoss
  • Then I place all in "monitor" in "/tmp/monitor"

Scenario: Load Roles from Cookbooks

  • Given the Chef root directory "/tmp/monitor" exists
  • And a Cookbooks path "/tmp/monitor/cookbooks/"
  • And a Cookbooks path "/tmp/monitor/site-cookbooks/"
  • And the Knife file "/tmp/monitor/.chef/knife.rb"
  • When I load the Roles:
    site-cookbookrole
    zenossClass_Server-SSH-Linux.rb
    zenossClass_Server-SSH-Linux-MySQL.rb
    zenossLocation_Austin.rb
    zenossLocation_Seattle.rb
    zenossZenossServer.rb
  • Then these Roles exist:
    role
    ServerSSHLinux
    ServerSSHLinuxMySQL
    Austin
    Seattle
    ZenossServer

Scenario: Load Data Bag from Cookbooks

  • Given the Chef root directory "/tmp/monitor" exists
  • And a Cookbooks path "/tmp/monitor/cookbooks/"
  • And a Cookbooks path "/tmp/monitor/site-cookbooks/"
  • And I create the Data Bag "users"
  • When I add these Cookbook Data Bag items:
    site-cookbookdata_bagitem
    zenossusersZenoss_User.json
    zenossusersZenoss_Readonly_User.json
  • Then these Data Bags exist:
    data_bag
    users
  • And these Data Bags contain:
    data_bagitem
    usersreadonly
    userszenossadmin

Scenario: Build Node Run Lists

  • Given the Chef root directory "/tmp/monitor" exists
  • And the Node "monitor" exists
  • When I add these Roles to the Nodes:
    noderole
    monitorZenossServer

Scenario: Upload the Cookbooks

  • Given the Chef root directory "/tmp/monitor" exists
  • When I load the Cookbooks:
    cookbooksite-cookbook
    apt
    openssh
    openssl
    zenoss
    yum
  • Then these remote Cookbooks exist:
    cookbooksite-cookbook
    apt
    openssh
    openssl
    zenoss
    yum

Scenario: Launch the Vagrant VM Monitor

@cosmic

  • Given the state of VM "monitor" is not "running"
  • And the Chef root directory "/tmp/monitor" exists
  • And the Vagrantfile "/tmp/monitor/Vagrantfile" exists
  • When I launch the VM "monitor"
  • Then the state of VM "monitor" is "running"

Source: features/chef_examples/zenoss_example/03_monitor_chef_setup.feature at commit efec2546, Cuken (Apache-2.0 license).