Skip to content

Commit b22dcda

Browse files
committed
work on using podman instead of docker
1 parent 26e78fb commit b22dcda

11 files changed

+155
-142
lines changed

Diff for: helper.fish

+10
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
set -gx KEYNAME 86FEC04D
22
set -gx KEYNAME_OLD 115E1684
33

4+
if test -f /usr/bin/podman
5+
echo podman
6+
set -xg DOCKER "podman"
7+
set -xg DOCKER_URL_PREFIX "docker.io/"
8+
else
9+
set -xg DOCKER "docker"
10+
end
11+
12+
413
function lockDirectory
514
# Now grab the lock ourselves:
615
set -l pid (echo %self)
@@ -2237,6 +2246,7 @@ function findArangoDBVersion
22372246
echo "ARANGODB_SNIPPETS: $ARANGODB_SNIPPETS"
22382247
echo "ARANGODB_TGZ_UPSTREAM: $ARANGODB_TGZ_UPSTREAM"
22392248
echo "DOCKER_TAG: $DOCKER_TAG"
2249+
echo "DOCKER: $DOCKER"
22402250
echo '------------------------------------------------------------------------------'
22412251
echo
22422252
end

Diff for: helper.linux.fish

+117-114
Large diffs are not rendered by default.

Diff for: jenkins/docker/starter.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ if test -z "$SSH_AUTH_SOCK"; then
1515
agentstarted=1
1616
fi
1717

18-
docker run -v $HOME/.ssh:/root/.ssh arangodb/ssh-client ssh -o StrictHostKeyChecking=no -T [email protected]
18+
"$DOCKER" run -v $HOME/.ssh:/root/.ssh arangodb/ssh-client ssh -o StrictHostKeyChecking=no -T [email protected]
1919

20-
docker run \
20+
"$DOCKER" run \
2121
-e "PDOCKER=`getent group docker | cut -d: -f3`" \
2222
-e "PGID=`id -g`" \
2323
-e "PHOME=$HOME" \

Diff for: jenkins/forTestDocker.fish

+6-6
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ and downloadStarter
3838
and setArchSuffix
3939
and set -xg HUB_COMMUNITY "arangodb/arangodb-test:$DOCKER_TAG_JENKINS$archSuffix"
4040
and buildDockerImage $HUB_COMMUNITY
41-
and docker push $HUB_COMMUNITY
42-
and docker tag $HUB_COMMUNITY $GCR_REG_PREFIX$HUB_COMMUNITY
43-
and docker push $GCR_REG_PREFIX$HUB_COMMUNITY
41+
and "$DOCKER" push $HUB_COMMUNITY
42+
and "$DOCKER" tag $HUB_COMMUNITY $GCR_REG_PREFIX$HUB_COMMUNITY
43+
and "$DOCKER" push $GCR_REG_PREFIX$HUB_COMMUNITY
4444
and echo $HUB_COMMUNITY >> $WORKSPACE/imagenames.log
4545
and echo $GCR_REG_PREFIX$HUB_COMMUNITY >> $WORKSPACE/imagenames.log
4646

@@ -60,9 +60,9 @@ and copyRclone "linux"
6060
and setArchSuffix
6161
and set -xg HUB_ENTERPRISE "arangodb/enterprise-test:$DOCKER_TAG_JENKINS$archSuffix"
6262
and buildDockerImage $HUB_ENTERPRISE
63-
and docker push $HUB_ENTERPRISE
64-
and docker tag $HUB_ENTERPRISE $GCR_REG_PREFIX$HUB_ENTERPRISE
65-
and docker push $GCR_REG_PREFIX$HUB_ENTERPRISE
63+
and "$DOCKER" push $HUB_ENTERPRISE
64+
and "$DOCKER" tag $HUB_ENTERPRISE $GCR_REG_PREFIX$HUB_ENTERPRISE
65+
and "$DOCKER" push $GCR_REG_PREFIX$HUB_ENTERPRISE
6666
and echo $HUB_ENTERPRISE >> $WORKSPACE/imagenames.log
6767
and echo $GCR_REG_PREFIX$HUB_ENTERPRISE >> $WORKSPACE/imagenames.log
6868

