RiftWare Build VM Script: Difference between revisions

From OSM Public Wiki
Jump to: navigation, search
No edit summary
mNo edit summary
 
(12 intermediate revisions by the same user not shown)
Line 14: Line 14:
  sed -i -e 's:1.4.1:7.1.2:g' /bin/python3-pip  
  sed -i -e 's:1.4.1:7.1.2:g' /bin/python3-pip  
  /bin/python3-pip install --upgrade pip
  /bin/python3-pip install --upgrade pip
  sed -i -e 's:7.1.2:8.1.1:g' /bin/python3-pip  
  sed -i -e 's:7.1.2:8.1.2:g' /bin/python3-pip  
   
   
  /bin/yum --assumeyes --nogpgcheck install yum-utils
  /bin/yum --assumeyes --nogpgcheck install yum-utils
Line 24: Line 24:


  # install libraries and tools
  # install libraries and tools
  /bin/yum --assumeyes --nogpgcheck install cloud-utils-growpart-0.27-9.fc20.noarch json-c-devel-0.11-3.fc20.x86_64 lua-devel bzip2 gcc-4.8.2-7.fc20.x86_64 \
/bin/yum --assumeyes --nogpgcheck --disablerepo updates3 install gcc-4.8.2-7.fc20.x86_64 gcc-c++-4.8.2-7.fc20.x86_64
  cracklib-dicts-2.9.0-5.fc20.x86_64 bind-license-9.9.4-8.fc20.noarch bzip2-libs-1.0.6-9.fc20.x86_64 audit-libs-python-2.3.2-1.fc20.x86_64 cracklib- 2.9.0-5.fc20.x86_64 \
  /bin/yum --assumeyes --nogpgcheck install cloud-utils-growpart-0.27-9.fc20.noarch json-c-devel-0.11-3.fc20.x86_64 lua-devel bzip2 \
  cracklib-dicts-2.9.0-5.fc20.x86_64 bind-license-9.9.4-8.fc20.noarch bzip2-libs-1.0.6-9.fc20.x86_64 audit-libs-python-2.3.2-1.fc20.x86_64 cracklib-2.9.0-5.fc20.x86_64 \
  bind-utils npm xml-common boost-filesystem-1.54.0-9.fc20.x86_64 wget python3-devel gtk-doc libdb-devel augeas-libs-1.1.0-2.fc20.x86_64 cronie-anacron-1.4.11-4.fc20.x86_64 \
  bind-utils npm xml-common boost-filesystem-1.54.0-9.fc20.x86_64 wget python3-devel gtk-doc libdb-devel augeas-libs-1.1.0-2.fc20.x86_64 cronie-anacron-1.4.11-4.fc20.x86_64 \
  libpng-devel libffi-devel libev-devel libgudev1 python-devel c-ares-devel-1.10.0-2.fc20.x86_64 libguestfs-tools-c libssh2-devel libxslt-devel boost-system-1.54.0-9.fc20.x86_64 \
  libpng-devel libffi-devel libev-devel libgudev1 python-devel c-ares-devel-1.10.0-2.fc20.x86_64 libguestfs-tools-c libssh2-devel libxslt-devel boost-system-1.54.0-9.fc20.x86_64 \
  c-ares-1.10.0-2.fc20.x86_64 gcc-c++-4.8.2-7.fc20.x86_64 cronie-1.4.11-4.fc20.x86_64 boost-devel lcov libtool-2.4.2-23.fc20.x86_64 bison-2.7-3.fc20.x86_64 \
  c-ares-1.10.0-2.fc20.x86_64 cronie-1.4.11-4.fc20.x86_64 boost-devel lcov libtool-2.4.2-23.fc20.x86_64 bison-2.7-3.fc20.x86_64 \
  libnl-devel cpio-2.11-24.fc20.x86_64 libicu-devel-50.1.2-10.fc20.x86_64 icu libnl3-devel flex bind-libs-lite-9.9.4-8.fc20.x86_64 texlive-latex2man-bin \
  libnl-devel cpio-2.11-24.fc20.x86_64 libicu-devel-50.1.2-10.fc20.x86_64 icu libnl3-devel flex bind-libs-lite-9.9.4-8.fc20.x86_64 texlive-latex2man-bin \
  coreutils-8.21-18.fc20.x86_64 qemu-img cmake-2.8.12.1-1.fc20.x86_64 audit-libs-2.3.2-1.fc20.x86_64 crontabs-1.11-6.20121102git.fc20.noarch boost-thread-1.54.0-9.fc20.x86_64 \
  coreutils-8.21-18.fc20.x86_64 qemu-img cmake-2.8.12.1-1.fc20.x86_64 audit-libs-2.3.2-1.fc20.x86_64 crontabs-1.11-6.20121102git.fc20.noarch boost-thread-1.54.0-9.fc20.x86_64 \
Line 34: Line 36:
  go binutils-2.23.88.0.1-13.fc20.x86_64 bc bash-4.2.45-4.fc20.x86_64 ceph-libs-0.67.3-2.fc20.x86_64 flex-devel libudev-devel automake-1.13.4-5.fc20.noarch \
  go binutils-2.23.88.0.1-13.fc20.x86_64 bc bash-4.2.45-4.fc20.x86_64 ceph-libs-0.67.3-2.fc20.x86_64 flex-devel libudev-devel automake-1.13.4-5.fc20.noarch \
  boost-filesystem make-4.0-3.1.fc22.x86_64 ca-certificates-2013.1.94-18.fc20.noarch basesystem-10.0-9.fc20.noarch libevent-devel chkconfig-1.3.60-4.fc20.x86_64 \
  boost-filesystem make-4.0-3.1.fc22.x86_64 ca-certificates-2013.1.94-18.fc20.noarch basesystem-10.0-9.fc20.noarch libevent-devel chkconfig-1.3.60-4.fc20.x86_64 \
  cloud-init-0.7.2-7.fc20.noarch autoconf-2.69-14.fc20.noarch autogen-libopts-5.18-1.fc20.x86_64 curl libpcap-devel libxml2-devel libtool nbd luajit-devel \
  cloud-init-0.7.2-7.fc20.noarch autoconf-2.69-14.fc20.noarch autogen-libopts-5.18-1.fc20.x86_64 curl libpcap-devel libxml2-devel nbd luajit-devel \
  unzip clang-3.3-4.fc20.x86_64 python-pip ruby libuuid-devel cryptopp-5.6.2-3.fc20.x86_64 corosynclib-2.3.3-1.fc20.x86_64 valgrind-devel git \
  unzip clang-3.3-4.fc20.x86_64 python-pip ruby libuuid-devel cryptopp-5.6.2-3.fc20.x86_64 corosynclib-2.3.3-1.fc20.x86_64 valgrind-devel git \
  gnome-common-3.10.0-1.fc20.noarch intltool acl-2.2.52-4.fc20.x86_64 avahi-libs-0.6.31-21.fc20.x86_64
  gnome-common-3.10.0-1.fc20.noarch intltool acl-2.2.52-4.fc20.x86_64 avahi-libs-0.6.31-21.fc20.x86_64
   
   
  /bin/python3-pip install --use-wheel --no-index --find-links=https://wheel.riftio.com/mirrors/python3_wheelhouse/ asyncio==3.4.3 boto3==1.1.3 boto==2.38.0 certifi==2015.4.28 \
  /bin/python3-pip install --use-wheel --no-index --find-links=https://wheel.riftio.com/mirrors/python3_wheelhouse/ \
        asyncio==3.4.3 boto3==1.1.3 boto==2.38.0 certifi==2015.4.28 \
  crossbar==0.11.1 dicttoxml ecdsa==0.13 enum34==1.0.4 futures==2.2.0 junit-xml jsonpath-rw==1.4.0 jujuclient==0.50.5 kazoo==2.1 lxml==3.4.4 matplotlib mock==1.0.1 \
  crossbar==0.11.1 dicttoxml ecdsa==0.13 enum34==1.0.4 futures==2.2.0 junit-xml jsonpath-rw==1.4.0 jujuclient==0.50.5 kazoo==2.1 lxml==3.4.4 matplotlib mock==1.0.1 \
  netifaces==0.10.4 nose numpy objectpath==0.5 paramiko==1.15.2 pycrypto==2.6.1 PyYAML==3.11 pytest pytest-xdist requests==2.8.1 six==1.10.0 statistics tornado==4.1 \
  netifaces==0.10.4 nose numpy objectpath==0.5 paramiko==1.15.2 pycrypto==2.6.1 PyYAML==3.11 pytest pytest-xdist requests==2.8.1 six==1.10.0 statistics tornado==4.1 \
  tosca-parser==0.4.1.dev40 websockets xmltodict zake==0.2.1 beautifulsoup4 dictdiffer jujuclient psutil beautifulsoup4
  tosca-parser==0.4.1.dev40 websockets xmltodict zake==0.2.1 beautifulsoup4 dictdiffer psutil
   
   
  pip install --upgrade six
  pip install --upgrade six
Line 48: Line 51:
  python-novaclient python-neutronclient python-glanceclient python-cinderclient
  python-novaclient python-neutronclient python-glanceclient python-cinderclient


 
  # node and NPM
  # NPM
  /bin/yum --assumeyes --nogpgcheck install npm
  /bin/yum --assumeyes --nogpgcheck install npm
# upgrade nodejs from our mirror
wget http://repo.riftio.com/releases/open.riftio.com/4.2.0/node -O $(which node)
  npm set registry https://npm.riftio.com:4873/  
  npm set registry https://npm.riftio.com:4873/  
  npm set strict-ssl false
  npm set strict-ssl false
  npm set progress=false
  npm set progress=false
  # never completes first try
  # never completes first try
  npm install npm@3.8.6 -g
  npm install npm@latest -g
  npm install npm@3.8.6 -g
  npm install npm@latest -g
  npm install -g --production forever
  npm install -g --production forever


  # configure system
  # configure system
Line 65: Line 68:
  setcap cap_net_raw+ep /bin/ping
  setcap cap_net_raw+ep /bin/ping


  /bin/yum --assumeyes --nogpgcheck install salt-master salt-minion  
# runtime dependencies
# these are only needed if you want to run launchpad in the same VM that
# you build in
  /bin/yum --assumeyes --nogpgcheck install salt-master salt-minion screen java zookeeper-java-3.4.5-12.fc20.noarch \
nss-softokn-freebl-3.17.1-2.fc20.x86_64 \
glibc-common-2.18-16.fc20.x86_64 \
glibc-2.18-16.fc20.x86_64 \
apr-1.5.1-1.fc20.x86_64 \
apr-util-1.5.3-1.fc20.x86_64 \
lxc-libs-0.9.0-2.fc20.x86_64 \
openssh-6.4p1-5.fc20.x86_64 \
python3-lxc-0.9.0-2.fc20.x86_64 \
httpd-tools-2.4.10-1.fc20.x86_64 \
php-xml-5.5.18-1.fc20.x86_64 \
php-cli-5.5.18-1.fc20.x86_64 \
php-process-5.5.18-1.fc20.x86_64 \
php-common-5.5.18-1.fc20.x86_64 \
php-pear-1.9.5-3.fc20.noarch \
php-pecl-jsonc-1.3.6-1.fc20.x86_64 \
t1lib-5.1.2-14.fc20.x86_64 \
ldns-utils-1.6.17-7.fc20.x86_64 \
ldns-1.6.17-7.fc20.x86_64 \
glibc-headers-2.18-16.fc20.x86_64 \
snappy-1.1.0-2.fc20.x86_64 \
fedora-logos-httpd-21.0.1-1.fc20.noarch \
httpd-2.4.10-1.fc20.x86_64 \
xen-licenses-4.3.1-8.fc20.x86_64 \
xen-libs-4.3.1-8.fc20.x86_64 \
php-5.5.18-1.fc20.x86_64 \
leveldb-1.12.0-5.fc20.x86_64 \
glibc-devel-2.18-16.fc20.x86_64 \
php-gd-5.5.18-1.fc20.x86_64 \
lxc-extra-0.9.0-2.fc20.x86_64 \
openssh-server-6.4p1-5.fc20.x86_64 \
openssh-clients-6.4p1-5.fc20.x86_64 \
lxc-0.9.0-2.fc20.x86_64 \
socat-1.7.2.2-3.fc20.x86_64 \
sshpass-1.05-5.fc20.x86_64 \
tmux-1.9a-2.fc20.x86_64 \
expect-5.45-10.fc20.x86_64 \
python3-magic-5.19-7.fc20.noarch
 
  systemctl enable salt-master
  systemctl enable salt-master
  systemctl enable salt-minion
  systemctl enable salt-minion
  systemctl enable libvirtd
  systemctl enable libvirtd
ln -s /home/rift /usr/rift


  yum install -y grub2
  yum install -y grub2
  grub2-mkconfig -o /boot/grub2/grub.cfg
  grub2-mkconfig -o /boot/grub2/grub.cfg
  grub2-set-default "Fedora, with Linux 3.12.9-301.fc20.x86_64"
  grub2-set-default "Fedora, with Linux 3.12.9-301.fc20.x86_64"
# enable SSH as root
# take all defaults
ssh-keygen
cat /root/.ssh/id_rsa.pub >>/root/.ssh/authorized_keys




  echo REBOOT before attempting a compile
  echo REBOOT before attempting a compile
# then continue at step 2 in [[ RiftWare installation (release 0) ]]

Latest revision as of 21:03, 16 June 2016

#enable the RIFT mirrors: 
# some of the FC20 versions of the packages that RIFT.ware depends on are hard to find, so RIFT.io manages a mirror. 
# in the near future, we will relax the restrictions on the versions, and then this script will become much more generic
rm -f /etc/yum.repos.d/*
/bin/yum localinstall --assumeyes http://repo.riftio.com/releases/riftware-release-latest.rpm
/bin/yum clean all
/bin/yum makecache
# install installers
# note that I often get hung up here so be careful
/bin/yum --assumeyes --nogpgcheck install python3 python3-pip perl
curl https://wheel.riftio.com/mirrors/python3_wheelhouse/pip-7.1.2-py2.py3-none-any.whl -o /tmp/pip-7.1.2-py2.py3-none-any.whl
/bin/python3-pip install /tmp/pip-7.1.2-py2.py3-none-any.whl
sed -i -e 's:1.4.1:7.1.2:g' /bin/python3-pip 
/bin/python3-pip install --upgrade pip
sed -i -e 's:7.1.2:8.1.2:g' /bin/python3-pip 

/bin/yum --assumeyes --nogpgcheck install yum-utils
yum-config-manager --quiet --enable updates3
/bin/yum --assumeyes --nogpgcheck install deltarpm
# get the kernel
/bin/yum --assumeyes --nogpgcheck install kernel-3.12.9-301.fc20.x86_64 kernel-devel-3.12.9-301.fc20.x86_64 kernel-modules-extra-3.12.9-301.fc20.x86_64
# install libraries and tools
/bin/yum --assumeyes --nogpgcheck --disablerepo updates3 install gcc-4.8.2-7.fc20.x86_64 gcc-c++-4.8.2-7.fc20.x86_64 

/bin/yum --assumeyes --nogpgcheck install cloud-utils-growpart-0.27-9.fc20.noarch json-c-devel-0.11-3.fc20.x86_64 lua-devel bzip2  \
	cracklib-dicts-2.9.0-5.fc20.x86_64 bind-license-9.9.4-8.fc20.noarch bzip2-libs-1.0.6-9.fc20.x86_64 audit-libs-python-2.3.2-1.fc20.x86_64 cracklib-2.9.0-5.fc20.x86_64 \
	bind-utils npm xml-common boost-filesystem-1.54.0-9.fc20.x86_64 wget python3-devel gtk-doc libdb-devel augeas-libs-1.1.0-2.fc20.x86_64 cronie-anacron-1.4.11-4.fc20.x86_64 \
	libpng-devel libffi-devel libev-devel libgudev1 python-devel c-ares-devel-1.10.0-2.fc20.x86_64 libguestfs-tools-c libssh2-devel libxslt-devel boost-system-1.54.0-9.fc20.x86_64 \
	c-ares-1.10.0-2.fc20.x86_64 cronie-1.4.11-4.fc20.x86_64 boost-devel lcov libtool-2.4.2-23.fc20.x86_64 bison-2.7-3.fc20.x86_64 \
	libnl-devel cpio-2.11-24.fc20.x86_64 libicu-devel-50.1.2-10.fc20.x86_64 icu libnl3-devel flex bind-libs-lite-9.9.4-8.fc20.x86_64 texlive-latex2man-bin \
	coreutils-8.21-18.fc20.x86_64 qemu-img cmake-2.8.12.1-1.fc20.x86_64 audit-libs-2.3.2-1.fc20.x86_64 crontabs-1.11-6.20121102git.fc20.noarch boost-thread-1.54.0-9.fc20.x86_64 \
	ncurses-devel corosync-2.3.3-1.fc20.x86_64 glib-devel libxml-devel cpp-4.8.2-7.fc20.x86_64 python-lxml python-tools audit-2.3.2-1.fc20.x86_64 vala bzip2-1.0.6-9.fc20.x86_64 \
	go binutils-2.23.88.0.1-13.fc20.x86_64 bc bash-4.2.45-4.fc20.x86_64 ceph-libs-0.67.3-2.fc20.x86_64 flex-devel libudev-devel automake-1.13.4-5.fc20.noarch \
	boost-filesystem make-4.0-3.1.fc22.x86_64 ca-certificates-2013.1.94-18.fc20.noarch basesystem-10.0-9.fc20.noarch libevent-devel chkconfig-1.3.60-4.fc20.x86_64 \
	cloud-init-0.7.2-7.fc20.noarch autoconf-2.69-14.fc20.noarch autogen-libopts-5.18-1.fc20.x86_64 curl libpcap-devel libxml2-devel nbd luajit-devel \
	unzip clang-3.3-4.fc20.x86_64 python-pip ruby libuuid-devel cryptopp-5.6.2-3.fc20.x86_64 corosynclib-2.3.3-1.fc20.x86_64 valgrind-devel git \
	gnome-common-3.10.0-1.fc20.noarch intltool acl-2.2.52-4.fc20.x86_64 avahi-libs-0.6.31-21.fc20.x86_64

/bin/python3-pip install --use-wheel --no-index --find-links=https://wheel.riftio.com/mirrors/python3_wheelhouse/ \
       asyncio==3.4.3 boto3==1.1.3 boto==2.38.0 certifi==2015.4.28 \
	crossbar==0.11.1 dicttoxml ecdsa==0.13 enum34==1.0.4 futures==2.2.0 junit-xml jsonpath-rw==1.4.0 jujuclient==0.50.5 kazoo==2.1 lxml==3.4.4 matplotlib mock==1.0.1 \
	netifaces==0.10.4 nose numpy objectpath==0.5 paramiko==1.15.2 pycrypto==2.6.1 PyYAML==3.11 pytest pytest-xdist requests==2.8.1 six==1.10.0 statistics tornado==4.1 \
	tosca-parser==0.4.1.dev40 websockets xmltodict zake==0.2.1 beautifulsoup4 dictdiffer psutil

pip install --upgrade six

/bin/python3-pip install --use-wheel --no-index --find-links=https://wheel.riftio.com/mirrors/python3_kilo_rel_4.2_wheelhouse/ python-ceilometerclient==2.0.1 \
	python-novaclient python-neutronclient python-glanceclient python-cinderclient
# node and NPM
/bin/yum --assumeyes --nogpgcheck install npm
# upgrade nodejs from our mirror
wget http://repo.riftio.com/releases/open.riftio.com/4.2.0/node -O $(which node)

npm set registry https://npm.riftio.com:4873/ 
npm set strict-ssl false
npm set progress=false
# never completes first try
npm install npm@latest -g
npm install npm@latest -g
npm install -g --production forever
# configure system
systemctl enable sshd
setcap cap_net_raw+ep /bin/ping
# runtime dependencies
# these are only needed if you want to run launchpad in the same VM that 
# you build in
/bin/yum --assumeyes --nogpgcheck install salt-master salt-minion screen java zookeeper-java-3.4.5-12.fc20.noarch \
nss-softokn-freebl-3.17.1-2.fc20.x86_64 \
glibc-common-2.18-16.fc20.x86_64 \
glibc-2.18-16.fc20.x86_64 \
apr-1.5.1-1.fc20.x86_64 \
apr-util-1.5.3-1.fc20.x86_64 \
lxc-libs-0.9.0-2.fc20.x86_64 \
openssh-6.4p1-5.fc20.x86_64 \
python3-lxc-0.9.0-2.fc20.x86_64 \
httpd-tools-2.4.10-1.fc20.x86_64 \
php-xml-5.5.18-1.fc20.x86_64 \
php-cli-5.5.18-1.fc20.x86_64 \
php-process-5.5.18-1.fc20.x86_64 \
php-common-5.5.18-1.fc20.x86_64 \
php-pear-1.9.5-3.fc20.noarch \
php-pecl-jsonc-1.3.6-1.fc20.x86_64 \
t1lib-5.1.2-14.fc20.x86_64 \
ldns-utils-1.6.17-7.fc20.x86_64 \
ldns-1.6.17-7.fc20.x86_64 \
glibc-headers-2.18-16.fc20.x86_64 \
snappy-1.1.0-2.fc20.x86_64 \
fedora-logos-httpd-21.0.1-1.fc20.noarch \
httpd-2.4.10-1.fc20.x86_64 \
xen-licenses-4.3.1-8.fc20.x86_64 \
xen-libs-4.3.1-8.fc20.x86_64 \
php-5.5.18-1.fc20.x86_64 \
leveldb-1.12.0-5.fc20.x86_64 \
glibc-devel-2.18-16.fc20.x86_64 \
php-gd-5.5.18-1.fc20.x86_64 \
lxc-extra-0.9.0-2.fc20.x86_64 \
openssh-server-6.4p1-5.fc20.x86_64 \
openssh-clients-6.4p1-5.fc20.x86_64 \
lxc-0.9.0-2.fc20.x86_64 \
socat-1.7.2.2-3.fc20.x86_64 \
sshpass-1.05-5.fc20.x86_64 \
tmux-1.9a-2.fc20.x86_64 \
expect-5.45-10.fc20.x86_64 \
python3-magic-5.19-7.fc20.noarch
systemctl enable salt-master
systemctl enable salt-minion
systemctl enable libvirtd
ln -s /home/rift /usr/rift
yum install -y grub2
grub2-mkconfig -o /boot/grub2/grub.cfg
grub2-set-default "Fedora, with Linux 3.12.9-301.fc20.x86_64"
# enable SSH as root
# take all defaults
ssh-keygen
cat /root/.ssh/id_rsa.pub >>/root/.ssh/authorized_keys


echo REBOOT before attempting a compile
# then continue at step 2 in RiftWare installation (release 0)