First you need to install a number of packages with your OS package manager. The list of packages depends on the OS you use.
$ sudo apt-get install python-pip python-dev \
> libmysqlclient-dev libpq-dev \
> libxml2-dev libxslt1-dev \
> libffi-dev
Note
Fedora support wasn’t thoroughly tested. We do not guarantee that Murano will work on Fedora.
$ sudo yum install gcc python-setuptools python-devel python-pip
$ sudo yum install gcc python-setuptools python-devel
$ sudo easy_install pip
$ sudo pip install tox
Murano can use various database types on backend. For development purposes SQLite is enough in most cases. For production installations you should use MySQL or PostgreSQL databases.
Warning
Although Murano could use PostgreSQL database on backend, it wasn’t thoroughly tested and should be used with caution.
To use MySQL database you should install it and create an empty database first:
$ apt-get install python-mysqldb mysql-server
$ mysql -u root -p
mysql> CREATE DATABASE murano;
mysql> GRANT ALL PRIVILEGES ON murano.* TO 'murano'@'localhost' \
IDENTIFIED BY 'MURANO_DBPASS';
mysql> exit;
Create a folder which will hold all Murano components.
$ mkdir ~/murano
Clone the Murano git repository to the management server.
$ cd ~/murano
$ git clone https://github.com/stackforge/murano
Copy the sample configuration from the source tree to their final location.
$ cd ~/murano/murano/etc/murano
$ cp murano.conf.sample murano.conf
Edit murano.conf with your favorite editor. Below is an example which contains basic settings your are likely need to configure.
Note
The example below uses SQLite database. Edit [database] section if you want to use other database type.
[DEFAULT]
debug = true
verbose = true
rabbit_host = %RABBITMQ_SERVER_IP%
rabbit_userid = %RABBITMQ_USER%
rabbit_password = %RABBITMQ_PASSWORD%
rabbit_virtual_host = %RABBITMQ_SERVER_VIRTUAL_HOST%
notification_driver = messagingv2
[database]
backend = sqlalchemy
connection = sqlite:///murano.sqlite
[keystone]
auth_url = 'http://%OPENSTACK_HOST_IP%:5000/v2.0'
[keystone_authtoken]
auth_uri = 'http://%OPENSTACK_HOST_IP%:5000/v2.0'
auth_host = '%OPENSTACK_HOST_IP%'
auth_port = 5000
auth_protocol = http
admin_tenant_name = %OPENSTACK_ADMIN_TENANT%
admin_user = %OPENSTACK_ADMIN_USER%
admin_password = %OPENSTACK_ADMIN_PASSWORD%
[murano]
url = http://%YOUR_HOST_IP%:8082
[rabbitmq]
host = %RABBITMQ_SERVER_IP%
login = %RABBITMQ_USER%
password = %RABBITMQ_PASSWORD%
virtual_host = %RABBITMQ_SERVER_VIRTUAL_HOST%
Create a virtual environment and install Murano prerequisites. We will use tox for that. Virtual environment will be created under .tox directory.
$ cd ~/murano/murano
$ tox
Create database tables for Murano.
$ cd ~/murano/murano
$ tox -e venv -- murano-db-manage \
> --config-file ./etc/murano/murano.conf upgrade
Open a new console and launch Murano API. A separate terminal is required because the console will be locked by a running process.
$ cd ~/murano/murano
$ tox -e venv -- murano-api \
> --config-file ./etc/murano/murano.conf
Import Core Murano Library.
$ cd ~/murano/murano
$ tox -e venv -- murano-manage \
> --config-file ./etc/murano/murano.conf \
> import-package ./meta/io.murano
Open a new console and launch Murano Engine. A separate terminal is required because the console will be locked by a running process.
$ cd ~/murano/murano
$ tox -e venv -- murano-engine --config-file ./etc/murano/murano.conf
Murano API & Engine services provide the core of Murano. However, your need a control plane to use it. This section decribes how to install and run Murano Dashboard.
Clone the repository with Murano Dashboard.
$ cd ~/murano
$ git clone https://github.com/stackforge/murano-dashboard
Create a virtual environment and install dashboard prerequisites. Again, we use tox for that.
$ cd ~/murano/murano-dashboard
$ tox
Install the latest horizon version and all murano-dashboard requirements into the virtual environment:
$ tox -e venv pip install horizon
It may happen, that the last release of horizon will be not capable with latest murano-dashboard code. In that case, horizon need to be installed from master branch of this repository: https://github.com/openstack/horizon
Copy configuration file for dashboard.
$ cd ~/murano/murano-dashboard/muranodashboard/local
$ cp local_settings.py.sample local_settings.py
Edit configuration file.
$ cd ~/murano/murano-dashboard/muranodashboard/local
$ vim ./local_settings.py
...
ALLOWED_HOSTS = '*'
# Provide OpenStack Lab credentials
OPENSTACK_HOST = '%OPENSTACK_HOST_IP%'
...
# Set secret key to prevent it's generation
SECRET_KEY = 'random_string'
...
DEBUG_PROPAGATE_EXCEPTIONS = DEBUG
...
Running Murano dashboard on developer environment implies the use of murano settings file instead of horizon. However, for the correct setup requires settings file to be synchronized with corresponding horizon release. But murano-dashboard also have parameters, that should be added to that config. So for your convenience, Murano has special script that allows to quickly synchronize Django settings file for a developer installation. update_setting.sh file can be found here.
To display all possible options run:
./update_setting.sh --help
Note
Ether output or input parameter should be specified.
$ cd ~/murano/murano-dashboard $ tox -e venv -- python manage.py runserver <IP:PORT>Development server will be restarted automatically on every code change.
Murano provides excellent catalog services, but it also requires applications which to provide. This section describes how to import Murano Applications from Murano App Incubator.
Clone Murano App Incubator repository.
$ cd ~/murano
$ git clone https://github.com/murano-project/murano-app-incubator
Import every package you need from Murano App Incubator using the command below.
$ cd ~/murano/murano
$ tox -e venv -- murano-manage \
> --config-file ./etc/murano/murano.conf \
> import-package ../murano-app-incubator/%APPLICATION_DIRECTORY_NAME%
To work with Murano, tenant network in Openstack installation should be configured in a certain way. This configuration may be set up automatically with the provision of several parameters in config file or manually.
Murano has advanced networking features that give you ability to not care about configuring networks for your application. By default it will create an isolated network for each environment and join all VMs needed by your application to that network. To install and configure application in just spawned virtual machine Murano also requires a router connected to the external network.
To create router automatically, provide the following parameters in config file:
[networking]
external_network = %EXTERNAL_NETWORK_NAME%
router_name = %MURANO_ROUTER_NAME%
create_router = true
To figure out the name of the external network, perform the following command:
$ neutron net-external-list
During the first deploy, required networks and router with specified name will be created and set up.
- First, you need to check for existence of external networks. Login as admin and go to Project -> Network -> Network Topology. And check network type in network details at Admin -> Networks -> Network name page. The same action can be done via CLI by running neutron net-external-list. To create new external network examine OpenStack documentation.
- Go to Project -> Network -> Networks.
- Click Create Network and fill the form.
- Go to Project -> Network -> Routers
- Click “Create Router”
- In the “Router Name” field, enter the murano-default-router
If you specify a name other than murano-default-router, it will be necessary to change the following settings in the config file:
[networking] router_name = %SPECIFIED_NAME% create_router = false
- Click on the specified router name
- In the opened view click “Add interface”
- Specify the subnet and IP address
And check the result in Network Topology tab.