4.11 Setting up Murano

The Murano project provides a method of creating and deploying cloud-ready applications. In order to use Murano applications, you must:

  • Deploy the Murano and Heat services (both enabled by default).

  • Create or download Murano applications.

  • Create images which include the Murano Agent.

  • Create a Murano environment which includes one or more Murano-enabled images and applications, and deploy the environment.

This section shows you how to create an image, ready to use with Murano.

4.11.1 Creating Oracle Linux Murano-enabled Images

In order to deploy Murano applications to virtual machine instances, the Murano Agent must be installed in the virtual machine. This section shows how to install the Murano Agent in Oracle Linux images. To create an image which includes the Murano Agent you can:

  • Create an Oracle Linux image, and install the openstack-murano-agent package.

  • Download an Oracle Linux image for OpenStack from the Oracle Software Delivery Cloud, mount the image, and install the openstack-murano-agent package.

When you have created an image with the Murano Agent installed, you then load it into Glance with an additional image property. The image can then be used in a Murano deployment.

Installing the Murano Agent in a virtual machine:

If you choose to create a virtual machine, you can install the openstack-murano-agent package from the Oracle Yum Server. Log into the virtual machine and perform these actions:

  1. Set up the yum repository location for the Murano Agent.

    For Oracle Linux 7, the openstack-murano-agent package is in the [ol7_openstack21] repository.

    For Oracle Linux 6, the openstack-murano-agent package is in the [ol6_openstack21] repository.

    Make sure this repository is enabled in the /etc/yum.repos.d/*.repo file. For ease, the steps to download this repository file are included.

    For Oracle Linux 7:

    # curl -L -o /etc/yum.repos.d/public-yum-ol7.repo \
        http://yum.oracle.com/public-yum-ol7.repo

    Make sure the [ol7_openstack21] and [ol7_addons] repositories are enabled.

    For Oracle Linux 6:

    # curl -L -o /etc/yum.repos.d/public-yum-ol6.repo \
        http://yum.oracle.com/public-yum-ol6.repo

    Make sure the [ol6_openstack21] and [ol6_addons] repositories are enabled.

  2. Install the openstack-murano-agent package.

    # yum install -y openstack-murano-agent
  3. Install the cloud-init package.

    # yum install -y cloud-init

Installing the Murano Agent in an image:

If you choose to use the Oracle Linux virtual machine images from the Oracle Software Delivery Cloud, this section contains instructions on installing the Murano Agent into these images.

The following should be performed by a user with root privileges. The final steps to load the image into Glance should be performed on a master node, so it may be easier to do all the steps from the master node.

  1. Oracle Linux virtual machine images for OpenStack are available on the Oracle Software Delivery Cloud, for both Oracle Linux 7 and Oracle Linux 6. Download the Oracle Linux virtual machine image(s) for OpenStack from the Oracle Software Delivery Cloud at:

    https://edelivery.oracle.com/linux

  2. Install the qemu-img package:

    # yum install qemu-img
  3. Load the qemu ndb module:

    # modprobe nbd max_part=63
  4. Share the virtual machine's disk:

    # qemu-nbd -c /dev/nbd0 OracleLinux-version-x86_64.qcow2
  5. Mount the virtual machine's disk. You can see a list of the partitions using:

    # fdisk /dev/nbd0 -l

    The Oracle Linux 6.7 and 7.2 image have two partitions: the boot partition, and the root partition. The system files are stored on the second (root) partition. The root partition (/dev/nbd0p2) is the mount point to access the file system and install packages.

    # mount /dev/nbd0p2 /mnt
  6. Set the networking to resolve the host names required to do the package install.

    On the Oracle Linux 7.2 image:

    # cat /etc/resolv.conf > /mnt/root/etc/resolv.conf

    On the Oracle Linux 6.7 image:

    # cat /etc/resolv.conf > /mnt/etc/resolv.conf
  7. Set up the yum repository location for the Murano Agent on the appropriate partition.

    For Oracle Linux 7, the openstack-murano-agent package is in the [ol7_openstack21] repository. For the Oracle Linux 7.2 image, use:

    # curl -L -o /mnt/root/etc/yum.repos.d/public-yum-ol7.repo \
        http://yum.oracle.com/public-yum-ol7.repo

    For Oracle Linux 6, the openstack-murano-agent package is in the [ol6_openstack21] repository. For the Oracle Linux 6.7 image use:

    # curl -L -o /mnt/etc/yum.repos.d/public-yum-ol6.repo \
        http://yum.oracle.com/public-yum-ol6.repo

    Make sure the repository is enabled in the yum.repos.d/*.repo file using a text editor such as vi .

  8. Install the openstack-murano-agent package.

    For the Oracle Linux 7.2 image, use:

    # chroot /mnt/root/ /bin/bash -c "/usr/bin/yum install -y openstack-murano-agent"

    For the Oracle Linux 6.7 image use:

    # chroot /mnt/ /bin/bash -c "/usr/bin/yum install -y openstack-murano-agent"

    If you need to access the yum server using a proxy, set the http_proxy environment variable as well, for example:

    # chroot /mnt/ /bin/bash -c "http_proxy=http://proxy.example.com:80 \
      /usr/bin/yum install -y openstack-murano-agent"
  9. Clean up any cached packages to reduce the image size.

    For the Oracle Linux 7.2 image, use:

    # chroot /mnt/root/ /bin/bash -c "/usr/bin/yum clean all"

    For the Oracle Linux 6.7 image use:

    # chroot /mnt/ /bin/bash -c "/usr/bin/yum clean all"
  10. Remove the Yum repository files.

    For the Oracle Linux 7.2 image, use:

    # rm /mnt/root/etc/yum.repos.d/public-yum-ol7.repo

    For the Oracle Linux 6.7 image use:

    # rm /mnt/etc/yum.repos.d/public-yum-ol6.repo
  11. Remove the networking changes:

    For the Oracle Linux 7.2 image, use:

    # cat > /mnt/root/etc/resolv.conf << __EOF__
    __EOF__

    For the Oracle Linux 6.7 image use:

    # cat > /mnt/etc/resolv.conf << __EOF__
    __EOF__
  12. Unmount the image.

    # umount /mnt/
    # qemu-nbd -d /dev/nbd0

Loading a Murano-enabled Image into Glance

  1. After installing the Murano Agent, the image is ready to load into Glance. To let OpenStack know that this image can be used in a Murano deployment, make sure you include the --property parameter as shown.

    --property murano_image_info='{"type": "linux", "title": "My Image Title"}'

    For example:

    $ glance image-create --name OL7-murano --is-public True --disk-format qcow2 \
      --container-format bare \
      --property murano_image_info='{"type": "linux", "title": "OL7-murano"}' \
      --file /data/OracleLinux-7.2-x86_64.qcow2
    +------------------------------+------------------------------------------+
    | Property                     | Value                                    |
    +------------------------------+------------------------------------------+
    | Property 'murano_image_info' | {"type": "linux", "title": "OL7-murano"} |
    | checksum                     | 0c487c29f3dfeb080034dc9b2f5a3690         |
    | container_format             | bare                                     |
    | created_at                   | 2016-03-17T05:15:28.000000               |
    | deleted                      | False                                    |
    | deleted_at                   | None                                     |
    | disk_format                  | qcow2                                    |
    | id                           | 2610deca-7b4e-4cf3-9aaa-8b4c0562a75e     |
    | is_public                    | True                                     |
    | min_disk                     | 0                                        |
    | min_ram                      | 0                                        |
    | name                         | OL7-murano                               |
    | owner                        | 41375e2937f04d7fa81b33f2ce134b2d         |
    | protected                    | False                                    |
    | size                         | 431329792                                |
    | status                       | active                                   |
    | updated_at                   | 2016-03-17T05:15:31.000000               |
    | virtual_size                 | None                                     |
    +------------------------------+------------------------------------------+
  2. You can create a virtual machine instance using this image, as well as using the image in a Murano deployment. For example, to deploy a virtual machine using this image, you could use:

    $ nova boot --image OL7-murano --flavor m1.medium \
      --nic net-id=4a922c1b-25a0-44ea-a476-7626ebe7738a OL7-murano-vm
    +--------------------------------------+----------------------------------------------------+
    | Property                             | Value                                              |
    +--------------------------------------+----------------------------------------------------+
    | OS-DCF:diskConfig                    | MANUAL                                             |
    | OS-EXT-AZ:availability_zone          | nova                                               |
    | OS-EXT-SRV-ATTR:host                 | -                                                  |
    | OS-EXT-SRV-ATTR:hypervisor_hostname  | -                                                  |
    | OS-EXT-SRV-ATTR:instance_name        | instance-0000001d                                  |
    | OS-EXT-STS:power_state               | 0                                                  |
    | OS-EXT-STS:task_state                | scheduling                                         |
    | OS-EXT-STS:vm_state                  | building                                           |
    | OS-SRV-USG:launched_at               | -                                                  |
    | OS-SRV-USG:terminated_at             | -                                                  |
    | accessIPv4                           |                                                    |
    | accessIPv6                           |                                                    |
    | adminPass                            | FNxRi3PH8AGd                                       |
    | config_drive                         |                                                    |
    | created                              | 2016-03-15T02:58:11Z                               |
    | flavor                               | m1.medium (3)                                      |
    | hostId                               |                                                    |
    | id                                   | 02749598-6da4-440b-8ea1-d58e986d2a04               |
    | image                                | OL7-murano (da9ddf7d-fe7c-4b02-9a90-09300fd29b23)  |
    | key_name                             | -                                                  |
    | metadata                             | {}                                                 |
    | name                                 | OL7-murano-vm                                      |
    | os-extended-volumes:volumes_attached | []                                                 |
    | progress                             | 0                                                  |
    | security_groups                      | default                                            |
    | status                               | BUILD                                              |
    | tenant_id                            | 41375e2937f04d7fa81b33f2ce134b2d                   |
    | updated                              | 2016-03-15T02:58:10Z                               |
    | user_id                              | cb96169f57ed4f6988ad749ed1f2efcb                   |
    +--------------------------------------+----------------------------------------------------+