Coder Social home page Coder Social logo

cookbooks's Introduction

HG Cookbooks

HG cookboks for Ubuntu/Debian servers provisioning.

Prerequisites

Available cookbooks

  • hg_development - Development tools setup
  • hg_rails - Rails stack setup (Ruby, RoR, database, dotenv)
  • hg_server - Server setup (creating users, deployment keys, MySQL, Redis etc.)

Berkshelf

sample Berskfile file:

# knife solo data bag edit synerise_mailers secrets

source "https://api.berkshelf.com"

cookbook "hg_server", git: '[email protected]:Synerise/cookbooks.git', rel: "hg_server/",           tag: "1.0.1"
cookbook "hg_rails", git: '[email protected]:Synerise/cookbooks.git', rel: "hg_rails/",             tag: "1.0.1"
cookbook "hg_development", git: '[email protected]:Synerise/cookbooks.git', rel: "hg_development/", tag: "1.0.1"

Useful commands

knife solo cook username@host --why-run - will explain what would be changed in actual run

Sample setup on Vagrant

  1. Get server that you would like to configure, for case of this example we will assume that you will use Vagrant machine (sample Vagrantfile is present here in the repository). Make sure it is running.
  2. Add to existing Gemfile or create new with following:
source "https://rubygems.org"

gem 'chef' # you can add require: false in all of these if you wish
gem "knife-solo"
gem "knife-solo_data_bag"
gem "berkshelf"
  1. Run bundle install
  2. Run bundle exec knife solo init ./chef/
  3. Create Berskfile file within ./chef/ directory (example content is presented above)
  4. Within ./chef/nodes create json file connected with node that you wish to provision. For Vagrant example it is 127.0.0.1.json. Within run_list key specify array of recipes to be run and of course specify all required node params and data_bags for provisioning (it depends on cookbook you will be using).
  5. Run knife solo prepare [email protected] -p 2222 to install Chef on server (2222 port is internal setting of Vagrant)
  6. Finally run knife solo cook [email protected] -p 2222

cookbooks's People

Contributors

jadrol avatar mbalus avatar knarewski avatar

Watchers

James Cloos avatar  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.