heat_stack_server.yaml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  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. subtype:
  17. type: string
  18. label: Sub-type
  19. description: Sub-type compute or infra for nodes, default otherwise
  20. default: default
  21. key_name:
  22. type: string
  23. label: Key name
  24. description: Key name of keypair
  25. image:
  26. type: string
  27. label: Image
  28. description: Name of the image
  29. flavor:
  30. type: string
  31. label: Flavor
  32. description: Name of the flavor
  33. net:
  34. type: string
  35. label: Net ID
  36. description: Net resource
  37. net_name:
  38. type: string
  39. label: Net name
  40. description: Net name
  41. subnet:
  42. type: string
  43. label: Subnet ID
  44. description: Subnet resource
  45. secgrp:
  46. type: comma_delimited_list
  47. label: Security groups
  48. description: Security group resources
  49. floating_network:
  50. type: string
  51. label: Floating network
  52. description: Network to allocate floating IP from
  53. outputs:
  54. name:
  55. description: Name of the server
  56. value: { get_attr: [ server, name ] }
  57. private_ip:
  58. description: Private IP of the server
  59. value:
  60. get_attr:
  61. - server
  62. - addresses
  63. - { get_param: net_name }
  64. - 0
  65. - addr
  66. floating_ip:
  67. description: Floating IP of the server
  68. value:
  69. get_attr:
  70. - server
  71. - addresses
  72. - { get_param: net_name }
  73. - 1
  74. - addr
  75. resources:
  76. server:
  77. type: OS::Nova::Server
  78. properties:
  79. name: { get_param: name }
  80. key_name: { get_param: key_name }
  81. image: { get_param: image }
  82. flavor: { get_param: flavor }
  83. networks:
  84. - port: { get_resource: port }
  85. user_data: { get_file: user-data }
  86. user_data_format: RAW
  87. metadata:
  88. env: { get_param: cluster_id }
  89. host-type: { get_param: type }
  90. env-host-type:
  91. str_replace:
  92. template: cluster_id-openshift-type
  93. params:
  94. cluster_id: { get_param: cluster_id }
  95. type: { get_param: type }
  96. sub-host-type: { get_param: subtype }
  97. port:
  98. type: OS::Neutron::Port
  99. properties:
  100. network: { get_param: net }
  101. fixed_ips:
  102. - subnet: { get_param: subnet }
  103. security_groups: { get_param: secgrp }
  104. floating-ip:
  105. type: OS::Neutron::FloatingIP
  106. properties:
  107. floating_network: { get_param: floating_network }
  108. port_id: { get_resource: port }