[magnum] Add Centos DC/OS DIB

Add build script for centos DC/OS magnum driver.

Change-Id: I02380f7457d87be677cfb5d27cb4bd7b37d91abc
Implements: blueprint mesos-dcos
This commit is contained in:
Spyros Trigazis 2017-05-26 11:18:48 +02:00
parent 42792ca478
commit 9deb57a4f7
3 changed files with 27 additions and 1 deletions

View File

@ -204,7 +204,7 @@
#!/bin/bash -eux
cd ~
if [ "{image-name}" == "ubuntu-mesos" ]; then
if [[ "{image-name}" =~ ^(ubuntu-mesos|centos-dcos)$ ]]; then
EXTRA_PROJECTS="openstack/tripleo-image-elements openstack/heat-templates"
else
EXTRA_PROJECTS=""
@ -249,6 +249,30 @@
heat-config heat-config-script -o $WORKSPACE/{image-name}.qcow2
$MESOS_ELEMENTS/validate_image.sh $WORKSPACE/{image-name}.qcow2
elif [ "{image-name}" == "centos-dcos" ]; then
DCOS_ELEMENTS=./openstack/magnum/contrib/drivers/dcos_centos_v1/image
TRIPLEO_ELEMENTS=./openstack/tripleo-image-elements/elements
HEAT_ELEMENTS=./openstack/heat-templates/hot/software-config/elements
# Order matters, we need the docker elements from DCOS_ELEMENTS to be used first
export ELEMENTS_PATH=$DCOS_ELEMENTS:$DIB_ELEMENTS:$TRIPLEO_ELEMENTS:$HEAT_ELEMENTS
# TODO: Add install_imagebuild_deps scipt in DC/OS dir
$MESOS_ELEMENTS/install_imagebuild_deps.sh
export DIB_IMAGE_SIZE=3.0
export FS_TYPE=xfs
curl -O https://downloads.dcos.io/dcos/stable/commit/e64024af95b62c632c90b9063ed06296fcf38ea5/dcos_generate_config.sh
export DCOS_GENERATE_CONFIG_SRC=`pwd`/dcos_generate_config.sh
disk-image-create \
centos7 vm docker dcos selinux-permissive \
os-collect-config os-refresh-config os-apply-config \
heat-config heat-config-script \
-o $WORKSPACE/{image-name}.qcow2
#TODO: Add size validation
else
MAGNUM_ELEMENTS=./openstack/magnum/magnum/drivers/common/image
export ELEMENTS_PATH=$DIB_ELEMENTS:$MAGNUM_ELEMENTS

View File

@ -6753,6 +6753,7 @@
image-name:
- 'fedora-atomic-25'
- 'ubuntu-mesos'
- 'centos-dcos'
- api-ref-jobs:
service: container-infrastructure-management

View File

@ -11656,6 +11656,7 @@ projects:
periodic:
- periodic-magnum-dib-buildimage-fedora-atomic-25-ubuntu-xenial
- periodic-magnum-dib-buildimage-ubuntu-mesos-ubuntu-xenial
- periodic-magnum-dib-buildimage-centos-dcos-ubuntu-xenial
experimental:
- gate-functional-dsvm-magnum-k8s-multinode-ubuntu-xenial-nv
- gate-functional-dsvm-magnum-swarm-multinode-ubuntu-xenial-nv