Atalanta / cucumber-chef

Framework for test-driven infrastructure development
http://cucumber-chef.org
Apache License 2.0
265 stars 55 forks source link

New Cuke Steps #95

Closed zpatten closed 11 years ago

zpatten commented 11 years ago

Since the docs are a bit out of date (we'll have them updated soon) I wanted to post about the new steps:

  Background:
    * I have a server called "users"
    * "users" is running "ubuntu" "lucid"
    * "users" should be persistent
    * "users" has been provisioned
    * all of the cookbooks in "./cookbooks" have been uploaded
    * all of the cookbooks in "./site-cookbooks" have been uploaded
    * the following environment has been uploaded:
      | environment | environment_path |
      | *.rb | ./environments/ |
    * the following roles have been updated:
      | role | role_path |
      | *.rb | ./roles/ |
    * the following databags have been updated:
      | databag | databag_path |
      | users | ./data_bags/users |
    * the "base" role has been added to the "users" run list
    * "users" is in the "staging" environment
    * the chef-client has been run on "users"
    * I ssh to "users" with the following credentials:
      | username | keyfile |
      | $lxc$ | $lxc$ |

To load all of your chef-repo cookbooks:

    * all of the cookbooks in "./cookbooks" have been uploaded

If you use librarian; load your site-cookbooks:

    * all of the cookbooks in "./site-cookbooks" have been uploaded

Push all of your chef-repo environments: (you can put any filename or glob in the "environment" table field to control loading singular items or multiple)

    * the following environment has been uploaded:
      | environment | environment_path |
      | *.rb | ./environments/ |

Push all of your chef-repo roles: (you can put any filename or glob in the "role" table field to control loading singular items or multiple)

    * the following roles have been updated:
      | role | role_path |
      | *.rb | ./roles/ |

Push all items in one of your chef-repo data bag:

    * the following databags have been updated:
      | databag | databag_path |
      | users | ./data_bags/users |

SSH macros; no more messing with keyfiles and usernames if you want to SSH in as the root user (the default LXC user). The $lxc$ macros are replaced with the appropriate username and keyfile for the LXC user defined in your config. Note you can not change this user after you setup your test lab. If you want to change this user you'll need to re-create your lab. Also changing of these users yet has not been fully tested as of yet; attempt at your own peril.

    * I ssh to "users" with the following credentials:
      | username | keyfile |
      | $lxc$ | $lxc$ |
pikesley commented 11 years ago

Can't believe I've not run up against this before, but here's the thing: can I set attributes on a node? I need to set "node['xml']['packages']" prior to the chef-client run. Am I missing something obvious?

pikesley commented 11 years ago

Oh no wait, I can use a role. Derp.

As you were.

zpatten commented 11 years ago

:-) On Feb 13, 2013 9:19 AM, "Sam Pikesley" notifications@github.com wrote:

Oh no wait, I can use a role. Derp.

As you were.

— Reply to this email directly or view it on GitHubhttps://github.com/Atalanta/cucumber-chef/issues/95#issuecomment-13505581.