Advertisement
Guest User

Untitled

a guest
Feb 21st, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 2.04 KB | None | 0 0
  1. #
  2. # This is a hello world HOT template just defining a single compute
  3. # server.
  4. #
  5. heat_template_version: 2013-05-23
  6.  
  7. description: >
  8.  Hello world HOT template that just defines a single server.
  9.   Contains just base features to verify base HOT support.
  10.  
  11. parameters:
  12.   key_name:
  13.     type: string
  14.     description: Name of an existing key pair to use for the server
  15.     constraints:
  16.       - custom_constraint: nova.keypair
  17.   flavor:
  18.     type: string
  19.     description: Flavor for the server to be created
  20.     default: m1.small
  21.     constraints:
  22.       - custom_constraint: nova.flavor
  23.   image:
  24.     type: string
  25.     description: Image ID or image name to use for the server
  26.     constraints:
  27.       - custom_constraint: glance.image
  28.   admin_pass:
  29.     type: string
  30.     description: Admin password
  31.     hidden: true
  32.     constraints:
  33.       - length: { min: 6, max: 8 }
  34.         description: Password length must be between 6 and 8 characters
  35.       - allowed_pattern: "[a-zA-Z0-9]+"
  36.         description: Password must consist of characters and numbers only
  37.       - allowed_pattern: "[A-Z]+[a-zA-Z0-9]*"
  38.         description: Password must start with an uppercase character
  39.   db_port:
  40.     type: number
  41.     description: Database port number
  42.     default: 50000
  43.     constraints:
  44.       - range: { min: 40000, max: 60000 }
  45.         description: Port number must be between 40000 and 60000
  46. resources:
  47.   server:
  48.     type: OS::Nova::Server
  49.     properties:
  50.       name: testStack1
  51.       key_name: { get_param: key_name }
  52.       image: { get_param: image }
  53.       flavor: { get_param: flavor }
  54.       admin_pass: { get_param: admin_pass }
  55.       networks:
  56.         - network: int-net
  57.       user_data:
  58.         str_replace:
  59.           template: |
  60.            #!/bin/bash
  61.             echo db_port
  62.           params:
  63.             db_port: { get_param: db_port }
  64.  
  65. outputs:
  66.   server_networks:
  67.     description: The networks of the deployed server
  68.     value: { get_attr: [server, networks] }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement