Add support for vendor customisations in install script
Currently apt repos are hardcoded to come from upstream ubuntu and the github account is hardcoded to stackforge. In order to support alternative distributions using this data model, this patch adds a variable called $vendor that can customise these according to a particular distributor's preference. Change-Id: Iba4353bc226b973ce1ad0c84e0f670b11f23bdf2
This commit is contained in:
@@ -157,4 +157,10 @@ Defaults for end user data should be located in one of the following files:
|
||||
/etc/puppet/data/hiera_data/user.common.yaml
|
||||
/etc/puppet/data/hiera_data/user.<scenario>.yaml
|
||||
|
||||
### Using a vendor modification
|
||||
|
||||
You can specify a vendor, which will change both the apt repository and the git repository the data defining the deployment is drawn from. Currently the only option is cisco, which can be set by:
|
||||
|
||||
export vendor=cisco
|
||||
|
||||
###Additional information on the data model being leveraged is available in the data directory of this repository.
|
||||
|
||||
46
install-scripts/cisco.install.sh
Normal file
46
install-scripts/cisco.install.sh
Normal file
@@ -0,0 +1,46 @@
|
||||
export vendor_repo=CiscoSystems
|
||||
export vendor_branch=coi-development
|
||||
|
||||
# Add Cisco repo
|
||||
cat > /etc/apt/sources.list.d/cisco-openstack-mirror_havana.list<<EOF
|
||||
# cisco-openstack-mirror_havana
|
||||
deb http://openstack-repo.cisco.com/openstack/cisco havana-proposed main
|
||||
deb-src http://openstack-repo.cisco.com/openstack/cisco havana-proposed main
|
||||
EOF
|
||||
|
||||
echo "-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
Version: GnuPG v1.4.11 (GNU/Linux)
|
||||
|
||||
mQENBE/oXVkBCACcjAcV7lRGskECEHovgZ6a2robpBroQBW+tJds7B+qn/DslOAN
|
||||
1hm0UuGQsi8pNzHDE29FMO3yOhmkenDd1V/T6tHNXqhHvf55nL6anlzwMmq3syIS
|
||||
uqVjeMMXbZ4d+Rh0K/rI4TyRbUiI2DDLP+6wYeh1pTPwrleHm5FXBMDbU/OZ5vKZ
|
||||
67j99GaARYxHp8W/be8KRSoV9wU1WXr4+GA6K7ENe2A8PT+jH79Sr4kF4uKC3VxD
|
||||
BF5Z0yaLqr+1V2pH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sZng+AgAnFogD90f3ByTVlNp
|
||||
Sb+HHd/cPqZ83RB9XUxRRnkIQmOozUjw8nq8I8eTT4t0Sa8G9q1fl14tXIJ9szzz
|
||||
BUIYyda/RYZszL9rHhucSfFIkpnp7ddfE9NDlnZUvavnnyRsWpIZa6hJq8hQEp92
|
||||
IQBF6R7wOws0A0oUmME25Rzam9qVbywOh9ZQvzYPpFaEmmjpCRDxJLB1DYu8lnC4
|
||||
h1jP1GXFUIQDbcznrR2MQDy5fNt678HcIqMwVp2CJz/2jrZlbSKfMckdpbiWNns/
|
||||
xKyLYs5m34d4a0it6wsMem3YCefSYBjyLGSd/kCI/CgOdGN1ZY1HSdLmmjiDkQPQ
|
||||
UcXHbA==
|
||||
=v6jg
|
||||
-----END PGP PUBLIC KEY BLOCK-----" | apt-key add -
|
||||
|
||||
# Fix puppet, clobbering any existing puppet version to ensure
|
||||
# we are using the puppet 3.2 we target
|
||||
dpkg --purge puppet puppet-common
|
||||
rm -rf /etc/puppet/puppet.conf /var/lib/puppet
|
||||
12
install-scripts/install.sh
Normal file → Executable file
12
install-scripts/install.sh
Normal file → Executable file
@@ -8,11 +8,18 @@ set -x
|
||||
set -e
|
||||
set -e
|
||||
|
||||
# Vendors can optionally include customisations
|
||||
# leaving this blank will use the community packages
|
||||
# and stackforge repositories
|
||||
export vendor_name="${vendor:-}"
|
||||
|
||||
# Master node or client (i.e., install puppet master or not)
|
||||
# defaults to true
|
||||
export master="${master:-true}"
|
||||
|
||||
if [ -n "${vendor_name}" ]; then
|
||||
source ./$vendor_name.install.sh
|
||||
fi
|
||||
|
||||
apt-get update
|
||||
apt-get install -y git apt rubygems puppet
|
||||
@@ -31,10 +38,13 @@ else
|
||||
echo "127.0.1.1 $(hostname).$domain $(hostname)" >> /etc/hosts
|
||||
fi;
|
||||
|
||||
export vendor_repo="${vendor_repo:-stackforge}"
|
||||
export vendor_branch="${vendor_branch:-master}"
|
||||
|
||||
# Install puppet_openstack_builder
|
||||
cd /root/
|
||||
if ! [ -d puppet_openstack_builder ]; then
|
||||
git clone https://github.com/stackforge/puppet_openstack_builder.git /root/puppet_openstack_builder
|
||||
git clone -b $vendor_branch https://github.com/$vendor_repo/puppet_openstack_builder.git /root/puppet_openstack_builder
|
||||
fi
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user