2017 © Pedro Peláez
 

silverstripe-module deploynaut-vagrant

Helps setting up a developer environment for silverstripe/deploynaut

image

silverstripe/deploynaut-vagrant

Helps setting up a developer environment for silverstripe/deploynaut

  • Friday, September 23, 2016
  • by stojg
  • Repository
  • 4 Watchers
  • 3 Stars
  • 1,688 Installations
  • Shell
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 6 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Vagrant / Ansible test bench

This is a SilverStripe module that provides an automated setup of a dev environment for the deploynuat module by using virtualbox, vagrant and ansible., (*1)

System requirements

On your development machine you will need:, (*2)

You can install ansible via pip:, (*3)

sudo pip install ansible

Installation

It is meant to be installed in a project that already have deploynaut installed, see the deploynaut installation instructions. Please note that you will not be required to install capistrano or php-resque, just the source code for the project., (*4)

Install this module to your current deploynaut project with composer:, (*5)

composer require --dev "silverstripe/deploynaut-vagrant:*"

Start the virtual machines from the root of the project from a terminal:, (*6)

VAGRANT_CWD=deploynaut-vagrant/ vagrant up

You can also only boot selected machines if you don't need the complete environment:, (*7)

VAGRANT_CWD=deploynaut-vagrant/ vagrant up deploynaut prod

The purpose of using VAGRANT_CWD is that we need to run vagrant from the root folder of the project so that it can be mounted over shared volume into the virtual machine., (*8)

On vagrant up the vagrant will start three virtualbox machines and use ansible to install the necessary software for running one deploynaut site and two generic silverstripe sites., (*9)

Provisioned machines

Note the last octet of IP is reused as the last part of the forwarded HTTP port number., (*10)

deploynaut

  • SSH Access: VAGRANT_CWD=deploynaut-vagrant/ vagrant ssh deploynaut
  • hostname: deploynaut
  • Internal ip address: 10.0.1.2
  • http://localhost:8102/
  • http://localhost:5678/ (resque-web for debugging failing Resque workers)

uat

  • SSH Access: VAGRANT_CWD=deploynaut-vagrant/ vagrant ssh uat
  • hostname: uat
  • Internal ip address: 10.0.1.3
  • http://localhost:8103/

prod

  • SSH Access: VAGRANT_CWD=deploynaut-vagrant/ vagrant ssh prod
  • hostname: prod
  • Internal ip address: 10.0.1.4
  • http://localhost:8104/

rep1

  • SSH Access: VAGRANT_CWD=deploynaut-vagrant/ vagrant ssh rep1
  • hostname: uat
  • Internal ip address: 10.0.1.5
  • http://localhost:8105/

rep2

  • SSH Access: VAGRANT_CWD=deploynaut-vagrant/ vagrant ssh rep2
  • hostname: prod
  • Internal ip address: 10.0.1.6
  • http://localhost:8106/

Detailed usage instructions

Step by step instructions to setup a fully working environment, (*11)

VAGRANT_CWD=ansible/ vagrant up

Go to the admin http://localhost:8102/admin/naut/, (*12)

The username and password is: admin / password, (*13)

Configure a git repository where needed, e.g. https://github.com/stojg/sandbox.dev.git, (*14)

You can click "Check connection", it should report "You appear to have all necessary dependencies installed", (*15)

Go to project/mytest and deploy to the selected environment. The site should be up now., (*16)

FAQ

Q: I have restarted (or vagrant reloaded) the deploynaut server and now it's not working!, (*17)

A: Resque might not have started. Rerun the provisioner by calling vagrant provision deploynaut., (*18)

The Versions

23/09 2016

dev-master

9999999-dev

Helps setting up a developer environment for silverstripe/deploynaut

  Sources   Download

BSD-3-Clause

module silverstripe vagrant deploynaut

05/06 2015

dev-docker

dev-docker

Helps setting up a developer environment for silverstripe/deploynaut

  Sources   Download

BSD-3-Clause

module silverstripe vagrant deploynaut