Diff for: jenkins/forTestDockerCommunity.fish

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ and downloadStarter
3838
and setArchSuffix
3939
and set -xg HUB_COMMUNITY "arangodb/arangodb-test:$DOCKER_TAG_JENKINS$archSuffix"
4040
and buildDockerImage $HUB_COMMUNITY
41-
and docker push $HUB_COMMUNITY
42-
and docker tag $HUB_COMMUNITY $GCR_REG_PREFIX$HUB_COMMUNITY
43-
and docker push $GCR_REG_PREFIX$HUB_COMMUNITY
41+
and "$DOCKER" push $HUB_COMMUNITY
42+
and "$DOCKER" tag $HUB_COMMUNITY $GCR_REG_PREFIX$HUB_COMMUNITY
43+
and "$DOCKER" push $GCR_REG_PREFIX$HUB_COMMUNITY
4444
and echo $HUB_COMMUNITY >> $WORKSPACE/imagenames.log
4545
and echo $GCR_REG_PREFIX$HUB_COMMUNITY >> $WORKSPACE/imagenames.log
4646

Diff for: jenkins/forTestDockerEnterprise.fish

+3-3
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ and copyRclone "linux"
4040
and setArchSuffix
4141
and set -xg HUB_ENTERPRISE "arangodb/enterprise-test:$DOCKER_TAG_JENKINS$archSuffix"
4242
and buildDockerImage $HUB_ENTERPRISE
43-
and docker push $HUB_ENTERPRISE
44-
and docker tag $HUB_ENTERPRISE $GCR_REG_PREFIX$HUB_ENTERPRISE
45-
and docker push $GCR_REG_PREFIX$HUB_ENTERPRISE
43+
and "$DOCKER" push $HUB_ENTERPRISE
44+
and "$DOCKER" tag $HUB_ENTERPRISE $GCR_REG_PREFIX$HUB_ENTERPRISE
45+
and "$DOCKER" push $GCR_REG_PREFIX$HUB_ENTERPRISE
4646
and echo $HUB_ENTERPRISE >> $WORKSPACE/imagenames.log
4747
and echo $GCR_REG_PREFIX$HUB_ENTERPRISE >> $WORKSPACE/imagenames.log
4848

Diff for: jenkins/helper/runAnyPerformanceResults.fish

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ if count $src/results-*.csv > /dev/null
141141
end
142142

143143
echo "Generating images"
144-
docker run -v (pwd)/work:/work pavlov99/gnuplot gnuplot $gp
144+
"$DOCKER" run -v (pwd)/work:/work pavlov99/gnuplot gnuplot $gp
145145
or begin
146146
echo "=== $gp ==="
147147
cat $gp

Diff for: jenkins/helper/server.inc

+7-7
Original file line numberDiff line numberDiff line change
@@ -41,18 +41,18 @@ echo "AUTH: $ARANGO_AUTH"
4141
echo "EDITION: $ARANGO_EDITION"
4242
echo
4343

44-
docker kill $ARANGO_DOCKER_NAME > /dev/null 2>&1 || true
45-
docker rm -fv $ARANGO_DOCKER_NAME > /dev/null 2>&1 || true
46-
docker pull $DOCKER_IMAGE
47-
docker run --rm --cap-add SYS_NICE $DOCKER_IMAGE arangosh --version | tee ./${ARANGO_DOCKER_NAME}.txt
44+
"$DOCKER" kill $ARANGO_DOCKER_NAME > /dev/null 2>&1 || true
45+
"$DOCKER" rm -fv $ARANGO_DOCKER_NAME > /dev/null 2>&1 || true
46+
"$DOCKER" pull $DOCKER_IMAGE
47+
"$DOCKER" run --rm --cap-add SYS_NICE $DOCKER_IMAGE arangosh --version | tee ./${ARANGO_DOCKER_NAME}.txt
4848
export SERVER_FULL_VERSION=$(cat ./${ARANGO_DOCKER_NAME}.txt | grep -oP '^server-version: \K.*$')
4949

5050
OUTDIR="`pwd`/output"
5151
rm -rf $OUTDIR
5252
mkdir $OUTDIR
5353
DOCKER_AUTH=""
5454
STARTER_AUTH=""
55-
DOCKER_CMD="docker run --rm --hostname localhost --cap-add SYS_NICE --name $ARANGO_DOCKER_NAME -d $EXPORT_PORTS -v $OUTDIR:/testrun"
55+
DOCKER_CMD="$DOCKER run --rm --hostname localhost --cap-add SYS_NICE --name $ARANGO_DOCKER_NAME -d $EXPORT_PORTS -v $OUTDIR:/testrun"
5656
#DOCKER_IMAGE="registry.arangodb.biz:5000/arangodb/linux-${ARANGO_EDITION}-maintainer:$ARANGO_BRANCH"
5757
STARTER_CMD="arangodb --starter.address localhost --starter.local --server.storage-engine $ARANGO_STORAGE_ENGINE --starter.data-dir /testrun ${MMFILES_DEPRECATED_OPTION}"
5858
STARTER_MODE=""
@@ -101,7 +101,7 @@ command="$DOCKER_CMD $DOCKER_AUTH $DOCKER_IMAGE /testrun/starter.sh $STARTER_CMD
101101
echo $command
102102
$command
103103

104-
trap "$(trap -p | grep EXIT | sed "s/.*-- '\(.*\)'.EXIT/\1;/g")docker rm -fv $ARANGO_DOCKER_NAME ; sudo chown jenkins:jenkins -R output ; tar czf arango_data.tar.gz output" EXIT
104+
trap "$(trap -p | grep EXIT | sed "s/.*-- '\(.*\)'.EXIT/\1;/g") "$DOCKER" rm -fv $ARANGO_DOCKER_NAME ; sudo chown jenkins:jenkins -R output ; tar czf arango_data.tar.gz output" EXIT
105105

106106
echo "Waiting until ArangoDB is ready on port ${ARANGO_PORTS[0]}"
107107

@@ -131,7 +131,7 @@ done
131131

132132
if [ $count -ge 240 ]; then
133133
echo "docker logs:"
134-
docker logs $ARANGO_DOCKER_NAME
134+
"$DOCKER" logs $ARANGO_DOCKER_NAME
135135

136136
echo
137137
echo "curl:"

Diff for: jenkins/runGobenchPerformance.fish

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ and popd
2929

3030
and sudo rm -rf work/database $simple/results.csv
3131
and echo "==== starting performance run ===="
32-
and echo "docker run -e ARANGO_LICENSE_KEY=$ARANGODB_LICENSE_KEY -v (pwd)/work/ArangoDB:/ArangoDB -v (pwd)/work:/data -v $simple:/performance -v $gobenchdir:/gobench"
32+
and echo "$DOCKER run -e ARANGO_LICENSE_KEY=$ARANGODB_LICENSE_KEY -v (pwd)/work/ArangoDB:/ArangoDB -v (pwd)/work:/data -v $simple:/performance -v $gobenchdir:/gobench"
3333

3434
and for protocol in VST HTTP
3535
echo "Protocol: " $protocol
36-
docker run \
36+
"$DOCKER" run \
3737
--cap-add SYS_NICE \
3838
-e ARANGO_LICENSE_KEY=$ARANGODB_LICENSE_KEY \
3939
-e ARANGO_BRANCH=$ARANGODB_BRANCH \

Diff for: jenkins/runGobenchPerformanceResults.fish

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,4 +81,4 @@ if test (count work/images/*.png) -gt 0
8181
end
8282

8383
echo "Generating images"
84-
docker run -v (pwd)/work:/work pavlov99/gnuplot gnuplot $gp
84+
"$DOCKER" run -v (pwd)/work:/work pavlov99/gnuplot gnuplot $gp

Diff for: jenkins/runSimplePerformance.fish

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ and sudo rm -rf work/database $simple/results.csv
2626
and cat /proc/sys/kernel/core_pattern
2727
and echo "==== starting performance run ===="
2828
and if test -z "$DOCKER_IMAGE"
29-
docker run \
29+
"$DOCKER" run \
3030
--ulimit core=-1 \
3131
-e ARANGO_LICENSE_KEY=$ARANGODB_LICENSE_KEY \
3232
-v (pwd)/work/ArangoDB:/ArangoDB \
@@ -44,7 +44,7 @@ and if test -z "$DOCKER_IMAGE"
4444
/data/database \
4545
--javascript.script simple/$ARANGODB_TEST_CONFIG"
4646
else
47-
docker run \
47+
"$DOCKER" run \
4848
--ulimit core=-1 \
4949
-e ARANGO_LICENSE_KEY=$ARANGODB_LICENSE_KEY \
5050
-v (pwd)/work:/data \
@@ -63,7 +63,7 @@ end
6363
set -l s $status
6464

6565
if count $simple/core* >/dev/null
66-
docker run \
66+
"$DOCKER" run \
6767
-v $simple:/performance \
6868
--rm \
6969
$DOCKER_IMAGE \

0 commit comments

Comments
 (0)