bare-template.yaml 2.1 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
# Base Template for an Argo cluster:
#   - use the chameleon default image
#   - install argo dependencies
#   - does not install argo software itself
# If used to deploy multiple nodes, will take care of allocating a floating IP
# for a frontend node

# OpenStack Liberty release version
heat_template_version: 2015-10-15

description: Bare-metal cluster with Argo dependencies

parameters:
  key_name:
    type: string
    label: Key name
    description: Name of a key pair to enable SSH access to the instance
    default: default
    constraints:
    - custom_constraint: nova.keypair
  reservation_id:
    type: string
    description: ID of the Blazar reservation to use for launching instances
    constraints:
    - custom_constraint: blazar.reservation
  node_count:
    type: number
    label: Node count
    description: Number of physical nodes
    default: 1
    constraints:
      - range: { min: 1 }
        description: There must be at least one physical node.
  image:
    type: string
    label: Image
    description: Image to use for all instances
    default: CC-CentOS7
    constraints:
    - custom_constraint: glance.image
resources:
# floating IP for frontend
  instance_floating_ip:
    type: OS::Nova::FloatingIP
    properties:
      pool: public
    deletion_policy: Delete
  instance_association:
    type: OS::Nova::FloatingIPAssociation
    properties:
      floating_ip: { get_resource: instance_floating_ip }
      server_id: { get_attr: [argo_cluster, resource.0] }
  argo_cluster:
    type: OS::Heat::ResourceGroup
    properties:
      count: { get_param: node_count }
      resource_def:
        type: OS::Nova::Server
        properties:
          name: argo-base-%index%
          image: { get_param: image }
          flavor: baremetal
          key_name: { get_param: key_name }
          networks:
             - network: sharednet1
          scheduler_hints: { reservation: { get_param: reservation_id } }
outputs:
    first_instance_ip:
      description: The public IP address of the first instance. Login with the command 'ssh cc@first_instance_ip'.
      value: { get_attr: [instance_floating_ip, ip] }