GEODE: Configure jenkins slave for geode test 26/1726/4
authorrobert.tomczyk <robert.tomczyk@est.tech>
Wed, 24 Jul 2019 07:40:36 +0000 (08:40 +0100)
committerrobert.tomczyk <robert.tomczyk@est.tech>
Wed, 24 Jul 2019 09:45:37 +0000 (10:45 +0100)
The geode slaves will be created by jenkins OpenStack plugin from base
image: geode-build-ubuntu1804-base. The basic configuration will be done
as part of that image.

When OpenStack slave VM is create from the image, additional
configuration is required:
- Additional software package have to be installed.
- The correct version of Chrome Driver for Slenium should be present
- The geode doceker test image have to be downloaded.

Change-Id: I9111ed700414a095f1507c2aaced91ee122d38e6

jjb/geode/apache-geode-macros.yaml
jjb/geode/apache-geode-slave/apache-geode-slave-setup.yaml [new file with mode: 0644]
jjb/geode/apache-geode-slave/slave_setup.sh [new file with mode: 0755]
jjb/geode/apache-geode-test-coordinator.yaml

index 491a0253c3614f7960ba3287ead061bd0e998a12..71aca9f8b76abc2194b4a7be67b4bab1a0b70ae0 100644 (file)
     builders:
       - shell:
           !include-raw: ./apache-geode-test/execute_tests.sh
+
 - builder:
     name: 'apache-geode-execute-stressnew-macro'
     builders:
       - shell:
           !include-raw: ./apache-geode-test/execute_stressnew.sh
+
 - builder:
     name: 'apache-geode-execute-build-macro'
     builders:
       - shell:
           !include-raw: ./apache-geode-build/set_geode_build_version.sh
       - shell:
-          !include-raw: ./apache-geode-build/execute_build.sh
\ No newline at end of file
+          !include-raw: ./apache-geode-build/execute_build.sh
+
+- builder:
+    name: 'apache-geode-setup-slave-macro'
+    builders:
+      - shell:
+          !include-raw: ./apache-geode-slave/slave_setup.sh
\ No newline at end of file
diff --git a/jjb/geode/apache-geode-slave/apache-geode-slave-setup.yaml b/jjb/geode/apache-geode-slave/apache-geode-slave-setup.yaml
new file mode 100644 (file)
index 0000000..9a3a2a3
--- /dev/null
@@ -0,0 +1,45 @@
+---
+#
+# ============LICENSE_START=======================================================
+#  Copyright (C) 2018-2019 Nordix Foundation.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+- job:
+    name: 'apache-geode-SlaveSetup'
+
+    node: geode-ubuntu1804
+    disabled: false
+    concurrent: true
+
+    properties:
+      - logrotate
+
+    parameters:
+      - string:
+          name: CHROME_DRIVER_VERSION
+          default: '2.35'
+          description: JJB configured Chrome Diver used by Selenium during Geode testing
+      - string:
+          name: GEODE_DOCKER_IMAGE
+          default: 'registry.nordix.org/geode/apache-develop-test-container'
+          description: JJB configured Geode test docker image
+
+    builders:
+      - 'apache-geode-setup-slave-macro'
+
+#    publishers:
+#      - notify-slack:
+#          slack-channel: '#geode'
diff --git a/jjb/geode/apache-geode-slave/slave_setup.sh b/jjb/geode/apache-geode-slave/slave_setup.sh
new file mode 100755 (executable)
index 0000000..ef32cd1
--- /dev/null
@@ -0,0 +1,71 @@
+#!/usr/bin/env bash
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+set -o nounset
+set -o errexit
+set -o pipefail
+set -o xtrace
+
+sudo apt-get update
+sudo apt-get install -y --no-install-recommends \
+  apt-transport-https \
+  lsb-release
+
+curl -sSL https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
+sudo add-apt-repository "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main"
+sudo apt-get update
+set +e && sudo apt-get purge -y google-cloud-sdk lxc-docker && set -e
+sudo apt-get install -y --no-install-recommends \
+    aptitude \
+    ca-certificates \
+    cgroupfs-mount \
+    docker-compose \
+    docker-ce \
+    git \
+    google-chrome-stable \
+    htop \
+    jq \
+    less \
+    lsof \
+    net-tools \
+    python3 \
+    python3-pip \
+    rsync \
+    tmux \
+    unzip \
+    vim
+
+sudo cp -R /etc/alternatives /etc/keep-alternatives
+sudo apt-get install -y --no-install-recommends \
+    openjdk-8-jdk \
+    openjdk-11-jdk
+sudo rm -rf /etc/alternatives
+sudo mv /etc/keep-alternatives /etc/alternatives
+
+docker pull ${GEODE_DOCKER_IMAGE}
+sudo curl -Lo /usr/local/bin/dunit-progress https://github.com/jdeppe-pivotal/progress-util/releases/download/0.2/progress.linux
+sudo chmod +x /usr/local/bin/dunit-progress
+wget --no-verbose -O /tmp/chromedriver_linux64.zip https://chromedriver.storage.googleapis.com/${CHROME_DRIVER_VERSION}/chromedriver_linux64.zip
+sudo sudo rm -rf /opt/selenium/chromedriver
+sudo unzip /tmp/chromedriver_linux64.zip -d /opt/selenium
+rm /tmp/chromedriver_linux64.zip
+sudo mv /opt/selenium/chromedriver /opt/selenium/chromedriver-${CHROME_DRIVER_VERSION}
+sudo chmod 755 /opt/selenium/chromedriver-${CHROME_DRIVER_VERSION}
+sudo ln -fs /opt/selenium/chromedriver-${CHROME_DRIVER_VERSION} /usr/bin/chromedriver
+
+sudo apt-get clean
+sudo rm -rf /var/lib/apt/lists/*
index 01764a660cf00045c2fe345f88aafda86ffcfc93..c0bbd8aec474a90a0f0e5925f7193f58689c2b96 100644 (file)
       - github
 
     builders:
+      - multijob:
+          name: SlaveSetup
+          condition: SUCCESSFUL
+          execution-type: SEQUENTIALLY
+          projects:
+            - name: 'apache-geode-SlaveSetup'
+              current-parameters: true
+              git-revision: false
+              abort-all-job: true
+              node-parameters: true
       - multijob:
           name: Test
           condition: SUCCESSFUL
+          execution-type: SEQUENTIALLY
           projects:
             - name: 'apache-geode-UnitTest-jdk8'
               current-parameters: true