Modify glance image name to cirros-0.3.5-x86_64-disk

Change-Id: I0a95ff408f7ac4d1d59d7d839e2ebd8cd3359c8b
Closes-Bug: #1665220
This commit is contained in:
Bharath Thiruveedula 2017-02-16 22:16:43 +05:30
parent ddbe8164ad
commit 6797945d5d
33 changed files with 60 additions and 44 deletions

View File

@ -317,12 +317,26 @@ function tacker_horizon_install {
sudo cp $DEST/tacker-horizon/tacker_horizon/enabled/* $DEST/horizon/openstack_dashboard/enabled/
restart_apache_server
}
function tacker_check_and_download_cirros {
local image_url image_fname
image_url=http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img
cirros_fname=`basename "$image_url"`
image_name=`glance image-list | grep "${cirros_fname%.*}" | awk '{print $4}'`
if [[ $image_name == "" ]]; then
if [[ ! -f $FILES/$image_fname || "$(stat -c "%s" $FILES/$image_fname)" = "0" ]]; then
{
wget --progress=dot:giga -c $image_url -O $FILES/$image_fname \
&& openstack_image_create $FILES/$image_fname ${cirros_fname%.*}
}
fi
fi
}
function openstack_image_create_openwrt {
function openstack_image_create {
image=$1
disk_format=raw
container_format=bare
image_name="OpenWRT"
image_name=$2
openstack --os-cloud=devstack-admin image create $image_name --public --container-format=$container_format --disk-format $disk_format < <(zcat --force "${image}")
glance image-list | grep OpenWRT | awk {print$2}
}
@ -336,7 +350,7 @@ function tacker_create_openwrt_image {
if [[ ! -f $FILES/$image_fname || "$(stat -c "%s" $FILES/$image_fname)" = "0" ]]; then
{
wget --progress=dot:giga -c $image_url -O $FILES/$image_fname \
&& openstack_image_create_openwrt $FILES/$image_fname
&& openstack_image_create $FILES/$image_fname OpenWRT
}||{
rm -rf $FILES/$image_fname
echo "WARNING: openwrt image create for $image_fname failed"

View File

@ -36,6 +36,8 @@ if is_service_enabled tacker; then
tacker_create_initial_network
echo_summary "Upload OpenWrt image"
tacker_create_openwrt_image
echo_summary "Check existence of cirros==3.5"
tacker_check_and_download_cirros
echo_summary "Registering default VIM"
tacker_register_default_vim
fi

View File

@ -15,7 +15,7 @@ topology_template:
mem_size: 512 MB
num_cpus: 2
properties:
image: cirros-0.3.4-x86_64-uec
image: cirros-0.3.5-x86_64-disk
mgmt_driver: noop
availability_zone: nova
metadata: {metering.vnf: VDU1}

View File

@ -15,7 +15,7 @@ topology_template:
mem_size: 512 MB
num_cpus: 2
properties:
image: cirros-0.3.4-x86_64-uec
image: cirros-0.3.5-x86_64-disk
mgmt_driver: noop
availability_zone: nova
metadata: {metering.vnf: SG1}

View File

@ -17,7 +17,7 @@ topology_template:
mem_size: 512 MB
disk_size: 1 GB
properties:
image: cirros-0.3.4-x86_64-uec
image: cirros-0.3.5-x86_64-disk
mgmt_driver: noop
availability_zone: nova

View File

@ -1,5 +1,5 @@
{
image_name: 'cirros-0.3.4-x86_64-uec',
image_name: 'cirros-0.3.5-x86_64-disk',
flavor: 'm1.tiny',
zone: 'nova',
network: 'net_mgmt',

View File

@ -16,7 +16,7 @@ topology_template:
disk_size: 1 GB
mem_size: 512 MB
properties:
image: cirros-0.3.4-x86_64-uec
image: cirros-0.3.5-x86_64-disk
availability_zone: nova
mgmt_driver: noop
config: |

View File

@ -19,7 +19,7 @@ topology_template:
artifacts:
VNFImage_image_func:
type: tosca.artifacts.Deployment.Image.VM
file: http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-uec.tar.gz
file: http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img
CP1:
type: tosca.nodes.nfv.CP.Tacker
@ -68,4 +68,4 @@ topology_template:
type: tosca.nodes.nfv.VL
properties:
network_name: net1
vendor: Tacker
vendor: Tacker

View File

@ -10,7 +10,7 @@ topology_template:
VDU1:
type: tosca.nodes.nfv.VDU.Tacker
properties:
image: cirros-0.3.4-x86_64-uec
image: cirros-0.3.5-x86_64-disk
flavor: m1.tiny
availability_zone: nova
mgmt_driver: noop
@ -70,7 +70,7 @@ topology_template:
VDU2:
type: tosca.nodes.nfv.VDU.Tacker
properties:
image: cirros-0.3.4-x86_64-uec
image: cirros-0.3.5-x86_64-disk
flavor: m1.medium
availability_zone: nova
mgmt_driver: noop

View File

@ -11,7 +11,7 @@ topology_template:
VDU1:
type: tosca.nodes.nfv.VDU.Tacker
properties:
image: cirros-0.3.4-x86_64-uec
image: cirros-0.3.5-x86_64-disk
flavor: m1.tiny
config: |
param0: key1

View File

@ -10,7 +10,7 @@ topology_template:
VDU1:
type: tosca.nodes.nfv.VDU.Tacker
properties:
image: cirros-0.3.4-x86_64-uec
image: cirros-0.3.5-x86_64-disk
flavor: m1.tiny
availability_zone: nova
mgmt_driver: noop
@ -53,7 +53,7 @@ topology_template:
VDU2:
type: tosca.nodes.nfv.VDU.Tacker
properties:
image: cirros-0.3.4-x86_64-uec
image: cirros-0.3.5-x86_64-disk
flavor: m1.medium
availability_zone: nova
mgmt_driver: noop
@ -90,7 +90,7 @@ topology_template:
VDU3:
type: tosca.nodes.nfv.VDU.Tacker
properties:
image: cirros-0.3.4-x86_64-uec
image: cirros-0.3.5-x86_64-disk
flavor: m1.tiny
availability_zone: nova
mgmt_driver: noop

View File

@ -10,7 +10,7 @@ topology_template:
VDU1:
type: tosca.nodes.nfv.VDU.Tacker
properties:
image: cirros-0.3.4-x86_64-uec
image: cirros-0.3.5-x86_64-disk
flavor: m1.tiny
availability_zone: nova
mgmt_driver: noop
@ -52,7 +52,7 @@ topology_template:
VDU2:
type: tosca.nodes.nfv.VDU.Tacker
properties:
image: cirros-0.3.4-x86_64-uec
image: cirros-0.3.5-x86_64-disk
flavor: m1.medium
availability_zone: nova
mgmt_driver: noop
@ -94,7 +94,7 @@ topology_template:
VDU3:
type: tosca.nodes.nfv.VDU.Tacker
properties:
image: cirros-0.3.4-x86_64-uec
image: cirros-0.3.5-x86_64-disk
flavor: m1.tiny
availability_zone: nova
mgmt_driver: noop

View File

@ -11,7 +11,7 @@ topology_template:
VDU1:
type: tosca.nodes.nfv.VDU.Tacker
properties:
image: cirros-0.3.4-x86_64-uec
image: cirros-0.3.5-x86_64-disk
flavor: m1.tiny
config: |
param0: key1

View File

@ -14,7 +14,7 @@ topology_template:
mem_size: 512 MB
disk_size: 1 GB
properties:
image: cirros-0.3.4-x86_64-uec
image: cirros-0.3.5-x86_64-disk
availability_zone: nova
mgmt_driver: noop
config: |

View File

@ -20,7 +20,7 @@ topology_template:
type: tosca.nodes.nfv.VDU.Tacker
properties:
name: {get_input : vdu-name}
image: cirros-0.3.4-x86_64-uec
image: cirros-0.3.5-x86_64-disk
flavor: m1.tiny
key_name: userKey
availability_zone: nova

View File

@ -30,7 +30,7 @@ topology_template:
VDU1:
type: tosca.nodes.nfv.VDU.Tacker
properties:
image: cirros-0.3.4-x86_64-uec
image: cirros-0.3.5-x86_64-disk
flavor: m1.tiny
availability_zone: nova
mgmt_driver: noop
@ -60,7 +60,7 @@ topology_template:
VDU2:
type: tosca.nodes.nfv.VDU.Tacker
properties:
image: cirros-0.3.4-x86_64-uec
image: cirros-0.3.5-x86_64-disk
flavor: m1.medium
availability_zone: nova
mgmt_driver: noop

View File

@ -16,7 +16,7 @@ topology_template:
VDU1:
type: tosca.nodes.nfv.VDU.Tacker
properties:
image: cirros-0.3.4-x86_64-uec
image: cirros-0.3.5-x86_64-disk
flavor: m1.tiny
availability_zone: nova
mgmt_driver: noop
@ -38,7 +38,7 @@ topology_template:
VDU2:
type: tosca.nodes.nfv.VDU.Tacker
properties:
image: cirros-0.3.4-x86_64-uec
image: cirros-0.3.5-x86_64-disk
flavor: m1.medium
availability_zone: nova
mgmt_driver: noop

View File

@ -30,7 +30,7 @@ topology_template:
VDU1:
type: tosca.nodes.nfv.VDU.Tacker
properties:
image: cirros-0.3.4-x86_64-uec
image: cirros-0.3.5-x86_64-disk
flavor: m1.tiny
availability_zone: nova
mgmt_driver: noop
@ -60,7 +60,7 @@ topology_template:
VDU2:
type: tosca.nodes.nfv.VDU.Tacker
properties:
image: cirros-0.3.4-x86_64-uec
image: cirros-0.3.5-x86_64-disk
flavor: m1.medium
availability_zone: nova
mgmt_driver: noop

View File

@ -16,7 +16,7 @@ topology_template:
VDU1:
type: tosca.nodes.nfv.VDU.Tacker
properties:
image: cirros-0.3.4-x86_64-uec
image: cirros-0.3.5-x86_64-disk
flavor: m1.tiny
availability_zone: nova
mgmt_driver: noop
@ -38,7 +38,7 @@ topology_template:
VDU2:
type: tosca.nodes.nfv.VDU.Tacker
properties:
image: cirros-0.3.4-x86_64-uec
image: cirros-0.3.5-x86_64-disk
flavor: m1.medium
availability_zone: nova
mgmt_driver: noop

View File

@ -16,7 +16,7 @@ resources:
availability_zone: nova
config_drive: false
flavor: m1.tiny
image: cirros-0.3.4-x86_64-uec
image: cirros-0.3.5-x86_64-disk
metadata: {metering.vnf: SG1}
networks:
- port: {get_resource: CP1}

View File

@ -6,4 +6,4 @@ resources:
properties:
config_drive: true
flavor: m1.tiny
image: cirros-0.3.2-x86_64-uec
image: cirros-0.3.5-x86_64-disk

View File

@ -11,7 +11,7 @@ resources:
availability_zone: nova
config_drive: true
flavor: m1.tiny
image: cirros-0.3.2-x86_64-uec
image: cirros-0.3.5-x86_64-disk
metadata: {param0: key0, param1: key1}
networks:
- port: {get_resource: vdu1-net_mgmt-port}

View File

@ -11,7 +11,7 @@ resources:
availability_zone: nova
config_drive: true
flavor: m1.tiny
image: cirros-0.3.4-x86_64-uec
image: cirros-0.3.5-x86_64-disk
metadata: {param0: key0, param1: key1}
networks:
- port: {get_resource: vdu1-net_mgmt-port}

View File

@ -11,7 +11,7 @@ resources:
availability_zone: nova
config_drive: true
flavor: m1.tiny
image: cirros-0.3.4-x86_64-uec
image: cirros-0.3.5-x86_64-disk
key_name: keyName
metadata: {param0: key0, param1: key1}
networks:

View File

@ -16,7 +16,7 @@ resources:
availability_zone: nova
config_drive: false
flavor: m1.tiny
image: cirros-0.3.4-x86_64-uec
image: cirros-0.3.5-x86_64-disk
networks:
- port: {get_resource: CP1}
user_data_format: SOFTWARE_CONFIG

View File

@ -14,7 +14,7 @@ resources:
availability_zone: nova
config_drive: false
flavor: {get_resource: VDU1_flavor}
image: cirros-0.3.4-x86_64-uec
image: cirros-0.3.5-x86_64-disk
networks:
- port: {get_resource: CP1}
user_data_format: SOFTWARE_CONFIG

View File

@ -14,7 +14,7 @@ resources:
availability_zone: nova
config_drive: false
flavor: {get_resource: VDU1_flavor}
image: cirros-0.3.4-x86_64-uec
image: cirros-0.3.5-x86_64-disk
networks:
- port: {get_resource: CP1}
user_data_format: SOFTWARE_CONFIG

View File

@ -15,7 +15,7 @@ topology_template:
mem_size: 512 MB
num_cpus: 2
properties:
image: cirros-0.3.4-x86_64-uec
image: cirros-0.3.5-x86_64-disk
mgmt_driver: noop
availability_zone: nova
metadata: {metering.vnf: VDU1}

View File

@ -15,7 +15,7 @@ topology_template:
mem_size: 512 MB
num_cpus: 2
properties:
image: cirros-0.3.4-x86_64-uec
image: cirros-0.3.5-x86_64-disk
mgmt_driver: noop
availability_zone: nova
metadata: {metering.vnf: SG1}

View File

@ -18,7 +18,7 @@ topology_template:
mem_size: 512 MB
num_cpus: 2
properties:
image: cirros-0.3.4-x86_64-uec
image: cirros-0.3.5-x86_64-disk
mgmt_driver: noop
availability_zone: nova

View File

@ -15,7 +15,7 @@ topology_template:
mem_size: 512 MB
num_cpus: 2
properties:
image: cirros-0.3.4-x86_64-uec
image: cirros-0.3.5-x86_64-disk
mgmt_driver: noop
availability_zone: nova
metadata: {metering.vnf: VDU1}

View File

@ -10,7 +10,7 @@ topology_template:
VDU1:
type: tosca.nodes.nfv.VDU.Tacker
properties:
image: cirros-0.3.4-x86_64-uec
image: cirros-0.3.5-x86_64-disk
mgmt_driver: noop
availability_zone: nova
flavor: m1.tiny

View File

@ -10,7 +10,7 @@ topology_template:
VDU1:
type: tosca.nodes.nfv.VDU.Tacker
properties:
image: cirros-0.3.4-x86_64-uec
image: cirros-0.3.5-x86_64-disk
mgmt_driver: noop
availability_zone: nova
flavor: m1.tiny