Commit 5706a070 authored by Volodymyr Yurchenko's avatar Volodymyr Yurchenko
Browse files

Enable public and cern installation options for bootstrap scripts

By default all packages will be taken from public repositories. Run `./bootstrapCTA.sh cern` and `./bootstrapMHVTL.sh cern` to get packages from cern-only repos.
parent f080a702
......@@ -46,6 +46,8 @@ ls -lR /opt/mhvtl
################################################################################
### Create mhvtl directory
mkdir -p /opt/mhvtl
sudo groupadd vtl || true
sudo adduser vtl -g vtl || true
chown vtl.vtl /opt/mhvtl
################################################################################
......
......@@ -2,6 +2,12 @@
set -x
PUBLIC=true
if [[ $1 == "cern" ]]; then
PUBLIC=false
echo Going to install from internal CERN repositories
fi
echo Preparing CTA sources...
cd ~/CTA
git submodule update --init --recursive
......@@ -21,13 +27,14 @@ mkdir -p ~/CTA-build-srpm
(cd ~/CTA-build-srpm && cmake -DPackageOnly:Bool=true ../CTA; make cta_srpm)
echo Installing repos
for r in `ls -1 ~/CTA/continuousintegration/docker/ctafrontend/cc7/etc/yum.repos.d/*.repo` ; do
sudo yum-config-manager --add-repo=$r
done
sudo yum install -y yum-plugin-priorities
sudo wget https://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol7 -O /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
sudo tee /etc/yum.repos.d/oracle-instant-client.repo > /dev/null << 'EOF'
if [[ "$PUBLIC" == false ]] ; then
for r in `ls -1 ~/CTA/continuousintegration/docker/ctafrontend/cc7/etc/yum.repos.d/*.repo` ; do
sudo yum-config-manager --add-repo=$r
done
else
sudo wget https://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol7 -O /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
sudo tee /etc/yum.repos.d/oracle-instant-client.repo > /dev/null << 'EOF'
[oracle-instant-client]
name=Oracle instant client
baseurl=https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/
......@@ -36,21 +43,28 @@ gpgcheck=1
enabled=1
EOF
sudo wget https://git.ceph.com/release.asc -O /etc/pki/rpm-gpg/RPM-ASC-KEY-ceph
sudo tee /etc/yum.repos.d/ceph.repo > /dev/null << 'EOF'
[ceph]
name=Ceph
baseurl=https://download.ceph.com/rpm-nautilus/el7/x86_64/
gpgkey=file:///etc/pki/rpm-gpg/RPM-ASC-KEY-ceph
gpgcheck=1
enabled=1
EOF
sudo yum-config-manager --add-repo=`ls -1 ~/CTA/continuousintegration/docker/ctafrontend/cc7/etc/yum.repos.d/eos-*.repo`
fi
sudo yum install -y yum-plugin-priorities
echo Adding versionlock for xrootd:
sudo cp ~/CTA/continuousintegration/docker/ctafrontend/cc7/etc/yum/pluginconf.d/versionlock.list /etc/yum/pluginconf.d/versionlock.list
echo Installing build dependencies
sudo yum-builddep -y ~/CTA-build-srpm/RPM/SRPMS/cta-0-1.src.rpm
echo Installing mhvtl
sudo yum install -y mhvtl-utils kmod-mhvtl mhvtl-utils --enablerepo=castor
echo Building CTA
mkdir -p ~/CTA-build
(cd ~/CTA-build && cmake ../CTA; make -j 4)
echo Tuning the system for EOS
sudo bash -c "echo net.ipv4.tcp_tw_reuse = 1 >> /etc/sysctl.d/00-eos.conf"
sudo sysctl -p
echo CTA setup finished successfully
#!/bin/bash
PUBLIC=true
if [[ $1 == "cern" ]]; then
PUBLIC=false
echo Going to install from internal CERN repositories
fi
echo Installing mhvtl
if [[ "$PUBLIC" == false ]] ; then
sudo yum install -y mhvtl-utils kmod-mhvtl --enablerepo=castor
else
sudo yum install -y make gcc zlib-devel lzo-devel kernel kernel-tools kernel-devel kernel-headers
git clone --depth 1 -b 1.6-3_release https://github.com/markh794/mhvtl.git
cd mhvtl
make
sudo make install
cd kernel
make
sudo make install
sudo make_vtl_media -C /etc/mhvtl
sudo systemctl start mhvtl.target
echo "Please check the result of 'make install'. If it has failed, reboot and rerun this script"
fi
echo "mhvtl bootstrap finished"
......@@ -31,4 +31,8 @@ sudo yum install -y git cmake rpm-build gcc gcc-c++ vim gdb cgdb strace ltrace s
echo "Getting CTA sources for $CTAUSER..."
sudo -u $CTAUSER bash -c 'cd ~ ; git clone https://gitlab.cern.ch/cta/CTA.git'
echo Tuning the system for EOS
sudo bash -c "echo net.ipv4.tcp_tw_reuse = 1 >> /etc/sysctl.d/00-eos.conf"
sudo sysctl -p
echo System bootstrap finished!
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment