From 4fae4bbd7864b4332ff7168725c292f8f116458c Mon Sep 17 00:00:00 2001 From: Eduardo Gonzalez Date: Mon, 3 Apr 2017 14:16:06 +0100 Subject: [PATCH] Add tacker contrib demo Add tacker deployment demo. Generate sample config, register vim and vnfd. Deploy demo vnf service. Cleanup deployment demo. Change-Id: If707a89bd675e3298357360125cd6487588a2fb2 --- contrib/demos/tacker/README.rst | 20 +++++++ contrib/demos/tacker/cleanup-tacker | 13 +++++ contrib/demos/tacker/deploy-tacker-demo | 69 +++++++++++++++++++++++++ 3 files changed, 102 insertions(+) create mode 100644 contrib/demos/tacker/README.rst create mode 100644 contrib/demos/tacker/cleanup-tacker create mode 100644 contrib/demos/tacker/deploy-tacker-demo diff --git a/contrib/demos/tacker/README.rst b/contrib/demos/tacker/README.rst new file mode 100644 index 0000000000..22138c0009 --- /dev/null +++ b/contrib/demos/tacker/README.rst @@ -0,0 +1,20 @@ +A Kolla Demo using Tacker +========================= + +By default, the deploy script will spawn 1 Nova instance on a Neutron +network created from the tools/init-runonce script. + +Then run the deploy script: + +:: + + $ ./deploy-tacker-demo + +After the demo is deployed, a cleanup script can be used to remove +resources created by deploy script. + +To run the cleanup script: + +:: + + $ ./cleanup-tacker diff --git a/contrib/demos/tacker/cleanup-tacker b/contrib/demos/tacker/cleanup-tacker new file mode 100644 index 0000000000..781b8396f6 --- /dev/null +++ b/contrib/demos/tacker/cleanup-tacker @@ -0,0 +1,13 @@ +#!/bin/bash + +echo "Deleting sample VNF" +tacker vnf-delete kolla-sample-vnf +while tacker vnf-list | grep -q kolla-sample-vnf; do + sleep 1 +done +echo "Deleting sample VNFD" +tacker vnfd-delete kolla-sample-vnfd +echo "Deleting sample VIM" +tacker vim-delete kolla-sample-vim +echo "Removing sample config" +rm -rf ./kolla-sample-*.yaml diff --git a/contrib/demos/tacker/deploy-tacker-demo b/contrib/demos/tacker/deploy-tacker-demo new file mode 100644 index 0000000000..eb3f139957 --- /dev/null +++ b/contrib/demos/tacker/deploy-tacker-demo @@ -0,0 +1,69 @@ +#!/bin/bash + +function gen_config { + echo "Generating sample config" + DEMO_NET=$(openstack network list | awk '/demo-net/ { print $2 }') + IMAGE_ID=$(openstack image list | awk '/cirros/ { print $2 }') + cat > ./kolla-sample-vim.yaml < ./kolla-sample-vnfd.yaml <