2016-02-02 14:26:58 +02:00
|
|
|
.. _install_manually:
|
|
|
|
|
|
|
|
=======================
|
|
|
|
Install murano manually
|
|
|
|
=======================
|
|
|
|
|
|
|
|
Before you install Murano, verify that you completed the following tasks:
|
|
|
|
|
|
|
|
#. Install software prerequisites depending on the operating system you use
|
|
|
|
as described in the System prerequisites section.
|
|
|
|
|
|
|
|
.. TODO (OG): add ref to System prerequisites when it is ready
|
|
|
|
|
|
|
|
#. Install tox:
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
sudo pip install tox
|
|
|
|
|
|
|
|
#. Install and configure a database.
|
|
|
|
|
|
|
|
Murano can use various database types on back end. For development
|
|
|
|
purposes, use SQLite. For production installations, consider using
|
|
|
|
MySQL database.
|
|
|
|
|
|
|
|
.. warning::
|
|
|
|
|
|
|
|
Murano supports PostgreSQL as well. Though, use it with caution
|
|
|
|
as it has not been thoroughly tested yet.
|
|
|
|
|
|
|
|
Before you can use MySQL database, proceed with the following:
|
|
|
|
|
|
|
|
#. Install MySQL:
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
apt-get install mysql-server
|
|
|
|
|
|
|
|
#. Create an empty database:
|
|
|
|
|
2016-09-04 18:08:43 +03:00
|
|
|
Replace %MURANO_DB_PASSWORD% with the actual password. For example,
|
|
|
|
'admin'.
|
|
|
|
|
2016-02-02 14:26:58 +02:00
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
mysql -u root -p
|
|
|
|
|
|
|
|
mysql> CREATE DATABASE murano;
|
|
|
|
mysql> GRANT ALL PRIVILEGES ON murano.* TO 'murano'@'localhost' \
|
|
|
|
IDENTIFIED BY %MURANO_DB_PASSWORD%;
|
|
|
|
mysql> exit;
|
|
|
|
|
|
|
|
Install the API service and engine
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
#. Create a folder to which all murano components will be stored:
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
mkdir ~/murano
|
|
|
|
|
|
|
|
#. Clone the murano git repository to the management server:
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
cd ~/murano
|
|
|
|
git clone git://git.openstack.org/openstack/murano
|
|
|
|
|
|
|
|
#. Create the configuration file. Murano has a common configuration
|
|
|
|
file for API and engine services.
|
|
|
|
|
|
|
|
#. Generate a sample configuration file using tox:
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
cd ~/murano/murano
|
|
|
|
tox -e genconfig
|
|
|
|
|
|
|
|
#. Create a copy of ``murano.conf`` for further modifications:
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
cd ~/murano/murano/etc/murano
|
|
|
|
cp murano.conf.sample murano.conf
|
|
|
|
|
|
|
|
#. Edit the ``murano.conf`` file. An example below contains the basic
|
|
|
|
configuration.
|
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
|
|
|
The example uses MySQL database. If you want to use another
|
|
|
|
database type, edit the ``[database]`` section correspondingly.
|
|
|
|
|
2016-09-04 18:08:43 +03:00
|
|
|
Replace items in "%" with the actual values. For example, replace
|
|
|
|
%RABBITMQ_SERVER_IP% with 127.0.0.1. So, the complete row with the
|
|
|
|
replaced value will be rabbit_host = 127.0.0.1
|
|
|
|
|
2016-02-02 14:26:58 +02:00
|
|
|
.. code-block:: ini
|
|
|
|
|
|
|
|
[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%
|
|
|
|
|
|
|
|
...
|
|
|
|
|
|
|
|
[database]
|
|
|
|
connection = mysql+pymysql://murano:%MURANO_DB_PASSWORD%@127.0.0.1/murano
|
|
|
|
|
|
|
|
...
|
|
|
|
|
|
|
|
[keystone]
|
|
|
|
auth_url = 'http://%OPENSTACK_HOST_IP%:5000'
|
|
|
|
|
|
|
|
...
|
|
|
|
|
|
|
|
[keystone_authtoken]
|
|
|
|
auth_uri = 'http://%OPENSTACK_HOST_IP%:5000'
|
|
|
|
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%
|
|
|
|
|
|
|
|
[networking]
|
2016-10-24 14:19:52 +08:00
|
|
|
default_dns = 8.8.8.8 # In case OpenStack neutron has no default
|
2016-02-02 14:26:58 +02:00
|
|
|
# DNS configured
|
|
|
|
|
|
|
|
[oslo_messaging_notifications]
|
|
|
|
driver = messagingv2
|
|
|
|
|
|
|
|
#. Create a virtual environment and install murano prerequisites
|
|
|
|
using **tox**. The virtual environment will be created under
|
|
|
|
the ``tox`` directory.
|
|
|
|
|
|
|
|
#. Install MySQL driver since it is not a part of the murano requirements:
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
tox -e venv -- pip install PyMYSQL
|
|
|
|
|
|
|
|
#. Create database tables for murano:
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
cd ~/murano/murano
|
|
|
|
tox -e venv -- murano-db-manage \
|
|
|
|
--config-file ./etc/murano/murano.conf upgrade
|
|
|
|
|
2016-07-21 12:11:19 +03:00
|
|
|
#. Launch the murano API in a separate terminal:
|
2016-02-02 14:26:58 +02:00
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
cd ~/murano/murano
|
|
|
|
tox -e venv -- murano-api --config-file ./etc/murano/murano.conf
|
|
|
|
|
2016-07-21 12:11:19 +03:00
|
|
|
.. note::
|
|
|
|
|
|
|
|
Run the command in a new terminal as the process will be running in
|
|
|
|
the terminal until you terminate it, therefore, blocking the current
|
|
|
|
terminal.
|
|
|
|
|
|
|
|
#. Leaving the API process running, return to the previous console and
|
2016-09-20 16:31:29 +03:00
|
|
|
import murano core library and other libraries from the `meta`
|
|
|
|
directory:
|
2016-02-02 14:26:58 +02:00
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
2016-09-20 16:31:29 +03:00
|
|
|
cd ~/murano/murano/meta/
|
|
|
|
for i in */; do pushd ./"$i"; zip -r ../../"${i%/}.zip" *; popd; done
|
|
|
|
cd ..
|
2016-09-07 08:56:04 +03:00
|
|
|
tox -e venv -- murano --os-username %OPENSTACK_ADMIN_USER% \
|
|
|
|
--os-password %OPENSTACK_ADMIN_PASSWORD% \
|
|
|
|
--os-auth-url http://%OPENSTACK_HOST_IP%:5000 \
|
|
|
|
--os-project-name %OPENSTACK_ADMIN_TENANT% \
|
|
|
|
--murano-url http://%MURANO_IP%:8082 \
|
2016-09-20 16:31:29 +03:00
|
|
|
package-import --is-public *.zip
|
|
|
|
rm *.zip
|
2016-02-02 14:26:58 +02:00
|
|
|
|
2016-07-21 12:11:19 +03:00
|
|
|
#. Launch the murano engine in a separate terminal:
|
2016-02-02 14:26:58 +02:00
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
cd ~/murano/murano
|
|
|
|
tox -e venv -- murano-engine --config-file ./etc/murano/murano.conf
|
|
|
|
|
2016-07-21 12:11:19 +03:00
|
|
|
.. note::
|
|
|
|
|
|
|
|
Run the command in a new terminal as the process will be running in
|
|
|
|
the terminal until you terminate it, therefore, blocking the current
|
|
|
|
terminal.
|
|
|
|
|
2016-02-02 14:26:58 +02:00
|
|
|
Register in keystone
|
|
|
|
~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
To make the murano API available to all OpenStack users, you need to register
|
|
|
|
the Application Catalog service within the Identity service.
|
|
|
|
|
|
|
|
#. Add the ``application-catalog`` service to keystone:
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
openstack service create --name murano --description \
|
|
|
|
"Application Catalog for OpenStack" application-catalog
|
|
|
|
|
|
|
|
#. Provide an endpoint for this service:
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
2016-09-07 08:56:04 +03:00
|
|
|
openstack endpoint create --region RegionOne --publicurl 'http://%MURANO_IP%:8082/' \
|
|
|
|
--adminurl 'http://%MURANO_IP%:8082/' --internalurl 'http://%MURANO_IP%:8082/' \
|
|
|
|
%MURANO_SERVICE_ID%
|
2016-02-02 14:26:58 +02:00
|
|
|
|
|
|
|
where ``MURANO-SERVICE-ID`` is the unique service number that can be found
|
|
|
|
in the :command:`openstack service create` output.
|
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
|
|
|
URLs (``--publicurl``, ``--internalurl``, and ``--adminurl`` values)
|
|
|
|
may differ depending on your environment.
|
|
|
|
|
|
|
|
Install the murano dashboard
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
This section describes how to install and run the murano dashboard.
|
|
|
|
|
|
|
|
#. Clone the repository with the murano dashboard:
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
cd ~/murano
|
|
|
|
git clone git://git.openstack.org/openstack/murano-dashboard
|
|
|
|
|
|
|
|
#. Clone the ``horizon`` repository:
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
git clone git://git.openstack.org/openstack/horizon
|
|
|
|
|
|
|
|
#. Create a virtual environment and install ``muranodashboard``
|
|
|
|
as an editable module:
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
cd horizon
|
|
|
|
tox -e venv -- pip install -e ../murano-dashboard
|
|
|
|
|
|
|
|
#. Prepare local settings.
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
cp openstack_dashboard/local/local_settings.py.example \
|
|
|
|
openstack_dashboard/local/local_settings.py
|
|
|
|
|
2016-10-06 16:07:39 +05:30
|
|
|
|
|
|
|
For more information, check out the official
|
|
|
|
`horizon documentation <http://docs.openstack.org/developer/horizon/topics/settings.html#openstack-settings-partial>`_.
|
2016-02-02 14:26:58 +02:00
|
|
|
|
2016-08-22 20:34:24 +03:00
|
|
|
#. Enable and configure Murano dashboard in the OpenStack Dashboard:
|
2016-02-02 14:26:58 +02:00
|
|
|
|
2016-08-22 20:34:24 +03:00
|
|
|
* For the Newton (and later) OpenStack installations, copy plug-in file
|
|
|
|
local settings files, and policy files:
|
2016-02-02 14:26:58 +02:00
|
|
|
|
2016-08-22 20:34:24 +03:00
|
|
|
.. code-block:: console
|
2016-02-02 14:26:58 +02:00
|
|
|
|
2016-08-22 20:34:24 +03:00
|
|
|
cp ../murano-dashboard/muranodashboard/local/enabled/*.py \
|
|
|
|
openstack_dashboard/local/enabled/
|
2016-02-02 14:26:58 +02:00
|
|
|
|
2016-08-22 20:34:24 +03:00
|
|
|
cp ../murano-dashboard/muranodashboard/local/local_settings.d/*.py \
|
|
|
|
openstack_dashboard/local/local_settings.d/
|
2016-02-02 14:26:58 +02:00
|
|
|
|
2016-08-22 20:34:24 +03:00
|
|
|
cp ../murano-dashboard/muranodashboard/conf/* openstack_dashboard/conf/
|
2016-02-02 14:26:58 +02:00
|
|
|
|
2016-08-22 20:34:24 +03:00
|
|
|
* For the OpenStack installations prior to the Newton release, run:
|
|
|
|
|
|
|
|
.. code-block:: console
|
2016-02-02 14:26:58 +02:00
|
|
|
|
2016-08-22 20:34:24 +03:00
|
|
|
cp ../murano-dashboard/muranodashboard/local/_50_murano.py \
|
|
|
|
openstack_dashboard/local/enabled/
|
2016-02-02 14:26:58 +02:00
|
|
|
|
2016-08-22 20:34:24 +03:00
|
|
|
Customize local settings of your horizon installation, by editing the
|
|
|
|
``openstack_dashboard/local/local_settings.py`` file:
|
2016-06-02 08:42:01 -04:00
|
|
|
|
2016-08-22 20:34:24 +03:00
|
|
|
.. code-block:: python
|
2016-06-02 08:42:01 -04:00
|
|
|
|
2016-08-22 20:34:24 +03:00
|
|
|
...
|
|
|
|
ALLOWED_HOSTS = '*'
|
2016-06-02 08:42:01 -04:00
|
|
|
|
2016-08-22 20:34:24 +03:00
|
|
|
# Provide your OpenStack Lab credentials
|
|
|
|
OPENSTACK_HOST = '%OPENSTACK_HOST_IP%'
|
2016-08-22 20:25:32 +03:00
|
|
|
|
2016-08-22 20:34:24 +03:00
|
|
|
...
|
2016-02-02 14:26:58 +02:00
|
|
|
|
2016-08-22 20:34:24 +03:00
|
|
|
DEBUG_PROPAGATE_EXCEPTIONS = DEBUG
|
2016-02-02 14:26:58 +02:00
|
|
|
|
2016-08-22 20:34:24 +03:00
|
|
|
Change the default session back end from browser cookies to database
|
|
|
|
to avoid issues with forms during the applications creation:
|
|
|
|
|
|
|
|
.. code-block:: python
|
|
|
|
|
|
|
|
DATABASES = {
|
2016-02-02 14:26:58 +02:00
|
|
|
'default': {
|
|
|
|
'ENGINE': 'django.db.backends.sqlite3',
|
|
|
|
'NAME': 'murano-dashboard.sqlite',
|
|
|
|
}
|
2016-08-22 20:34:24 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
SESSION_ENGINE = 'django.contrib.sessions.backends.db'
|
2016-02-02 14:26:58 +02:00
|
|
|
|
|
|
|
|
|
|
|
#. (Optional) If you do not plan to get the murano service from the keystone
|
|
|
|
application catalog, specify where the ``murano-api`` service is running:
|
|
|
|
|
|
|
|
.. code-block:: python
|
|
|
|
|
2016-09-07 08:56:04 +03:00
|
|
|
MURANO_API_URL = 'http://%MURANO_IP%:8082'
|
2016-02-02 14:26:58 +02:00
|
|
|
|
2016-08-22 20:34:24 +03:00
|
|
|
#. (Optional) If you have set up the database as a session back end (this is
|
|
|
|
done by default with murano local_settings file starting with Newton),
|
|
|
|
perform database migration:
|
2016-02-02 14:26:58 +02:00
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
tox -e venv -- python manage.py migrate --noinput
|
|
|
|
|
|
|
|
Since a separate user is not required for development purpose,
|
|
|
|
you can reply ``no``.
|
|
|
|
|
|
|
|
#. Run Django server at ``127.0.0.1:8000`` or provide a different ``IP``
|
|
|
|
and ``PORT`` parameters:
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
tox -e venv -- python manage.py runserver <IP:PORT>
|
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
|
|
|
The development server restarts automatically on every code change.
|
|
|
|
|
2016-08-22 20:34:24 +03:00
|
|
|
**Result:** The murano dashboard is available at ``http://IP:PORT``.
|
2016-02-02 14:26:58 +02:00
|
|
|
|
|
|
|
Import murano applications
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
To fill the application catalog, you need to import applications to your
|
|
|
|
OpenStack environment. You can import applications using the murano dashboard,
|
|
|
|
as well as the command-line client.
|
|
|
|
|
|
|
|
To import applications using CLI, complete the following tasks:
|
|
|
|
|
|
|
|
#. Clone the murano apps repository:
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
cd ~/murano
|
|
|
|
git clone git://git.openstack.org/openstack/murano-apps
|
|
|
|
|
|
|
|
#. Import every package you need from this repository by running
|
|
|
|
the following command:
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
cd ~/murano/murano
|
|
|
|
pushd ../murano-apps/Docker/Applications/%APP-NAME%/package
|
|
|
|
zip -r ~/murano/murano/app.zip *
|
|
|
|
popd
|
2016-09-07 08:56:04 +03:00
|
|
|
tox -e venv -- murano --murano-url http://%MURANO_IP%:8082 package-import app.zip
|
2016-02-02 14:26:58 +02:00
|
|
|
|
|
|
|
**Result:** The applications are imported and available from the application
|
2016-06-02 08:42:01 -04:00
|
|
|
catalog.
|