Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cta
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dCache
cta
Commits
64143287
Commit
64143287
authored
6 years ago
by
Cedric CAFFY
Browse files
Options
Downloads
Patches
Plain Diff
Added documentation about installing a CentOS VM and a CTA Environment
parent
8bdad636
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
continuousintegration/buildtree_runner/vmBootstrap/InstallCTAEnvironment.md
+111
-0
111 additions, 0 deletions
...ion/buildtree_runner/vmBootstrap/InstallCTAEnvironment.md
with
111 additions
and
0 deletions
continuousintegration/buildtree_runner/vmBootstrap/InstallCTAEnvironment.md
0 → 100644
+
111
−
0
View file @
64143287
## Install a CentOS VM on CentOS
*Source: https://www.linuxtechi.com/install-kvm-hypervisor-on-centos-7-and-rhel-7/*
1.
Download the CERN Centos here : http://linuxsoft.cern.ch/cern/centos/7/os/x86_64/images/boot.iso
2.
Install Virtual Machine Manager and KVM / QEMU related libs :
```
bash
sudo
yum
install
qemu-kvm qemu-img virt-manager libvirt libvirt-python libvirt-client virt-install virt-viewer bridge-utils
```
3.
Start and enable the libvirtd service :
```
bash
sudo
systemctl start libvirtd
sudo
systemctl
enable
libvirtd
```
4.
Launch virt-manager by typing :
```
bash
virt-manager
```
5.
Create a new virtual machine by clicking on the corresponding button
-
Choose Local install media
-
Use ISO image, browse
-
Set the Memory (RAM) you want (I suggest using 8192 Mib)
-
Set the number of CPU you want (I suggest 2)
-
Create a disk image for the virtual machine (choose the size you allocate for the disk)
-
Name the machine and click Finish
6.
Install the CERN CentOS following the instructions here : http://linux.web.cern.ch/linux/centos7/docs/install.shtml
## Setting up CTA environment in your VM
1.
Clone the project from the CTA's gitlab page : https://gitlab.cern.ch/cta/CTA
2.
go to the CTA folder and init the xrootd-ssi-profobuf-interface submodule :
```
bash
git submodule init
git submodule update
```
3.
Go to CTA/continuousintegration/buildtree_runner/vmBootstrap and type the following commands :
```
bash
cp
gitScripts/.git-
*
~
cat
gitScripts/bash_profile.hook
>>
~/.bash_profile
source
~/.bash_profile
cp
tigConf/tigrc ~/.tigrc
yum
install
-y
git cmake rpm-build gcc gcc-c++ vim gdb cgdb strace ltrace screen tig lsscsi mt-st mtx sg3_utils jq psmisc yum-plugin-versionlock
```
4.
Bootstrap CTA :
```
bash
cat
>
~/path_to_CTA_folder/.git/hooks/post-checkout
<<
EOFGitHook
#!/bin/sh
cd `git rev-parse --show-toplevel`
git submodule update --init --recursive
EOFGitHook
chmod
+x ~/path_to_CTA_folder/.git/hooks/post-checkout
cp
~/path_to_CTA_folder/.git/hooks/post-checkout ~/path_to_CTA_folder/.git/hooks/post-merge
```
5.
Build CTA's srpm
Go to the CTA parent's folder and type
```
bash
mkdir
CTA-build-srpm
cd
CTA-build-srpm
cmake
-DPackageOnly
:Bool
=
true
../CTA
make cta_srpm
```
6.
Install repositories necessary for CTA's compilation works
```
bash
cd
~/path_to_CTA_folder/continuousintegration/buildtree_runner/vmBootstrap
sudo
yum-config-manager
--add-repo
=
../../docker/ctafrontend/cc7/etc/yum.repos.d/eos-citrine-depend.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-config-manager
--add-repo
=
ceph-internal.repo
```
7.
Install yum-plugin-priorities
```
bash
sudo
yum
install
-y
yum-plugin-priorities
```
8.
Add versionlock for xrootd
```
bash
sudo cp
../../docker/ctafrontend/cc7/etc/yum/pluginconf.d/versionlock.list /etc/yum/pluginconf.d/versionlock.list
```
9.
Install build dependencies
10.
Verify you have the CentOS-CERN.repo, epel.repo and elrepo.repo in /etc/yum.repos.d/
Then, go to the CTA-build-srpm directory and execute :
```
bash
sudo
yum-builddep
-y
./RPM/SRPMS/cta-0-1.src.rpm
--nogpgcheck
```
10.
Install mhvtl
```
bash
sudo
yum
install
-y
mhvtl-utils kmod-mhvtl mhvtl-utils
--enablerepo
=
castor
```
11.
Build CTA
Create a directory near the CTA one called CTA-build, go into it and type
```
bash
cmake ../CTA
make
-j
4
```
12.
Run the unit tests of CTA located in CTA-build/tests
```
bash
./cta-unitTests
```
If tests don't run, edit the /etc/resolv.conf file and add a line with
```
search cern.ch
```
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment