Andy Bavier | d37f8ee | 2018-04-12 09:54:10 -0700 | [diff] [blame] | 1 | --- |
| 2 | |
| 3 | # Copyright 2018-present Open Networking Foundation |
| 4 | # |
| 5 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | # you may not use this file except in compliance with the License. |
| 7 | # You may obtain a copy of the License at |
| 8 | # |
| 9 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | # |
| 11 | # Unless required by applicable law or agreed to in writing, software |
| 12 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | # See the License for the specific language governing permissions and |
| 15 | # limitations under the License. |
| 16 | |
| 17 | # TOSCA recipe for adding a sample R-CORD subscriber |
| 18 | # |
| 19 | # http POST $(minikube service xos-tosca --url)/run \ |
| 20 | # xos-username:admin@opencord.org xos-password:letmein \ |
| 21 | # @./openstack-tosca.yaml |
| 22 | |
| 23 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 24 | |
| 25 | imports: |
| 26 | - custom_types/controller.yaml |
| 27 | - custom_types/controllersite.yaml |
| 28 | - custom_types/deployment.yaml |
| 29 | - custom_types/flavor.yaml |
| 30 | - custom_types/image.yaml |
| 31 | - custom_types/site.yaml |
| 32 | - custom_types/networktemplate.yaml |
| 33 | - custom_types/network.yaml |
| 34 | - custom_types/networkslice.yaml |
| 35 | - custom_types/slice.yaml |
| 36 | - custom_types/sitedeployment.yaml |
| 37 | |
| 38 | description: openstack extensions to deployment |
| 39 | |
| 40 | topology_template: |
| 41 | node_templates: |
| 42 | |
| 43 | # Images and flavors |
| 44 | Cirros-0.3.5: |
| 45 | type: tosca.nodes.Image |
| 46 | properties: |
| 47 | name: "Cirros 0.3.5 64-bit" |
| 48 | disk_format: QCOW2 |
| 49 | container_format: BARE |
| 50 | |
| 51 | m1.tiny: |
| 52 | type: tosca.nodes.Flavor |
| 53 | properties: |
| 54 | name: m1.tiny |
| 55 | |
| 56 | m1.small: |
| 57 | type: tosca.nodes.Flavor |
| 58 | properties: |
| 59 | name: m1.small |
| 60 | |
| 61 | m1.medium: |
| 62 | type: tosca.nodes.Flavor |
| 63 | properties: |
| 64 | name: m1.medium |
| 65 | |
| 66 | m1.large: |
| 67 | type: tosca.nodes.Flavor |
| 68 | properties: |
| 69 | name: m1.large |
| 70 | |
| 71 | m1.xlarge: |
| 72 | type: tosca.nodes.Flavor |
| 73 | properties: |
| 74 | name: m1.xlarge |
| 75 | |
| 76 | |
| 77 | MyDeployment: |
| 78 | type: tosca.nodes.Deployment |
| 79 | properties: |
| 80 | name: MyDeployment |
| 81 | |
| 82 | # OpenStack Controller |
| 83 | mysite_MyDeployment_openstack: |
| 84 | type: tosca.nodes.Controller |
| 85 | requirements: |
| 86 | - deployment: |
| 87 | node: MyDeployment |
| 88 | relationship: tosca.relationships.BelongsToOne |
| 89 | properties: |
| 90 | name: mysite_MyDeployment_openstack |
| 91 | backend_type: OpenStack |
| 92 | version: Newton |
| 93 | auth_url: http://keystone.openstack.svc.cluster.local/v3 |
| 94 | admin_user: admin |
| 95 | admin_password: password |
| 96 | admin_tenant: admin |
| 97 | domain: Default |
| 98 | |
| 99 | # Site - adds openstack controller to site defined in deployment.yaml |
| 100 | mysite: |
| 101 | type: tosca.nodes.Site |
| 102 | properties: |
| 103 | name: mysite |
| 104 | must-exist: true |
| 105 | site_url: http://mysite.opencloud.us/ |
| 106 | hosts_nodes: true |
| 107 | |
| 108 | mysite_deployment_MyDeployment: |
| 109 | type: tosca.nodes.SiteDeployment |
| 110 | requirements: |
| 111 | - site: |
| 112 | node: mysite |
| 113 | relationship: tosca.relationships.BelongsToOne |
| 114 | - deployment: |
| 115 | node: MyDeployment |
| 116 | relationship: tosca.relationships.BelongsToOne |
| 117 | - controller: |
| 118 | node: mysite_MyDeployment_openstack |
| 119 | relationship: tosca.relationships.BelongsToOne |
| 120 | |
| 121 | mysite_openstack_controller: |
| 122 | type: tosca.nodes.ControllerSite |
| 123 | requirements: |
| 124 | - site: |
| 125 | node: mysite |
| 126 | relationship: tosca.relationships.BelongsToOne |
| 127 | - controller: |
| 128 | node: mysite_MyDeployment_openstack |
| 129 | relationship: tosca.relationships.BelongsToOne |
| 130 | |
| 131 | |
| 132 | # For creating a test VM |
| 133 | mysite_test: |
| 134 | description: Test Slice |
| 135 | type: tosca.nodes.Slice |
| 136 | properties: |
| 137 | # network: noauto |
| 138 | name: mysite_test |
| 139 | requirements: |
| 140 | - site: |
| 141 | node: mysite |
| 142 | relationship: tosca.relationships.BelongsToOne |
| 143 | - default_image: |
| 144 | node: Cirros-0.3.5 |
| 145 | relationship: tosca.relationships.BelongsToOne |
| 146 | |
| 147 | |
| 148 | # For private networks (e.g., per-slice) |
| 149 | private_template: |
| 150 | type: tosca.nodes.NetworkTemplate |
| 151 | properties: |
| 152 | name: Private |
| 153 | visibility: private |
| 154 | translation: none |
| 155 | vtn_kind: PRIVATE |