4.14 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.14.1 Creating Oracle Linux Murano-enabled Images

To deploy Murano applications to virtual machine instances, the Murano Agent must be installed in the virtual machine. The Murano Agent is only available for Oracle Linux 7.

To create an image which includes the Murano Agent you can:

  • Create an Oracle Linux 7 virtual machine, and install the openstack-murano-agent package.

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

Once you have a virtual machine image that includes the Murano Agent, you then load it into Glance so that it can be used in a Murano deployment.

Installing the Murano Agent in a Virtual Machine

You install the openstack-murano-agent package in a virtual machine using the Oracle Yum Server. Log into the virtual machine and perform the following:

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

    The openstack-murano-agent package is in the [ol7_openstack30] repository.

    Enable the [ol7_openstack30] and [ol7_addons] repositories by setting enabled=1 in the /etc/yum.repos.d/public-yum-ol7.repo file. If this file does not contain an entry for the [ol7_openstack30] repository, download the latest copy of the repository file:

    # curl -L -o /etc/yum.repos.d/public-yum-ol7.repo \
        http://yum.oracle.com/public-yum-ol7.repo
  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

To install the Murano Agent in an Oracle Linux 7 virtual machine image, perform the following as user with root privileges:

  1. Install the qemu-img package.

    # yum install qemu-img
  2. Load the qemu ndb module.

    # modprobe nbd max_part=63
  3. Download an Oracle Linux 7 virtual machine image for OpenStack

    Oracle Linux 7 virtual machine images for OpenStack are available on the Oracle Software Delivery Cloud at: https://edelivery.oracle.com/linux.

  4. Share the virtual machine image.

    # qemu-nbd -c /dev/nbd0 OracleLinux-version-x86_64.qcow2
  5. Mount the virtual machine image.

    To see a list of the disk partitions:

    # fdisk /dev/nbd0 -l

    The Oracle Linux 7 images 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. Configure DNS name resolution (required for package installation).

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

    The openstack-murano-agent package is in the [ol7_openstack30] repository.

    Enable the [ol7_openstack30] and [ol7_addons] repositories by setting enabled=1 in the /mnt/root/etc/yum.repos.d/public-yum-ol7.repo file. If this file does not contain an entry for the [ol7_openstack30] repository, download the latest copy of the repository file:

    # curl -L -o /mnt/root/etc/yum.repos.d/public-yum-ol7.repo \
        http://yum.oracle.com/public-yum-ol7.repo
  8. Install the openstack-murano-agent package.

    # chroot /mnt/root/ /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.

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

    # rm /mnt/root/etc/yum.repos.d/public-yum-ol7.repo
  11. Remove the DNS name resolution configuration.

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

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

Loading a Murano-Enabled Image into Glance

After you install the Murano Agent in an image, the image is ready to load into Glance. When you load the image into Glance, make sure you include the --property parameter as follows, so that the image can be used in a Murano deployment.

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

For example:

$ glance image-create --name OL7-murano --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     |
| 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                                     |
+------------------------------+------------------------------------------+

As well as using the image in a Murano deployment, you can create a instance using the image. For example:

$ 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                   |
+--------------------------------------+----------------------------------------------------+