Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- formatVersion: 1
- inputs:
- image:
- type: string
- title: Operating System
- enum:
- - ubuntu 16.04
- - ubuntu 18.04
- default: ubuntu 16.04
- count:
- type: integer
- title: Machine Count
- minimum: 2
- maximum: 5
- default: 2
- size:
- type: string
- title: Machine size
- description: Resource requirements for your workload.
- enum:
- - small
- - medium
- default: small
- tags:
- type: array
- title: Tags
- description: Freeform tags that you would like attached to the provisioned resources.
- items:
- type: object
- properties:
- key:
- type: string
- title: Key
- value:
- type: string
- title: Value
- platform:
- type: string
- title: Deploy to
- oneOf:
- - title: AWS
- const: 'platform:aws'
- - title: Azure
- const: 'platform:azure'
- - title: vSphere
- const: 'platform:vsphere'
- username:
- title: User Account
- type: string
- description: Name of the user account to be created. Can only contain letters and numbers.
- pattern: '^[a-zA-Z0-9]+$'
- shell:
- title: Default Shell
- type: string
- enum:
- - /bin/bash
- - /bin/sh
- default: /bin/bash
- ssh_public_key:
- type: string
- title: SSH public key
- encrypted: true
- password:
- type: string
- title: Password
- description: The initial password that will be required to logon to the machine. Will be set to reset on first login.
- writeOnly: true
- public_ip:
- type: boolean
- title: Assign public IP address
- description: Choose whether your machine should be internet facing.
- default: false
- resources:
- Machine_1:
- type: Cloud.Machine
- properties:
- count: '${input.count}'
- image: '${input.image}'
- flavor: '${input.size}'
- tags: '${input.tags}'
- constraints:
- - tag: '${input.platform}'
- cloudConfig: |
- #cloud-config
- users:
- - name: ${input.username}
- shell: ${input.shell}
- groups: sudo
- sudo: ['ALL=(ALL) NOPASSWD:ALL']
- ssh-authorized_keys:
- - ${input.ssh_public_key}
- passwd: ${input.password}
- chpasswd: {expire: True}
- networks:
- - name: '${resource.Network_1.name}'
- assignPublicIpAddress: '${input.public_ip}'
- Network_1:
- type: Cloud.Network
- properties:
- name: net1
- networkType: existing
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement