Provide a tool to generate a VNFC image

Change-Id: I8a35db57b536c75860355840537afeb20d088ec6
Partial-Bug: 1673012
This commit is contained in:
gong yong sheng 2017-03-15 17:52:24 +08:00
parent b8940dfa6c
commit cb4e713ae6
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