Scott Baker | 5042166 | 2016-06-27 22:09:48 -0700 | [diff] [blame] | 1 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 2 | |
| 3 | # Note: |
| 4 | # assumes the following have been created and filled with appropriate data: |
| 5 | # /root/setup/admin_openrc |
| 6 | # /root/setup/flat_net_name |
| 7 | # /root/setup/padmin_public_key |
| 8 | |
| 9 | description: > |
| 10 | * Adds OpenCloud Sites, Deployments, and Controllers. |
| 11 | |
| 12 | imports: |
| 13 | - custom_types/xos.yaml |
| 14 | |
| 15 | topology_template: |
| 16 | node_templates: |
| 17 | trusty-server-multi-nic: |
| 18 | type: tosca.nodes.Image |
| 19 | properties: |
| 20 | disk_format: QCOW2 |
| 21 | container_format: BARE |
| 22 | |
| 23 | MyDeployment: |
| 24 | type: tosca.nodes.Deployment |
| 25 | properties: |
| 26 | flavors: m1.large, m1.medium, m1.small |
| 27 | requirements: |
| 28 | - image: |
| 29 | node: trusty-server-multi-nic |
| 30 | relationship: tosca.relationships.SupportsImage |
| 31 | |
| 32 | CloudLab: |
| 33 | type: tosca.nodes.Controller |
| 34 | requirements: |
| 35 | - deployment: |
| 36 | node: MyDeployment |
| 37 | relationship: tosca.relationships.ControllerDeployment |
| 38 | properties: |
| 39 | backend_type: OpenStack |
| 40 | version: Kilo |
| 41 | auth_url: { get_script_env: [ SELF, adminrc, OS_AUTH_URL, LOCAL_FILE] } |
| 42 | admin_user: { get_script_env: [ SELF, adminrc, OS_USERNAME, LOCAL_FILE] } |
| 43 | admin_password: { get_script_env: [ SELF, adminrc, OS_PASSWORD, LOCAL_FILE] } |
| 44 | admin_tenant: { get_script_env: [ SELF, adminrc, OS_TENANT_NAME, LOCAL_FILE] } |
| 45 | rabbit_user: { get_script_env: [ SELF, controller_settings, RABBIT_USER, LOCAL_FILE] } |
| 46 | rabbit_password: { get_script_env: [ SELF, controller_settings, RABBIT_PASS, LOCAL_FILE] } |
| 47 | rabbit_host: { get_script_env: [ SELF, controller_settings, CONTROLLER_FLAT_LAN_IP, LOCAL_FILE] } |
| 48 | domain: Default |
| 49 | artifacts: |
| 50 | adminrc: /root/setup/admin-openrc.sh |
| 51 | controller_settings: /root/setup/controller_settings |
| 52 | |
| 53 | mysite: |
| 54 | type: tosca.nodes.Site |
| 55 | properties: |
| 56 | display_name: MySite |
| 57 | site_url: http://opencloud.us/ |
| 58 | requirements: |
| 59 | - deployment: |
| 60 | node: MyDeployment |
| 61 | relationship: tosca.relationships.SiteDeployment |
| 62 | requirements: |
| 63 | - controller: |
| 64 | node: CloudLab |
| 65 | relationship: tosca.relationships.UsesController |
| 66 | |
| 67 | Public shared IPv4: |
| 68 | type: tosca.nodes.NetworkTemplate |
| 69 | properties: |
| 70 | visibility: private |
| 71 | translation: NAT |
| 72 | shared_network_name: { get_artifact: [ SELF, flat_net_name, LOCAL_FILE] } |
| 73 | artifacts: |
| 74 | flat_net_name: /root/setup/flat_net_name |
| 75 | |
| 76 | padmin@vicci.org: |
| 77 | type: tosca.nodes.User |
| 78 | requirements: |
| 79 | - site: |
| 80 | node: mysite |
| 81 | relationship: tosca.relationships.MemberOfSite |
| 82 | properties: |
| 83 | public_key: { get_artifact: [ SELF, pubkey, LOCAL_FILE ] } |
| 84 | is_admin: true |
| 85 | is_active: true |
| 86 | firstname: XOS |
| 87 | lastname: admin |
| 88 | artifacts: |
| 89 | pubkey: /root/setup/padmin_public_key |