Jump to: navigation, search

Difference between revisions of "Murano/Documentation/How to create new app on murano application catalog automatically"

(Step1: Preparing(Writing) heat template)
 
(6 intermediate revisions by the same user not shown)
Line 16: Line 16:
 
The following yaml-style code is the most simple heat template that is used in the next sections to create a murano package.  
 
The following yaml-style code is the most simple heat template that is used in the next sections to create a murano package.  
  
heat_template_version: 2014-10-16  
+
heat_template_version: 2014-10-16  
description: Simple template to deploy a single compute instance  
+
description: Simple template to deploy a single compute instance  
resources:  
+
resources:  
 
   my_instance:  
 
   my_instance:  
 
     type: OS::Nova::Server  
 
     type: OS::Nova::Server  
Line 31: Line 31:
  
 
=== Step2: Create Murano Package ===
 
=== Step2: Create Murano Package ===
As mentioned in introductory section, two automatic and manual ways are available to create a murano package(in zip format), but in this page the automatic way is used. For more information about the manual method which is more complex see [[Murano/Documentation/How to create application package|"''How to create application package manually''"]] page. The following command can be used to create a new murano package automatically:
+
As mentioned in introductory section, two automatic and manual ways are available to create a murano package(in zip format), but in this page the automatic way is selected. For more information about the manual method which is more complex see [[Murano/Documentation/How to create application package|"''How to create application package manually''"]] page.
 +
The following command can be used to create a new murano package automatically:
  
 
murano package-create  --template my_hot_template --logo logo.png
 
murano package-create  --template my_hot_template --logo logo.png
Line 50: Line 51:
 
=== Step3: Upload the zip file to Murano Package ===
 
=== Step3: Upload the zip file to Murano Package ===
 
Using the horizon dashboard it is possible to upload the zip archive to the murano package. The following snapshot shows this simple step.
 
Using the horizon dashboard it is possible to upload the zip archive to the murano package. The following snapshot shows this simple step.
Image#1
+
 
 +
 
 +
[[File:Package_Definitions_-_OpenStack_Dashboard(Upload).png|center]]
  
 
Check both the public and active checkboxes:
 
Check both the public and active checkboxes:
  
image#2
+
[[File:Package_Definitions_-_OpenStack_Dashboard(Checkboxes).png|center]]
  
 
=== Step4: Browse the App and Deploy it ===
 
=== Step4: Browse the App and Deploy it ===
 
After uploading the package, its time to browse the application and deploy it. The following figure shows the application catalog.
 
After uploading the package, its time to browse the application and deploy it. The following figure shows the application catalog.
  
image#3
+
[[File:Applications_-_OpenStack_Dashboard(Deploy).png|center]]
  
 
By clicking on the quick deploy button, the application is added to the environment. Environment is a virtual sandbox to store user's application.  Environment can contain more than one application. By clicking on the ''“Deploy This Environment''”(As the figure shows), all applications in the current environment will be deploy on the infrastructure. See the following figure.
 
By clicking on the quick deploy button, the application is added to the environment. Environment is a virtual sandbox to store user's application.  Environment can contain more than one application. By clicking on the ''“Deploy This Environment''”(As the figure shows), all applications in the current environment will be deploy on the infrastructure. See the following figure.
  
Image#4
+
[[File:Components_-_OpenStack_Dashboard(Env_Deploy).png|center]]

Latest revision as of 07:41, 11 February 2015

Introduction

Murano works with heat orchestration service. So at first, its need to install and configure heat. The reason behind this dependency is that, every application on the murano app catalog historically defined as heat template. So to add a new app to the catalog its need firstly write heat template to define the instance resources(e.g. network, storage, ...), and then generate a zip archive in the murano package standard format. Generating the zip archive could be done in two different ways:

  • Automatic: Using murano package-create command to create a new .zip catalog package
  • Manual: Manually compress several files in standard murano package definition format (This format comprises three directories: 1-calsses, 2-resources, 3-ui and two files 1-logo.png and 2-manifest.yaml files) into a zip file.

This page tries to address the automatic way of murano application package creation, but to create it manually go to the "How to create application package manually" page.

To add a new package to the murano application catalog, the following steps are required:

  1. Preparing(Writing) heat template(HOT)
  2. Create murano package using either manual or automatic way(Mentioned above)
  3. Upload the output file(zip archive) to the murano package definition via horizon dashboard
  4. Browse and deploy the app via the murano app catalog

All of these steps are explained in the following subsequent sections separately.

Step1: Preparing(Writing) heat template

The goal of this page is explaining how simple is to add a new application on the murano application catalog. So the provided example in this section is the most simple one. But to create a complex murano package, more sophisticated heat template can be written. The following yaml-style code is the most simple heat template that is used in the next sections to create a murano package.

heat_template_version: 2014-10-16 
description: Simple template to deploy a single compute instance 
resources: 
 my_instance: 
   type: OS::Nova::Server 
   properties: 
     key_name: heat_key 
     image: Xamin
     flavor: 1 GB Performance

Do the following steps:

  1. Create a new file(called my_hot_template) filled with the above content.
  2. Replace the key_name value(heat_key) by your added keypair value.

Step2: Create Murano Package

As mentioned in introductory section, two automatic and manual ways are available to create a murano package(in zip format), but in this page the automatic way is selected. For more information about the manual method which is more complex see "How to create application package manually" page. The following command can be used to create a new murano package automatically:

murano package-create --template my_hot_template --logo logo.png

Before running this command its need to prepare a logo.png file. This icon is what shows at murano application catalog. The following options can be used to change the default value of application metadata on the catalog:

  • Format: Defines application definition format; should be set to Heat.HOT/1.0
  • Type: Defines manifest type, should be set to Application
  • FullName: Unique name which will be used to identify the application in Murano Catalog
  • Description: Text information about an application
  • Author: Name of application author or company
  • Tags: Keywords, associated with the application
  • Logo: Name of the application logo file

As a result of this step, a zip file will be created at /tmp directory.

Step3: Upload the zip file to Murano Package

Using the horizon dashboard it is possible to upload the zip archive to the murano package. The following snapshot shows this simple step.


Package Definitions - OpenStack Dashboard(Upload).png

Check both the public and active checkboxes:

Package Definitions - OpenStack Dashboard(Checkboxes).png

Step4: Browse the App and Deploy it

After uploading the package, its time to browse the application and deploy it. The following figure shows the application catalog.

Applications - OpenStack Dashboard(Deploy).png

By clicking on the quick deploy button, the application is added to the environment. Environment is a virtual sandbox to store user's application. Environment can contain more than one application. By clicking on the “Deploy This Environment”(As the figure shows), all applications in the current environment will be deploy on the infrastructure. See the following figure.

Components - OpenStack Dashboard(Env Deploy).png