X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=build%2Finstack.sh;h=3dfbf622b9e161bd30b998812120f42466e0a592;hb=011907b693481782cc3966f0f16355da1dd259df;hp=52384689d8595b5de1709ec7e206b27b16a518cf;hpb=5ee57264d1661ee8d89147bee50152fc40e01ff7;p=apex.git diff --git a/build/instack.sh b/build/instack.sh index 52384689..3dfbf622 100755 --- a/build/instack.sh +++ b/build/instack.sh @@ -67,15 +67,6 @@ elif [ "$1" == "-master" ]; then sudo rm -f /etc/yum.repos.d/delorean-current.repo fi -# install the opendaylight yum repo definition -cat << 'EOF' | sudo tee /etc/yum.repos.d/opendaylight.repo -[opendaylight] -name=OpenDaylight $releasever - $basearch -baseurl=http://cbs.centos.org/repos/nfv7-opendaylight-33-release/$basearch/os/ -enabled=1 -gpgcheck=0 -EOF - # ensure the undercloud package is installed so we can build the undercloud if ! rpm -q instack-undercloud > /dev/null; then sudo yum install -y python-tripleoclient @@ -261,33 +252,16 @@ git checkout stable/liberty popd tar -czf puppet-aodh.tar.gz aodh -# work around for XFS grow bug -# http://xfs.org/index.php/XFS_FAQ#Q:_Why_do_I_receive_No_space_left_on_device_after_xfs_growfs.3F -cat > /tmp/xfs-grow-remount-fix.service << EOF -[Unit] -Description=XFS Grow Bug Remount -After=network.target -Before=getty@tty1.service - -[Service] -Type=oneshot -ExecStart=/bin/bash -c "mount -o remount,inode64 /" -RemainAfterExit=no - -[Install] -WantedBy=multi-user.target -EOF - -# Add epel, aodh and ceph, remove openstack-neutron-openvswitch +# Add epel, aodh and ceph +# dhcp enable isolated_metadata and metada_tanetwork AODH_PKG="openstack-aodh-api,openstack-aodh-common,openstack-aodh-compat,openstack-aodh-evaluator,openstack-aodh-expirer" AODH_PKG+=",openstack-aodh-listener,openstack-aodh-notifier" -LIBGUESTFS_BACKEND=direct virt-customize --upload "/tmp/xfs-grow-remount-fix.service:/usr/lib/systemd/system/xfs-grow-remount-fix.service" \ - --run-command "systemctl enable xfs-grow-remount-fix.service" \ +LIBGUESTFS_BACKEND=direct virt-customize \ --upload puppet-aodh.tar.gz:/etc/puppet/modules/ \ --run-command "cd /etc/puppet/modules/ && rm -rf aodh && tar xzf puppet-aodh.tar.gz" \ - --run-command "yum remove -y openstack-neutron-openvswitch" \ --run-command "echo 'nf_conntrack_proto_sctp' > /etc/modules-load.d/nf_conntrack_proto_sctp.conf" \ - --install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \ + --run-command "if ! rpm -q epel-release > /dev/null; then yum install -y http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm; fi" \ + --install https://github.com/michaeltchapman/networking_rpm/raw/master/openstack-neutron-bgpvpn-2015.2-1.el7.centos.noarch.rpm \ --install "$AODH_PKG,ceph" \ -a overcloud-full-opendaylight.qcow2 @@ -296,17 +270,22 @@ LIBGUESTFS_BACKEND=direct virt-customize --upload "/tmp/xfs-grow-remount-fix.ser ############################################### cat > /tmp/opendaylight.repo << EOF -[opendaylight] -name=OpenDaylight \$releasever - \$basearch -baseurl=http://cbs.centos.org/repos/nfv7-opendaylight-33-release/\$basearch/os/ +[opendaylight-42-beta] +name=CentOS CBS OpenDaylight Beta Beryllium SR2 repository +baseurl=http://cbs.centos.org/repos/nfv7-opendaylight-4-testing/\$basearch/os/ enabled=1 gpgcheck=0 EOF +odlrpm=opendaylight-4.2.0-1.20160407.144137180.el7.noarch.rpm +LIBGUESTFS_BACKEND=direct virt-customize --upload ${rdo_images_uri/file:\/\//}/$odlrpm:/tmp/ \ + -a overcloud-full-opendaylight.qcow2 +opendaylight=/tmp/$odlrpm + # install ODL packages LIBGUESTFS_BACKEND=direct virt-customize \ --upload /tmp/opendaylight.repo:/etc/yum.repos.d/opendaylight.repo \ - --install opendaylight,python-networking-odl \ + --install ${opendaylight},python-networking-odl \ -a overcloud-full-opendaylight.qcow2 ## WORK AROUND @@ -314,10 +293,7 @@ LIBGUESTFS_BACKEND=direct virt-customize \ # upload the opendaylight puppet module rm -rf puppet-opendaylight -git clone -b 2.2.0 https://github.com/dfarrell07/puppet-opendaylight -pushd puppet-opendaylight -git archive --format=tar.gz --prefix=opendaylight/ HEAD > ../puppet-opendaylight.tar.gz -popd +cp ${rdo_images_uri/file:\/\//}/puppet-opendaylight-3.5.0.tar.gz puppet-opendaylight.tar.gz LIBGUESTFS_BACKEND=direct virt-customize --upload puppet-opendaylight.tar.gz:/etc/puppet/modules/ \ --run-command "cd /etc/puppet/modules/ && tar xzf puppet-opendaylight.tar.gz" \ --upload ../opendaylight-puppet-neutron.patch:/tmp \ @@ -332,6 +308,8 @@ LIBGUESTFS_BACKEND=direct virt-customize --upload ../opnfv-tripleo-heat-template # REMOVE ME AFTER Brahmaputra LIBGUESTFS_BACKEND=direct virt-customize --upload ../puppet-neutron-force-metadata.patch:/tmp \ --run-command "cd /etc/puppet/modules/neutron && patch -Np1 < /tmp/puppet-neutron-force-metadata.patch" \ + --run-command "sed -i '/ \$enable_isolated_metadata = false,/c\\ \$enable_isolated_metadata = true,' /etc/puppet/modules/neutron/manifests/agents/dhcp.pp" \ + --run-command "sed -i '/ \$enable_metadata_network = false,/c\\ \$enable_metadata_network = true,' /etc/puppet/modules/neutron/manifests/agents/dhcp.pp" \ -a overcloud-full-opendaylight.qcow2 LIBGUESTFS_BACKEND=direct virt-customize --upload ../puppet-cinder-quota-fix.patch:/tmp \ @@ -355,38 +333,39 @@ LIBGUESTFS_BACKEND=direct virt-customize --upload ../aodh-tripleoclient.patch:/t ##### Adding SFC+OpenDaylight overcloud ##### ################################################ -cat > /tmp/opendaylight.repo << EOF -[opendaylight] -name=OpenDaylight \$releasever - \$basearch -baseurl=http://cbs.centos.org/repos/nfv7-opendaylight-4-testing/\$basearch/os/ -enabled=1 -gpgcheck=0 +# work around for XFS grow bug +# http://xfs.org/index.php/XFS_FAQ#Q:_Why_do_I_receive_No_space_left_on_device_after_xfs_growfs.3F +cat > /tmp/xfs-grow-remount-fix.service << EOF +[Unit] +Description=XFS Grow Bug Remount +After=network.target +Before=getty@tty1.service + +[Service] +Type=oneshot +ExecStart=/bin/bash -c "echo 'XFS Grow Bug Remount Sleeping 10s' && sleep 10 && echo 'XFS Grow Bug Remounting Now' && mount -o remount,inode64 /" +RemainAfterExit=no + +[Install] +WantedBy=multi-user.target EOF + #copy opendaylight overcloud full to isolate odl-sfc cp overcloud-full-opendaylight.qcow2 overcloud-full-opendaylight-sfc.qcow2 -# upload the opendaylight puppet module -rm -rf puppet-opendaylight -git clone -b 3.0.1 https://github.com/dfarrell07/puppet-opendaylight -pushd puppet-opendaylight -git archive --format=tar.gz --prefix=opendaylight/ HEAD > ../puppet-opendaylight.tar.gz -popd - +# kernel is patched with patch from this post +# http://xfs.org/index.php/XFS_FAQ#Q:_Why_do_I_receive_No_space_left_on_device_after_xfs_growfs.3F LIBGUESTFS_BACKEND=direct virt-customize \ + --upload "/tmp/xfs-grow-remount-fix.service:/etc/systemd/system/xfs-grow-remount-fix.service" \ + --run-command "chmod 664 /etc/systemd/system/xfs-grow-remount-fix.service" \ + --run-command "systemctl enable xfs-grow-remount-fix.service" \ --install 'https://radez.fedorapeople.org/kernel-ml-3.13.7-1.el7.centos.x86_64.rpm' \ --run-command 'grub2-set-default "\$(grep -P \"submenu|^menuentry\" /boot/grub2/grub.cfg | cut -d \"\\x27\" | head -n 1)"' \ --install 'https://radez.fedorapeople.org/openvswitch-kmod-2.3.90-1.el7.centos.x86_64.rpm' \ --run-command 'yum downgrade -y https://radez.fedorapeople.org/openvswitch-2.3.90-1.x86_64.rpm' \ --run-command 'rm -f /lib/modules/3.13.7-1.el7.centos.x86_64/kernel/net/openvswitch/openvswitch.ko' \ --run-command 'ln -s /lib/modules/3.13.7-1.el7.centos.x86_64/kernel/extra/openvswitch/openvswitch.ko /lib/modules/3.13.7-1.el7.centos.x86_64/kernel/net/openvswitch/openvswitch.ko' \ - --upload /tmp/opendaylight.repo:/etc/yum.repos.d/opendaylight.repo \ - --run-command "yum remove -y opendaylight" \ - --run-command "yum clean all" \ - --run-command "yum install -y opendaylight" \ - --run-command "rm -rf /etc/puppet/modules/opendaylight && rm -f /etc/puppet/modules/puppet-opendaylight.tar.gz " \ - --upload puppet-opendaylight.tar.gz:/etc/puppet/modules/ \ - --run-command "cd /etc/puppet/modules/ && tar xzf puppet-opendaylight.tar.gz" \ -a overcloud-full-opendaylight-sfc.qcow2