Merge "[Docs] Change FQNs of murano apps and add examples of FQNs"

This commit is contained in:
Jenkins 2016-07-27 17:34:04 +00:00 committed by Gerrit Code Review
commit dc0da8be4e
14 changed files with 93 additions and 85 deletions

View File

@ -48,7 +48,7 @@ with murano, proceed with the following steps:
.. code-block:: ini
MURANO_APPS=io.murano.apps.apache.Tomcat,io.murano.apps.Guacamole
MURANO_APPS=com.example.apache.Tomcat,com.example.Guacamole
To configure the git repository that will be used as the source for
the imported packages, configure the ``MURANO_APPS_REPO`` and

View File

@ -35,12 +35,12 @@ of rules that are as follows:
name: wordpress-env
'?': {type: io.murano.Environment, id: 83bff5ac}
applications:
- '?': {id: e7a13d3c, type: io.murano.databases.MySql}
- '?': {id: e7a13d3c, type: com.example.databases.MySql}
The model above transforms to the following rules:
* ``murano:objects+("83bff5ac", "tenant_id", "io.murano.Environment")``
* ``murano:objects+("83bff5ac", "e7a13d3c", "io.murano.databases.MySql")``
* ``murano:objects+("83bff5ac", "e7a13d3c", "com.example.databases.MySql")``
.. note::
@ -54,7 +54,7 @@ of rules that are as follows:
.. code-block:: yaml
applications:
- '?': {id: e7a13d3c, type: io.murano.databases.MySql}
- '?': {id: e7a13d3c, type: com.example.databases.MySql}
database: wordpress
The model above transforms to the following rule:
@ -100,10 +100,10 @@ of rules that are as follows:
applications:
- '?':
id: 0aafd67e
type: io.murano.databases.MySql
type: com.example.databases.MySql
- '?':
id: 50fa68ff
type: io.murano.apps.WordPress
type: com.example.WordPress
database: 0aafd67e
The model above transforms to the following rule:
@ -123,7 +123,7 @@ of rules that are as follows:
applications:
- '?':
id: 0aafd67e
type: io.murano.databases.MySql
type: com.example.databases.MySql
instance:
'?': {id: ed8df2b0, type: io.murano.resources.LinuxMuranoInstance}
@ -145,12 +145,12 @@ of rules that are as follows:
applications:
- '?':
id: 0aafd67e
type: io.murano.databases.MySql
type: com.example.databases.MySql
instance:
'?': {id: ed8df2b0, type: io.murano.resources.LinuxMuranoInstance}
- '?':
id: 50fa68ff
type: io.murano.apps.WordPress
type: com.example.WordPress
database: 0aafd67e
The model above transforms to the following rules:

View File

@ -235,7 +235,7 @@ an application:
Application:
?:
type: io.murano.apps.exampleApp
type: com.example.exampleApp
instance:
?:
type: io.murano.resources.LinuxMuranoInstance

View File

@ -207,7 +207,7 @@ unit tests:
- $.env: $this.load($.appJson)
- $.env.deploy()
- $isDeployed: $.env.applications[0].getAttr(deployed, false, 'io.murano.apps.apache.Tomcat')
- $isDeployed: $.env.applications[0].getAttr(deployed, false, 'com.example.apache.Tomcat')
- $.assertEqual(true, $isDeployed)
Provided methods are test cases for the Tomcat application. Object model and

View File

@ -51,8 +51,8 @@ Examples
...
type:
- io.murano.apps.docker.kubernetes.KubernetesPod
- io.murano.apps.docker.DockerStandaloneHost
- com.mirantis.docker.kubernetes.KubernetesPod
- com.mirantis.docker.DockerStandaloneHost
Information about the application itself (docker image and port that is
needed to be opened) is contained in the getContainer method. All other

View File

@ -66,7 +66,7 @@ Application package could be composed manually. Follow the 5 steps below.
Format: Heat.HOT/1.0
Type: Application
FullName: io.murano.apps.Chef-Server
FullName: com.example.Chef-Server
Name: Chef Server
Description: "Heat template to deploy Open Source CHEF server on a VM"
Author: Kate

View File

@ -26,11 +26,11 @@ in the bundle and bundle version. Here is the example:
{
"Packages": [
{
"Name": "io.murano.apps.apache.ApacheHttpServer",
"Name": "com.example.apache.ApacheHttpServer",
"Version": ""
},
{
"Name": "io.murano.apps.apache.Tomcat",
"Name": "com.example.apache.Tomcat",
"Version": ""
}
],
@ -43,9 +43,9 @@ in the bundle and bundle version. Here is the example:
``Version`` is not a mandatory parameter. Version for package entry specifies the
version of the package to look into :ref:`Murano package repository <repository>`.
If it is specified, murano client would look for a file with that version
specification in murano repository (for example ``io.murano.apps.MyApp.0.0.1.zip``
for io.murano.apps.MyApp of version 0.0.1). If the version is omitted or left
blank client would search for ``io.murano.apps.MyApp.zip``.
specification in murano repository (for example ``com.example.MyApp.0.0.1.zip``
for com.example.MyApp of version 0.0.1). If the version is omitted or left
blank client would search for ``com.example.MyApp.zip``.
Create local bundle
~~~~~~~~~~~~~~~~~~~

View File

@ -73,7 +73,7 @@ Response:
"_26411a1861294160833743e45d0eaad9": {
"name": "SimpleApp"
},
"type": "io.murano.apps.Simple",
"type": "com.example.Simple",
"id": "e34c317a-f5ee-4f3d-ad2f-d07421b13d67",
"_actions": {
"e34c317a-f5ee-4f3d-ad2f-d07421b13d67_exportConfig": {

View File

@ -21,9 +21,9 @@ When importing a bundle by name, the client appends ``.bundle`` file extension t
{"Packages":
[
{"Name": "io.murano.apps.ApacheHttpServer"},
{"Version": "", "Name": "io.murano.apps.Nginx"},
{"Version": "0.0.1", "Name": "io.murano.apps.Lighttpd"}
{"Name": "com.example.ApacheHttpServer"},
{"Version": "", "Name": "com.example.Nginx"},
{"Version": "0.0.1", "Name": "com.example.Lighttpd"}
]
}

View File

@ -81,7 +81,7 @@ The ApacheHTTPServer's manifest file:
Format: 1.0
Type: Application
FullName: io.murano.apps.apache.ApacheHttpServer
FullName: com.example.apache.ApacheHttpServer
Name: Apache HTTP Server
Description: |
The Apache HTTP Server Project is an effort to develop and maintain an
@ -91,7 +91,7 @@ The ApacheHTTPServer's manifest file:
Author: Mirantis, Inc
Tags: [HTTP, Server, WebServer, HTML, Apache]
Classes:
io.murano.apps.apache.ApacheHttpServer: ApacheHttpServer.yaml
com.example.apache.ApacheHttpServer: ApacheHttpServer.yaml
Now, let's inspect ``manifest.yaml`` line-by-line.
@ -131,20 +131,28 @@ application methods by this name.
To ensure the global uniqueness, the same naming
convention as the naming convention of Java packages and
classes is followed. The ``io.murano.apps.apache.`` part
is the "package" part of the name, while ``ApacheHttpServer``
stands for the "class" part of the name:
classes is followed.
The examples of such class names may include:
* ``com.example.Foo`` - for demo applications and packages
* ``org.openstack.projectName.Foo`` - for applications and packages developed
and maintained by the teams of official OpenStack projects
* ``com.companyname.Foo`` - for applications and packages developed and
maintained by a third party controlling the "companyname.com" domain name
* ``io.murano.Foo`` - for applications and packages developed and maintained by
the core murano team as part of the murano project. So, io.murano is a
preferred alias for longer ``org.openstack.murano`` FQN prefix.
In the following example the ``com.example.apache.`` part is the "package" part
of the name, while ``ApacheHttpServer`` stands for the "class" part of the name:
.. code-block:: yaml
FullName: io.murano.apps.apache.ApacheHttpServer
.. note::
It is not necessary that all applications belong to one domain.
This naming allows to determine an application group by its name.
OpenStack-related applications may have full names, started with
``org.openstack.apps``, for example, ``org.openstack.apps.Rally``
FullName: com.example.apache.ApacheHttpServer
Name
@ -234,12 +242,12 @@ Is a mapping between all classes present in ApacheHttpServer application
and the file names where these classes are defined in. This is one-to-one relationship,
which means that there is one and the only class per a single file.
The line ``io.murano.apps.apache.ApacheHttpServer: ApacheHttpServer.yaml`` says that the class ``io.murano.apps.apache.ApacheHttpServer`` is defined in the file ``ApacheHttpServer.yaml``:
The line ``com.example.apache.ApacheHttpServer: ApacheHttpServer.yaml`` says that the class ``com.example.apache.ApacheHttpServer`` is defined in the file ``ApacheHttpServer.yaml``:
.. code-block:: yaml
Classes:
io.murano.apps.apache.ApacheHttpServer: ApacheHttpServer.yaml
com.example.apache.ApacheHttpServer: ApacheHttpServer.yaml
Step 3. Create the execution plan template
@ -296,7 +304,7 @@ ApacheHTTPServer's ui.yaml source code:
Application:
?:
type: io.murano.apps.apache.ApacheHttpServer
type: com.example.apache.ApacheHttpServer
name: $.appConfiguration.name
enablePHP: $.appConfiguration.enablePHP
instance:
@ -366,7 +374,7 @@ symbol. This indicates system information:
Application:
?:
type: io.murano.apps.apache.ApacheHttpServer
type: com.example.apache.ApacheHttpServer
For ApacheHTTPServer application it is defined that the user should input the application name,
some instance parameters and decide whether PHP should be enabled or not:
@ -437,7 +445,7 @@ Here is how it looks like:
:linenos:
Namespaces:
=: io.murano.apps.apache
=: com.example.apache
std: io.murano
res: io.murano.resources
sys: io.murano.system
@ -490,7 +498,7 @@ which enables short names instead of the long ones:
:linenos:
Namespaces:
=: io.murano.apps.apache
=: com.example.apache
std: io.murano
res: io.murano.resources
sys: io.murano.system
@ -502,7 +510,7 @@ Name
----
Contains the class name that is defined in this file.
So full class name will be current namespace and name, provided by corresponding key: ``io.murano.apps.apache.ApacheHttpServer``:
So full class name will be current namespace and name, provided by corresponding key: ``com.example.apache.ApacheHttpServer``:
.. code-block:: yaml
@ -521,7 +529,7 @@ This class has defined deploy method and only instances of that class can be use
Environment class, in its turn, is responsible for the deployment configurations. Definition of both
classes are located at meta/io.murano folder of murano repository.
Thus, if you want to have some modifications of ApacheHttpServer, you can set io.murano.apps.apache.ApacheHttpServer
Thus, if you want to have some modifications of ApacheHttpServer, you can set com.example.apache.ApacheHttpServer
in the Extends section of a new Application class:
.. code-block:: yaml

View File

@ -31,8 +31,8 @@ MySql has a number of methods:
* ``assignUser``
* ``getConnectionString``
In the ``io.murano.apps.WordPress`` class definition the database property is a
contact for the ``io.murano.databases.MySql`` class. So, the database
In the ``com.example.WordPress`` class definition the database property is a
contact for the ``com.example.databases.MySql`` class. So, the database
configuration methods can be called with the parameters passed by the user
in the main method:
@ -87,7 +87,7 @@ instruction template (object model) in the ``Application`` section:
Application:
?:
type: io.murano.apps.HDPSandbox
type: com.example.HDPSandbox
name: $.appConfiguration.name
instance:
?:

View File

@ -107,7 +107,7 @@ Below is an example of the :file:`object_model_patch.json` file content:
"name": "ApacheHttpServer",
"enablePHP": true,
"?": {
"type": "io.murano.apps.apache.ApacheHttpServer",
"type": "com.example.apache.ApacheHttpServer",
"id": "===id2==="
}
}
@ -149,7 +149,7 @@ running the :command:`environment-show` command with the
},
"?": {
"status": "pending",
"type": "io.murano.apps.apache.ApacheHttpServer",
"type": "com.example.apache.ApacheHttpServer",
"id": "69cdf10d31e64196b4de894e7ea4f1be"
},
"enablePHP": true,

View File

@ -34,7 +34,7 @@ To upload an application to the catalog:
* Specify the URL in the :guilabel:`Package URL` field. Lets upload
the Apache HTTP Server package using
http://storage.apps.openstack.org/apps/io.murano.apps.apache.ApacheHttpServer.zip;
http://storage.apps.openstack.org/apps/com.example.apache.ApacheHttpServer.zip;
* Click :guilabel:`Next` to continue:

View File

@ -122,12 +122,12 @@ For example:
.. code-block:: console
$ murano package-import /home/downloads/mysql.zip
Importing package io.murano.databases.MySql
+---------------------------------+------+--------------------------+--------------+---------+
| ID | Name | FQN | Author |Is Public|
+---------------------------------+------+--------------------------+--------------+---------+
| 83e4038885c248e3a758f8217ff8241f| MySQL| io.murano.databases.MySql| Mirantis, Inc| |
+---------------------------------+------+--------------------------+--------------+---------+
Importing package com.example.databases.MySql
+---------------------------------+------+----------------------------+--------------+---------+
| ID | Name | FQN | Author |Is Public|
+---------------------------------+------+----------------------------+--------------+---------+
| 83e4038885c248e3a758f8217ff8241f| MySQL| com.example.databases.MySql| Mirantis, Inc| |
+---------------------------------+------+----------------------------+--------------+---------+
To make the package available for users from other projects (tenants), use the
``--is-public`` parameter. For example:
@ -166,7 +166,7 @@ murano applications repository:
.. code-block:: console
$ murano --murano-repo-url=http://storage.apps.openstack.org \
package-import io.murano.databases.MySql
package-import com.example.databases.MySql
This command supports an optional ``--package-version`` parameter that instructs
murano client to download a specified package version.
@ -204,14 +204,14 @@ murano applications repository using the package URL:
.. code-block:: console
$ murano package-import http://storage.apps.openstack.org/apps/io.murano.databases.MySql.zip
$ murano package-import http://storage.apps.openstack.org/apps/com.example.databases.MySql.zip
Inspecting required images
Importing package io.murano.databases.MySql
+----------------------------------+-------+--------------------------+--------------+--------+----------+------------+
| ID | Name | FQN | Author | Active | Is Public| Type |
+----------------------------------+-------+-----------------------------------------+--------+----------+------------+
| 1aa62196595f411399e4e48cc2f6a512 | MySQL | io.murano.databases.MySql| Mirantis, Inc| True | | Application|
+----------------------------------+-------+-----------------------------------------+--------+----------+------------+
Importing package com.example.databases.MySql
+----------------------------------+-------+----------------------------+--------------+--------+----------+------------+
| ID | Name | FQN | Author | Active | Is Public| Type |
+----------------------------------+-------+----------------------------+--------------+--------+----------+------------+
| 1aa62196595f411399e4e48cc2f6a512 | MySQL | com.example.databases.MySql| Mirantis, Inc| True | | Application|
+----------------------------------+-------+----------------------------+--------------+--------+----------+------------+
.. _cli_bundles:
@ -252,14 +252,14 @@ The following example shows the import of a monitoring bundle:
$ murano bundle-import /home/downloads/monitoring.bundle
Inspecting required images
Importing package io.murano.apps.ZabbixServer
Importing package io.murano.apps.ZabbixAgent
+----------------------------------+---------------+-----------------------------+---------------+--------+----------+------------+
| ID | Name | FQN | Author | Active | Is Public| Type |
+----------------------------------+---------------+-----------------------------+---------------+--------+----------+------------+
| fb0b35359e384fe18158ff3ed8f969b5 | Zabbix Agent | io.murano.apps.ZabbixAgent | Mirantis, Inc | True | | Application|
| 00a77e302a65420c8080dc97cc0f2723 | Zabbix Server | io.murano.apps.ZabbixServer | Mirantis, Inc | True | | Application|
+----------------------------------+---------------+-----------------------------+---------------+--------+----------+------------+
Importing package com.example.ZabbixServer
Importing package com.example.ZabbixAgent
+----------------------------------+---------------+--------------------------+---------------+--------+----------+------------+
| ID | Name | FQN | Author | Active | Is Public| Type |
+----------------------------------+---------------+--------------------------+---------------+--------+----------+------------+
| fb0b35359e384fe18158ff3ed8f969b5 | Zabbix Agent | com.example.ZabbixAgent | Mirantis, Inc | True | | Application|
| 00a77e302a65420c8080dc97cc0f2723 | Zabbix Server | com.example.ZabbixServer | Mirantis, Inc | True | | Application|
+----------------------------------+---------------+--------------------------+---------------+--------+----------+------------+
.. note::
@ -324,16 +324,16 @@ ID, name, author and if it is public or not. For example:
.. code-block:: console
$ murano package-list
+----------------------------------+--------------------+----------------------------------------+---------------+--------+----------+------------+
| ID | Name | FQN | Author | Active | Is Public| Type |
+----------------------------------+--------------------+----------------------------------------+---------------+--------+----------+------------+
| daa46cfd78c74c11bcbe66d3239e546e | Apache HTTP Server | io.murano.apps.apache.ApacheHttpServer | Mirantis, Inc | True | | Application|
| 5252c9897e864c9f940e08500056f155 | Cloud Foundry | io.murano.apps.paas.CloudFoundry | Mirantis, Inc | True | | Application|
| 1aa62196595f411399e4e48cc2f6a512 | MySQL | io.murano.databases.MySql | Mirantis, Inc | True | | Application|
| 11d73cfdc6d7447a910984d95090463b | SQL Library | io.murano.databases | Mirantis, Inc | True | | Application|
| fb0b35359e384fe18158ff3ed8f969b5 | Zabbix Agent | io.murano.apps.ZabbixAgent | Mirantis, Inc | True | | Application|
| 00a77e302a65420c8080dc97cc0f2723 | Zabbix Server | io.murano.apps.ZabbixServer | Mirantis, Inc | True | | Application|
+----------------------------------+--------------------+----------------------------------------+---------------+--------+----------+------------+
+----------------------------------+--------------------+-------------------------------------+---------------+--------+----------+------------+
| ID | Name | FQN | Author | Active | Is Public| Type |
+----------------------------------+--------------------+-------------------------------------+---------------+--------+----------+------------+
| daa46cfd78c74c11bcbe66d3239e546e | Apache HTTP Server | com.example.apache.ApacheHttpServer | Mirantis, Inc | True | | Application|
| 5252c9897e864c9f940e08500056f155 | Cloud Foundry | com.example.paas.CloudFoundry | Mirantis, Inc | True | | Application|
| 1aa62196595f411399e4e48cc2f6a512 | MySQL | com.example.databases.MySql | Mirantis, Inc | True | | Application|
| 11d73cfdc6d7447a910984d95090463b | SQL Library | com.example.databases | Mirantis, Inc | True | | Application|
| fb0b35359e384fe18158ff3ed8f969b5 | Zabbix Agent | com.example.ZabbixAgent | Mirantis, Inc | True | | Application|
| 00a77e302a65420c8080dc97cc0f2723 | Zabbix Server | com.example.ZabbixServer | Mirantis, Inc | True | | Application|
+----------------------------------+--------------------+-------------------------------------+---------------+--------+----------+------------+
.. _cli_display:
@ -350,13 +350,13 @@ command. For example:
| Property | Value |
+----------------------+-----------------------------------------------------+
| categories | |
| class_definitions | io.murano.databases.MySql |
| class_definitions | com.example.databases.MySql |
| description | MySql is a relational database management system |
| | (RDBMS), and ships with no GUI tools to administer |
| | MySQL databases or manage data contained within the |
| | databases. |
| enabled | True |
| fully_qualified_name | io.murano.databases.MySql |
| fully_qualified_name | com.example.databases.MySql |
| id | 1aa62196595f411399e4e48cc2f6a512 |
| is_public | False |
| name | MySQL |
@ -419,7 +419,7 @@ Example:
.. code-block:: console
$ murano package-create -c Downloads/Folder1/Classes -r Downloads/Folder2/Resources \
-n mysql -f io.murano.MySQL -d Package -o MySQL.zip --type Library
-n mysql -f com.example.MySQL -d Package -o MySQL.zip --type Library
Application package is available at /home/Downloads/MySQL.zip
After this, the package is ready to be imported to the application