Giter Site home page Giter Site logo

hdo-puppet's Introduction

"Holder de Ord" VM setup repository

Build Status

Installing Vagrant

Full tutorial about Vagrant can be found at http://devops.me/2011/10/05/vagrant/

$ sudo apt-get install vagrant

or:

$ [sudo] gem install vagrant

Note that the hdo-devel VM image requires at least Virtualbox 4.1.16. For installation instructions, see this link.

Bring up the VM instance

After the inital checkout of the repo, you need check out the required submodules:

$ git submodule init
$ git submodule update

After this, bringing up the VM is pretty simple (but can take some time depending on your hardware):

$ vagrant up

The first time you run this, Vagrant will download a pre-packaged VM image (hdo-devel.box).

On subsequent runs, this brings up the VM, sets up port forwarding/shared folders (as configured in the Vagrantfile), and provisions the VM with Puppet.

If you just want to provision an already running VM:

$ vagrant provision

Puppet code style

To ensure a consistent code style we use the puppet-lint tool. The lint.sh script included in the repo will lint only the modules we maintain, and is used on Travis CI.

The tool requires a Ruby install + the puppet-lint gem:

$ [sudo] gem install puppet-lint
$ ./lint.sh

Test the configuration

Check out the main website code repository:

$ git checkout https://github.com/holderdeord/hdo-site.git ../hdo-site

Bring up the VM instance:

$ vagrant up

Set up password-less logins as hdo user, which is needed for Capistrano deployment. The password for these commands is 'vagrant':

$ cat ~/.ssh/id_dsa.pub | ssh -p 2222 vagrant@localhost "cat > ./key; sudo mkdir -p /home/hdo/.ssh; sudo mv ./key /home/hdo/.ssh/authorized_keys; sudo chown -R hdo:hdo /home/hdo/.ssh"

Launch the installation of the actual hdo-site code:

$ cd ../hdo-site
$ bundle install
$ VAGRANT=1 cap deploy:setup deploy:cold # only needed first time
$ VAGRANT=1 cap deploy

The test script can do this for you. By default, it will destroy and recreate the VM, provision it, set up password-less login, and do a cold deploy of the app (assumed to be in ../hdo-site):

$ bin/test.sh

If you want to skip the re-creation of the VM (i.e you've already done a cold deploy):

$ DEPLOY_ONLY=1 bin/test.sh

Installation on production servers

UNTESTED, from Salve's earlier work:

$ wget http://apt.puppetlabs.com/puppetlabs-release_1.0-3_all.deb
$ dpkg -i puppetlabs-release_1.0-3_all.deb
$ apt-get update
$ apt-get install puppet git-core
$ git clone git://github.com/holderdeord/hdo-puppet.git
$ cd hdo-puppet
$ git submodule update --init
$ FACTER_mysql_root_password=t0ps3cret FACTER_mysql_hdo_password=s3cr3t puppet apply --modulepath=puppet/modules puppet/base.pp

Creating the Vagrant .box image

If you can find a vagrant base box on www.vagrantbox.es, then it's quite easy. Unfortunately, there is none available (at least as of July 2012), so I had to build a custom image based on Ubuntu 12.04 server LTS i386.

That's the image I was referring to earlier in this document when I talked about hdo-devel.box or hdo-devel.


FOLLOWING INFORMATION REFERS TO SQUEEZE, SO IT'S OUTDATED:

You can follow this tutorial: http://vagrantup.com/v1/docs/base_boxes.html

If you create a Virtualbox image named "HDO-Dev-Squeeze", you can recreate the vagrant .box image with the following commands:

$ vagrant box remove hdo-squeeze32 $ vagrant package --output ../hdo-squeeze32.box --base ~/VirtualBox\ VMs/HDO-Dev-Squeeze/HDO-Dev-Squeeze.vbox

...and then go to the Development VM image setup step above.

hdo-puppet's People

Contributors

jarib avatar cosimo avatar

Stargazers

Salve J. Nilsen avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.