Preparing to Deploy Contrail by Using Juju Charms
Follow these steps to prepare for deployment:
- Install Juju.
sudo apt-get update sudo apt-get upgrade sudo apt-get install juju
- Configure Juju.
You can add a cloud to Juju, identify clouds supported by Juju, and also manage clouds already added to Juju.
Adding a cloud—Juju recognizes a wide range of cloud types. You can use any one of the following methods to add a cloud to Juju:
Adding a Cloud by Using Interactive Command
Example: Adding an MAAS cloud to Juju
juju add-cloud
Cloud Types maas manual openstack oracle vsphere Select cloud type: maas Enter a name for your maas cloud: maas-cloud Enter the API endpoint url: http://<ip-address>:<node>/MAAS Cloud "maas-cloud" successfully added You may bootstrap with 'juju bootstrap maas-cloud'
Note Juju 2.x is compatible with MAAS series 1.x and 2.x.
Adding a Cloud Manually
You use a YAML configuration file to add a cloud manually. Enter the following command:
juju add-cloud <cloud-name> juju add-credential <cloud name>
For an example, to add the cloud junmaas, assuming that the name of the configuration file in the directory is
maas-clouds.yaml
, you run the following command:juju add-cloud junmaas maas-clouds.yaml
The following is the format of the YAML configuration file:
clouds: <cloud_name>: type: <type_of_cloud> auth-types: [<authenticaton_types>] regions: <region-name>: endpoint: <http://<ip-address>:<node>/MAAS>
Note The
auth-types
for a MAAS cloud type isoauth1
.
Identifying a supported cloud
Juju recognizes the cloud types given below. You use the
juju clouds
command to list cloud types that are supported by Juju.$ juju clouds Cloud Regions Default Type Description aws 15 us-east-1 ec2 Amazon Web Services aws-china 1 cn-north-1 ec2 Amazon China aws-gov 1 us-gov-west-1 ec2 Amazon (USA Government) azure 26 centralus azure Microsoft Azure azure-china 2 chinaeast azure Microsoft Azure China cloudsigma 5 hnl cloudsigma CloudSigma Cloud google 13 us-east1 gce Google Cloud Platform joyent 6 eu-ams-1 joyent Joyent Cloud oracle 5 uscom-central-1 oracle Oracle Cloud rackspace 6 dfw rackspace Rackspace Cloud localhost 1 localhost lxd LXD Container Hypervisor
- Create a Juju controller.
juju bootstrap --bootstrap-series=xenial <cloud name> <controller name>
Note A Juju controller manages and keeps track of applications in the Juju cloud environment.