Skip to content

Instantly share code, notes, and snippets.

analyticstestsanity3.log:2016-04-06 23:43:46,865 - INFO - END TEST : test_db_purge : FAILED[0:12:12]
analyticstestsanity3.log:2016-04-06 23:50:19,259 - INFO - END TEST : test_verify_generator_collector_connections : FAILED[0:06:33]
analyticstestsanity3.log:2016-04-06 23:50:57,161 - INFO - END TEST : test_verify_process_status_agent : FAILED[0:00:17]
analyticstestsanity3.log:2016-04-06 23:51:14,424 - INFO - END TEST : test_verify_process_status_analytics_node : FAILED[0:00:17]
analyticstestsanity3.log:2016-04-06 23:51:31,515 - INFO - END TEST : test_verify_process_status_config : FAILED[0:00:17]
analyticstestsanity3.log:2016-04-06 23:51:48,268 - INFO - END TEST : test_verify_process_status_control_node : FAILED[0:00:17]
analyticstestsanitywithresource.log:2016-04-07 03:10:33,123 - INFO - END TEST : test_verify_flow_tables : FAILED[0:06:07]
-> some analytics problems
testbasicvmvn0.log:2016-04-07 03:58:17,839 - INFO - END TEST : test_max_vm_flows : FAILED[0:00:53]
#!/bin/bash
to_build=${@:-'contrail-test contrail-test-ci'}
TEST_ARTIFACT=${TEST_ARTIFACT:-$(readlink -f sb/build/artifacts_extra/docker-contrail-test-*~kilo.tgz)}
TEST_CI_ARTIFACT=${TEST_CI_ARTIFACT:-$(readlink -f sb/build/artifacts_extra/docker-contrail-test-ci-*~kilo.tgz)}
FABRIC_UTILS_ARTIFACT=${FABRIC_UTILS_ARTIFACT:-$(readlink -f sb/build/artifacts_extra/contrail-fabric-utils-*~kilo.tgz)}
CONTRAIL_PACKAGE_DEB_JUNO=${CONTRAIL_PACKAGE_DEB_JUNO:-$(readlink -f sb/build/artifacts/contrail-install-packages*~juno_all.deb)}
CONTRAIL_PACKAGE_DEB_KILO=${CONTRAIL_PACKAGE_DEB_KILO:-$(readlink -f sb/build/artifacts/contrail-install-packages*~kilo_all.deb)}
DOCKER_IMAGE_EXPORT_PATH=${DOCKER_IMAGE_EXPORT_PATH:-$(readlink -f sb/build/artifacts/)}
IPADDRESS=${IPADDRESS:-$(ip a show docker0 | awk '/inet / {split ($2,a,"/"); print a[1]}')}
#!/bin/bash -x
run=${1:-'basic_job'}
export AVAILABLE_TESTBEDS=testbed_sanity_nodei31.py
export BUILDID=25
export BRANCH=R3.0
export DISTRO=ubuntu-14-04
export SKU=kilo
export JENKINS_TRIGGERED=0
export LOCK_TESTBED_ON_FAILURE=0
export TEST_CONTAINER_IMAGE_DIR=/cs-shared/images/contrail-test-docker-images/
@hkumarmk
hkumarmk / Containerizing-contrail-services.md
Last active June 15, 2016 13:33
Containerizing Contrail Services

Changes in provisioning/deployment in container world

There are two stages in deployment of containerized contrail services.

  • Build stage – In this stage installing the packages and setup with reasonable default configurations are added and a docker image is produced. This is happening during artifact build in our servers and docker image is produced as the artifact. This is a ready to deploy container image which only required customer environment specific configuration.
  • Provisioning stage - In this stage, the artifact produced in last stage is deployed on customer environment, added custom configurations and other operations and is started on appropriate nodes (cfgm nodes in case of contrail-config ).

NOTE: Only configuration is done during provisioning stage, no packages will be installed at this moment – so the images should be specific for a contrail version and an openstack build (e.g contrail-config-liberty-3.1-50, contrail-config-mitaka-3.1.50)

Design approach

## Current state
Currently we have containerized contrail-config. We have not added any provisioning/orchestration system till yet, I just take standard provisioned system, stopped all config services and started config container on that node. Currently I have added this on a single node setup, but adding to multi node setup is not going to be difficult.
I have a setup on the node 10.204.217.162 – you may login to it and get a feel of it.
```
# Stopped supervisor-config on the host
  • Get contrail-docker code from https://github.com/hkumarmk/contrail-docker (master)

  • Build the images: you may use build.sh script it is rather a convenient script as of now for me – I made few hardcoded defaults (like contrail-install-package url) which probably only make sense to my environment – but you may just provide appropriate parameters

    run script.sh with appropriate possitional params ./script.sh <package_url> <image_path> where component is one of the component name like config, control, database, lb, analytics package_url is the web url from which contrail-install-package url to be downloaded image_path - a local path to a directory to which container image will be copied

- hosts: localhost
vars:
qs: [
{'hardware_q_id': '1', 'logical_queue':['1', '6-10', '12-15']},
{'hardware_q_id': '2', 'logical_queue':['2-5']},
{'hardware_q_id': '3', 'logical_queue':['7'], 'default': 'True'}]
q: {}
tasks:
- set_fact: