heat_stack_server.yaml 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  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_env:
  9. type: string
  10. label: Cluster environment
  11. description: Environment of the cluster
  12. cluster_id:
  13. type: string
  14. label: Cluster ID
  15. description: Identifier of the cluster
  16. type:
  17. type: string
  18. label: Type
  19. description: Type master or node
  20. subtype:
  21. type: string
  22. label: Sub-type
  23. description: Sub-type compute or infra for nodes, default otherwise
  24. default: default
  25. key_name:
  26. type: string
  27. label: Key name
  28. description: Key name of keypair
  29. image:
  30. type: string
  31. label: Image
  32. description: Name of the image
  33. flavor:
  34. type: string
  35. label: Flavor
  36. description: Name of the flavor
  37. net:
  38. type: string
  39. label: Net ID
  40. description: Net resource
  41. net_name:
  42. type: string
  43. label: Net name
  44. description: Net name
  45. subnet:
  46. type: string
  47. label: Subnet ID
  48. description: Subnet resource
  49. secgrp:
  50. type: comma_delimited_list
  51. label: Security groups
  52. description: Security group resources
  53. floating_network:
  54. type: string
  55. label: Floating network
  56. description: Network to allocate floating IP from
  57. outputs:
  58. name:
  59. description: Name of the server
  60. value: { get_attr: [ server, name ] }
  61. private_ip:
  62. description: Private IP of the server
  63. value:
  64. get_attr:
  65. - server
  66. - addresses
  67. - { get_param: net_name }
  68. - 0
  69. - addr
  70. floating_ip:
  71. description: Floating IP of the server
  72. value:
  73. get_attr:
  74. - server
  75. - addresses
  76. - { get_param: net_name }
  77. - 1
  78. - addr
  79. resources:
  80. server:
  81. type: OS::Nova::Server
  82. properties:
  83. name: { get_param: name }
  84. key_name: { get_param: key_name }
  85. image: { get_param: image }
  86. flavor: { get_param: flavor }
  87. networks:
  88. - port: { get_resource: port }
  89. user_data: { get_resource: config }
  90. user_data_format: RAW
  91. metadata:
  92. environment: { get_param: cluster_env }
  93. clusterid: { get_param: cluster_id }
  94. host-type: { get_param: type }
  95. sub-host-type: { get_param: subtype }
  96. port:
  97. type: OS::Neutron::Port
  98. properties:
  99. network: { get_param: net }
  100. fixed_ips:
  101. - subnet: { get_param: subnet }
  102. security_groups: { get_param: secgrp }
  103. floating-ip:
  104. type: OS::Neutron::FloatingIP
  105. properties:
  106. floating_network: { get_param: floating_network }
  107. port_id: { get_resource: port }
  108. config:
  109. type: OS::Heat::CloudConfig
  110. properties:
  111. cloud_config:
  112. disable_root: true
  113. hostname: { get_param: name }
  114. fqdn:
  115. str_replace:
  116. template: name.example.com
  117. params:
  118. name: { get_param: name }
  119. system_info:
  120. default_user:
  121. name: openshift
  122. sudo: ["ALL=(ALL) NOPASSWD: ALL"]
  123. write_files:
  124. - path: /etc/sudoers.d/00-openshift-no-requiretty
  125. permissions: 440
  126. # content: Defaults:openshift !requiretty
  127. # Encoded in base64 to be sure that we do not forget the trailing newline or
  128. # sudo will not be able to parse that file
  129. encoding: b64
  130. content: RGVmYXVsdHM6b3BlbnNoaWZ0ICFyZXF1aXJldHR5Cg==