X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=azure%2Faria%2Faria-extension-cloudify%2Fexamples%2Fopenstack-hello-world%2Fopenstack-helloworld.yaml;fp=azure%2Faria%2Faria-extension-cloudify%2Fexamples%2Fopenstack-hello-world%2Fopenstack-helloworld.yaml;h=1fb031c71c3efbd7c0f6437a521a379258fb58c5;hb=7409dfb144cf2a06210400134d822a1393462b1f;hp=0000000000000000000000000000000000000000;hpb=9e65649dfff8f00dc0a0ef6b10d020ae0e2255ba;p=multicloud%2Fazure.git diff --git a/azure/aria/aria-extension-cloudify/examples/openstack-hello-world/openstack-helloworld.yaml b/azure/aria/aria-extension-cloudify/examples/openstack-hello-world/openstack-helloworld.yaml new file mode 100644 index 0000000..1fb031c --- /dev/null +++ b/azure/aria/aria-extension-cloudify/examples/openstack-hello-world/openstack-helloworld.yaml @@ -0,0 +1,144 @@ +tosca_definitions_version: tosca_simple_yaml_1_0 + +imports: + - https://raw.githubusercontent.com/cloudify-cosmo/aria-extension-cloudify/master/plugins/openstack/plugin.yaml + - aria-1.0 + +node_types: + web_app: + derived_from: tosca.nodes.WebApplication + properties: + port: + type: integer + default: + +topology_template: + + inputs: + ssh_username: + type: string + default: ubuntu + external_network_name: + type: string + webserver_port: + type: integer + private_key_path: + type: string + image: + type: string + flavor: + type: string + openstack_config: + type: map + entry_schema: string + + node_templates: + network: + type: aria.openstack.nodes.Network + properties: + resource_id: aria_helloworld_network + create_if_missing: true + openstack_config: { get_input: openstack_config } + + router: + type: aria.openstack.nodes.Router + properties: + external_network: { get_input: external_network_name } + create_if_missing: true + resource_id: aria_helloworld_rtr + openstack_config: { get_input: openstack_config } + + subnet: + type: aria.openstack.nodes.Subnet + properties: + resource_id: aria_helloworld_subnet + create_if_missing: true + openstack_config: { get_input: openstack_config } + requirements: + - router: router + - network: network + + port: + type: aria.openstack.nodes.Port + properties: + create_if_missing: true + resource_id: aria_helloworld_port + openstack_config: { get_input: openstack_config } + requirements: + - security_group: security_group + - subnet: subnet + - network: network + + virtual_ip: + type: aria.openstack.nodes.FloatingIP + properties: + resource_id: aria_helloworld_floatingip + create_if_missing: true + openstack_config: { get_input: openstack_config } + floatingip: + floating_network_name: { get_input: external_network_name } + + security_group: + type: aria.openstack.nodes.SecurityGroup + properties: + create_if_missing: true + resource_id: aria_helloworld_sg + openstack_config: { get_input: openstack_config } + rules: + - remote_ip_prefix: 0.0.0.0/0 + port: { get_input: webserver_port } + - port: 22 + remote_ip_prefix: 0.0.0.0/0 + + keypair: + type: aria.openstack.nodes.KeyPair + properties: + create_if_missing: true + resource_id: aria_helloworld_kp + private_key_path: { get_input: private_key_path } + openstack_config: { get_input: openstack_config } + + vm: + type: aria.openstack.nodes.Server + properties: + image: { get_input: image } + flavor: { get_input: flavor } + create_if_missing: true + resource_id: aria_helloworld_vm + management_network_name: aria_helloworld_network + openstack_config: { get_input: openstack_config } + requirements: + - floating_ip: virtual_ip + - security_group: security_group + - key_pair: keypair + - port: port + + web_app: + type: web_app + properties: + port: { get_input: webserver_port } + requirements: + - host: vm + interfaces: + Standard: + configure: + implementation: + primary: scripts/configure.sh + dependencies: + - "ssh.user > { get_input: ssh_username }" + - "ssh.key_filename > { get_input: private_key_path }" + - "ssh.address > { get_attribute: [ virtual_ip, floating_ip_address ] }" + start: + implementation: + primary: scripts/start.sh + dependencies: + - "ssh.user > { get_input: ssh_username }" + - "ssh.key_filename > { get_input: private_key_path }" + - "ssh.address > { get_attribute: [ virtual_ip, floating_ip_address ] }" + stop: + implementation: + primary: scripts/stop.sh + dependencies: + - "ssh.user > { get_input: ssh_username }" + - "ssh.key_filename > { get_input: private_key_path }" + - "ssh.address > { get_attribute: [ virtual_ip, floating_ip_address ] }"