aboutsummaryrefslogtreecommitdiff
path: root/stretch-arm64-obsworker
diff options
context:
space:
mode:
authorRiku Voipio <riku.voipio@linaro.org>2017-04-04 16:21:34 +0300
committerFathi Boudra <fathi.boudra@linaro.org>2017-04-07 06:03:15 +0000
commit8297f29b57d1237f782ab3f81206f9c57dd87d9a (patch)
treece989b5b6e315dd2e3cf217bba601aaa9c1aeaf6 /stretch-arm64-obsworker
parentf82fc92d446990782904de2a6eac3ffe8dd03ccf (diff)
new docker images: obsworker
Arm64 and amd64 obsworker images. Usage: docker run -d -e OBS_SERVER=obs -e OBS_IP=192.168.1.6 -e OBS_JOBS=4 --privileged -h workername -p 5454:5454 -t linaro/obsworker-amd64 Where - OBS_IP - the IP of obs server - OBS_SERVER - the hostname obs *server* thinks it is - OBS_JOBS - make -j - workername - the name of the worker that will be visible in OBS status monitor - 5454 - hardcoded port number, obs server will contact worker here Change-Id: I65537ff79d5fb17ce6283cefba029b1c82a53baa
Diffstat (limited to 'stretch-arm64-obsworker')
-rw-r--r--stretch-arm64-obsworker/Dockerfile30
-rwxr-xr-xstretch-arm64-obsworker/build.sh10
-rwxr-xr-xstretch-arm64-obsworker/start-obsworker11
3 files changed, 51 insertions, 0 deletions
diff --git a/stretch-arm64-obsworker/Dockerfile b/stretch-arm64-obsworker/Dockerfile
new file mode 100644
index 00000000..8aa4ce8b
--- /dev/null
+++ b/stretch-arm64-obsworker/Dockerfile
@@ -0,0 +1,30 @@
+FROM linaro/base-arm64-debian:stretch
+
+COPY start-obsworker /
+
+RUN apt-get update \
+ && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
+ apt-utils \
+ binutils \
+ bsdtar \
+ cpio \
+ curl \
+ debootstrap \
+ libcompress-raw-zlib-perl \
+ libtimedate-perl \
+ libxml-parser-perl \
+ libxml-simple-perl \
+ lsb-base \
+ lvm2 \
+ lzma \
+ psmisc \
+ rpm \
+ util-linux \
+ && apt-get clean \
+ && rm -rf \
+ /var/lib/apt/lists/* \
+ /tmp/* \
+ /var/tmp/*
+
+EXPOSE 5454
+CMD ["/start-obsworker"]
diff --git a/stretch-arm64-obsworker/build.sh b/stretch-arm64-obsworker/build.sh
new file mode 100755
index 00000000..6641e63f
--- /dev/null
+++ b/stretch-arm64-obsworker/build.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+set -e
+
+export LANG=C
+
+DISTRIBUTION=$(basename ${PWD} | cut -f1 -d '-')
+ARCHITECTURE=$(basename ${PWD} | cut -f2 -d '-')
+
+docker build --pull --tag=linaro/ci-${ARCHITECTURE}-obsworker .
diff --git a/stretch-arm64-obsworker/start-obsworker b/stretch-arm64-obsworker/start-obsworker
new file mode 100755
index 00000000..6245e22b
--- /dev/null
+++ b/stretch-arm64-obsworker/start-obsworker
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+rm -rf /srv/obs
+mkdir -p /srv/obs/worker/root_1
+mkdir -p /srv/obs/run/worker/{boot,1}
+cd /srv/obs/run/worker/boot
+echo $OBS_IP $OBS_SERVER >> /etc/hosts
+curl -s "http://$OBS_SERVER:5252/getworkercode" | cpio --quiet --extract
+ln -s . XML
+
+exec /usr/bin/perl -w ./bs_worker --hardstatus --port 5454 --root /srv/obs/worker/root_1 --statedir /srv/obs/run/worker/1 --id `hostname`:1 --reposerver http://$OBS_SERVER:5252 --jobs $OBS_JOBS