Updates of slaves to EL7 38/21138/1
authorAndrew Grimberg <agrimberg@linuxfoundation.org>
Tue, 19 May 2015 22:33:48 +0000 (15:33 -0700)
committerAndrew Grimberg <agrimberg@linuxfoundation.org>
Tue, 19 May 2015 22:38:47 +0000 (15:38 -0700)
* 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 <agrimberg@linuxfoundation.org>
vagrant/basic-builder/bootstrap.sh
vagrant/basic-java-node/bootstrap.sh
vagrant/lf-networking/configure_lf_infra.sh
vagrant/rackspace-convert-base/bootstrap.sh

index c3a2eef2bf8dfc4805af1572147960e74f976239..24aed3c7b54cfa8de03aafce71afe7037d08a3e0 100644 (file)
@@ -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"
index 1ae6a2a33b47eaa019657b5eff5bdd8448744085..7cdb8125780cd46a14298e36c83b82784d896e91 100644 (file)
@@ -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
index ad4983059ec337b78b997f93ee00340c9cf4f534..6842655e3e4eaaeb0c6c41b1159855cc61b6d651 100644 (file)
@@ -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 <<EOL > /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 <<EOL >> /etc/rc.d/post-cloud-init
 #!/bin/bash
index 8079d7bc85e06b390b37b72ea60026b7fdbae762..15d47f68cd8bb3005c84358b545ff56bfba54835 100644 (file)
@@ -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