Browse Source

Merge "Refactor murano Installation Guide"

Zuul 8 months ago
parent
commit
c4d625b8e8

+ 282
- 0
doc/source/install/from-source.rst View File

@@ -0,0 +1,282 @@
1
+Install Murano from Source
2
+~~~~~~~~~~~~~~~~~~~~~~~~~~
3
+
4
+This section describes how to install and configure the Application Catalog
5
+service for Ubuntu 16.04 (LTS) from source code.
6
+
7
+.. include:: common_prerequisites.rst
8
+
9
+Install the API service and Engine
10
+----------------------------------
11
+
12
+#.  Create a folder which will hold all Murano components.
13
+
14
+    .. code-block:: console
15
+
16
+        mkdir ~/murano
17
+    ..
18
+
19
+#.  Clone the murano git repository to the management server.
20
+
21
+    .. code-block:: console
22
+
23
+        cd ~/murano
24
+        git clone git://git.openstack.org/openstack/murano
25
+    ..
26
+
27
+#.  Set up the murano config file
28
+
29
+    Murano has a common config file for API and Engine services.
30
+
31
+    First, generate a sample configuration file, using tox
32
+
33
+    .. code-block:: console
34
+
35
+        cd ~/murano/murano
36
+        tox -e genconfig
37
+    ..
38
+
39
+    And make a copy of it for further modifications
40
+
41
+    .. code-block:: console
42
+
43
+        cd ~/murano/murano/etc/murano
44
+        ln -s murano.conf.sample murano.conf
45
+    ..
46
+
47
+#.  Edit ``murano.conf`` with your favorite editor. Below is an example
48
+    which contains basic settings you likely need to configure.
49
+
50
+    .. note::
51
+
52
+        The example below uses SQLite database. Edit **[database]** section
53
+        if you want to use any other database type.
54
+    ..
55
+
56
+    .. code-block:: ini
57
+
58
+        [DEFAULT]
59
+        debug = true
60
+        verbose = true
61
+        rabbit_host = %RABBITMQ_SERVER_IP%
62
+        rabbit_userid = %RABBITMQ_USER%
63
+        rabbit_password = %RABBITMQ_PASSWORD%
64
+        rabbit_virtual_host = %RABBITMQ_SERVER_VIRTUAL_HOST%
65
+        driver = messagingv2
66
+
67
+        ...
68
+
69
+        [database]
70
+        backend = sqlalchemy
71
+        connection = sqlite:///murano.sqlite
72
+
73
+        ...
74
+
75
+        [keystone]
76
+        auth_url = 'http://%OPENSTACK_HOST_IP%:5000/v2.0'
77
+
78
+        ...
79
+
80
+        [keystone_authtoken]
81
+        www_authenticate_uri = 'http://%OPENSTACK_HOST_IP%:5000/v2.0'
82
+        auth_host = '%OPENSTACK_HOST_IP%'
83
+        auth_port = 5000
84
+        auth_protocol = http
85
+        admin_tenant_name = %OPENSTACK_ADMIN_TENANT%
86
+        admin_user = %OPENSTACK_ADMIN_USER%
87
+        admin_password = %OPENSTACK_ADMIN_PASSWORD%
88
+
89
+        ...
90
+
91
+        [murano]
92
+        url = http://%YOUR_HOST_IP%:8082
93
+
94
+        [rabbitmq]
95
+        host = %RABBITMQ_SERVER_IP%
96
+        login = %RABBITMQ_USER%
97
+        password = %RABBITMQ_PASSWORD%
98
+        virtual_host = %RABBITMQ_SERVER_VIRTUAL_HOST%
99
+
100
+        [networking]
101
+        default_dns = 8.8.8.8 # In case openstack neutron has no default
102
+                              # DNS configured
103
+    ..
104
+
105
+#.  Create a virtual environment and install Murano prerequisites. We will use
106
+    *tox* for that. The virtual environment will be created under *.tox*
107
+    directory.
108
+
109
+    .. code-block:: console
110
+
111
+        cd ~/murano/murano
112
+        tox
113
+    ..
114
+
115
+#.  Create database tables for Murano.
116
+
117
+    .. code-block:: console
118
+
119
+        cd ~/murano/murano
120
+        tox -e venv -- murano-db-manage \
121
+          --config-file ./etc/murano/murano.conf upgrade
122
+    ..
123
+
124
+#.  Open a new console and launch Murano API. A separate terminal is
125
+    required because the console will be locked by a running process.
126
+
127
+    .. code-block:: console
128
+
129
+        cd ~/murano/murano
130
+        tox -e venv -- murano-api --config-file ./etc/murano/murano.conf
131
+    ..
132
+
133
+#.  Import Core Murano Library.
134
+
135
+    .. code-block:: console
136
+
137
+        cd ~/murano/murano
138
+        pushd ./meta/io.murano
139
+        zip -r ../../io.murano.zip *
140
+        popd
141
+        tox -e venv -- murano --murano-url http://localhost:8082 \
142
+          package-import --is-public io.murano.zip
143
+    ..
144
+
145
+#.  Open a new console and launch Murano Engine. A separate terminal is
146
+    required because the console will be locked by a running process.
147
+
148
+    .. code-block:: console
149
+
150
+        cd ~/murano/murano
151
+        tox -e venv -- murano-engine --config-file ./etc/murano/murano.conf
152
+    ..
153
+
154
+Install Murano Dashboard
155
+========================
156
+
157
+Murano API & Engine services provide the core of Murano. However, your need a
158
+control plane to use it. This section describes how to install and run Murano
159
+Dashboard.
160
+
161
+#.  Clone the murano dashboard repository.
162
+
163
+    .. code-block:: console
164
+
165
+       $ cd ~/murano
166
+       $ git clone git://git.openstack.org/openstack/murano-dashboard
167
+    ..
168
+
169
+#.  Clone the ``horizon`` repository
170
+
171
+    .. code-block:: console
172
+
173
+       $ git clone git://git.openstack.org/openstack/horizon
174
+    ..
175
+
176
+#.  Create a virtual environment and install ``muranodashboard`` as an editable
177
+    module:
178
+
179
+    .. code-block:: console
180
+
181
+       $ cd horizon
182
+       $ tox -e venv -- pip install -e ../murano-dashboard
183
+    ..
184
+
185
+#.  Prepare local settings.
186
+
187
+    .. code-block:: console
188
+
189
+       $ cp openstack_dashboard/local/local_settings.py.example \
190
+         openstack_dashboard/local/local_settings.py
191
+    ..
192
+
193
+    For more information, check out the official
194
+    `horizon documentation <https://docs.openstack.org/horizon/latest/>`_.
195
+
196
+#.  Enable and configure Murano dashboard in the OpenStack Dashboard:
197
+
198
+    * For Newton (and later) OpenStack installations, copy the plugin file,
199
+      local settings files, and policy files.
200
+
201
+      .. code-block:: console
202
+
203
+         $ cp ../murano-dashboard/muranodashboard/local/enabled/*.py \
204
+           openstack_dashboard/local/enabled/
205
+
206
+         $ cp ../murano-dashboard/muranodashboard/local/local_settings.d/*.py \
207
+           openstack_dashboard/local/local_settings.d/
208
+
209
+         $ cp ../murano-dashboard/muranodashboard/conf/* openstack_dashboard/conf/
210
+      ..
211
+
212
+    * For the OpenStack installations prior to the Newton release, run:
213
+
214
+      .. code-block:: console
215
+
216
+         $ cp ../murano-dashboard/muranodashboard/local/_50_murano.py \
217
+           openstack_dashboard/local/enabled/
218
+      ..
219
+
220
+    Customize local settings of your horizon installation, by editing the
221
+    :file:`openstack_dashboard/local/local_settings.py` file:
222
+
223
+    .. code-block:: python
224
+
225
+        ...
226
+        ALLOWED_HOSTS = '*'
227
+
228
+        # Provide OpenStack Lab credentials
229
+        OPENSTACK_HOST = '%OPENSTACK_HOST_IP%'
230
+
231
+        ...
232
+
233
+        DEBUG_PROPAGATE_EXCEPTIONS = DEBUG
234
+    ..
235
+
236
+    Change the default session back end-from using browser cookies to using a
237
+    database instead to avoid issues with forms during the creation of
238
+    applications:
239
+
240
+    .. code-block:: python
241
+
242
+        DATABASES = {
243
+          'default': {
244
+          'ENGINE': 'django.db.backends.sqlite3',
245
+          'NAME': 'murano-dashboard.sqlite',
246
+          }
247
+        }
248
+
249
+        SESSION_ENGINE = 'django.contrib.sessions.backends.db'
250
+    ..
251
+
252
+#.  (Optional) If you do not plan to get the murano service from the keystone
253
+    application catalog, specify where the murano-api service is running:
254
+
255
+    .. code-block:: python
256
+
257
+        MURANO_API_URL = 'http://%MURANO_IP%:8082'
258
+    ..
259
+
260
+#.  (Optional) If you have set up the database as a session back-end (this is
261
+    done by default with the murano local_settings file starting with Newton),
262
+    perform database migration:
263
+
264
+    .. code-block:: console
265
+
266
+       $ tox -e venv -- python manage.py migrate --noinput
267
+    ..
268
+
269
+#.  Run the Django server at 127.0.0.1:8000 or provide different IP and PORT
270
+    parameters:
271
+
272
+    .. code-block:: console
273
+
274
+       $ tox -e venv -- python manage.py runserver <IP:PORT>
275
+    ..
276
+
277
+.. note::
278
+
279
+   The development server restarts automatically following every code change.
280
+..
281
+
282
+**Result:** The murano dashboard is available at http://IP:PORT.

+ 13
- 92
doc/source/install/install-api.rst View File

@@ -17,7 +17,7 @@ Install Murano API
17 17
 ~~~~~~~~~~~~~~~~~~
18 18
 
19 19
 This section describes how to install and configure the Application Catalog
20
-service for Ubuntu 14.04 (LTS).
20
+service for Ubuntu 16.04 (LTS).
21 21
 
22 22
 .. include:: common_prerequisites.rst
23 23
 
@@ -32,55 +32,6 @@ Install and configure components
32 32
 
33 33
       # apt-get install murano-engine murano-api
34 34
 
35
-#. Edit the ``/etc/murano/murano.conf`` file and complete the following
36
-   actions:
37
-
38
-   * In the ``[database]`` section, configure database access:
39
-
40
-     .. code-block:: ini
41
-
42
-        [database]
43
-        ...
44
-        connection = mysql+pymysql://murano:MURANO_DBPASS@controller/murano
45
-
46
-Install the API service and Engine
47
-----------------------------------
48
-
49
-#.  Create a folder which will hold all Murano components.
50
-
51
-    .. code-block:: console
52
-
53
-        mkdir ~/murano
54
-    ..
55
-
56
-#.  Clone the murano git repository to the management server.
57
-
58
-    .. code-block:: console
59
-
60
-        cd ~/murano
61
-        git clone git://git.openstack.org/openstack/murano
62
-    ..
63
-
64
-#.  Set up the murano config file
65
-
66
-    Murano has a common config file for API and Engine services.
67
-
68
-    First, generate a sample configuration file, using tox
69
-
70
-    .. code-block:: console
71
-
72
-        cd ~/murano/murano
73
-        tox -e genconfig
74
-    ..
75
-
76
-    And make a copy of it for further modifications
77
-
78
-    .. code-block:: console
79
-
80
-        cd ~/murano/murano/etc/murano
81
-        ln -s murano.conf.sample murano.conf
82
-    ..
83
-
84 35
 #.  Edit ``murano.conf`` with your favorite editor. Below is an example
85 36
     which contains basic settings you likely need to configure.
86 37
 
@@ -104,8 +55,7 @@ Install the API service and Engine
104 55
         ...
105 56
 
106 57
         [database]
107
-        backend = sqlalchemy
108
-        connection = sqlite:///murano.sqlite
58
+        connection = mysql+pymysql://murano:MURANO_DBPASS@controller/murano
109 59
 
110 60
         ...
111 61
 
@@ -139,51 +89,22 @@ Install the API service and Engine
139 89
                               # DNS configured
140 90
     ..
141 91
 
142
-#.  Create a virtual environment and install Murano prerequisites. We will use
143
-    *tox* for that. The virtual environment will be created under *.tox*
144
-    directory.
145
-
146
-    .. code-block:: console
147
-
148
-        cd ~/murano/murano
149
-        tox
150
-    ..
151
-
152
-#.  Create database tables for Murano.
153
-
154
-    .. code-block:: console
155
-
156
-        cd ~/murano/murano
157
-        tox -e venv -- murano-db-manage \
158
-          --config-file ./etc/murano/murano.conf upgrade
159
-    ..
160
-
161
-#.  Open a new console and launch Murano API. A separate terminal is
162
-    required because the console will be locked by a running process.
92
+#. Populate the Murano database:
163 93
 
164
-    .. code-block:: console
94
+   .. code-block:: console
165 95
 
166
-        cd ~/murano/murano
167
-        tox -e venv -- murano-api --config-file ./etc/murano/murano.conf
168
-    ..
96
+      # su -s /bin/sh -c "murano-db-manage upgrade" murano
169 97
 
170
-#.  Import Core Murano Library.
98
+   .. note::
171 99
 
172
-    .. code-block:: console
100
+      Ignore any deprecation messages in this output.
173 101
 
174
-        cd ~/murano/murano
175
-        pushd ./meta/io.murano
176
-        zip -r ../../io.murano.zip *
177
-        popd
178
-        tox -e venv -- murano --murano-url http://localhost:8082 \
179
-          package-import --is-public io.murano.zip
180
-    ..
102
+Finalize installation
103
+---------------------
181 104
 
182
-#.  Open a new console and launch Murano Engine. A separate terminal is
183
-    required because the console will be locked by a running process.
105
+#. Restart the Application Catalog services:
184 106
 
185
-    .. code-block:: console
107
+   .. code-block:: console
186 108
 
187
-        cd ~/murano/murano
188
-        tox -e venv -- murano-engine --config-file ./etc/murano/murano.conf
189
-    ..
109
+      # service murano-api restart
110
+      # service murano-engine restart

+ 13
- 82
doc/source/install/install-dashboard.rst View File

@@ -20,79 +20,25 @@ Murano API & Engine services provide the core of Murano. However, your need a
20 20
 control plane to use it. This section describes how to install and run Murano
21 21
 Dashboard.
22 22
 
23
-#.  Clone the murano dashboard repository.
23
+#.  Install OpenStack Dashboard, the steps please reference from
24
+    `OpenStack Dashboard Install Guide <https://docs.openstack.org/horizon/latest/install/>`__.
24 25
 
25
-    .. code-block:: console
26
+#. Install the packages:
26 27
 
27
-       $ cd ~/murano
28
-       $ git clone git://git.openstack.org/openstack/murano-dashboard
29
-    ..
30
-
31
-#.  Clone the ``horizon`` repository
32
-
33
-    .. code-block:: console
34
-
35
-       $ git clone git://git.openstack.org/openstack/horizon
36
-    ..
37
-
38
-#.  Create a virtual environment and install ``muranodashboard`` as an editable
39
-    module:
40
-
41
-    .. code-block:: console
42
-
43
-       $ cd horizon
44
-       $ tox -e venv -- pip install -e ../murano-dashboard
45
-    ..
46
-
47
-#.  Prepare local settings.
48
-
49
-    .. code-block:: console
50
-
51
-       $ cp openstack_dashboard/local/local_settings.py.example \
52
-         openstack_dashboard/local/local_settings.py
53
-    ..
54
-
55
-    For more information, check out the official
56
-    `horizon documentation <https://docs.openstack.org/horizon/latest/>`_.
57
-
58
-#.  Enable and configure Murano dashboard in the OpenStack Dashboard:
59
-
60
-    * For Newton (and later) OpenStack installations, copy the plugin file,
61
-      local settings files, and policy files.
28
+   .. code-block:: console
62 29
 
63
-      .. code-block:: console
30
+      # apt install python-murano-dashboard
64 31
 
65
-         $ cp ../murano-dashboard/muranodashboard/local/enabled/*.py \
66
-           openstack_dashboard/local/enabled/
67
-
68
-         $ cp ../murano-dashboard/muranodashboard/local/local_settings.d/*.py \
69
-           openstack_dashboard/local/local_settings.d/
70
-
71
-         $ cp ../murano-dashboard/muranodashboard/conf/* openstack_dashboard/conf/
72
-      ..
73
-
74
-    * For the OpenStack installations prior to the Newton release, run:
75
-
76
-      .. code-block:: console
77
-
78
-         $ cp ../murano-dashboard/muranodashboard/local/_50_murano.py \
79
-           openstack_dashboard/local/enabled/
80
-      ..
81
-
82
-    Customize local settings of your horizon installation, by editing the
83
-    :file:`openstack_dashboard/local/local_settings.py` file:
32
+#. Edit the ``/etc/openstack-dashboard/local_settings.py``
33
+   file to customize local settings of your envi
84 34
 
85 35
     .. code-block:: python
86 36
 
87 37
         ...
88
-        ALLOWED_HOSTS = '*'
89
-
90
-        # Provide OpenStack Lab credentials
91 38
         OPENSTACK_HOST = '%OPENSTACK_HOST_IP%'
92
-
39
+        OPENSTACK_KEYSTONE_DEFAULT_ROLE = '%OPENSTACK_ROLE%'
93 40
         ...
94 41
 
95
-        DEBUG_PROPAGATE_EXCEPTIONS = DEBUG
96 42
     ..
97 43
 
98 44
     Change the default session back end-from using browser cookies to using a
@@ -119,26 +65,11 @@ Dashboard.
119 65
         MURANO_API_URL = 'http://%MURANO_IP%:8082'
120 66
     ..
121 67
 
122
-#.  (Optional) If you have set up the database as a session back-end (this is
123
-    done by default with the murano local_settings file starting with Newton),
124
-    perform database migration:
68
+Finalize installation
69
+---------------------
125 70
 
126
-    .. code-block:: console
71
+#. Restart the Apache service:
127 72
 
128
-       $ tox -e venv -- python manage.py migrate --noinput
129
-    ..
130
-
131
-#.  Run the Django server at 127.0.0.1:8000 or provide different IP and PORT
132
-    parameters:
133
-
134
-    .. code-block:: console
135
-
136
-       $ tox -e venv -- python manage.py runserver <IP:PORT>
137
-    ..
138
-
139
-.. note::
140
-
141
-   The development server restarts automatically following every code change.
142
-..
73
+   .. code-block:: console
143 74
 
144
-**Result:** The murano dashboard is available at http://IP:PORT.
75
+      # service apache2 restart

+ 1
- 0
doc/source/install/install.rst View File

@@ -27,5 +27,6 @@ be adapted to work with other types of distros.
27 27
 
28 28
    install-api.rst
29 29
    install-dashboard.rst
30
+   from-source.rst
30 31
    install-network-config.rst
31 32
    enable-ssl.rst

Loading…
Cancel
Save