tripleo-ci/scripts/deploy-server.sh
Emilien Macchi fb59994a73 Remove EPEL usage
Puppet OpenStack CI and RDO CI doesn't need EPEL, so this patch removes
EPEL dependency in TripleO CI.

Change-Id: I7adebb9ff6b544289bb138b5aa8736f0ded0da49
Depends-On: I91b070324eb39af351c2304e6786c395509d08dc
Depends-On: Iceff0d5bedd9816adfd2990970e7c216b67b6bd0
2016-09-12 18:20:58 +00:00

30 lines
1.1 KiB
Bash

#!/bin/bash
# bootstrap a tripleo-ci infrastructure server, this selects which puppet manifest
# to run based on the hostname e.g. to create a mirror server then one can simply
# nova boot --image <id> --flavor <id> --user-data scripts/deploy-server.sh --nic net-id=<id> --nic net-id=<id>,v4-fixed-ip=192.168.1.101 mirror-server
yum install -y puppet git
echo puppetlabs-apache adrien-filemapper | xargs -n 1 puppet module install
git clone https://github.com/puppetlabs/puppetlabs-vcsrepo.git /etc/puppet/modules/vcsrepo
if [ -e /sys/class/net/eth1 ] ; then
echo -e 'DEVICE=eth1\nBOOTPROTO=dhcp\nONBOOT=yes\nPERSISTENT_DHCLIENT=yes\nPEERDNS=no' > /etc/sysconfig/network-scripts/ifcfg-eth1
ifdown eth1
ifup eth1
fi
CIREPO=/opt/stack/tripleo-ci
mkdir -p $CIREPO
git clone https://git.openstack.org/openstack-infra/tripleo-ci $CIREPO
if [ -f $CIREPO/scripts/$(hostname)/$(hostname).sh ] ; then
bash $CIREPO/scripts/$(hostname)/$(hostname).sh
fi
if [ -f $CIREPO/scripts/$(hostname)/$(hostname).pp ] ; then
puppet apply $CIREPO/scripts/$(hostname)/$(hostname).pp
fi