From 316acf6c8c27d32813df77679a540b8e49b84037 Mon Sep 17 00:00:00 2001 From: Andrew Grimberg Date: Tue, 19 May 2015 15:33:48 -0700 Subject: [PATCH] Updates of slaves to EL7 * Merge commonalities into the rackspace-convert-base script. That makes the script more of a common setting bootstrap than just making sure vagrant operates properly on a system but that's fine as it squashes down our replication of code everywhere * Update the configure_lf_infra script to accept a few more variables and be more flexible * Update the basic-builder to get rid of the common code that moved into the rackspace-convert-base * Update basic-java-node to get rid of the common code that moved into the rackspace-convert-base. At present this effectively means that a basic-java-node could be produced by just the rackspace-convert-base and lf-networking vagrants as presently this vagrant is doing nothing but making sure packages are up to date which the lf-networking vagrant also does Change-Id: I473a532dbd728d9829ac53fdbca2923a34b825e0 Signed-off-by: Andrew Grimberg --- vagrant/basic-builder/bootstrap.sh | 31 ++---------------- vagrant/basic-java-node/bootstrap.sh | 21 ------------- vagrant/lf-networking/configure_lf_infra.sh | 29 +++-------------- vagrant/rackspace-convert-base/bootstrap.sh | 35 ++++++++++++++++++++- 4 files changed, 41 insertions(+), 75 deletions(-) diff --git a/vagrant/basic-builder/bootstrap.sh b/vagrant/basic-builder/bootstrap.sh index c3a2eef2bf..24aed3c7b5 100644 --- a/vagrant/basic-builder/bootstrap.sh +++ b/vagrant/basic-builder/bootstrap.sh @@ -3,38 +3,15 @@ # vim: sw=4 ts=4 sts=4 et tw=72 : yum clean all -# Add the ODL yum repo (not needed for java nodes, but useful for -# potential later layers) -yum install -q -y https://nexus.opendaylight.org/content/repositories/opendaylight-yum-epel-6-x86_64/rpm/opendaylight-release/0.1.0-1.el6.noarch/opendaylight-release-0.1.0-1.el6.noarch.rpm # Make sure the system is fully up to date yum update -q -y -# Add in git (needed for most everything) and XML-XPath as it is useful -# for doing CLI based CML parsing of POM files -yum install -q -y git perl-XML-XPath - -# install all available openjdk-devel sets -yum install -q -y 'java-*-openjdk-devel' - -# we currently use Java7 (aka java-1.7.0-openjdk) as our standard make -# sure that this is the java that alternatives is pointing to, dynamic -# spin-up scripts can switch to any of the current JREs installed if -# needed -alternatives --set java /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java -alternatives --set java_sdk_openjdk /usr/lib/jvm/java-1.7.0-openjdk.x86_64 - -# To handle the prompt style that is expected all over the environment -# with how use use robotframework we need to make sure that it is -# consistent for any of the users that are created during dynamic spin -# ups -echo 'PS1="[\u@\h \W]> "' >> /etc/skel/.bashrc - # The following packages are not needed by all projects, but they are # needed by enough to make them useful everywhere yum install -q -y @development perl-{Digest-SHA,ExtUtils-MakeMaker} \ ant {boost,gtest,json-c,libcurl,libxml2,libvirt,openssl}-devel \ - {readline,unixODBC}-devel + {readline,unixODBC}-devel yum-utils # tcpmd5 is wanting to do 32bit ARM cross-compilation and is specifically # requesting the following be installed (note the kernel headers are @@ -46,11 +23,9 @@ yum install -q -y glibc-devel.i686 kernel-headers # an EL6 system some of these packages are not availalble (or at the # wrong version) in publically available repositories as such this # should only really be done on an EL7 (or F18+) system -yum install -q -y {jansson,libevent,libevent2,libnl,libuuid}-devel \ - python-{devel,virtualenv,setuptools} +yum install -q -y {jansson,libevent,libnl,libuuid}-devel \ + python-{devel,virtualenv,setuptools,pip} -#get yum-config-manager -yum -q -y install yum-utils #The following is needed for the new code in vtn project. #these packages will enable C# compilation. rpm --import "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF" diff --git a/vagrant/basic-java-node/bootstrap.sh b/vagrant/basic-java-node/bootstrap.sh index 1ae6a2a33b..7cdb812578 100644 --- a/vagrant/basic-java-node/bootstrap.sh +++ b/vagrant/basic-java-node/bootstrap.sh @@ -3,29 +3,8 @@ # vim: sw=4 ts=4 sts=4 et tw=72 : yum clean all -# Add the ODL yum repo (not needed for java nodes, but useful for -# potential later layers) -yum install -q -y https://nexus.opendaylight.org/content/repositories/opendaylight-yum-epel-6-x86_64/rpm/opendaylight-release/0.1.0-1.el6.noarch/opendaylight-release-0.1.0-1.el6.noarch.rpm # Make sure the system is fully up to date yum update -q -y -# Add in git (needed for most everything) and XML-XPath as it is useful -# for doing CLI based CML parsing of POM files -yum install -q -y git perl-XML-XPath -# install all available openjdk-devel sets -yum install -q -y 'java-*-openjdk-devel' - -# we currently use Java7 (aka java-1.7.0-openjdk) as our standard make -# sure that this is the java that alternatives is pointing to, dynamic -# spin-up scripts can switch to any of the current JREs installed if -# needed -alternatives --set java /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java -alternatives --set java_sdk_openjdk /usr/lib/jvm/java-1.7.0-openjdk.x86_64 - -# To handle the prompt style that is expected all over the environment -# with how use use robotframework we need to make sure that it is -# consistent for any of the users that are created during dynamic spin -# ups -echo 'PS1="[\u@\h \W]> "' >> /etc/skel/.bashrc diff --git a/vagrant/lf-networking/configure_lf_infra.sh b/vagrant/lf-networking/configure_lf_infra.sh index ad4983059e..6842655e3e 100644 --- a/vagrant/lf-networking/configure_lf_infra.sh +++ b/vagrant/lf-networking/configure_lf_infra.sh @@ -9,7 +9,10 @@ yum install -y -q unzip xz # install some needed internal networking configurations yum install -y dnsmasq puppet -puppet module install lex-dnsmasq +# install specific versions of puppet modules +puppet module install puppetlabs-stdlib -v 4.5.1 +puppet module install puppetlabs-concat -v 1.2.0 +puppet module install lex-dnsmasq -v 2.6.1 # script requires information about subdomain if [ -z "$1" ]; then @@ -34,30 +37,6 @@ chattr +i /etc/resolv.conf # don't let cloud-init do funny things to our routing chattr +i /etc/sysconfig/network-scripts/route-eth0 -# create a docker bridge that doesn't trample our networks -# but only if docker is installed -DOCKER=`rpm -q docker-io` -if [ "$?" == "0" ]; then - echo "---> Docker installed, configuring docker bridge" - # fully overwrite the default, otherwise we end up with the options - # split over two lines which will fail - # Default: OPTIONS=--selinux-enabled - echo 'OPTIONS=--selinux-enabled --bip=10.250.0.254/24' > /etc/sysconfig/docker -# cat < /etc/sysconfig/network-scripts/ifcfg-docker0 -#DEVICE="docker0" -#TYPE="Bridge" -#ONBOOT="yes" -#NM_CONTROLLED="no" -#IPADDR=10.250.0.254 -#NETMASK=255.255.255.0 -#EOL - -# # don't let cloud-init do funny things to our docker bridge -# chattr +i /etc/sysconfig/network-scripts/ifcfg-docker0 - cat /etc/sysconfig/docker -fi - - # setup the needed routing cat <> /etc/rc.d/post-cloud-init #!/bin/bash diff --git a/vagrant/rackspace-convert-base/bootstrap.sh b/vagrant/rackspace-convert-base/bootstrap.sh index 8079d7bc85..15d47f68cd 100644 --- a/vagrant/rackspace-convert-base/bootstrap.sh +++ b/vagrant/rackspace-convert-base/bootstrap.sh @@ -1,6 +1,6 @@ #!/bin/bash -# vim: ts=4 sw=4 sts=4 et : +# vim: ts=4 sw=4 sts=4 et tw=72 : # Handle the occurance where SELINUX is actually disabled if [ `grep SELINUX=permissive /etc/selinux/config` ]; then @@ -26,3 +26,36 @@ fi yum clean all -q yum update -y -q + +# add in components we need or want on systems +yum install -y -q @base unzip xz puppet git perl-XML-XPath + +# All of our systems require Java (because of Jenkins) +# Install all versions of the OpenJDK devel but force 1.7.0 to be the +# default + +yum install -y -q 'java-*-openjdk-devel' +alternatives --set java /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java +alternatives --set java_sdk_openjdk /usr/lib/jvm/java-1.7.0-openjdk.x86_64 + +# To handle the prompt style that is expected all over the environment +# with how use use robotframework we need to make sure that it is +# consistent for any of the users that are created during dynamic spin +# ups +echo 'PS1="[\u@\h \W]> "' >> /etc/skel/.bashrc + +# Do any Distro specific installations here +echo "Checking distribution" +if [ `/usr/bin/facter operatingsystem` = "Fedora" ]; then + echo "---> Fedora found" + echo "No extra steps for Fedora" +else + if [ `/usr/bin/facter operatingsystemrelease | /bin/cut -d '.' -f1` = "7" ]; then + echo "---> CentOS 7" + echo "No extra steps currently for CentOS 7" + else + echo "---> CentOS 6" + echo "Installing ODL YUM repo" + yum install -q -y https://nexus.opendaylight.org/content/repositories/opendaylight-yum-epel-6-x86_64/rpm/opendaylight-release/0.1.0-1.el6.noarch/opendaylight-release-0.1.0-1.el6.noarch.rpm + fi +fi -- 2.36.6