Jump to: navigation, search

Difference between revisions of "PolicyGuidedFulfillmentLibertyPlanning WorkflowEmbracement"

(Created page with "This topic is part of PolicyGuidedFulfillmentLibertyPlanning == Workflow Embracement == Currently it is possible to use Mistral workflow in Murano component action. Th...")
 
(Creating Murano Component From Mistral Workflow)
 
(3 intermediate revisions by the same user not shown)
Line 4: Line 4:
  
 
Currently it is possible to use Mistral workflow in Murano component action. The next step is to create component completely from the Mistral workflow, so any component action will be implemented by an action. During embracement (i.e., process of component creation from workflows) it should be possible to specify a) dependencies of the component on other components (e.g., Instance); b) mapping of workflow's input and output from/to component properties.
 
Currently it is possible to use Mistral workflow in Murano component action. The next step is to create component completely from the Mistral workflow, so any component action will be implemented by an action. During embracement (i.e., process of component creation from workflows) it should be possible to specify a) dependencies of the component on other components (e.g., Instance); b) mapping of workflow's input and output from/to component properties.
 +
 +
=== Creating Murano Component From Mistral Workflow ===
 +
 +
Mistral workflow  is another Murano component action implementation (currently Murano support Murano PL and HOT template). The difference is implementation style - action is building from existing Mistral actions which are scheduled and executed by Mistral engine.
 +
 +
Mistral workflow typically won't be creating infrastructure (e.g., server, network, ...), thus we want to support contracts in workflow embraced components. Further workflow Input properties shall be able to get values from either user using UI, or contract .
 +
 +
Workflow output properties shall be available on the component.
 +
 +
'''Example'''
 +
 +
''workflow.yaql'' contains workflow implementing ''deploy'' action.
 +
version: '2.0'
 +
create_vm:
 +
  description: Install apache using package tools, configures apache for given port, and starts it. It uses Murano agent for execution of commands on the Murano instance.
 +
  type: direct
 +
  input:
 +
    - queue_id
 +
    - port
 +
  output:
 +
    url: <% $.url %>
 +
....
 +
 +
''definition.yaml'' contains various mappings
 +
Properties:
 +
  port:
 +
    $.string().notNull()
 +
    Default: 80
 +
  instance:
 +
    $.class( io.murano.resource.Instance )
 +
  url:
 +
      $.string()
 +
      Usage: out
 +
Methods
 +
  deploy:
 +
    workflow: 'workflow.yaql'
 +
    inputs:
 +
      queue_id: $.instance.queueId
 +
      port: $.port
 +
    outputs:
 +
      url: url
 +
 +
 +
Command to create package:
 +
 +
$ murano create-package --mistral-workflow <definition.yaml>
 +
 +
The resulting package will contain
 +
* manifest + logo +... files
 +
* class file
 +
** generated from the definition.yaml, or it can be also generated on-the-fly from the ''definition.yaml'' file (like Heat HOT templates are)
 +
** the class is responsible for
 +
*** deployment of dependencies (e.g., Instances)
 +
*** execution of workflows using mapping of input and outputs
 +
*** ...
 +
* UI file
 +
** generated from the definition.yaml, or it can be also generated on-the-fly from the ''definition.yaml'' file (like Heat HOT templates are)
 +
* workflow files as resources
 +
 +
=== Workflow Implementation Support ===
 +
 +
* ''Murano agent integration in Mistral''
 +
Mistral shall be able to construct and send message with execution plans to Murano agent on Instances.
 +
 +
* ''Command execution on Instances''
 +
Using Murano execution plan it shall be possible to execute commands on Instances - e.g., ''apt-get install mysql''
 +
 +
* ''Security group, etc... management''
 +
Implementation of classes also changes security groups using SecurityGroupManager provided by an environment. We have to provide similar/same capability in the definition.yaml

Latest revision as of 13:56, 12 May 2015

This topic is part of PolicyGuidedFulfillmentLibertyPlanning

Workflow Embracement

Currently it is possible to use Mistral workflow in Murano component action. The next step is to create component completely from the Mistral workflow, so any component action will be implemented by an action. During embracement (i.e., process of component creation from workflows) it should be possible to specify a) dependencies of the component on other components (e.g., Instance); b) mapping of workflow's input and output from/to component properties.

Creating Murano Component From Mistral Workflow

Mistral workflow is another Murano component action implementation (currently Murano support Murano PL and HOT template). The difference is implementation style - action is building from existing Mistral actions which are scheduled and executed by Mistral engine.

Mistral workflow typically won't be creating infrastructure (e.g., server, network, ...), thus we want to support contracts in workflow embraced components. Further workflow Input properties shall be able to get values from either user using UI, or contract .

Workflow output properties shall be available on the component.

Example

workflow.yaql contains workflow implementing deploy action.

version: '2.0'
create_vm:
  description: Install apache using package tools, configures apache for given port, and starts it. It uses Murano agent for execution of commands on the Murano instance.
  type: direct
  input:
    - queue_id
    - port
  output:
    url: <% $.url %>
....

definition.yaml contains various mappings

Properties:
  port:
    $.string().notNull()
    Default: 80
  instance:
    $.class( io.murano.resource.Instance )
  url:
     $.string()
     Usage: out
Methods
  deploy:
    workflow: 'workflow.yaql'
    inputs:
      queue_id: $.instance.queueId
      port: $.port
    outputs:
      url: url

Command to create package:

$ murano create-package --mistral-workflow <definition.yaml>

The resulting package will contain

  • manifest + logo +... files
  • class file
    • generated from the definition.yaml, or it can be also generated on-the-fly from the definition.yaml file (like Heat HOT templates are)
    • the class is responsible for
      • deployment of dependencies (e.g., Instances)
      • execution of workflows using mapping of input and outputs
      • ...
  • UI file
    • generated from the definition.yaml, or it can be also generated on-the-fly from the definition.yaml file (like Heat HOT templates are)
  • workflow files as resources

Workflow Implementation Support

  • Murano agent integration in Mistral

Mistral shall be able to construct and send message with execution plans to Murano agent on Instances.

  • Command execution on Instances

Using Murano execution plan it shall be possible to execute commands on Instances - e.g., apt-get install mysql

  • Security group, etc... management

Implementation of classes also changes security groups using SecurityGroupManager provided by an environment. We have to provide similar/same capability in the definition.yaml