README.md in opskeleton-0.4.6 vs README.md in opskeleton-0.4.7

- old
+ new

@@ -12,11 +12,11 @@ * No clear development guidelines, for example extracting general modules and exporting them. See it in action [here](https://www.youtube.com/watch?v=LNlHC54Ej8c). -[![Build Status](https://travis-ci.org/narkisr/opskeleton.png)](https://travis-ci.org/narkisr/opskeleton) +[![Build Status](https://travis-ci.org/opskeleton/opskeleton.png)](https://travis-ci.org/opskeleton/opskeleton) Usage ========= Perquisites (on Ubuntu): @@ -55,28 +55,52 @@ Opskelaton defines a simple module life cycle: 1. Internal non reusable modules (usually specific to a client site) go under static-modules 2. If we create a general reusable module which is ready for prime time we pull out to a new git repository. - 3. The extracted module is added back as a third party (using [librarian-puppet](https://github.com/rodjek/librarian-puppet) module which reside under module folder. + 3. The extracted module is added back as a third party (using [librarian-puppet](https://github.com/rodjek/librarian-puppet) module which resides under modules folder. Life cycle scheme: <img src="https://raw.github.com/narkisr/vagrant-sketching-board/master/images/module-lifecycle-black.png" width='30%' hight='50%' alt="" /> -## Packaging +Creating new (static) modules is easy as: +```bash +$ opsk module foo +``` + +Each generated module will contain puppet-rspec with matching Rakefile (see [testing](https://github.com/opskeleton/opskeleton#testing)). + +## Testing + +Opskelaton supports two levels of testing: + +* Static module testing that includes rspec and linting. +* Integration testing using [serverspec](http://serverspec.org/) and Vagrant. + +```bash +# linting all static modules +$ rake lint +# rspecing +$ rake modspec +# running serverspec +$ rake spec +``` + +## Packaging Opskelaton fully supports deployment and portable execution of sandboxes on non Vagrant environments: ```bash $ opsk generate foo ubuntu-13.10 $ cd foo-sandbox # The package version file $ cat opsk.yaml --- version: '0.0.1' name: foo + # post bundle and gem install .. $ opsk package create pkg/foo-sandbox-0.0.1 create pkg/foo-sandbox-0.0.1/scripts create pkg/foo-sandbox-0.0.1/scripts/lookup.rb @@ -108,9 +132,29 @@ $ opsk deploy <bintray-repo> deployed foo-sandbox-0.0.1.tar.gz to http://dl.bintray.com/narkisr/<bintray-repo>/foo-sandbox-0.0.1.tar.gz ``` Make sure to [configure](https://github.com/narkisr/bintray-deploy#usage) configure the bintray API key. + +## Updating +Keeping you box up to date with latest opsk version is easy, just re-generate it again and resolve conflicts by answering y/n: +```bash +# Moving to latest opsk +$ gem update opskeleton +# foo box already exists +$ opsk generate foo <vagrant-box> + exist foo-sandbox + conflict foo-sandbox/Vagrantfile +Overwrite /home/ronen/code/foo-sandbox/Vagrantfile? (enter "h" for help) [Ynaqdh] +``` + +## Vagrant +Opskeleton generates a Vagrant file with couple of enhancements: + +* VAGRANT_BRIDGE (default eth0) for setting up public bridge on the go. +* PUPPET_ENV (default dev) for setting puppet environment. +* Puppet options preset to match modules and hiera folders. + # Copyright and license Copyright [2013] [Ronen Narkis] Licensed under the Apache License, Version 2.0 (the "License");