This repository has been archived by the owner on Jan 8, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
update_arc.sh
executable file
·74 lines (54 loc) · 1.99 KB
/
update_arc.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/bin/sh
os_v=el7
echo "================== START PREPARATIONS ================================================================"
yum clean metadata
cd /
echo "wget 'https://source.coderefinery.org/nordugrid/arc/-/jobs/artifacts/hackathon2022/download?job=packages_${os_v}' -O artifacts.zip";
wget https://source.coderefinery.org/nordugrid/arc/-/jobs/artifacts/hackathon2022/download?job=build_${os_v} -O /artifacts.zip;
echo "unzip /artifacts.zip";
unzip artifacts.zip;
echo "Preparing local repo for installation"
printf "yum list installed\n"
yum list installed | grep createrepo
if [ $? -eq 1 ]; then yum install -y createrepo; fi;
#printf "mkdir -p /rpmbuild/RPMS/{noarch,x86_64}"
#mkdir -p /rpmbuild/RPMS/{noarch,x86_64}
printf "cd /rpmbuild/RPMS/noarch\n"
cd /rpmbuild/RPMS/noarch
printf "createrepo .\n"
createrepo .
printf "cd ../x86_64\n"
cd ../x86_64
printf "createrepo .\n"
createrepo .
cat > /etc/yum.repos.d/nordugrid-hackathon.repo <<EOF
[nordugrid-hackathon]
name=NorduGrid - $basearch - CI
baseurl=file:///rpmbuild/RPMS/x86_64
enabled=1
gpgcheck=0
[nordugrid-hackathon-noarch]
name=NorduGrid - noarch - CI
baseurl=file:///rpmbuild/RPMS/noarch
enabled=1
gpgcheck=0
EOF
printf "cat /etc/yum.repos.d/nordugrid-hackathon.repo\n"
cat /etc/yum.repos.d/nordugrid-hackathon.repo
printf '\n\n======== START Install and start ARC ==========\n'
printf "\nInstalling client packages"
printf "yum update -y nordugrid-arc-client\n"
yum update -y nordugrid-arc-client
printf "yum update -y nordugrid-arc-plugins-arcrest\n"
yum update -y nordugrid-arc-plugins-arcrest
printf "\nInstalling server packages"
printf "yum update -y nordugrid-arc-arex\n"
yum update -y nordugrid-arc-arex
printf "yum update -y nordugrid-arc-gridftpd\n"
yum update -y nordugrid-arc-gridftpd
printf "arcctl reservice start -a\n"
arcctl service restart -a
printf "arcctl service list\n"
arcctl service list
printf "\n\n======== END Install and start ARC =========="
echo "================== END PREPARATIONS ===================="