Configure Ubuntu Pro services

All the examples in this page require an Ubuntu Pro contract token, which is provided with a subscription. Pro is available for free for personal use on up to five machines. Your subscription (and contract token) can be obtained from: https://ubuntu.com/pro

Some services are incompatible with others and cannot be enabled at the same time. Refer to this compatibility matrix for more details.

For a full list of keys, refer to the Ubuntu Pro module schema.

Attach machine to a subscription

This example attaches the machine to the subscription linked to the contract token specified.

1#cloud-config
2ubuntu_pro: {token: <ubuntu_pro_token>}

Attach and enable FIPS and ESM

This example attaches the machine to an Ubuntu Pro subscription, also enabling the FIPS and ESM services.

1#cloud-config
2ubuntu_pro:
3  enable: [fips, esm]
4  token: <ubuntu_pro_token>

Attach, enable FIPS and reboot

This example shows how to attach the machine to subscription and enable the FIPS service, then perform a reboot after cloud-init has completed to ensure the machine boots into the FIPS kernel.

1#cloud-config
2power_state: {mode: reboot}
3ubuntu_pro:
4  enable: [fips]
5  token: <ubuntu_pro_token>

Configure a HTTP(S) proxy

This example will set a HTTP(S) proxy before attaching the machine to subscription and enabling the FIPS service.

 1#cloud-config
 2ubuntu_pro:
 3  token: <ubuntu_pro_token>
 4  config:
 5    http_proxy: 'http://some-proxy:8088'
 6    https_proxy: 'https://some-proxy:8088'
 7    global_apt_https_proxy: 'https://some-global-apt-proxy:8088/'
 8    global_apt_http_proxy: 'http://some-global-apt-proxy:8088/'
 9    ua_apt_http_proxy: 'http://10.0.10.10:3128'
10    ua_apt_https_proxy: 'https://10.0.10.10:3128'
11  enable:
12  - fips

Auto-attach but don’t enable services

Enabling services can be skipped as follows:

1#cloud-config
2ubuntu_pro:
3  enable: []
4  enable_beta: []

Enable beta services

This example shows how to enable both ESM and the beta real-time kernel services. Note that real-time Ubuntu is available on specific releases.

1#cloud-config
2ubuntu_pro:
3  enable: [esm]
4  enable_beta: [realtime-kernel]

Note that a reboot will be required after the real-time kernel has been installed.

Disable auto-attach

1#cloud-config
2ubuntu_pro:
3  features: {disable_auto_attach: true}