blob: 2013db978e099ae76d0cbaf9510893962077ab0e [file] [log] [blame]
peusterm86fc48e2017-02-06 08:48:56 +01001#!/bin/bash
2#
3# This is the entry point for Jenkins.
4# Script has do be called from "son-emu" root directory, like: sudo ./utils/ci/jenkins_entrypoint.sh
5export DOCKER_HOST="unix:///var/run/docker.sock"
6
peusterm7e8aa5e2017-02-06 09:09:26 +01007# don't rely on Debian/Ubuntu Docker engine
peusterm8046dfe2017-02-06 09:10:54 +01008apt-get remove docker-engine
peusterm2f3ad5e2017-02-06 12:54:26 +01009# make sure we start from scratch
10pip uninstall docker-py
11pip uninstall docker
peusterm7e8aa5e2017-02-06 09:09:26 +010012
peusterm86fc48e2017-02-06 08:48:56 +010013set -e
14set -x
15
16SON_EMU_DIR=$(pwd)
17cd $SON_EMU_DIR/../
18
19# prepare
20apt-get update
peusterm04142612017-02-06 08:54:18 +010021DEBIAN_FRONTEND=noninteractive apt-get install -o Dpkg::Options::="--force-confold" --force-yes -y git ansible aptitude
peusterm86fc48e2017-02-06 08:48:56 +010022echo "localhost ansible_connection=local" >> /etc/ansible/hosts
23
24# install containernet
25git clone https://github.com/containernet/containernet.git
26CONTAINERNET_DIR=$(pwd)/containernet
27echo "Installing containernet (will take some time ~30 minutes) ..."
28cd $CONTAINERNET_DIR/ansible
29ansible-playbook install.yml
30
31# install son-emu
32echo "Installing son-emu (will take some time) ..."
33cd $SON_EMU_DIR/ansible
34ansible-playbook install.yml
35
36# execute son-emu tests at the end to validate installation
37echo "Running son-emu unit tests to validate installation"
38cd $SON_EMU_DIR
39python setup.py develop
peusterm3d153942017-02-08 08:23:33 +010040
peusterm86fc48e2017-02-06 08:48:56 +010041
42
43