Fix Centos Virl deployment and image build want list 19/5119/3
authorMatej Klotton <mklotton@cisco.com>
Tue, 14 Feb 2017 06:45:01 +0000 (07:45 +0100)
committerMatej Klotton <mklotton@cisco.com>
Wed, 15 Feb 2017 12:22:25 +0000 (13:22 +0100)
Change-Id: I65d54fff4f936444bed3382ee21a260cf718bafd
Signed-off-by: Matej Klotton <mklotton@cisco.com>
resources/tools/disk-image-builder/centos/run-listmaker.sh
resources/tools/disk-image-builder/centos/scripts-remote/post-install.sh
resources/tools/virl/topologies/double-ring-nested.centos7.virl

index 4733ef4..9b19587 100755 (executable)
@@ -63,8 +63,8 @@ echo "Storing data in ${OUTPUT_DIR}/."
 RPM_WANTLIST_INFRA="nfs-utils cloud-init pkgconfig yum-utils"
 RPM_WANTLIST_CSIT="python-devel python-pip python-virtualenv python-setuptools python-pip openssl-devel git strongswan"
 RPM_WANTLIST_VPP="dkms bridge-utils"
-RPM_WANTLIST_TREX="zlib1g-dev unzip"
-RPM_WANTLIST_MISC="gperftools glusterfs glusterfs-api libiscsi libibverbs libpcap libpcap-dev libgfrpc libgfxdr libpixman libpng14 pulseaudio-libs librados2 librbd1 librdmacm libseccomp spice-server libusb usbredir glusterfs-dev seavgabios-bin sgabios-bin ipxe-roms-qemu nss-devel seabios-bin"
+RPM_WANTLIST_TREX="zlib-devel unzip"
+RPM_WANTLIST_MISC="gperftools glusterfs glusterfs-api libiscsi libibverbs libpcap libpcap-devel pixman libpng pulseaudio-libs librados2 librbd1 librdmacm libseccomp spice-server libusb usbredir glusterfs-devel seavgabios-bin sgabios-bin ipxe-roms-qemu nss-devel seabios-bin"
 
 RPM_WANTLIST_NESTED="qemu-img-ev-2.3.0-31.el7_2.21.1.x86_64.rpm libcacard-ev-2.3.0-31.el7_2.21.1.x86_64.rpm libcacard-devel-ev-2.3.0-31.el7_2.21.1.x86_64.rpm qemu-kvm-ev-debuginfo-2.3.0-31.el7_2.21.1.x86_64.rpm qemu-kvm-tools-ev-2.3.0-31.el7_2.21.1.x86_64.rpm qemu-kvm-common-ev-2.3.0-31.el7_2.21.1.x86_64.rpm qemu-kvm-ev-2.3.0-31.el7_2.21.1.x86_64.rpm libcacard-tools-ev-2.3.0-31.el7_2.21.1.x86_64.rpm"
 RPM_WANTLIST_JAVA="java-1.8.0-openjdk-headless java-1.8.0-openjdk-devel"
index 9ae1608..bd45d23 100644 (file)
 
 TEMP_PATH="/root/temp"
 
+echo ==========================Remove NetworkManager============================
+systemctl disable NetworkManager
+systemctl enable network
+yum -y remove NetworkManager
+
+cat - > /etc/sysconfig/network-scripts/ifcfg-eth0 <<"_EOF"
+DEVICE=eth0
+BOOTPROTO=dhcp
+ONBOOT=yes
+_EOF
+echo =======================End Remove NetworkManager===========================
+
 ###
 ### RPMs
 ###
@@ -27,11 +39,9 @@ echo "********** INSTALLING RPMs **********"
 # problems during the first one(s).
 echo ==========================yum update==============================
 yum clean all
-yum install -y @base
 yum install -y deltarpm
 yum update -y
-yum -y install epel-release
-yum update -y
+yum install -y @base epel-release
 echo ==========================end yum update==============================
 attempt=1
 MAX_ATTEMPTS=3
index 4a88e83..e426597 100644 (file)
@@ -6,15 +6,11 @@
     <node name="tg1" type="SIMPLE" subtype="server" location="570,238" vmImage="$$VM_IMAGE$$">
         <extensions>
             <entry key="config" type="String">#cloud-config
-bootcmd:
-- ln -s -t /etc/rc.d /etc/rc.local
 hostname: tg1
 manage_etc_hosts: true
 nfs_server_scratch: $$NFS_SERVER_SCRATCH$$
 nfs_server_common: $$NFS_SERVER_COMMON$$
 runcmd:
