Everything you need for development work on the Orion stack.
0.1.0
- Vagrant >= 1.5
- Oracle VirtualBox
- ChefDK >= 0.4.0
- Ruby >= 1.9.3
- XQuartz (if using Mac OS X)
-
Clone the vagrant project:
$ git clone git@github.com:G5/g5-orion-vagrant.git $ cd g5-orion-vagrant
-
Execute the setup script:
$ ./bin/setup.rb
NOTE: the vagrant-berkshelf plugin requires the version of Berkshelf
distributed with ChefDK, not the berkshelf gem. If you previously installed
berkshelf as a stand-alone gem, you will receive a warning while running the
setup script, and errors when you run vagrant up
. In order to use this
project, you can either uninstall the berkshelf gem, or you can run all
Vagrant commands through chef exec (e.g. chef exec vagrant up
).
To start up the Vagrant VM:
$ vagrant up
To SSH to the Vagrant VM:
$ vagrant ssh
To suspend/resume a Vagrant VM:
$ vagrant suspend
$ vagrant resume
To destroy the Vagrant VM (it will be rebuilt the next
time vagrant up
is executed):
$ vagrant destroy
For more information, see the Vagrant documentation.
The github repos listed in projects.yml
(or projects-override.yml
)
will be mounted under the root directory (/
) in the VM.
$ ls -l /
...
drwxr-xr-x 28 502 dialout 952 Mar 11 00:48 g5-client-app-creator
drwxr-xr-x 28 502 dialout 952 Mar 11 00:48 g5-configurator
drwxr-xr-x 32 502 dialout 1088 Mar 9 19:15 g5-content-management-system
drwxr-xr-x 35 502 dialout 1190 Mar 11 00:42 g5-hub
drwxr-xr-x 25 502 dialout 850 Mar 11 00:48 g5-layout-garden
drwxr-xr-x 25 502 dialout 850 Mar 11 00:48 g5-phone-number-service
drwxr-xr-x 23 502 dialout 782 Mar 11 00:48 g5-pricing-and-availability-service
drwxr-xr-x 28 502 dialout 952 Mar 11 00:48 g5-sibling-deployer
drwxr-xr-x 24 502 dialout 816 Mar 11 00:48 g5-theme-garden
drwxr-xr-x 31 502 dialout 1054 Mar 11 00:48 g5-widget-garden
...
The code for the Vagrant project itself (this repository) will be mounted
at /vagrant
.
All non-gem prerequisites (e.g. postgresql) are installed by Chef during the provisioning process, but you'll still have to perform the db setup and install gems for each project yourself. Postgresql is already set up with a user named 'vagrant' (no password). For example:
$ cd /g5-hub
$ gem install bundler
$ bundle install
$ cp config/database.yml.example config/database.yml
# Edit the database.yml for the vagrant user
$ bundle exec rake db:setup
Each project contains more specific documentation on how to set up your development environment.
- Maeve Revels / @maeve
- Jessica Suttles / @jlsuttles
- Fork it
- Set up your cookbook development environment
- Create your feature branch (
git checkout -b my-new-feature
) - Update cookbook implementation as needed.
- Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new pull request
If you find bugs, have feature requests or questions, please file an issue.
- Clone the repository locally:
$ git clone git@github.com:G5/g5-orion-vagrant.git
$ cd g5stack
- Install required cookbooks using Berkshelf:
$ chef exec berks install
- Provision an instance for development using test-kitchen:
$ chef exec kitchen converge
See chef exec kitchen help
for more test-kitchen commands.
The unit tests use ChefSpec,
and live in the test/unit
directory. To execute the unit tests:
$ chef exec rspec
To run the foodcritic linting tool:
$ chef exec foodcritic .
The integration tests use ServerSpec, and live
in the test/integration/default/serverspec
directory. To execute
the test suite without re-provisioning:
$ chef exec kitchen verify
To execute the full integration test run (environment setup and convergence, test verification, and environment teardown):
$ chef exec kitchen test
-
Update the version in the README and CHANGELOG, and metadata.rb, following the guidelines of semantic versioning.
-
Tag the code with the latest version:
$ git tag -a v0.1.0 -m "Use g5stack base box" $ git push --tags
Copyright (c) 2014 G5
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.