How to add placement directives to a bundle

You can co-locate applications by using the to key. When LXD is supported by the backing cloud, it is also possible to isolate charms by including the container format in the placement directive.

For example:

mysql:
  charm: "cs:mysql-57"
  num_units: 1
  to: ["lxd:wordpress/0"]
  annotations:
    "gui-x": "139"
    "gui-y": "168"

This will install the MySQL application into a LXD container on the same machine as the ‘wordpress/0’ unit.

Alternatively, to install MySQL into a LXD container on machine ‘1’, use the following syntax:

mysql:
  charm: "cs:mysql-57"
  num_units: 1
  to: ["lxd:1"]
  annotations:
    "gui-x": "139"
    "gui-y": "168"

Last updated 11 months ago.