Merge "Provide a tool to generate a VNFC image"

This commit is contained in:
Jenkins 2017-03-22 00:38:15 +00:00 committed by Gerrit Code Review
commit ccc67509cb
2 changed files with 28 additions and 1 deletions

View File

@ -40,7 +40,8 @@ How to setup environment
To make use of VNFC in Tacker, we have to upload the image to the glance in
which heat-config and heat-config agents are installed. The installation steps
can be referred `here <https://github.com/openstack/heat-templates/blob/master/
hot/software-config/elements/README.rst>`_.
hot/software-config/elements/README.rst>`_. The tool
'tools/vnfc/build_image.sh' can be used to generate such a kind of image.
Currently VNFC feature works by using `heat software config <http://docs.openstack.org/
developer/heat/template_guide/openstack.html#OS::Heat::SoftwareConfig>`_ which

26
tools/vnfc/build_image.sh Executable file
View File

@ -0,0 +1,26 @@
#!/bin/bash
VNFC_IMAGE=/tmp/tacker_vnfc_images
rm -rf $VNFC_IMAGE
mkdir $VNFC_IMAGE
pip install diskimage-builder
pip install dib-utils
CURRENT_DIR=`pwd`
cd $VNFC_IMAGE
git clone https://git.openstack.org/openstack/tripleo-image-elements.git
git clone https://git.openstack.org/openstack/heat-templates.git
export ELEMENTS_PATH=tripleo-image-elements/elements:heat-templates/hot/software-config/elements
disk-image-create vm \
fedora selinux-permissive \
os-collect-config \
os-refresh-config \
os-apply-config \
heat-config \
heat-config-ansible \
heat-config-cfn-init \
heat-config-puppet \
heat-config-salt \
heat-config-script \
-o fedora-software-config.qcow2