Configuring VMs

Another simple blueprint will just create a VM which you can use, without any software installed upon it:

tosca_definitions_version: tosca_simple_yaml_1_3

  template_name: simple-compute-spec
  template_version: 1.0.0-SNAPSHOT

    type: tosca.nodes.Compute
        mem_size: 8192 mb
        num_cpus: 4
        disk_size: 100gb
name: simple-vm
- type:
  name: VM
      minRam: 8192mb
      minCores: 4
      minDisk: 100gb

We’ve omitted the location section here and in many of the examples elsewhere; add the appropriate choice when you paste your YAML. Note that the will be ignored if deploying to localhost or byon fixed-IP machines.

This will create a VM with the specified parameters in your choice of cloud. In the GUI (and in the REST API), the entity is called “VM”, and the hostname and IP address(es) are reported as sensors. There are many more supported here, including:

  • a user to create (if not specified it creates the same username as brooklyn is running under)
  • a password for him or a publicKeyFile and privateKeyFile (defaulting to keys in ~/.ssh/id_rsa{.pub,} and no password, so if you have keys set up you can immediately ssh in!)
  • machineCreateAttempts (for dodgy clouds, and they nearly all fail occasionally!)
  • and things like imageId and userMetadata and disk and networking options (e.g. autoAssignFloatingIp for private clouds)

For more information, see Operations: Locations.