Commit d7c054b3 authored by Holger Levsen's avatar Holger Levsen
Browse files

s#slave#agent#g as done by upstream



Signed-off-by: Holger Levsen's avatarHolger Levsen <holger@layer-acht.org>
parent 6121cd22
...@@ -92,7 +92,7 @@ cd vncdotool/ ...@@ -92,7 +92,7 @@ cd vncdotool/
python setup.py install python setup.py install
---- ----
=== adding new slaves to jenkins === adding new agents to jenkins
Process to follow to add a new node to jenkins: Process to follow to add a new node to jenkins:
...@@ -104,12 +104,12 @@ Process to follow to add a new node to jenkins: ...@@ -104,12 +104,12 @@ Process to follow to add a new node to jenkins:
* 'Labels': `$arch $short_name` (with '$short_name' like ff64u if the hostname is ff64u-armhf-rb) * 'Labels': `$arch $short_name` (with '$short_name' like ff64u if the hostname is ff64u-armhf-rb)
* 'Usage': select "Only build jobs with label expressions matching this node" * 'Usage': select "Only build jobs with label expressions matching this node"
* 'Launch method': select "Launch agent via execution of command on the master" * 'Launch method': select "Launch agent via execution of command on the master"
* 'Launch command': `/srv/jenkins/bin/start-slave.sh` * 'Launch command': `/srv/jenkins/bin/start-agent.sh`
* 'Availability': select "Take this agent online when in demand, and offline when idle" * 'Availability': select "Take this agent online when in demand, and offline when idle"
* 'In demand delay': 0 (so that builds will start right away) * 'In demand delay': 0 (so that builds will start right away)
* 'Idle delay': 5 (this is an arbitrary amount of time) * 'Idle delay': 5 (this is an arbitrary amount of time)
The slave setup is done so that the slave.jar program doesn't get run on the remote nodes, The agent setup is done so that the agent.jar program doesn't get run on the remote nodes,
to avoid needing Java available in there. to avoid needing Java available in there.
Jobs wanting to run entirely on a remote host will just execute `jenkins_master_wrapper.sh` Jobs wanting to run entirely on a remote host will just execute `jenkins_master_wrapper.sh`
which will do the needed ssh and execute `jenkins_node_wrapper.sh` on the remote host, which will do the needed ssh and execute `jenkins_node_wrapper.sh` on the remote host,
......
#!/bin/bash #!/bin/bash
# Copyright © 2015-2017 Holger Levsen (holger@layer-acht.org) # Copyright © 2015-2018 Holger Levsen (holger@layer-acht.org)
# Copyright © 2017 Hans-Christoph Steiner (hans@guardianproject.info) # Copyright © 2017 Hans-Christoph Steiner (hans@guardianproject.info)
# released under the GPLv=2 # released under the GPLv=2
...@@ -17,9 +17,9 @@ common_init "$@" ...@@ -17,9 +17,9 @@ common_init "$@"
GIT_REPO=https://gitlab.com/fdroid/fdroidserver GIT_REPO=https://gitlab.com/fdroid/fdroidserver
# define and clean work space on the machine actually running the # define and clean work space on the machine actually running the
# build. jenkins.debian.net does not use Jenkins slaves. Instead # build. jenkins.debian.net does not use Jenkins agents. Instead
# /srv/jenkins/bin/jenkins_master_wrapper.sh runs this script on the # /srv/jenkins/bin/jenkins_master_wrapper.sh runs this script on the
# slave using a directly call to ssh, so this script has to do all # agent using a directly call to ssh, so this script has to do all
# of the workspace setup. # of the workspace setup.
export WORKSPACE=$BASE/reproducible_fdroid_build_apps export WORKSPACE=$BASE/reproducible_fdroid_build_apps
if [ -e $WORKSPACE/.git ]; then if [ -e $WORKSPACE/.git ]; then
......
#!/bin/bash #!/bin/bash
# Copyright © 2015-2017 Holger Levsen (holger@layer-acht.org) # Copyright © 2015-2018 Holger Levsen (holger@layer-acht.org)
# Copyright © 2017 Hans-Christoph Steiner (hans@guardianproject.info) # Copyright © 2017 Hans-Christoph Steiner (hans@guardianproject.info)
# released under the GPLv=2 # released under the GPLv=2
...@@ -17,9 +17,9 @@ common_init "$@" ...@@ -17,9 +17,9 @@ common_init "$@"
GIT_REPO=https://gitlab.com/fdroid/fdroidserver GIT_REPO=https://gitlab.com/fdroid/fdroidserver
# define and clean work space on the machine actually running the # define and clean work space on the machine actually running the
# build. jenkins.debian.net does not use Jenkins slaves. Instead # build. jenkins.debian.net does not use Jenkins agents. Instead
# /srv/jenkins/bin/jenkins_master_wrapper.sh runs this script on the # /srv/jenkins/bin/jenkins_master_wrapper.sh runs this script on the
# slave using a directly call to ssh, so this script has to do all # agent using a directly call to ssh, so this script has to do all
# of the workspace setup. # of the workspace setup.
export WORKSPACE=$BASE/reproducible_fdroid_build_apps export WORKSPACE=$BASE/reproducible_fdroid_build_apps
if [ -e $WORKSPACE/.git ]; then if [ -e $WORKSPACE/.git ]; then
......
#!/bin/bash #!/bin/bash
# Copyright © 2015-2016 Holger Levsen <holger@layer-acht.org> # Copyright © 2015-2018 Holger Levsen <holger@layer-acht.org>
# Copyright © 2016-2017 Hans-Christoph Steiner (hans@guardianproject.info) # Copyright © 2016-2017 Hans-Christoph Steiner (hans@guardianproject.info)
# released under the GPLv=2 # released under the GPLv=2
...@@ -17,9 +17,9 @@ common_init "$@" ...@@ -17,9 +17,9 @@ common_init "$@"
GIT_REPO=https://gitlab.com/fdroid/fdroidserver GIT_REPO=https://gitlab.com/fdroid/fdroidserver
# define and clean work space on the machine actually running the # define and clean work space on the machine actually running the
# build. jenkins.debian.net does not use Jenkins slaves. Instead # build. jenkins.debian.net does not use Jenkins agents. Instead
# /srv/jenkins/bin/jenkins_master_wrapper.sh runs this script on the # /srv/jenkins/bin/jenkins_master_wrapper.sh runs this script on the
# slave using a directly call to ssh, so this script has to do all # agent using a directly call to ssh, so this script has to do all
# of the workspace setup. # of the workspace setup.
export WORKSPACE=$BASE/reproducible_setup_fdroid_build_environment export WORKSPACE=$BASE/reproducible_setup_fdroid_build_environment
if [ -e $WORKSPACE/.git ]; then if [ -e $WORKSPACE/.git ]; then
......
#!/bin/sh #!/bin/sh
# slave.jar has to be downloaded from http://localhost/jnlpJars/slave.jar # agent.jar has to be downloaded from http://localhost/jnlpJars/agent.jar
# There doesn't seem to be any better way to figure out the slave name # There doesn't seem to be any better way to figure out the agent name
# from here, let's just hope all WORKSPACE have been set correctly # from here, let's just hope all WORKSPACE have been set correctly
NODE_NAME="$(basename ${WORKSPACE})" NODE_NAME="$(basename ${WORKSPACE})"
echo "Starting slave.jar for ${NODE_NAME}..." echo "Starting agent.jar for ${NODE_NAME}..."
f="/var/lib/jenkins/offline_nodes" f="/var/lib/jenkins/offline_nodes"
if [ -f "$f" ]; then if [ -f "$f" ]; then
if grep -q "$NODE_NAME" "$f"; then if grep -q "$NODE_NAME" "$f"; then
echo "This node is currently marked as offline, not starting slave.jar" echo "This node is currently marked as offline, not starting agent.jar"
exit 1 exit 1
fi fi
fi fi
echo "This jenkins slave.jar will run as PID $$." echo "This jenkins agent.jar will run as PID $$."
#export JAVA_ARGS="-Xmn128M -Xms1G -Xmx1G -client" #export JAVA_ARGS="-Xmn128M -Xms1G -Xmx1G -client"
export JAVA_ARGS="-Xmx2G" export JAVA_ARGS="-Xmx2G"
#export MALLOC_ARENA_MAX=1 #export MALLOC_ARENA_MAX=1
exec java $JAVA_ARGS -jar /var/lib/jenkins/slave.jar exec java $JAVA_ARGS -jar /var/lib/jenkins/agent.jar
# jenkins itself, to start the slave agents # jenkins itself, to start the agents
restrict,from="127.0.0.1,::1" ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDSPYH1KKv6PsW0IgNcPbI/l2rjhxPaOGT/lbgaPzVjwPWlqHAEB0PctzNzkduRiaEMhTmcDTCsMOVkBGiPMmuBltqzpGSjcAc3v/sDYaDn+Onj5pTaG8HBMKqxOQP9I24xNjb21tRrmRSDAUrSHHiEm2Lu64efA3vE/L447ZYs53aLd2fBt0zoFKHswasFR57y6y9/3VJTdAnGrAIq9QxnMi2Tbg/KZDiYYmodfCMrAnATTkwGntcINz7FO/HAxHAs1YryzuoDOA02Xqxg4uzlxQgkL91/OhKVKd+2TBg+FAVUkiCKY+uSCdgN1yjoUa0fPFaWEbtEwrWfZgIAIINf jenkins@jenkins.debian.net restrict,from="127.0.0.1,::1" ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDSPYH1KKv6PsW0IgNcPbI/l2rjhxPaOGT/lbgaPzVjwPWlqHAEB0PctzNzkduRiaEMhTmcDTCsMOVkBGiPMmuBltqzpGSjcAc3v/sDYaDn+Onj5pTaG8HBMKqxOQP9I24xNjb21tRrmRSDAUrSHHiEm2Lu64efA3vE/L447ZYs53aLd2fBt0zoFKHswasFR57y6y9/3VJTdAnGrAIq9QxnMi2Tbg/KZDiYYmodfCMrAnATTkwGntcINz7FO/HAxHAs1YryzuoDOA02Xqxg4uzlxQgkL91/OhKVKd+2TBg+FAVUkiCKY+uSCdgN1yjoUa0fPFaWEbtEwrWfZgIAIINf jenkins@jenkins.debian.net
# remote schedule packages building for reproducible builds testing, only from alioth.debian.org # remote schedule packages building for reproducible builds testing, only from alioth.debian.org
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# No builds will be dispatched to those nodes, and the nodes will be marked # No builds will be dispatched to those nodes, and the nodes will be marked
# as offline in the jenkins UI. # as offline in the jenkins UI.
# FIXME: the latter is needed by start-slave.sh, the former probably elsewhere # FIXME: the latter is needed by start-agent.sh, the former probably elsewhere
# FIXME: do debug # FIXME: do debug
#example-armhf-rb.debian.net #example-armhf-rb.debian.net
#example-armhf-rb #example-armhf-rb
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment