OpenStack and Juju

List of supported clouds > OpenStack

This document describes details specific to using your existing OpenStack cloud with Juju.

See more: OpenStack

When using the OpenStack cloud with Juju, it is important to keep in mind that it is a (1) machine cloud and (2) not some other cloud.

See more: Cloud differences in Juju

As the differences related to (1) are already documented generically in our Tutorial, How-to guides, and Reference docs, here we record just those that follow from (2).

Juju points of variation Notes for the OpenStack cloud
setup (chronological order):
supported versions: TBA
requirements: TBA
definition: Cloud type: openstack.

If you want to use the novarc file (recommended):
Source the OpenStack RC file (source <path to file>). This will allow Juju to detect values from preset OpenStack environment variables. Run add-cloud in interactive mode and accept the suggested defaults.

definition: If you want to use environment variables (recommended):
Source the OpenStack RC file (see above). Run add-credential and accept the suggested defaults.
notes on bootstrap: You will need to create an OpenStack machine metadata. If the metadata is available locally, you can pass it to Juju via juju bootstrap ... --metadata-source <path to metadata simplestreams.
> See more: How to configure machine image metadata

If your cloud has multiple private networks: You will need to specify the one that you want the instances to boot from via juju bootstrap ... --model-default network=<network uuid or name>.

If your cloud’s topology requires that its instances are accessed via floating IP addresses: Pass the allocate-public-ip=true (see constraints below) as a bootstrap constraint.

other (alphabetical order:)
conflicting: [instance-type] vs. [mem, root-disk, cores]
- allocate-public-id :white_check_mark:
- arch :white_check_mark:
- container :white_check_mark:
- cores :white_check_mark:
- cpu-power :negative_squared_cross_mark:
- instance-role :negative_squared_cross_mark:
- instance-type :white_check_mark:
Valid values: See cloud provider.
- mem :white_check_mark:
- root-disk :white_check_mark:
- root-disk-source :white_check_mark:
root-disk-source is either local or volume.
- spaces :negative_squared_cross_mark:
- tags :negative_squared_cross_mark:
- virt-type :white_check_mark: Valid values: [kvm, lxd].
- zones :white_check_mark:
<machine> TBA
subnet=... :negative_squared_cross_mark:
system-id=... :negative_squared_cross_mark:
zone=... :white_check_mark:
RESOURCE (cloud)

Consistent naming, tagging, and the ability to add user-controlled tags to created instances.


We should tell people to do

juju bootstrap ... --model-default use-floating-ip=true

instead of

juju bootstrap ... --config use-floating-ip=true

because the latter only affects the default model, whereas the former will affect all models the user will create. See Configuring models. I personally wasted a lot of time because of this. I was creating my own model right after bootstrapping the controller and couldn’t understand why that option had no effect.

Oh wow, I feel your pain. Thanks for taking the time to comment. I’ll update the recommendation. [Edit: I’ve made several changes to the document. Hopefully it’s easier to follow now.]

1 Like

@timClicks Thanks for the quick reaction! It’s actually --model-default, not --model-defaults (or do both work?). It’s easy to mix up with juju model-defaults which takes an ‘s’ :wink:

Fixed! Thanks for taking another look :slight_smile:

Perhaps "$ openstack network list " is missing here.

1 Like

Thank you! I’ve made the change.