Andy Bavier | 43cdc66 | 2018-05-15 14:50:47 -0700 | [diff] [blame] | 1 | {{/* vim: set filetype=mustache: */}} |
| 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 | {{- define "openstack.flavorTosca" -}} |
| 18 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 19 | |
| 20 | imports: |
| 21 | - custom_types/flavor.yaml |
| 22 | |
| 23 | description: openstack flavor models |
| 24 | |
| 25 | topology_template: |
| 26 | node_templates: |
| 27 | |
| 28 | m1.tiny: |
| 29 | type: tosca.nodes.Flavor |
| 30 | properties: |
| 31 | name: m1.tiny |
Scott Baker | 1d40803 | 2018-08-29 08:34:49 -0700 | [diff] [blame] | 32 | flavor: m1.tiny |
Andy Bavier | 43cdc66 | 2018-05-15 14:50:47 -0700 | [diff] [blame] | 33 | |
| 34 | m1.small: |
| 35 | type: tosca.nodes.Flavor |
| 36 | properties: |
| 37 | name: m1.small |
Scott Baker | 1d40803 | 2018-08-29 08:34:49 -0700 | [diff] [blame] | 38 | flavor: m1.small |
Andy Bavier | 43cdc66 | 2018-05-15 14:50:47 -0700 | [diff] [blame] | 39 | |
| 40 | m1.medium: |
| 41 | type: tosca.nodes.Flavor |
| 42 | properties: |
| 43 | name: m1.medium |
Scott Baker | 1d40803 | 2018-08-29 08:34:49 -0700 | [diff] [blame] | 44 | flavor: m1.medium |
Andy Bavier | 43cdc66 | 2018-05-15 14:50:47 -0700 | [diff] [blame] | 45 | |
| 46 | m1.large: |
| 47 | type: tosca.nodes.Flavor |
| 48 | properties: |
| 49 | name: m1.large |
Scott Baker | 1d40803 | 2018-08-29 08:34:49 -0700 | [diff] [blame] | 50 | flavor: m1.large |
Andy Bavier | 43cdc66 | 2018-05-15 14:50:47 -0700 | [diff] [blame] | 51 | |
| 52 | m1.xlarge: |
| 53 | type: tosca.nodes.Flavor |
| 54 | properties: |
| 55 | name: m1.xlarge |
Scott Baker | 1d40803 | 2018-08-29 08:34:49 -0700 | [diff] [blame] | 56 | flavor: m1.xlarge |
Andy Bavier | 43cdc66 | 2018-05-15 14:50:47 -0700 | [diff] [blame] | 57 | {{- end -}} |
| 58 | |
| 59 | {{- define "openstack.networkTosca" -}} |
| 60 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 61 | |
| 62 | imports: |
| 63 | - custom_types/network.yaml |
| 64 | - custom_types/networktemplate.yaml |
| 65 | - custom_types/site.yaml |
| 66 | - custom_types/slice.yaml |
| 67 | |
| 68 | description: openstack flavor models |
| 69 | |
| 70 | topology_template: |
| 71 | node_templates: |
| 72 | |
| 73 | {{ .cordSiteName }}: |
| 74 | type: tosca.nodes.Site |
| 75 | properties: |
| 76 | name: {{ .cordSiteName }} |
| 77 | must-exist: true |
| 78 | |
| 79 | # For private networks (e.g., per-slice) |
| 80 | private_template: |
| 81 | type: tosca.nodes.NetworkTemplate |
| 82 | properties: |
| 83 | name: Private |
| 84 | visibility: private |
| 85 | translation: none |
| 86 | vtn_kind: PRIVATE |
| 87 | |
| 88 | # management (vtn: MANAGEMENT_LOCAL) network |
| 89 | management_template: |
| 90 | type: tosca.nodes.NetworkTemplate |
| 91 | properties: |
| 92 | name: management_template |
| 93 | visibility: private |
| 94 | translation: none |
| 95 | vtn_kind: MANAGEMENT_LOCAL |
| 96 | |
| 97 | management: |
| 98 | type: tosca.nodes.Network |
| 99 | properties: |
| 100 | name: management |
| 101 | # ip_version: 4 |
| 102 | subnet: 172.27.0.0/24 |
| 103 | permit_all_slices: true |
| 104 | requirements: |
| 105 | - template: |
| 106 | node: management_template |
| 107 | relationship: tosca.relationships.BelongsToOne |
| 108 | - owner: |
| 109 | node: slice#{{ .cordSiteName }}_management |
| 110 | relationship: tosca.relationships.BelongsToOne |
| 111 | |
| 112 | # Slice to own management networks |
| 113 | slice#{{ .cordSiteName }}_management: |
| 114 | description: This slice exists solely to own the management network(s) |
| 115 | type: tosca.nodes.Slice |
| 116 | properties: |
| 117 | network: noauto |
| 118 | name: {{ .cordSiteName }}_management |
| 119 | requirements: |
| 120 | - site: |
| 121 | node: {{ .cordSiteName }} |
| 122 | relationship: tosca.relationships.BelongsToOne |
| 123 | {{- end -}} |
| 124 | |
| 125 | {{- define "openstack.controllerTosca" -}} |
| 126 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 127 | |
| 128 | imports: |
| 129 | - custom_types/controller.yaml |
| 130 | - custom_types/controllersite.yaml |
| 131 | - custom_types/deployment.yaml |
| 132 | - custom_types/site.yaml |
| 133 | - custom_types/sitedeployment.yaml |
Scott Baker | a08a2d7 | 2018-05-22 16:09:14 -0700 | [diff] [blame] | 134 | - custom_types/openstackservice.yaml |
Andy Bavier | 43cdc66 | 2018-05-15 14:50:47 -0700 | [diff] [blame] | 135 | |
| 136 | description: openstack controller models |
| 137 | |
| 138 | topology_template: |
| 139 | node_templates: |
| 140 | |
| 141 | {{ .cordSiteName }}: |
| 142 | type: tosca.nodes.Site |
| 143 | properties: |
| 144 | name: {{ .cordSiteName }} |
| 145 | must-exist: true |
| 146 | |
Scott Baker | a08a2d7 | 2018-05-22 16:09:14 -0700 | [diff] [blame] | 147 | service#openstack: |
| 148 | type: tosca.nodes.OpenStackService |
| 149 | properties: |
| 150 | name: "OpenStack" |
| 151 | auth_url: http://keystone.openstack.svc.cluster.local/v3 |
| 152 | admin_user: {{ .keystoneAdminUser }} |
| 153 | admin_password: {{ .keystoneAdminPassword }} |
| 154 | admin_tenant: {{ .keystoneAdminTenant }} |
| 155 | |
Scott Baker | 4206a5f | 2019-02-28 17:07:04 -0800 | [diff] [blame] | 156 | # TODO: deal with the lack of controller objects |
| 157 | # TODO: All of this probably ends up in OpenStack service after the refactor |
| 158 | # {{ .cordSiteName }}_somedeployment_openstack: |
| 159 | # type: tosca.nodes.Controller |
| 160 | # properties: |
| 161 | # name: {{ .cordSiteName }}_somedeployment_openstack |
| 162 | # backend_type: OpenStack |
| 163 | # version: Newton |
| 164 | # auth_url: http://keystone.openstack.svc.cluster.local/v3 |
| 165 | # admin_user: {{ .keystoneAdminUser }} |
| 166 | # admin_password: {{ .keystoneAdminPassword }} |
| 167 | # admin_tenant: {{ .keystoneAdminTenant }} |
| 168 | # domain: {{ .keystoneDomain }} |
Andy Bavier | 43cdc66 | 2018-05-15 14:50:47 -0700 | [diff] [blame] | 169 | |
Andy Bavier | 43cdc66 | 2018-05-15 14:50:47 -0700 | [diff] [blame] | 170 | {{- end -}} |