Last active
August 29, 2015 14:20
-
-
Save nickithewatt/f431a46d155449a5c6d8 to your computer and use it in GitHub Desktop.
Initial fixes for Jellyfish bootstrap issues with puppet ref https://github.com/projectjellyfish/puppet-jellyfish/issues/4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Bash automated instructions as per here https://github.com/projectjellyfish/puppet-jellyfish | |
# with some corrections | |
set -e | |
# 0. Verify if this has been done before, for now do it once | |
if [ -d /tmp/puppet/modules/jellyfish/ ]; then | |
echo "Initial jellyfish puppet download and verification - already complete" | |
exit 0 | |
fi | |
echo "Doing initial jellyfish puppet download and verification" | |
# 2. Create a puppet module and manifests folder under the /tmp directory | |
mkdir -p /tmp/puppet/modules | |
mkdir -p /tmp/puppet/manifests | |
# 3. Create a puppet site.pp, this will be the attributes file and contains | |
# the run_list, run the commands below | |
cat <<EOF > /tmp/puppet/manifests/site.pp | |
class { "jellyfish": } | |
EOF | |
# 4. Install dependencies: | |
cd /tmp/puppet/modules | |
puppet module install puppetlabs-postgresql --modulepath=/tmp/puppet/modules/ | |
puppet module install puppetlabs-apt --modulepath=/tmp/puppet/modules/ | |
puppet module install puppetlabs-concat --modulepath=/tmp/puppet/modules/ | |
puppet module install puppetlabs-git --modulepath=/tmp/puppet/modules/ | |
puppet module install jdowning-rbenv --modulepath=/tmp/puppet/modules/ | |
puppet module install puppetlabs-stdlib --modulepath=/tmp/puppet/modules/ | |
puppet module install puppetlabs-vcsrepo --modulepath=/tmp/puppet/modules/ | |
puppet module install maestrodev-wget --modulepath=/tmp/puppet/modules/ | |
# 5. Download and extract the manifests | |
sudo wget --output-document master.tar.gz https://github.com/projectjellyfish/puppet-jellyfish/archive/master.tar.gz | |
sudo tar xvfz master.tar.gz | |
sudo rm master.tar.gz | |
sudo mv puppet-jellyfish-master/ jellyfish |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# # vi: set ft=ruby : | |
require 'fileutils' | |
Vagrant.require_version ">= 1.6.5" | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
# -------------------------- JELLY FISH ----------------------------- # | |
config.vm.define "jellyfish_box_2" do |jellyfish_server| | |
jellyfish_server.vm.box_url = "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-6.5_chef-provisionerless.box" | |
jellyfish_server.vm.box = "opscode-centos-6.5" | |
config.vm.provider :virtualbox do |vb| | |
vb.customize ["modifyvm", :id, "--memory", "2048"] | |
vb.name = "jellyfish-2" | |
end | |
jellyfish_server.vm.hostname = "jellyfish-2" | |
jellyfish_server.vm.network :private_network, ip: "192.168.78.80" | |
jellyfish_server.vm.network :forwarded_port, guest: 22, host: 2280 | |
# Enable shell provisioning to bootstrap puppet and jellyfish puppet | |
jellyfish_server.vm.provision :shell, :path => "centos_6_x.sh" | |
jellyfish_server.vm.provision :shell, :path => "vagrant_jellyfish_puppet_bootstrap.sh" | |
# Then ... for now ... manually run puppet apply on the box | |
# vagrant ssh | |
# cd /tmp/puppet | |
# sudo puppet apply --modulepath=/tmp/puppet/modules/ -e "include jellyfish" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment