Skip to content

Instantly share code, notes, and snippets.

@rickerc
Last active November 28, 2016 06:23
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save rickerc/9836426 to your computer and use it in GitHub Desktop.
Save rickerc/9836426 to your computer and use it in GitHub Desktop.
#!/bin/bash
#
# assumption is starting with a generic minimal install of Ubuntu trusty
#
# this will install an all_in_one using puppetry from a Cisco repo;
# OpenStack packages come from a separate Cisco repo while other packages come from Ubuntu trusty
echo "i.0 is released. Use normal install processes instead"
exit 254
# general cleanup - kill any repos and puppet cobbler may have added
rm -f /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
# temp bug fixes / workarounds before install
#
# https://bugs.launchpad.net/openstack-cisco/+bug/1322012 - ml2 issues
mkdir -p /usr/share/puppet/modules
cd /usr/share/puppet/modules
git clone -b icehouse https://github.com/CiscoSystems/puppet-neutron neutron
cd neutron
wget -qO- https://github.com/CiscoSystems/puppet-neutron/pull/2.diff | patch -p1
cd /root/puppet_openstack_builder
sed -i '/neutron$/d' modules.list
wget -qO- https://github.com/CiscoSystems/puppet_openstack_builder/pull/98.diff | patch -p1
sed -i 's/^#disableml2: false/disableml2: true/g' data/hiera_data/user.common.yaml
# 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
# temp fixes / workarounds after install
#
# 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment