RiftWare Build VM Script

From OSM Public Wiki
Revision as of 19:25, 12 May 2016 by Mordkoff (talk | contribs)
Jump to: navigation, search
#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 --disable 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


# NPM
/bin/yum --assumeyes --nogpgcheck install npm
npm set registry https://npm.riftio.com:4873/ 
npm set strict-ssl false
npm set progress=false
# never completes first try
npm install npm@3.8.6 -g
npm install npm@3.8.6 -g
npm install -g --production forever


# configure system
systemctl enable sshd
setcap cap_net_raw+ep /bin/ping
/bin/yum --assumeyes --nogpgcheck install salt-master salt-minion screen
systemctl enable salt-master
systemctl enable salt-minion
systemctl enable libvirtd
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
ssh-keygen
# take all defaults
cat .ssh/id_rsa.pub >>.ssh/authorized_keys



echo REBOOT before attempting a compile