-- systemctl enable serial-getty-digi@ttyS0.service
-- systemctl start serial-getty-digi@ttyS0.service
 - systemctl start rc-local
 - touch /tmp/before-sed
 - sed -i 's/^\s*PasswordAuthentication\s\+no/PasswordAuthentication yes/' /etc/ssh/sshd_config
@@ -35,9 +31,9 @@ users:
 write_files:
 - path: /usr/local/sbin/cloud-instance-name
   content: |
-    #!/usr/bin/python3.5
+    #!/usr/bin/python2.7
     import pickle
-    print(pickle.loads(open('/var/lib/cloud/instance/obj.pkl', 'rb').read(), encoding="ACSII").metadata['name'])
+    print pickle.loads(open('/var/lib/cloud/instance/obj.pkl', 'rb').read()).metadata['name']
   owner: root:root
   permissions: '0755'
 - path: /etc/rc.local
@@ -85,17 +81,13 @@ write_files:
     <node name="sut1" type="SIMPLE" subtype="vPP" location="425,26" vmImage="$$VM_IMAGE$$">
         <extensions>
             <entry key="config" type="string">#cloud-config
-bootcmd:
-- ln -s -t /etc/rc.d /etc/rc.local
 hostname: sut1
 manage_etc_hosts: true
 nfs_server_scratch: $$NFS_SERVER_SCRATCH$$
 nfs_server_common: $$NFS_SERVER_COMMON$$
 runcmd:
-- systemctl enable serial-getty-digi@ttyS0.service
-- systemctl start serial-getty-digi@ttyS0.service
 - systemctl start rc-local
-- sed -i '/^\s*PasswordAuthentication\s\+no/d' /etc/ssh/sshd_config
+- sed -i 's/^\s*PasswordAuthentication\s\+no/PasswordAuthentication yes/' /etc/ssh/sshd_config
 - echo "UseDNS no" &gt;&gt; /etc/ssh/sshd_config
 - service ssh restart
 - service sshd restart
@@ -116,9 +108,9 @@ users:
 write_files:
 - path: /usr/local/sbin/cloud-instance-name
   content: |
-    #!/usr/bin/python3.5
+    #!/usr/bin/python2.7
     import pickle
-    print(pickle.loads(open('/var/lib/cloud/instance/obj.pkl', 'rb').read(), encoding="ACSII").metadata['name'])
+    print pickle.loads(open('/var/lib/cloud/instance/obj.pkl', 'rb').read()).metadata['name']
   owner: root:root
   permissions: '0755'
 - path: /etc/rc.local
@@ -189,17 +181,13 @@ write_files:
     <node name="sut2" type="SIMPLE" subtype="vPP" location="748,26" vmImage="$$VM_IMAGE$$">
         <extensions>
             <entry key="config" type="string">#cloud-config
-bootcmd:
-- ln -s -t /etc/rc.d /etc/rc.local
 hostname: sut2
 manage_etc_hosts: true
 nfs_server_scratch: $$NFS_SERVER_SCRATCH$$
 nfs_server_common: $$NFS_SERVER_COMMON$$
 runcmd:
-- systemctl enable serial-getty-digi@ttyS0.service
-- systemctl start serial-getty-digi@ttyS0.service
 - systemctl start rc-local
-- sed -i '/^\s*PasswordAuthentication\s\+no/d' /etc/ssh/sshd_config
+- sed -i 's/^\s*PasswordAuthentication\s\+no/PasswordAuthentication yes/' /etc/ssh/sshd_config
 - echo "UseDNS no" &gt;&gt; /etc/ssh/sshd_config
 - service ssh restart
 - service sshd restart
@@ -220,9 +208,9 @@ users:
 write_files:
 - path: /usr/local/sbin/cloud-instance-name
   content: |
-    #!/usr/bin/python3.5
+    #!/usr/bin/python2.7
     import pickle
-    print(pickle.loads(open('/var/lib/cloud/instance/obj.pkl', 'rb').read(), encoding="ACSII").metadata['name'])
+    print pickle.loads(open('/var/lib/cloud/instance/obj.pkl', 'rb').read()).metadata['name']
   owner: root:root
   permissions: '0755'
 - path: /etc/rc.local

©2016 FD.io a Linux Foundation Collaborative Project. All Rights Reserved.
Linux Foundation is a registered trademark of The Linux Foundation. Linux is a registered trademark of Linus Torvalds.
Please see our privacy policy and terms of use.