0f34b15bb3db19afab29eb496385a71ee3661178
configuration/hudson_slave_setup/mounthudsonworkspace
| ... | ... | @@ -2,6 +2,11 @@ |
| 2 | 2 | # Expects an ephemeral volume to have been mounted at /ephemeral/data and |
| 3 | 3 | # mounts that with a "bind" mount to /home/hudson/workspace. |
| 4 | 4 | # The directory is then chown/chgrp'ed to hudson |
| 5 | -mount -o bind /ephemeral/data /home/hudson/workspace |
|
| 5 | +if [ -e /dev/nvme1n1 ]; then |
|
| 6 | + mkfs.ext4 /dev/nvme1n1 |
|
| 7 | + mount /dev/nvme1n1 /home/hudson/workspace |
|
| 8 | +else |
|
| 9 | + mount -o bind /ephemeral/data /home/hudson/workspace |
|
| 10 | +fi |
|
| 6 | 11 | chgrp hudson /home/hudson/workspace |
| 7 | 12 | chown hudson /home/hudson/workspace |
wiki/howto/development/ci.md
| ... | ... | @@ -71,11 +71,13 @@ The image has been crafted specifically to contain the tools required for the bu |
| 71 | 71 | apt-get update |
| 72 | 72 | apt-get install -y unzip xvfb libxi6 libgconf-2-4 |
| 73 | 73 | curl -sS -o - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add |
| 74 | - echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list |
|
| 74 | + wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add - |
|
| 75 | + echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list |
|
| 76 | + echo "deb https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" >/etc/apt/sources.list.d/mongodb-org-4.4.list |
|
| 75 | 77 | apt-get -y update |
| 76 | 78 | apt-get -y upgrade |
| 79 | + apt-get -y install google-chrome-stable mongodb-org fwupd linux-aws linux-headers-aws linux-image-aws |
|
| 77 | 80 | apt-get -y autoremove |
| 78 | - apt-get -y install google-chrome-stable |
|
| 79 | 81 | cd /tmp |
| 80 | 82 | wget https://chromedriver.storage.googleapis.com/2.41/chromedriver_linux64.zip |
| 81 | 83 | cd /usr/bin |
| ... | ... | @@ -87,8 +89,25 @@ The image has been crafted specifically to contain the tools required for the bu |
| 87 | 89 | source /usr/local/bin/imageupgrade_functions.sh |
| 88 | 90 | download_and_install_latest_sap_jvm_8 |
| 89 | 91 | systemctl daemon-reload |
| 92 | + systemctl enable imageupgrade.service |
|
| 93 | + systemctl enable mounthudsonworkspace.service |
|
| 94 | + adduser --system --shell /bin/bash --quiet --group --disabled-password sailing |
|
| 90 | 95 | adduser --system --shell /bin/bash --quiet --group --disabled-password hudson |
| 96 | + sudo -u sailing mkdir /home/sailing/.ssh |
|
| 97 | + sudo -u sailing chmod 700 /home/sailing/.ssh |
|
| 91 | 98 | sudo -u hudson mkdir /home/hudson/.ssh |
| 99 | + sudo -u hudson chmod 700 /home/hudson/.ssh |
|
| 100 | + sudo -u hudson mkdir /home/hudson/workspace |
|
| 101 | + # Now add a password-less private ssh key "id_rsa" to /home/sailing/.ssh and make sure it is eligible to access trac@sapsailing.com |
|
| 102 | + chmod 600 /home/sailing/.ssh/id_* |
|
| 103 | + cp /home/sailing/.ssh/id_* /home/hudson/.ssh |
|
| 104 | + chown hudson /home/hudson/.ssh/* |
|
| 105 | + chgrp hudson /home/hudson/.ssh/* |
|
| 106 | + chmod 600 /home/hudson/.ssh/id_* |
|
| 107 | + # ensure the host key of sapsailing.com is accepted: |
|
| 108 | + sudo -u sailing ssh -o StrictHostKeyChecking=false trac@sapsailing.com ls >/dev/null |
|
| 109 | + sudo -u sailing git clone trac@sapsailing.com:/home/trac/git /home/sailing/code |
|
| 110 | + sudo -u hudson ssh -o StrictHostKeyChecking=false trac@sapsailing.com ls >/dev/null |
|
| 92 | 111 | echo "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6TjveiR+KkEbQQcAEcme6PCUHZLLU5ENRCXnXKaFolWrBj77xEMf3RrlLJ1TINepuwydHDtN5of0D1kjykAIlgZPeMYf9zq3mx0dQk/B2IEFSW8Mbj74mYDpQoUULwosSmWz3yAhfLRgE83C7Wvdb0ToBGVHeHba2IFsupnxU6gcInz8SfX3lP78mh4KzVkNmQdXkfEC2Qe/HUeDLdI8gqVtAOd0NKY8yv/LUf4JX8wlZb6rU9Y4nWDGbgcv/k8h67xYRI4YbtEDVkPBqCZux66JuwKF4uZ2q+rPZTYRYJWT8/0x1jz5W5DQtuDVITT1jb1YsriegOZgp9LfS11B7w== hudson@ip-172-31-28-17" >/home/hudson/.ssh/authorized_keys |
| 93 | 112 | sudo -u hudson wget -O /home/hudson/slave.jar "https://hudson.sapsailing.com/jnlpJars/slave.jar" |
| 94 | 113 | ``` |