Murano service broker for Cloud Foundry

Service broker overview

Service broker is a new murano component which implements Cloud Foundry Service Broker API.

This lets users build ‘hybrid’ infrastructures that are services like databases, message queues, key/value stores, and so on. This services can be uploaded and deployed with murano and made available to Cloud Foundry apps on demand. The result is lowered cost, shorter timetables, and quicker access to required tools — developers can ‘self serve’ by building any required service, then make it instantly available in Cloud Foundry.

Configure service broker

Manual installation

If you use local murano installation, you can configure and run murano service broker in a few simple steps:

  1. Add new entry to the murano configuration file.

    [cfapi]
    tenant = %TENANT_NAME%
    bind_host = %HOST_IP%
    bind_port = 8083
    auth_url = 'http://%OPENSTACK_HOST_IP%:5000/v2.0'
    

    Note

    bind_host IP should be in the same network as Cloud Foundry instance

  2. Open a new console and launch service broker.

    cd ~/murano/murano
    tox -e venv -- murano-api --config-file ./etc/murano/murano.conf
    

Devstack installation

It is really easy to enable service broker in your devstack installation. You need simply update your local.conf with the following:

[[local|localrc]]
enable_plugin murano git://git.openstack.org/openstack/murano
enable_service murano-cfapi

How to use service broker

After service broker is configured and started you have nothing to do with service broker from murano side - it is an adapter which is used by Cloud Foundry PaaS.

To access and use murano packages through Cloud Foundry, you need to perform following steps:

  1. Log in to Cloud Foundry instance via ssh.

    ssh -i <key_name> <username>@<hostname>
    
  2. Log in to Cloud Foundry itself.

    cf login -a https://api.<smthg>.xip.io -u <user_name> -p <password>
    
  3. Add murano service broker.

    cf create-service-broker <broker_name> <OS_USERNAME> <OS_PASSWORD>  http://<service_broker_ip>:8083
    
  4. Enable access to murano packages.

    cf enable-service-access <service_name>
    

    Warning

    By default, access to all services is prohibited.

    Note

    You can use service-access command to see human-readable list of packages.

  5. Provision murano service through Cloud Foundry.

    cf create-service 'Apache HTTP Server' default  -c apache.json
    
    {
        "instance": {
            "flavor": "m1.medium",
            "?": {
                "type": "io.murano.resources.LinuxMuranoInstance"
            },
            "keyname": "nstarodubtsev",
            "assignFloatingIp": "True",
            "name": <name_pattern>,
            "availabilityZone": "nova",
            "image": "1b9ff37e-dff3-4308-be08-9185705dad91"
        },
        "enablePHP": "True"
    }