Giter Club home page Giter Club logo

hdo-puppet's Introduction

HDO server setup

Build Status

Getting started

You need Ruby/Rubygems installed. Then simply run:

$ script/bootstrap

To get familiar with our setup, look at the site directory.

Puppet code style

To ensure a consistent code style we use puppet-lint. This is also part of the Travis CI build.

To run syntax check + lint, use:

$ script/lint

Dependencies

Dependencies are managed using librarian-puppet.

To update a dependency, edit the Puppetfile, then run:

$ script/bootstrap

Note: After pulling down changes to the server running the puppetmaster, always run script/bootstrap and restart the puppetmaster (e.g. service puppetmaster restart).

Testing with Vagrant

Install Vagrant from [http://vagrantup.com]. We're using a multi-VM setup to more closely emulate the production environment. The VMs have their own node definitions, and can be brought up or destroyed independently:

$ vagrant up <name>
$ vagrant destroy <name>

E.g.

$ vagrant up ops
$ vagrant up app

Check out the Vagrantfile to see how the VMs are set up.

If you just want to provision an already running VM:

$ vagrant provision <name>

Deploying hdo-site to Vagrant

Check out the main website code repo:

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

Configure manifests/vagrant.pp with the necessary dependencies, then bring up the VM instance:

$ vagrant up app

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 [email protected] "cat > ./key; sudo mkdir -p /home/hdo/.ssh; sudo mv ./key /home/hdo/.ssh/authorized_keys; sudo chown -R hdo:hdo /home/hdo/.ssh"

Deploy hdo-site:

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

Production

Hiera

Hiera is configured using puppet-hiera, and stored in ./hiera. Secret variables use eyaml and can be edited using bin/eyaml edit hiera/secure.eyaml. To do this you need the private keys locally and configured in ~/.eyaml/config.yaml.

Setting up agent on a new server

As root:

$ wget http://apt.puppetlabs.com/puppetlabs-release-trusty.deb
$ dpkg -i puppetlabs-release-trusty.deb
$ apt-get update
$ apt-get install puppet ruby-full git-core build-essential
$ git clone https://github.com/holderdeord/hdo-puppet /opt/hdo-puppet
$ cd /opt/hdo-puppet
$ script/run-apply

If the first run fails, try a apt-get update and run it again.

hdo-puppet's People

Contributors

jarib avatar dyresen avatar petterreinholdtsen avatar cosimo avatar jonathanronen avatar

Stargazers

Angus H. avatar Oskars Gavriševs avatar Ole-Morten Duesund avatar  avatar Salve J. Nilsen avatar  avatar

Watchers

 avatar Ivar Refsdal avatar  avatar  avatar Arne Hassel avatar James Cloos avatar Henrik Helmers avatar Ingrid Odegaard avatar Kat Aquino avatar Jarand B avatar

Forkers

sjn cosimo dyresen

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.