osmith has submitted this change. (
https://gerrit.osmocom.org/c/osmo-ci/+/37108?usp=email
)
Change subject: ansible: jenkins: lx2: configure tmpfs
......................................................................
ansible: jenkins: lx2: configure tmpfs
Add ansible rules to put jenkins workspace and ccache dirs into a tmpfs.
Related: OS#5873
Change-Id: I81e03f8d2013dda93395d0017b45f757a15c4ec2
---
M ansible/hosts
M ansible/roles/osmocom-jenkins-slave/README.md
M ansible/roles/osmocom-jenkins-slave/defaults/main.yml
M ansible/roles/osmocom-jenkins-slave/tasks/main.yml
4 files changed, 37 insertions(+), 1 deletion(-)
Approvals:
osmith: Looks good to me, approved
Jenkins Builder: Verified
laforge: Looks good to me, but someone else must approve
fixeria: Looks good to me, but someone else must approve
diff --git a/ansible/hosts b/ansible/hosts
index 51e26b9..a0a4578 100644
--- a/ansible/hosts
+++ b/ansible/hosts
@@ -16,7 +16,7 @@
rpi4-raspbian11build-ansible-1 ansible_host=10.9.25.50 docker_max_image_space="20
GB"
rpi4-raspbian11build-ansible-2 ansible_host=10.9.25.60 docker_max_image_space="20
GB"
rpi4-raspbian11build-ansible-3 ansible_host=10.9.25.70 docker_max_image_space="20
GB"
-lx2-raspbian11build-ansible ansible_host=10.34.2.153 docker_max_image_space="20
GB"
+lx2-raspbian11build-ansible ansible_host=10.34.2.153 docker_max_image_space="20
GB" jenkins_tmpfs=True
[simtester]
simtest ansible_host=10.9.25.80
diff --git a/ansible/roles/osmocom-jenkins-slave/README.md
b/ansible/roles/osmocom-jenkins-slave/README.md
index 81f68b3..fc62472 100644
--- a/ansible/roles/osmocom-jenkins-slave/README.md
+++ b/ansible/roles/osmocom-jenkins-slave/README.md
@@ -6,3 +6,4 @@
* `generic_slave`: (true) contains tasks used by the most osmocom jenkins slaves
* `osmocom_jenkins_slave_fstrim`: (false) calls fstrim periodical
* `ttcn3_slave`: (true) install titan ttcn3 compiler and prepares the docker-playground
+* `jenkins_tmpfs`: (false) put jenkins workspaces and ccache dirs into tmpfs
diff --git a/ansible/roles/osmocom-jenkins-slave/defaults/main.yml
b/ansible/roles/osmocom-jenkins-slave/defaults/main.yml
index a4ce8ac..fc6f9fa 100644
--- a/ansible/roles/osmocom-jenkins-slave/defaults/main.yml
+++ b/ansible/roles/osmocom-jenkins-slave/defaults/main.yml
@@ -15,3 +15,6 @@
# call fstrim peridically
osmocom_jenkins_slave_fstrim: false
+
+# put jenkins workspaces and ccache dirs into tmpfs
+jenkins_tmpfs: false
diff --git a/ansible/roles/osmocom-jenkins-slave/tasks/main.yml
b/ansible/roles/osmocom-jenkins-slave/tasks/main.yml
index 1868d97..46da076 100644
--- a/ansible/roles/osmocom-jenkins-slave/tasks/main.yml
+++ b/ansible/roles/osmocom-jenkins-slave/tasks/main.yml
@@ -58,3 +58,23 @@
minute: 0
job: "fstrim / >/dev/null 2>/dev/null || true"
when: osmocom_jenkins_slave_fstrim
+
+- name: add tmpfs for /home/osmocom-build/jenkins
+ when: jenkins_tmpfs
+ ansible.posix.mount:
+ boot: true
+ path: /home/osmocom-build/jenkins
+ src: tmpfs
+ fstype: tmpfs
+ state: mounted
+ opts: "uid=1000,gid=1000"
+
+- name: add tmpfs for /home/osmocom-build/ccache
+ when: jenkins_tmpfs
+ ansible.posix.mount:
+ boot: true
+ path: /home/osmocom-build/ccache
+ src: tmpfs
+ fstype: tmpfs
+ state: mounted
+ opts: "uid=1000,gid=1000"
--
To view, visit
https://gerrit.osmocom.org/c/osmo-ci/+/37108?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I81e03f8d2013dda93395d0017b45f757a15c4ec2
Gerrit-Change-Number: 37108
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: merged