cloud:juju
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
cloud:juju [2017/05/22 14:24] – ↷ Page moved from system:cloud:juju to cloud:juju blinke | cloud:juju [2017/05/22 14:24] (current) – ↷ Links adapted because of a move operation blinke | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== JuJu ====== | ||
+ | JuJu is an orchestration tool developed by Canonical. By utilizing JuJu it's possible to deploy and represent services from bare-metal (e.g. OpenStack) to application level (e.g. Owncloud), hence JuJu operates on the three major [[https:// | ||
+ | |||
+ | To deploy, integrate, scale and expose services one can provide so called Charms (e.g. MySQL). Furthermore, | ||
+ | |||
+ | Unlike [[https:// | ||
+ | |||
+ | ====== Connect to BCF cloud ====== | ||
+ | |||
+ | > Tested with JuJu version 2.0 | ||
+ | |||
+ | ===== Preperation ===== | ||
+ | |||
+ | In order to connect JuJu to the BCF cloud, prepare a virtual machine (VM) as described [[cloud: | ||
+ | |||
+ | <code bash> | ||
+ | user@cb-pc08: | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | +--------------------------------------+------------------------------------------+--------+ | ||
+ | | ID | Name | Status | | ||
+ | +--------------------------------------+------------------------------------------+--------+ | ||
+ | | 0f49eaf2-c366-43de-87ba-665ecb953c05 | Ubuntu_14.04_trusty | ||
+ | | 0ad51ebe-4225-40f5-8048-a8744b9ea4fd | fedora-20.x86_64 | ||
+ | | 02fcf9f0-787f-44bb-9c0c-fc377c775e8b | centos_7 | ||
+ | | d653054f-86f6-4567-a559-2119b2a78d80 | RancherOS | ||
+ | +--------------------------------------+------------------------------------------+--------+ | ||
+ | |||
+ | </ | ||
+ | |||
+ | All of the below-mentioned steps assuming a prepared Ubuntu Trusty (14.04) image, which can be created by executing the command below. Read [[cloud: | ||
+ | |||
+ | <code bash> | ||
+ | user@cb-pc08: | ||
+ | </ | ||
+ | |||
+ | ===== Install JuJu ===== | ||
+ | |||
+ | The first step is to install JuJu in the VM, from which you want to control your JuJu deployments (Ubuntu 14.04 or later). Since JuJu is already part of the official package repository of recent versions of Ubuntu, the command below is sufficient: | ||
+ | |||
+ | <code bash> | ||
+ | user@cb-pc08: | ||
+ | </ | ||
+ | |||
+ | After the installation was successfully, | ||
+ | |||
+ | JuJu already contains pre-installed, | ||
+ | |||
+ | <code bash> | ||
+ | user@cb-pc08: | ||
+ | </ | ||
+ | |||
+ | <code bash> | ||
+ | Cloud Regions | ||
+ | aws | ||
+ | aws-china | ||
+ | aws-gov | ||
+ | azure | ||
+ | azure-china | ||
+ | cloudsigma | ||
+ | google | ||
+ | joyent | ||
+ | rackspace | ||
+ | localhost | ||
+ | </ | ||
+ | |||
+ | Furthermore, | ||
+ | |||
+ | <code bash> | ||
+ | export OS_TENANT_NAME=$OS_PROJECT_NAME | ||
+ | export OS_DOMAIN_NAME=$OS_USER_DOMAIN_NAME | ||
+ | </ | ||
+ | |||
+ | ===== Create metadata image ===== | ||
+ | |||
+ | This step is necessary to create the metadata of an image. The data consists of endpoint, region, | ||
+ | image ID and so forth. It is needed to provide JuJu all necessary information for the later creation of the controller. | ||
+ | |||
+ | <code bash> | ||
+ | user@cb-pc08: | ||
+ | -i 2a3f51cf-c7dc-4364-9b17-458bd23c0aba \ | ||
+ | -s trusty \ | ||
+ | -r BCF \ | ||
+ | -u $OS_AUTH_URL | ||
+ | </ | ||
+ | |||
+ | ^ Flag ^ Description | ||
+ | | -d | The directory where the metadata will be placed. Must exist. | ||
+ | | -i | The image ID. Issue '' | ||
+ | | -s | Specifies the series (Trusty, Xenial, ...) of the image. | ||
+ | | -r | The region of the cloud. | ||
+ | | -u | The cloud endpoint. | ||
+ | |||
+ | ===== Create controller ===== | ||
+ | |||
+ | From the [[https:// | ||
+ | |||
+ | >A Juju controller is the management node of a Juju cloud environment. In particular, it houses the database and keeps track of all the models in that environment. Although it is a special node, it is a machine that gets created by Juju (during the " | ||
+ | |||
+ | Once all necessary steps in order to prepare the JuJu environment are done, one can start to create a controller by pasting the following lines into a file, e.g. called '' | ||
+ | |||
+ | <file yaml bcf_openstack.yaml> | ||
+ | clouds: | ||
+ | bcfopenstack: | ||
+ | type: openstack | ||
+ | use-floating-ip: | ||
+ | regions: | ||
+ | BCF: | ||
+ | endpoint: https:// | ||
+ | </ | ||
+ | |||
+ | The following, self-explanatory command adds the BCF cloud to the list of the known clouds, whereas the name of the cloud (// | ||
+ | |||
+ | <code bash> | ||
+ | user@cb-pc08: | ||
+ | </ | ||
+ | |||
+ | Verify a successful addition (notice the last line): | ||
+ | |||
+ | <code bash> | ||
+ | user@cb-pc08: | ||
+ | Cloud Regions | ||
+ | aws | ||
+ | aws-china | ||
+ | aws-gov | ||
+ | azure | ||
+ | azure-china | ||
+ | cloudsigma | ||
+ | google | ||
+ | joyent | ||
+ | rackspace | ||
+ | localhost | ||
+ | bcfopenstack | ||
+ | </ | ||
+ | |||
+ | Now add your credentials by issuing the command below. | ||
+ | |||
+ | <code bash> | ||
+ | user@cb-pc08: | ||
+ | </ | ||
+ | |||
+ | In case this command doesn' | ||
+ | |||
+ | Finally, create the controller in the following way. The location of the metadata source must match with the directory which have been used to store the metadata. | ||
+ | |||
+ | <code bash> | ||
+ | user@cb-pc08: | ||
+ | </ | ||
+ | |||
+ | Afterwards you will ask to (1) specify a cloud name and (2) to set a controller name. The latter can be chosen | ||
+ | freely, but the cloud name must match with the cloud name specified in the yaml file, // | ||
+ | |||
+ | ====== Set up JuJu GUI ====== | ||
+ | |||
+ | To set up a JuJu GUI, simply trigger '' | ||
+ | |||
+ | <code bash> | ||
+ | user@cb-pc08: | ||
+ | </ | ||
+ | |||
+ | ====== Deploy a service ====== | ||
+ | |||
+ | A service deployment can be achieved similar like the JuJu GUI in the latter step. Basically the deployment procedure is divided into two steps. First, choose a service from the charm store and issue the following command to deploy a [[https:// | ||
+ | |||
+ | <code bash> | ||
+ | user@cb-pc08: | ||
+ | </ | ||
+ | |||
+ | Second expose the service via: | ||
+ | |||
+ | <code bash> | ||
+ | user@cb-pc08: | ||
+ | </ | ||
+ | |||
+ | The GUI can be utilized to deploy and expose the wiki in a very easy way graphically. No matter, how you deploy and expose a service you have to **assign a floating IP** to get outside access to your application. | ||
+ | |||
+ | Read the [[https:// | ||
+ | |||
+ | ====== Delete a service ====== | ||
+ | |||
+ | To learn how to delete a service, consider [[https:// | ||
+ | |||
+ | ====== More ====== | ||
+ | |||
+ | The present introduction is very sketchy. Please read the official documentation, |