Getting started with local development

SNworks uses Vagrant and VirtualBox to provide local development environments for custom template and plugin development.

Note: Local development environments have only been tested and verified on Linux and MacOS. Environments should function on Windows, but have not been tested.

Requirements:

A few things to keep in mind:

  • Local dev environments use local databases, this makes it difficult to share data sources collaboratively.
  • Media handling is limited to photos, PDFs and audio. Video processing will not function.
  • Media is stored locally - if you destroy the virtual machine, the media will be lost.
  • Local environments do not have access to remote storage, email processing, CAPTCHA handling or geocoding services (for security reasons).
  • While you will have full access to the Gryphon3-Transitional system (includes some improvements from Gryphon4), the current admin interface is Gryphon3.
  • Your repository is a forked version of SNworks main client repository for your site. As such, you won't be able to update your site directly - you'll need to contact support pull your changes in.

Setup:

After installing Vagrant, VirtualBox and Xcode, start by opening up your Terminal (in /Applications/Utilities in MacOS).

First, clone your repository:

$] git clone git@bitbucket.org:statenews/MYREPO.git

Then, install the necessary vagrant plugins:

$] vagrant plugin install vagrant-berkshelf
$] vagrant plugin install vagrant-omnibus
$] vagrant plugin install vagrant-triggers

Finally, start Vagrant

$] vagrant up

Vagrant will download our pre-packaged box, then start Chef to provision and install the necessary packages. Once it has finished it will automatically open a browser window and connect to your site at:

http://localhost:8080

Stopping Vagrant:

You can stop Vagrant with:

$] vagrant halt

This will stop your virtual machine, but keep all the data.

If you need to completely start over, use:

$] vagrant destroy

Updating your virtual machine:

SNworks will release updates to the virtual machine as we continue to improve Gryphon and work toward a full Gryphon4 release. As we are not using Vagrant's box management service the only way to update your box is by removing and reinstalling it:

$] vagrant box remove snworks/gryphon_deploy
$] vagrant box add https://s3.amazonaws.com/static.getsnworks.com/vagrant/gryphon_deploy.box --name=snworks/gryphon_deploy
Have more questions? Submit a request

Comments

Powered by Zendesk