tacker/tools/vnfc/build_image.sh
gong yong sheng cb4e713ae6 Provide a tool to generate a VNFC image
Change-Id: I8a35db57b536c75860355840537afeb20d088ec6
Partial-Bug: 1673012
2017-03-17 14:32:43 +08:00

27 lines
690 B
Bash
Executable File

#!/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