Skip to content
Snippets Groups Projects
Commit 355b9953 authored by Eric Cano's avatar Eric Cano
Browse files

Bootstrap scripts now biggy back on data from docker images.

Following https://gitlab.cern.ch/cta/CTA/commit/85255bece9e7d9bbbf2f142b792adc6544888955#note_210679
Also gets repos from docker.
bootstrap now requires a complete checkout.
parent 85255bec
No related branches found
No related tags found
No related merge requests found
......@@ -12,10 +12,10 @@ The target is to run in a virtual machine, possibly in a disconnected laptop.
The vmBootstrap directory contains all the necessary script to go from minimal CC7 instalation to running kubernetes with CTA checked out and compiled.
The directory vmBootstrap should be copied at the root of the new machine and the script bootstrapSystem.sh should be run from /wmBootstrap:
A full CTA source tree should be cloned or copied in the target system, and scripts should be run from .../CTA/continuousintegration/buildtree_runner/vmBootstrap:
```
cd /vmBootstrap
cd .../CTA/continuousintegration/buildtree_runner/vmBootstrap
./bootstrapSystem.sh
```
......@@ -26,7 +26,7 @@ This will create a new user (currently hardcoded to "eric") and prompt for the p
The user should then login as the user, kinit with a valid CERN.CH token, and then run the next step: bootstrapCTA.sh:
```
kinit user@CERN.CH
cd /vmBootstrap
cd .../CTA/continuousintegration/buildtree_runner/vmBootstrap
./bootstrapCTA.sh
```
......@@ -36,7 +36,7 @@ This will check out CTA from git, in install the necessary build RPMs and compil
The user should then run the script to setup kubernetes:
```
cd /vmBootstrap
cd .../CTA/continuousintegration/buildtree_runner/vmBootstrap
./bootstrapKubernetes.sh
```
......
......@@ -10,22 +10,14 @@ mkdir -p ~/CTA-build-srpm
(cd ~/CTA-build-srpm && cmake -DPackageOnly:Bool=true ../CTA; make cta_srpm)
echo Installing repos
sudo yum-config-manager --add-repo=/vmBootstrap/eos.repo
sudo yum-config-manager --add-repo=/vmBootstrap/ceph-internal.repo
sudo yum-config-manager --add-repo=/vmBootstrap/cta-ci-xroot.repo
sudo yum-config-manager --add-repo=/vmBootstrap/castor.repo
sudo yum-config-manager --add-repo=../../docker/ctafrontend/cc7/etc/yum.repos.d/eos.repo
sudo yum-config-manager --add-repo=ceph-internal.repo
sudo yum-config-manager --add-repo=../../docker/ctafrontend/cc7/etc/yum.repos.d/cta-ci.repo
sudo yum-config-manager --add-repo=../../docker/ctafrontend/cc7/etc/yum.repos.d/castor.repo
sudo yum install -y yum-plugin-priorities
echo Adding versionlock for xrootd:
sudo bash -c "cat >> /etc/yum/pluginconf.d/versionlock.list << EOF
1:xrootd-libs-4.4.1-1.el7.x86_64
1:xrootd-devel-4.4.1-1.el7.x86_64
1:xrootd-client-libs-4.4.1-1.el7.x86_64
1:xrootd-server-libs-4.4.1-1.el7.x86_64
1:xrootd-client-devel-4.4.1-1.el7.x86_64
1:xrootd-server-devel-4.4.1-1.el7.x86_64
1:xrootd-private-devel-4.4.1-1.el7.noarch
EOF"
sudo cp ../../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-0.src.rpm --enablerepo=cernonly --nogpgcheck
......
......@@ -5,11 +5,11 @@ sudo yum install -y kubernetes etcd flannel
sudo systemctl enable etcd
sudo systemctl start etcd
sudo mkdir -p /etc/kubernetes
sudo cp -rv /vmBootstrap/kubernetes/* /etc/kubernetes
sudo cp -rv kubernetes/* /etc/kubernetes
sudo perl -p -i -e 's/^(KUBELET_ARGS=).*$/$1"--allow_privileged=true --cluster-dns=10.254.199.254 --cluster-domain=cluster.local"/' /etc/kubernetes/kubelet
# We put the config in 2 places as flanneld might fetch it from different places.
curl -L http://localhost:2379/v2/keys/flannel/network/config -XPUT --data-urlencode value@/vmBootstrap/kubernetes/flannel-config.json
curl -L http://localhost:2379/v2/keys/atomic.io/network/config -XPUT --data-urlencode value@/vmBootstrap/kubernetes/flannel-config.json
curl -L http://localhost:2379/v2/keys/flannel/network/config -XPUT --data-urlencode value@kubernetes/flannel-config.json
curl -L http://localhost:2379/v2/keys/atomic.io/network/config -XPUT --data-urlencode value@kubernetes/flannel-config.json
sudo systemctl enable flanneld
sudo systemctl start flanneld
sudo systemctl enable kubelet
......
......@@ -10,9 +10,9 @@ cat >> /etc/sudoers << EOFsudoers
eric ALL=(ALL) NOPASSWD: ALL
EOFsudoers
chmod a+rx ~eric
sudo -u eric cp /vmBootstrap/gitScripts/.git-* ~eric/
cat /vmBootstrap/gitScripts/bash_profile.hook >> ~eric/.bash_profile
sudo -u eric cp /vmBootstrap/tigConf/tigrc ~eric/.tigrc
sudo -u eric cp gitScripts/.git-* ~eric/
cat gitScripts/bash_profile.hook >> ~eric/.bash_profile
sudo -u eric cp tigConf/tigrc ~eric/.tigrc
echo Installing minimal tools and tape tools
yum install -y git cmake rpm-build gcc gcc-c++ vim gdb cgdb strace ltrace screen tig lsscsi mt-st mtx sg3_utils jq
......
[castor]
name=CASTOR Repositories in LINUXSOFT
baseurl=http://linuxsoft.cern.ch/internal/repos/castor7-testing/$basearch/os
enabled=0
gpgcheck=0
priority=2
[cta-ci-xroot]
name=CTA CI repo xroot cache
baseurl=https://cta-ci-repo.web.cern.ch/cta-ci-repo/xroot/
priority=4
gpgcheck=0
enabled=1
[eos-citrine-depend]
name=EOS Citrine
baseurl=http://dss-ci-repo.web.cern.ch/dss-ci-repo/eos/citrine-depend/el-7-x86_64/
gpgcheck=0
priority=4
enabled=1
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment