blob: 709bb22c9782f61806db036147f3b43d72f21d78 [file] [log] [blame]
---
# Copyright 2017-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
tosca_definitions_version: tosca_simple_yaml_1_0
description: >
Creates a TrustDomain, Principal, Slice, Image, and then brings up an openstack
VM attached to the management network. The VM is pinned to a specific compute
node. Make sure to edit the compute_node section below and set the name of
the node to the hostname of your compute node.
imports:
- custom_types/trustdomain.yaml
- custom_types/principal.yaml
- custom_types/image.yaml
- custom_types/flavor.yaml
- custom_types/network.yaml
- custom_types/networkslice.yaml
- custom_types/node.yaml
- custom_types/site.yaml
- custom_types/slice.yaml
- custom_types/openstackservice.yaml
- custom_types/openstackserviceinstance.yaml
topology_template:
node_templates:
service#openstack:
type: tosca.nodes.OpenStackService
properties:
name: OpenStack
must-exist: true
mysite:
type: tosca.nodes.Site
properties:
name: mysite
must-exist: true
management_network:
type: tosca.nodes.Network
properties:
name: management
must-exist: true
compute_node:
type: tosca.nodes.Node
properties:
name: <insert node hostname here>
must-exist: true
m1.small:
type: tosca.nodes.Flavor
properties:
name: m1.small
must-exist: true
demo_trustdomain:
type: tosca.nodes.TrustDomain
properties:
name: "demo-trust"
requirements:
- owner:
node: service#openstack
relationship: tosca.relationships.BelongsToOne
demo_principal:
type: tosca.nodes.Principal
properties:
name: "demo-account"
requirements:
- trust_domain:
node: demo_trustdomain
relationship: tosca.relationships.BelongsToOne
image_cirros:
type: tosca.nodes.Image
properties:
name: "cirros-0.3.5"
container_format: "BARE"
disk_format: "QCOW2"
path: "http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img"
demo_slice:
type: tosca.nodes.Slice
properties:
name: "demo-slice"
requirements:
- site:
node: mysite
relationship: tosca.relationships.BelongsToOne
- trust_domain:
node: demo_trustdomain
relationship: tosca.relationships.BelongsToOne
- principal:
node: demo_principal
relationship: tosca.relationships.BelongsToOne
demo_slice_management_network:
type: tosca.nodes.NetworkSlice
requirements:
- network:
node: management_network
relationship: tosca.relationships.BelongsToOne
- slice:
node: demo_slice
relationship: tosca.relationships.BelongsToOne
demo_instance:
type: tosca.nodes.OpenStackServiceInstance
properties:
name: "demo-instance-pinned"
requirements:
- slice:
node: demo_slice
relationship: tosca.relationships.BelongsToOne
- owner:
node: service#openstack
relationship: tosca.relationships.BelongsToOne
- image:
node: image_cirros
relationship: tosca.relationships.BelongsToOne
- node:
node: compute_node
relationship: tosca.relationships.BelongsToOne
- flavor:
node: m1.small
relationship: tosca.relationships.BelongsToOne