heat_stack_server.yaml 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. heat_template_version: 2014-10-16
  2. description: OpenShift cluster server
  3. parameters:
  4. name:
  5. type: string
  6. label: Name
  7. description: Name
  8. cluster_id:
  9. type: string
  10. label: Cluster ID
  11. description: Identifier of the cluster
  12. type:
  13. type: string
  14. label: Type
  15. description: Type master or node
  16. key_name:
  17. type: string
  18. label: Key name
  19. description: Key name of keypair
  20. image:
  21. type: string
  22. label: Image
  23. description: Name of the image
  24. flavor:
  25. type: string
  26. label: Flavor
  27. description: Name of the flavor
  28. net:
  29. type: string
  30. label: Net ID
  31. description: Net resource
  32. net_name:
  33. type: string
  34. label: Net name
  35. description: Net name
  36. subnet:
  37. type: string
  38. label: Subnet ID
  39. description: Subnet resource
  40. secgrp:
  41. type: comma_delimited_list
  42. label: Security groups
  43. description: Security group resources
  44. floating_network:
  45. type: string
  46. label: Floating network
  47. description: Network to allocate floating IP from
  48. outputs:
  49. name:
  50. description: Name of the server
  51. value: { get_attr: [ server, name ] }
  52. private_ip:
  53. description: Private IP of the server
  54. value:
  55. get_attr:
  56. - server
  57. - addresses
  58. - { get_param: net_name }
  59. - 0
  60. - addr
  61. floating_ip:
  62. description: Floating IP of the server
  63. value:
  64. get_attr:
  65. - server
  66. - addresses
  67. - { get_param: net_name }
  68. - 1
  69. - addr
  70. resources:
  71. server:
  72. type: OS::Nova::Server
  73. properties:
  74. name: { get_param: name }
  75. key_name: { get_param: key_name }
  76. image: { get_param: image }
  77. flavor: { get_param: flavor }
  78. networks:
  79. - port: { get_resource: port }
  80. user_data: { get_file: user-data }
  81. user_data_format: RAW
  82. metadata:
  83. env: { get_param: cluster_id }
  84. host-type: { get_param: type }
  85. env-host-type:
  86. str_template:
  87. template: cluster_id-openshift-type
  88. params:
  89. cluster_id: { get_param: cluster_id }
  90. type: { get_param: type }
  91. port:
  92. type: OS::Neutron::Port
  93. properties:
  94. network: { get_param: net }
  95. fixed_ips:
  96. - subnet: { get_param: subnet }
  97. security_groups: { get_param: secgrp }
  98. floating-ip:
  99. type: OS::Neutron::FloatingIP
  100. properties:
  101. floating_network: { get_param: floating_network }
  102. port_id: { get_resource: port }