Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tosca_definitions_version: tosca_simple_yaml_1_0_0_wd03
- imports:
- - tosca-normative-types:1.0.0.wd06-SNAPSHOT
- template_name: web-chat-cloudfoundry.mysql-cloudfoundry
- template_version: 1.0.0-SNAPSHOT
- description: Chat Application and mysql deployed on CloudFoundry
- node_types:
- org.apache.brooklyn.entity.cloudfoundry.webapp.php.PhpCloudFoundryPaasWebApp:
- derived_from: tosca.nodes.Root
- description: >
- An CloudFoundry PHP Application
- properties:
- application-name:
- type: string
- required: true
- application-url:
- type: string
- required: true
- bind:
- type: list
- required: false
- entry_schema:
- type: string
- env:
- type: map
- required: false
- entry_schema:
- type: string
- org.apache.brooklyn.entity.cloudfoundry.services.sql.cleardb.ClearDbService:
- derived_from: tosca.nodes.Root
- description: |
- A MySQL service based on ClearDbService
- properties:
- creationScriptUrl:
- type: string
- required: false
- serviceInstanceName:
- type: string
- required: true
- plan:
- type: string
- required: true
- topology_template:
- description: Web Server Sample with Script
- node_templates:
- phpModule:
- type: org.apache.brooklyn.entity.cloudfoundry.webapp.java.JavaCloudFoundryPaasWebApp
- properties:
- application-name: demo-php-frontend
- application-url: "https://<USER>:<PASS>@bitbucket.org/seaclDem/nuro-casestudy.git"
- bind:
- - "$brooklyn:component("db")"
- env:
- myDbName: $brooklyn:component("db").attributeWhenReady("test-brooklyn-app-from-yaml.credentials.name")
- myDbHostName: $brooklyn:component("db").attributeWhenReady("test-brooklyn-app-from-yaml.credentials.hostname")
- myDbUser: $brooklyn:component("db").attributeWhenReady("test-brooklyn-app-from-yaml.credentials.username")
- myDbPassword: $brooklyn:component("db").attributeWhenReady("test-brooklyn-app-from-yaml.credentials.password")
- myDbPort: $brooklyn:component("db").attributeWhenReady("test-brooklyn-app-from-yaml.credentials.port")
- db:
- type: org.apache.brooklyn.entity.cloudfoundry.services.sql.cleardb.ClearDbService
- properties:
- creationScriptUrl: https://s3-us-west-2.amazonaws.com/deployer-demo-artifacs/paas/webchat/chat-database.sql
- serviceInstanceName: demo-webchat-database
- plan: spark
- # if you want to tell brooklyn to assign a location at deploy time, as part of the template, this is the current way.
- # it can also be done with camp, referencing this topology template.
- groups:
- add_brooklyn_autoscaling:
- members: [ phpModule ]
- policies:
- - brooklyn.location: cloudfoundry-instance
- add_brooklyn_location-db:
- members: [ db ]
- policies:
- - brooklyn.location: cloudfoundry-instance
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement