Switch Docker template to common-packer 19/66919/12
authorThanh Ha <thanh.ha@linuxfoundation.org>
Mon, 8 Jan 2018 02:59:00 +0000 (21:59 -0500)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Tue, 9 Jan 2018 03:30:11 +0000 (22:30 -0500)
Switch to the common-packer Docker template. Split out the merge
job templates so that we do not need to maintain that epic
exclusion list.

Change-Id: Ia2f62e3c8f602d7f3232277864386ae9d53f9889
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
jjb/releng-defaults.yaml
jjb/releng-jobs.yaml
jjb/releng-packer-jobs.yaml [new file with mode: 0644]
packer/provision/docker.sh [deleted file]
packer/templates/docker.json [changed from file to symlink]

index a06606bb77c6d0be50e03a6c15cb38323c9ebe45..8dbbe35b19092db9799d6f793768982f00fa3657 100644 (file)
@@ -32,6 +32,7 @@
     nexus-snapshot-repo: opendaylight.snapshot
     git-url: 'ssh://jenkins-$SILO@git.opendaylight.org:29418'
     lftools-version: <1.0.0
+    packer-version: 1.1.3
 
     # defaults for parameters installing openstack for csit jobs
     devstack-hash: ''
index f2f33bb088c803782b67aaa3a698630e82d8daca..c7703ab79f892b011fa0fd4f7683184d5f817a72 100644 (file)
@@ -48,8 +48,6 @@
           build-timeout: 60
       - devstack-pre-pip-pike:
           build-timeout: 75
-      - docker:
-          build-timeout: 60
       - gbp
       - java-builder:
           build-timeout: 75
@@ -81,8 +79,6 @@
         templates: devstack-pre-pip-pike
       - platforms: ubuntu-14.04
         templates: devstack
-      - platforms: ubuntu-14.04
-        templates: docker
       - platforms: ubuntu-14.04
         templates: mininet-ovs-2.5
       - platforms: ubuntu-14.04
@@ -99,8 +95,6 @@
         templates: devstack-pre-pip-pike
       - platforms: ubuntu-16.04
         templates: devstack
-      - platforms: ubuntu-16.04
-        templates: docker
       - platforms: ubuntu-16.04
         templates: mininet
       - platforms: ubuntu-16.04
diff --git a/jjb/releng-packer-jobs.yaml b/jjb/releng-packer-jobs.yaml
new file mode 100644 (file)
index 0000000..09205d1
--- /dev/null
@@ -0,0 +1,16 @@
+---
+- project:
+    name: packer-docker-jobs
+    jobs:
+      - gerrit-packer-merge
+
+    project: releng/builder
+    project-name: builder
+    branch: master
+    archive-artifacts: '**/*.log'
+
+    build-node: centos7-java-builder-2c-8g
+    build-timeout: 60
+
+    platforms: centos
+    templates: docker
diff --git a/packer/provision/docker.sh b/packer/provision/docker.sh
deleted file mode 100644 (file)
index 12814a6..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/bin/bash
-
-# vim: sw=4 ts=4 sts=4 et :
-
-# force any errors to cause the script and job to end in failure
-set -xeu -o pipefail
-
-rh_changes() {
-    echo "---> RH changes"
-    # install docker and enable it
-    echo "---> Installing docker"
-    yum install -y docker supervisor bridge-utils
-    systemctl enable docker
-
-    # configure docker networking so that it does not conflict with LF
-    # internal networks
-    cat <<EOL > /etc/sysconfig/docker-network
-# /etc/sysconfig/docker-network
-DOCKER_NETWORK_OPTIONS='--bip=10.250.0.254/24'
-EOL
-    # configure docker daemon to listen on port 5555 enabling remote
-    # managment
-    sed -i -e "s#='--selinux-enabled'#='--selinux-enabled -H unix:///var/run/docker.sock -H tcp://0.0.0.0:5555'#g" /etc/sysconfig/docker
-
-    # docker group doesn't get created by default for some reason
-    groupadd docker
-
-    # Install python dependencies
-    yum install -y python-{devel,virtualenv,setuptools,pip}
-}
-
-ubuntu_changes() {
-    echo "---> Ubuntu changes"
-}
-
-OS=$(/usr/bin/facter operatingsystem | tr '[:upper:]' '[:lower:]')
-case "$OS" in
-    centos|fedora|redhat)
-        rh_changes
-    ;;
-    ubuntu)
-        ubuntu_changes
-    ;;
-    *)
-        echo "${OS} has no configuration changes"
-    ;;
-esac
-
-echo "***************************************************"
-echo "*   PLEASE RELOAD THIS VAGRANT BOX BEFORE USE     *"
-echo "***************************************************"
deleted file mode 100644 (file)
index e4575f372eaa3eb7e8b0c379c1f29e90bf09b660..0000000000000000000000000000000000000000
+++ /dev/null
@@ -1,50 +0,0 @@
-{
-  "variables": {
-    "public_base_image": null,
-    "public_network": null,
-    "public_cloud_user": null,
-    "public_auth_url": null,
-    "public_tenant": null,
-    "public_user": null,
-    "public_pass": null,
-    "distro": null,
-    "cloud_user_data": null,
-    "ssh_proxy_host": ""
-  },
-  "builders": [
-    {
-      "type": "openstack",
-      "identity_endpoint": "{{user `public_auth_url`}}",
-      "domain_name": "Default",
-      "tenant_name": "{{user `public_tenant`}}",
-      "username": "{{user `public_user`}}",
-      "password": "{{user `public_pass`}}",
-      "region": "ca-ymq-1",
-      "availability_zone": "ca-ymq-2",
-      "ssh_username": "{{user `public_cloud_user`}}",
-      "ssh_proxy_host": "{{user `ssh_proxy_host`}}",
-      "image_name": "ZZCI - {{user `distro`}} - docker - {{isotime \"20060102-1504\"}}",
-      "source_image_name": "{{user `public_base_image`}}",
-      "flavor": "v1-standard-1",
-      "networks": [
-        "{{user `public_network`}}"
-      ],
-      "user_data_file": "{{user `cloud_user_data`}}",
-      "metadata": {
-        "ci_managed": "yes"
-      }
-    }
-  ],
-  "provisioners": [
-    {
-      "type": "shell",
-      "scripts": [
-        "provision/baseline.sh",
-        "provision/docker.sh",
-        "provision/system_reseal_local_env.sh",
-        "provision/system_reseal.sh"
-      ],
-      "execute_command": "chmod +x {{ .Path }}; if [ \"$UID\" == \"0\" ]; then {{ .Vars }} '{{ .Path }}'; else {{ .Vars }} sudo -E '{{ .Path }}'; fi"
-    }
-  ]
-}
new file mode 120000 (symlink)
index 0000000000000000000000000000000000000000..4f33327fb1cdf37e1d0cf5c7fda14923be58489d
--- /dev/null
@@ -0,0 +1 @@
+../common-packer/templates/docker.json.example
\ No newline at end of file