build-timeout: 60
- mininet-ovs-2.6:
build-timeout: 75
- - robot
exclude:
- platforms: centos
templates: mininet-ovs-2.5
- platforms: centos
templates: mininet-ovs-2.6
- - platforms: ubuntu-14.04
- templates: robot
- platforms: ubuntu-14.04
templates: devstack-pre-pip-newton
- platforms: ubuntu-14.04
templates: mininet-ovs-2.5
- platforms: ubuntu-14.04
templates: mininet-ovs-2.6
- - platforms: ubuntu-16.04
- templates: robot
- platforms: ubuntu-16.04
templates: devstack-pre-pip-newton
- platforms: ubuntu-16.04
platforms: centos
templates: docker
+
+- project:
+ name: packer-robot-jobs
+ jobs:
+ - gerrit-packer-merge
+
+ project: releng/builder
+ project-name: builder
+ branch: master
+ archive-artifacts: '**/*.log'
+
+ build-node: centos7-builder-2c-8g
+
+ platforms: centos
+ templates: robot
+++ /dev/null
-#!/bin/bash
-
-# vim: sw=4 ts=4 sts=4 et tw=72 :
-
-# force any errors to cause the script and job to end in failure
-set -xeu -o pipefail
-
-# Install minimal python requirements to get virtualenv going
-# Additional python dependencies should be installed via JJB configuration
-# inside project jobs using a virtualenv setup.
-yum install -y @development \
- python-devel \
- python-setuptools \
- python-virtualenv
-
-# TODO: Move docker-py and netaddr to virtualenv in the csit jobs.
-yum install -y python-docker-py \
- python-netaddr
-
-# Install dependencies for robotframework and robotframework-sshlibrary
-# installed elsewhere
-yum install -y yum-utils unzip sshuttle nc libffi-devel openssl-devel
-
-# Install dependencies for matplotlib library used in longevity framework
-yum install -y libpng-devel freetype-devel python-matplotlib
-
-# install crudini command line tool for editing config files
-yum install -y crudini
-
-# Install dependency for postgres database used in storing performance plot results
-yum -y install postgresql-devel
-
-################################
-# LISPFLOWMAPPING REQUIREMENTS #
-################################
-
-# Needed for pyangbind
-yum install -y libxml2-devel libxslt-devel
-
-# Install `udpreplay` to be used for (lispflowmapping) performance tests
-yum install -y libpcap-devel boost-devel
-git clone https://github.com/ska-sa/udpreplay.git
-cd udpreplay
-./bootstrap.sh
-./configure
-make &> /dev/null && cp udpreplay /usr/local/bin
-
-## Install docker-py and netaddr
-yum install -y -q python-docker-py python-netaddr
-
-#####################
-# DLUX requirements #
-#####################
-
-# - Xvfb: Display manager in RAM
-#
-# Note: The end goal will be to test with multiple browser (Firefox, Chrome)
-# Chrome need a other library named chromedriver so let start with
-# one already supported with selenium.
-yum install -y firefox xorg-x11-server-Xvfb
--- /dev/null
+---
+- import_playbook: ../common-packer/provision/baseline.yaml
+
+- hosts: all
+ become_user: root
+ become_method: sudo
+
+ pre_tasks:
+ - include_role: name=system-update
+
+ tasks:
+ - name: Install robot dependencies
+ yum: 'name={{item}} state=present'
+ with_items:
+ - postgresql-devel
+ - python-docker-py
+ - python-matplotlib
+ - python-netaddr
+ become: true
+
+ - name: Install dlux dependencies
+ block:
+ - name: Install dlux dependencies
+ yum: 'name={{item}} state=present'
+ with_items:
+ - firefox
+ - xorg-x11-server-Xvfb
+ become: true
+
+ - name: Install lispflowmapping dependencies
+ block:
+ - name: Install lispflowmapping dependencies
+ yum: 'name={{item}} state=present'
+ with_items:
+ - boost-devel
+ - libpcap-devel
+ - libxml2-devel
+ - libxslt-devel
+ - python-docker-py
+ - python-netaddr
+ become: true
+ - name: Install udpreplay
+ block:
+ - name: Fetch udpreplay git repo
+ git:
+ repo: https://github.com/ska-sa/udpreplay.git
+ dest: /tmp/udpreplay
+ - name: Run bootstrap.sh script
+ command: /tmp/udpreplay/bootstrap.sh
+ args:
+ chdir: /tmp/udpreplay
+ - name: Run configure script
+ command: /tmp/udpreplay/configure
+ args:
+ chdir: /tmp/udpreplay
+ - name: Run make
+ command: make
+ args:
+ chdir: /tmp/udpreplay
+ - name: Install udpreplay to /usr/local/bin/udpreplay
+ copy:
+ src: /tmp/udpreplay/udpreplay
+ dest: /usr/local/bin/udpreplay
+ mode: 0755
+ owner: root
+ remote_src: yes
+ become: yes
+
+ post_tasks:
+ - name: System Reseal
+ script: ../common-packer/provision/system-reseal.sh
+ become: true
{
"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,
+ "base_image": null,
"distro": null,
+ "cloud_auth_url": null,
+ "cloud_user": null,
+ "cloud_pass": null,
+ "cloud_network": null,
+ "cloud_tenant": null,
"cloud_user_data": null,
+ "ssh_user": null,
"ssh_proxy_host": ""
},
"builders": [
{
+ "name": "vexxhost",
+ "image_name": "ZZCI - {{user `distro`}} - robot - {{isotime \"20060102-1504\"}}",
+ "source_image_name": "{{user `base_image`}}",
"type": "openstack",
- "identity_endpoint": "{{user `public_auth_url`}}",
+ "identity_endpoint": "{{user `cloud_auth_url`}}",
+ "username": "{{user `cloud_user`}}",
+ "password": "{{user `cloud_pass`}}",
+ "tenant_name": "{{user `cloud_tenant`}}",
"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`}} - robot - {{isotime \"20060102-1504\"}}",
- "source_image_name": "{{user `public_base_image`}}",
- "flavor": "v1-standard-1",
"networks": [
- "{{user `public_network`}}"
+ "{{user `cloud_network`}}"
],
"user_data_file": "{{user `cloud_user_data`}}",
+ "ssh_username": "{{user `ssh_user`}}",
+ "ssh_proxy_host": "{{user `ssh_proxy_host`}}",
+ "flavor": "v1-standard-1",
"metadata": {
"ci_managed": "yes"
}
{
"type": "shell",
"scripts": [
- "provision/baseline.sh",
- "provision/robot.sh",
- "provision/system_reseal_local_env.sh",
- "provision/system_reseal.sh"
+ "common-packer/provision/install-python.sh"
],
"execute_command": "chmod +x {{ .Path }}; if [ \"$UID\" == \"0\" ]; then {{ .Vars }} '{{ .Path }}'; else {{ .Vars }} sudo -E '{{ .Path }}'; fi"
+ },
+ {
+ "type": "ansible",
+ "playbook_file": "provision/robot.yaml",
+ "ansible_env_vars": [
+ "ANSIBLE_NOCOWS=1",
+ "ANSIBLE_PIPELINING=True",
+ "ANSIBLE_ROLES_PATH=../lf-ansible/roles",
+ "ANSIBLE_CALLBACK_WHITELIST=profile_tasks",
+ "ANSIBLE_STDOUT_CALLBACK=debug"
+ ]
}
]
}