From b4204de9dedde173952744284a31b66c085452a3 Mon Sep 17 00:00:00 2001 From: Roman Vasilets Date: Wed, 13 May 2015 12:38:34 +0300 Subject: [PATCH] Add HelloReporter application to rally-jobs Allow to deploy environment with following application. Here is an example how to add different applications to rally-jobs. This application content don't need to use some specific resources like images etc. And just outputs "HelloWorld". If you want to add your application just create directory for app and copy application content to this directory, like in this example. Change-Id: I72bb79f8e298754e7ea23e6b878d3ca27fad10ef --- .../Classes/HelloReporter.yaml | 25 +++++++++++++++++++ .../io.murano.apps.HelloReporter/UI/ui.yaml | 19 ++++++++++++++ .../manifest.yaml | 10 ++++++++ rally-jobs/task-murano.yaml | 20 +++++++++++++++ 4 files changed, 74 insertions(+) create mode 100644 rally-jobs/extra/applications/HelloReporter/io.murano.apps.HelloReporter/Classes/HelloReporter.yaml create mode 100644 rally-jobs/extra/applications/HelloReporter/io.murano.apps.HelloReporter/UI/ui.yaml create mode 100644 rally-jobs/extra/applications/HelloReporter/io.murano.apps.HelloReporter/manifest.yaml diff --git a/rally-jobs/extra/applications/HelloReporter/io.murano.apps.HelloReporter/Classes/HelloReporter.yaml b/rally-jobs/extra/applications/HelloReporter/io.murano.apps.HelloReporter/Classes/HelloReporter.yaml new file mode 100644 index 000000000..2eca9d0df --- /dev/null +++ b/rally-jobs/extra/applications/HelloReporter/io.murano.apps.HelloReporter/Classes/HelloReporter.yaml @@ -0,0 +1,25 @@ +Namespaces: + =: io.murano.apps + std: io.murano + sys: io.murano.system + + +Name: HelloReporter + +Extends: std:Application + +Properties: + name: + Contract: $.string().notNull() + +Workflow: + initialize: + Body: + - $.environment: $.find(std:Environment).require() + + deploy: + Body: + - If: not $.getAttr(deployed, false) + Then: + - $.environment.reporter.report($this, 'Starting deployment! Hello!') + - $.setAttr(deployed, True) diff --git a/rally-jobs/extra/applications/HelloReporter/io.murano.apps.HelloReporter/UI/ui.yaml b/rally-jobs/extra/applications/HelloReporter/io.murano.apps.HelloReporter/UI/ui.yaml new file mode 100644 index 000000000..3836655a4 --- /dev/null +++ b/rally-jobs/extra/applications/HelloReporter/io.murano.apps.HelloReporter/UI/ui.yaml @@ -0,0 +1,19 @@ +Version: 2 + +Application: + ?: + type: io.murano.apps.HelloReporter + name: $.appConfiguration.name + +Forms: + - appConfiguration: + fields: + - name: name + type: string + label: Application Name + description: >- + Enter a desired name for the application. Just A-Z, a-z, 0-9, dash and + underline are allowed + - name: unitNamingPattern + type: string + required: false diff --git a/rally-jobs/extra/applications/HelloReporter/io.murano.apps.HelloReporter/manifest.yaml b/rally-jobs/extra/applications/HelloReporter/io.murano.apps.HelloReporter/manifest.yaml new file mode 100644 index 000000000..47e4d510f --- /dev/null +++ b/rally-jobs/extra/applications/HelloReporter/io.murano.apps.HelloReporter/manifest.yaml @@ -0,0 +1,10 @@ +Format: 1.0 +Type: Application +FullName: io.murano.apps.HelloReporter +Name: HelloReporter +Description: | + HelloReporter test app. +Author: 'Mirantis, Inc' +Tags: [App, Test, HelloWorld] +Classes: + io.murano.apps.HelloReporter: HelloReporter.yaml diff --git a/rally-jobs/task-murano.yaml b/rally-jobs/task-murano.yaml index 3d77f234c..6ca4d9f68 100644 --- a/rally-jobs/task-murano.yaml +++ b/rally-jobs/task-murano.yaml @@ -26,3 +26,23 @@ sla: failure_rate: max: 0 + + MuranoEnvironments.create_and_deploy_environment: + - + args: + packages_per_env: 2 + runner: + type: "constant" + times: 8 + concurrency: 2 + context: + users: + tenants: 2 + users_per_tenant: 2 + murano_packages: + app_package: "/home/jenkins/.rally/extra/applications/HelloReporter/io.murano.apps.HelloReporter/" + roles: + - "admin" + sla: + failure_rate: + max: 0