Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
116 lines (116 loc) · 3.61 KB

File metadata and controls

116 lines (116 loc) · 3.61 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
pipeline {
agent { node {
label "centos9 && x86_64"
}}
environment {
CDS_CONF = "${env.WORKSPACE}/ceph-devstack.yml"
}
stages {
stage("Setup system") {
steps {
script {
env.OLD_AIO_MAX_NR = """${sh(returnStdout: true, script: "sysctl -b fs.aio-max-nr")}"""
}
sh """
sudo dnf install -y podman podman-plugins python3-virtualenv policycoreutils-devel selinux-policy-devel
sudo dnf update -y container\\* podman\\* selinux\\*
sudo sysctl fs.aio-max-nr=1048576
sudo usermod -a -G disk ${env.USER}
mkdir -p ~/.local/share/containers
# The below command is not idempotent, hence the '|| true'.
# See https://patchwork.kernel.org/project/selinux/patch/20240214122706.522873-1-vmojzis@redhat.com/
sudo semanage fcontext -a -e /var/lib/containers ~/.local/share/containers || true
sudo restorecon -R ~/.local/share/containers
sudo setsebool -P container_manage_cgroup=true
sudo setsebool -P container_use_devices=true
cd ${env.WORKSPACE}/ceph_devstack
make -f /usr/share/selinux/devel/Makefile ceph_devstack.pp
sudo semodule -i ceph_devstack.pp
"""
}
}
stage("Clone teuthology") {
steps {
sh """
git clone -b ${env.TEUTHOLOGY_BRANCH} https://github.com/ceph/teuthology ${env.WORKSPACE}/teuthology
"""
}
}
stage("Setup ceph-devstack") {
steps {
sh """
python3 -V
python3 -m venv venv
source ./venv/bin/activate
python -V
pip3 install -U pip
pip3 install -e .
if [ -z ${env.TEUTHOLOGY_BRANCH} ]; then
python3 -c "import yaml; print(yaml.safe_dump({'data_dir': '${env.WORKSPACE}/data'}))" > ${env.CDS_CONF}
else
python3 -c "import yaml; print(yaml.safe_dump({'containers': {'teuthology': {'repo': '${env.WORKSPACE}/teuthology'}}, 'data_dir': '${env.WORKSPACE}/data'}))" > ${env.CDS_CONF}
fi
ceph-devstack --config-file ${env.CDS_CONF} show-conf
ceph-devstack --config-file ${env.CDS_CONF} doctor
"""
}
}
stage("Build container images") {
steps {
sh """
source ./venv/bin/activate
ceph-devstack -v --config-file ${env.CDS_CONF} build
"""
}
}
stage("Pull container images") {
steps {
sh """
source ./venv/bin/activate
ceph-devstack -v --config-file ${env.CDS_CONF} pull
"""
}
}
stage("Create containers") {
steps {
sh """
source ./venv/bin/activate
ceph-devstack --config-file ${env.CDS_CONF} -v create
"""
}
}
stage("Start containers") {
steps {
sh """
source ./venv/bin/activate
ceph-devstack --config-file ${env.CDS_CONF} -v start
"""
}
}
stage("Wait for teuthology container") {
steps {
sh """
podman wait teuthology
exit \$(podman inspect -f "{{.State.ExitCode}}" teuthology)
"""
}
}
}
post {
always {
sh """
podman logs teuthology
"""
sh """
mkdir -p data/containers
podman logs teuthology 2>&1 > data/containers/teuthology.log
source ./venv/bin/activate
ceph-devstack --config-file ${env.CDS_CONF} -v remove
podman volume prune -f
podman ps -a
sudo sysctl fs.aio-max-nr=${env.OLD_AIO_MAX_NR}
"""
archiveArtifacts artifacts: 'ceph-devstack.yml,data/archive/**', fingerprint: true
}
}
}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.