Zack Williams | a276311 | 2017-01-03 11:38:38 -0700 | [diff] [blame] | 1 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 2 | |
| 3 | description: Hypercache CDN Content |
| 4 | |
| 5 | imports: |
| 6 | - custom_types/xos.yaml |
| 7 | - custom_types/cdn.yaml |
| 8 | |
| 9 | topology_template: |
| 10 | node_templates: |
| 11 | HyperCache: |
| 12 | type: tosca.nodes.CDNService |
| 13 | properties: |
| 14 | # HyperCache service must already exist before running this recipe |
| 15 | no-create: true |
| 16 | no-delete: true |
| 17 | no-update: true |
| 18 | |
| 19 | # Setup the CDN Service Provider |
| 20 | |
| 21 | main_service_provider: |
| 22 | type: tosca.nodes.ServiceProvider |
| 23 | requirements: |
| 24 | - hpc_service: |
| 25 | node: HyperCache |
| 26 | relationship: tosca.relationships.MemberOfService |
| 27 | |
| 28 | # Wall Street Journal Content Provider |
| 29 | |
| 30 | wsj_content: |
| 31 | type: tosca.nodes.ContentProvider |
| 32 | requirements: |
| 33 | - service_provider: |
| 34 | node: main_service_provider |
| 35 | relationship: tosca.relationships.MemberOfServiceProvider |
| 36 | |
| 37 | www.wsj.com: |
| 38 | type: tosca.nodes.CDNPrefix |
| 39 | requirements: |
| 40 | - content_provider: |
| 41 | node: wsj_content |
| 42 | relationship: tosca.relationships.MemberOfContentProvider |
| 43 | - default_origin_server: |
| 44 | node: http_www.wsj.com |
| 45 | relationship: tosca.relationships.DefaultOriginServer |
| 46 | |
| 47 | si.wsj.net: |
| 48 | type: tosca.nodes.CDNPrefix |
| 49 | requirements: |
| 50 | - content_provider: |
| 51 | node: wsj_content |
| 52 | relationship: tosca.relationships.MemberOfContentProvider |
| 53 | - default_origin_server: |
| 54 | node: http_si.wsj.net |
| 55 | relationship: tosca.relationships.DefaultOriginServer |
| 56 | |
| 57 | s.wsj.net: |
| 58 | type: tosca.nodes.CDNPrefix |
| 59 | requirements: |
| 60 | - content_provider: |
| 61 | node: wsj_content |
| 62 | relationship: tosca.relationships.MemberOfContentProvider |
| 63 | - default_origin_server: |
| 64 | node: http_s.wsj.net |
| 65 | relationship: tosca.relationships.DefaultOriginServer |
| 66 | |
| 67 | ore.wsj.net: |
| 68 | type: tosca.nodes.CDNPrefix |
| 69 | requirements: |
| 70 | - content_provider: |
| 71 | node: wsj_content |
| 72 | relationship: tosca.relationships.MemberOfContentProvider |
| 73 | - default_origin_server: |
| 74 | node: http_ore.wsj.net |
| 75 | relationship: tosca.relationships.DefaultOriginServer |
| 76 | |
| 77 | http_www.wsj.com: |
| 78 | type: tosca.nodes.OriginServer |
| 79 | requirements: |
| 80 | - content_provider: |
| 81 | node: wsj_content |
| 82 | relationship: tosca.relationships.MemberOfContentProvider |
| 83 | |
| 84 | http_si.wsj.net: |
| 85 | type: tosca.nodes.OriginServer |
| 86 | requirements: |
| 87 | - content_provider: |
| 88 | node: wsj_content |
| 89 | relationship: tosca.relationships.MemberOfContentProvider |
| 90 | |
| 91 | http_s.wsj.net: |
| 92 | type: tosca.nodes.OriginServer |
| 93 | requirements: |
| 94 | - content_provider: |
| 95 | node: wsj_content |
| 96 | relationship: tosca.relationships.MemberOfContentProvider |
| 97 | |
| 98 | http_ore.wsj.net: |
| 99 | type: tosca.nodes.OriginServer |
| 100 | requirements: |
| 101 | - content_provider: |
| 102 | node: wsj_content |
| 103 | relationship: tosca.relationships.MemberOfContentProvider |
| 104 | |
| 105 | # ON.Lab content provider |
| 106 | |
| 107 | on_lab_content: |
| 108 | type: tosca.nodes.ContentProvider |
| 109 | requirements: |
| 110 | - service_provider: |
| 111 | node: main_service_provider |
| 112 | relationship: tosca.relationships.MemberOfServiceProvider |
| 113 | |
| 114 | # Create CDN prefix onlab.vicci.org |
| 115 | onlab.vicci.org: |
| 116 | type: tosca.nodes.CDNPrefix |
| 117 | requirements: |
| 118 | - content_provider: |
| 119 | node: on_lab_content |
| 120 | relationship: tosca.relationships.MemberOfContentProvider |
| 121 | |
| 122 | http_onos-videos.s3.amazonaws.com: |
| 123 | type: tosca.nodes.OriginServer |
| 124 | requirements: |
| 125 | - content_provider: |
| 126 | node: on_lab_content |
| 127 | relationship: tosca.relationships.MemberOfContentProvider |
| 128 | |
| 129 | # Create origin server s3-us-west-1.amazonaws.com |
| 130 | http_s3-us-west-1.amazonaws.com: |
| 131 | type: tosca.nodes.OriginServer |
| 132 | requirements: |
| 133 | - content_provider: |
| 134 | node: on_lab_content |
| 135 | relationship: tosca.relationships.MemberOfContentProvider |
| 136 | |
| 137 | # Create origin server s3.amazonaws.com |
| 138 | http_s3.amazonaws.com: |
| 139 | type: tosca.nodes.OriginServer |
| 140 | requirements: |
| 141 | - content_provider: |
| 142 | node: on_lab_content |
| 143 | relationship: tosca.relationships.MemberOfContentProvider |
| 144 | |
| 145 | # Test Content Provider |
| 146 | |
| 147 | testcp2: |
| 148 | type: tosca.nodes.ContentProvider |
| 149 | requirements: |
| 150 | - service_provider: |
| 151 | node: main_service_provider |
| 152 | relationship: tosca.relationships.MemberOfServiceProvider |
| 153 | |
| 154 | http_www.cs.arizona.edu: |
| 155 | type: tosca.nodes.OriginServer |
| 156 | requirements: |
| 157 | - content_provider: |
| 158 | node: testcp2 |
| 159 | relationship: tosca.relationships.MemberOfContentProvider |
| 160 | |
| 161 | test-cdn.opencloud.us: |
| 162 | type: tosca.nodes.CDNPrefix |
| 163 | requirements: |
| 164 | - content_provider: |
| 165 | node: testcp2 |
| 166 | relationship: tosca.relationships.MemberOfContentProvider |
| 167 | |
| 168 | - default_origin_server: |
| 169 | node: http_www.cs.arizona.edu |
| 170 | relationship: tosca.relationships.DefaultOriginServer |
| 171 | |
| 172 | # Health Checks |
| 173 | |
| 174 | healthcheck_dns_onlab.vicci.org: |
| 175 | type: tosca.nodes.HpcHealthCheck |
| 176 | requirements: |
| 177 | - hpc_service: |
| 178 | node: HyperCache |
| 179 | relationship: tosca.relationships.MemberOfService |
| 180 | properties: |
| 181 | kind: dns |
| 182 | resource_name: onlab.vicci.org |
| 183 | |
| 184 | healthcheck_dns_test-cdn.opencloud.us: |
| 185 | type: tosca.nodes.HpcHealthCheck |
| 186 | requirements: |
| 187 | - hpc_service: |
| 188 | node: HyperCache |
| 189 | relationship: tosca.relationships.MemberOfService |
| 190 | properties: |
| 191 | kind: dns |
| 192 | resource_name: test-cdn.opencloud.us |
| 193 | |
| 194 | healthcheck_http_test-cdn-index: |
| 195 | type: tosca.nodes.HpcHealthCheck |
| 196 | requirements: |
| 197 | - hpc_service: |
| 198 | node: HyperCache |
| 199 | relationship: tosca.relationships.MemberOfService |
| 200 | properties: |
| 201 | kind: http |
| 202 | resource_name: test-cdn.opencloud.us:/ |
| 203 | result_contains: Lowenthal |
| 204 | |
| 205 | healthcheck_http_onlab_onos_image: |
| 206 | type: tosca.nodes.HpcHealthCheck |
| 207 | requirements: |
| 208 | - hpc_service: |
| 209 | node: HyperCache |
| 210 | relationship: tosca.relationships.MemberOfService |
| 211 | properties: |
| 212 | kind: http |
| 213 | resource_name: onlab.vicci.org:/onos/vm/onos-tutorial-1.1.0r220-ovf.zip |
| 214 | |
| 215 | healthcheck_http_onlab_mininet_image: |
| 216 | type: tosca.nodes.HpcHealthCheck |
| 217 | requirements: |
| 218 | - hpc_service: |
| 219 | node: HyperCache |
| 220 | relationship: tosca.relationships.MemberOfService |
| 221 | properties: |
| 222 | kind: http |
| 223 | resource_name: onlab.vicci.org:/mininet-vm/mininet-2.1.0-130919-ubuntu-13.04-server-amd64-ovf.zip |
| 224 | |