chef on gentoo

by investopresto
17 deployments · 2 still active · last rev. 4 years ago

install chef-solo on gentoo so that chef can take over rest of the deployment

Compatible with: No distros currently supported
						#!/bin/bash

function bootstrap {
  emerge --sync

  echo "-ruby_targets_ruby19" >> /etc/portage/profile/use.mask
  echo 'RUBY_TARGETS="ruby19"' >> /etc/make.conf

  CONFIG_PROTECT_MASK="/etc/portage/" emerge --autounmask-write ruby:1.9
  emerge -uDN ruby:1.9 world

  emerge --prune
  emerge --depclean
  revdep-rebuild


  gem install chef ruby-shadow --no-ri --no-rdoc

  # <UDF NAME="CHEF_REPO_URL" LABEL="git URL for chef cookbooks">
  git clone "$CHEF_REPO_URL" /var/chef

  # <UDF NAME="NODE_URL" LABEL="URL for chef attributes(node.json)">
  /usr/local/bin/chef-solo -j "$NODE_URL"
}

bootstrap &> /var/log/stackscript.log