Skip to content

Instantly share code, notes, and snippets.

@sebboh
Last active August 29, 2015 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sebboh/1f775f95ffb6cdd709de to your computer and use it in GitHub Desktop.
Save sebboh/1f775f95ffb6cdd709de to your computer and use it in GitHub Desktop.
helloworld.sh
#!/bin/bash
# Slack operations challenge, part 1
# Author: Steve Chen
# This script installs Chef via the omnibus installer and git
# then clones and runs the slack_helloworld_cookbook which
# installs the project dependencies and "deploys" Hello World
# to the server
CHEF_VERSION='12.0.1'
CHEF_OMNIBUS_INSTALLER_URL='https://www.chef.io/chef/install.sh'
CHEF_COOKBOOK_DIR='/var/chef/site-cookbooks'
SLACK_HELLOWORLD_COOKBOOK_URL='https://github.com/sebboh/slack_helloworld_cookbook.git'
CHEF_SOLO_CMD='/usr/bin/chef-solo'
apt-get update
curl -L ${CHEF_OMNIBUS_INSTALLER_URL} | bash -s -- -v ${CHEF_VERSION}
apt-get install -y git
mkdir -p ${CHEF_COOKBOOK_DIR}
git clone ${SLACK_HELLOWORLD_COOKBOOK_URL} ${CHEF_COOKBOOK_DIR}/helloworld
${CHEF_SOLO_CMD} -o helloworld
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment