Advertisement
Guest User

Untitled

a guest
May 12th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.40 KB | None | 0 0
  1. formatVersion: 1
  2. inputs:
  3. image:
  4. type: string
  5. title: Operating System
  6. enum:
  7. - ubuntu 16.04
  8. - ubuntu 18.04
  9. default: ubuntu 16.04
  10. count:
  11. type: integer
  12. title: Machine Count
  13. minimum: 2
  14. maximum: 5
  15. default: 2
  16. size:
  17. type: string
  18. title: Machine size
  19. description: Resource requirements for your workload.
  20. enum:
  21. - small
  22. - medium
  23. default: small
  24. tags:
  25. type: array
  26. title: Tags
  27. description: Freeform tags that you would like attached to the provisioned resources.
  28. items:
  29. type: object
  30. properties:
  31. key:
  32. type: string
  33. title: Key
  34. value:
  35. type: string
  36. title: Value
  37. platform:
  38. type: string
  39. title: Deploy to
  40. oneOf:
  41. - title: AWS
  42. const: 'platform:aws'
  43. - title: Azure
  44. const: 'platform:azure'
  45. - title: vSphere
  46. const: 'platform:vsphere'
  47. username:
  48. title: User Account
  49. type: string
  50. description: Name of the user account to be created. Can only contain letters and numbers.
  51. pattern: '^[a-zA-Z0-9]+$'
  52. shell:
  53. title: Default Shell
  54. type: string
  55. enum:
  56. - /bin/bash
  57. - /bin/sh
  58. default: /bin/bash
  59. ssh_public_key:
  60. type: string
  61. title: SSH public key
  62. encrypted: true
  63. password:
  64. type: string
  65. title: Password
  66. description: The initial password that will be required to logon to the machine. Will be set to reset on first login.
  67. writeOnly: true
  68. public_ip:
  69. type: boolean
  70. title: Assign public IP address
  71. description: Choose whether your machine should be internet facing.
  72. default: false
  73. resources:
  74. Machine_1:
  75. type: Cloud.Machine
  76. properties:
  77. count: '${input.count}'
  78. image: '${input.image}'
  79. flavor: '${input.size}'
  80. tags: '${input.tags}'
  81. constraints:
  82. - tag: '${input.platform}'
  83. cloudConfig: |
  84. #cloud-config
  85. users:
  86. - name: ${input.username}
  87. shell: ${input.shell}
  88. groups: sudo
  89. sudo: ['ALL=(ALL) NOPASSWD:ALL']
  90. ssh-authorized_keys:
  91. - ${input.ssh_public_key}
  92. passwd: ${input.password}
  93. chpasswd: {expire: True}
  94. networks:
  95. - name: '${resource.Network_1.name}'
  96. assignPublicIpAddress: '${input.public_ip}'
  97. Network_1:
  98. type: Cloud.Network
  99. properties:
  100. name: net1
  101. networkType: existing
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement