Skip to content

Instantly share code, notes, and snippets.

@pkilambi
Forked from rickerc/install_icehouse_cisco.sh
Created March 28, 2014 17:07
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 pkilambi/9837733 to your computer and use it in GitHub Desktop.
Save pkilambi/9837733 to your computer and use it in GitHub Desktop.
#!/bin/bash
#
# assumption is starting with a generic minimal install of Ubuntu trusty
# general cleanup - kill any repos and puppet cobbler may have added
rm /etc/apt/sources.list.d/*
apt-get update
apt-get remove --purge --yes puppet puppet-common
apt-get autoremove --purge --yes
# add our new puppet repo and get debs
wget -qO- http://openstack-repo.cisco.com/openstack/APT-GPG-KEY-Cisco-Puppet | apt-key add -
cat > /etc/apt/sources.list.d/cisco-openstack-puppet-mirror_icehouse.list<<EOF
# cisco-openstack-puppet-mirror_icehouse
deb http://openstack-repo.cisco.com/openstack/puppet icehouse-proposed main
deb-src http://openstack-repo.cisco.com/openstack/puppet icehouse-proposed main
EOF
apt-get update && apt-get dist-upgrade -y && apt-get install -y git
# get and fix puppet_openstack_builder
cd
git clone -b icehouse https://github.com/CiscoSystems/puppet_openstack_builder
cd puppet_openstack_builder
# for puppet repo stuff - separate repo for puppet modules -- now merged
#git fetch https://review.openstack.org/stackforge/puppet_openstack_builder refs/changes/02/81602/8 && git cherry-pick -x FETCH_HEAD
# drop rubygems
#git fetch https://review.openstack.org/stackforge/puppet_openstack_builder refs/changes/92/81892/1 && git cherry-pick -x FETCH_HEAD
sed -i 's,rubygems ,,' install-scripts/install.sh
sed -i 's,rubygems ,,' install-scripts/setup.sh
# drop supplemental repo
#git fetch https://review.openstack.org/stackforge/puppet_openstack_builder refs/changes/78/82078/1 && git cherry-pick -x FETCH_HEAD
sed -i 's,http://openstack-repo.cisco.com/openstack/cisco_supplemental,false,' data/hiera_data/enable_ha/true.yaml
sed -i 's,'\'http://openstack-repo.cisco.com/openstack/cisco_supplemental\'',false,' data/hiera_data/vendor/cisco_coi_common.yaml
# allow puppet-mysql 2.2 -- now merged
# git fetch https://review.openstack.org/stackforge/puppet_openstack_builder refs/changes/27/82127/2 && git cherry-pick -x FETCH_HEAD
# repo fixes
echo "coe::base::supplemental_repo: false" >> /root/puppet_openstack_builder/data/hiera_data/user.common.yaml
sed -i "s/pocket: ''/pocket: '-proposed'/" data/hiera_data/vendor/cisco_coi_common.yaml
sed -i 's/icehouse main/icehouse-proposed main/g' install-scripts/cisco.install.sh
# go, go, go!
cd install-scripts
export vendor=cisco
export scenario=all_in_one
./install.sh
# lots of ordering stuff to sort out still; run a few times to work around
puppet apply /etc/puppet/manifests/site.pp
puppet apply /etc/puppet/manifests/site.pp
puppet apply /etc/puppet/manifests/site.pp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment