Script Invocation Conventions TOSCA Interop SC 2012-12-07.

Slides:



Advertisements
Similar presentations
Exceptions, Templates, And The Standard Template Library (STL) Chapter 16.
Advertisements

TOSCA SugarCRM Deployment
1 © Wolfgang Pelz UML3 UML 3 Notations describe how to use reusable software. Package Component Deployment Node.
 2006 Pearson Education, Inc. All rights reserved Introduction to Classes and Objects.
Objects and Classes First Programming Concepts. 14/10/2004Lecture 1a: Introduction 2 Fundamental Concepts object class method parameter data type.
. Templates. Example… A useful routine to have is void Swap( int& a, int &b ) { int tmp = a; a = b; b = tmp; }
OOP in Java Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Satzinger, Jackson, and Burd Object-Orieneted Analysis & Design
Class template Describing a generic class Instantiating classes that are type- specific version of this generic class Also are called parameterized types.
Communication in Distributed Systems –Part 2
Topology and Orchestration Specification for Cloud Applications (TOSCA) Standard TOSCA Interoperability Demonstration Join the TOSCA Technical Committee.
OOP Languages: Java vs C++
TOSCA Interoperability Demonstration
Programming Languages and Paradigms Object-Oriented Programming.
CSM-Java Programming-I Spring,2005 Introduction to Objects and Classes Lesson - 1.
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 2: Modelling.
Chapter 33 CGI Technology for Dynamic Web Documents There are two alternative forms of retrieving web documents. Instead of retrieving static HTML documents,
Lecture 8 Inheritance Richard Gesick. 2 OBJECTIVES How inheritance promotes software reusability. The concepts of base classes and derived classes. To.
Grid Computing, B. Wilkinson, 20043b.1 Web Services Part II.
Implementation Yaodong Bi. Introduction to Implementation Purposes of Implementation – Plan the system integrations required in each iteration – Distribute.
Proposal by CA Technologies, IBM, SAP, Vnomic
CSE3201/CSE4500 Information Retrieval Systems XSLT – Part 2.
Topology and Orchestration Specification for Cloud Applications (TOSCA) Standard TOSCA Interoperability Demonstration Join the TOSCA Technical Committee.
Copyright © 2012 Pearson Education, Inc. Chapter 13: Introduction to Classes.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 13: Introduction to Classes.
Primer Themes: Creating a Cloud App With TOSCA Gerd Breiter Frank Leymann Thomas Spatzier.
Introduction to Method. Example Java Method ( 1 ) The 2 types (kinds) of methods in Java Class methods Instance methods Methods can do more work than.
OBJECT-ORIENTED PROGRAMMING (OOP) WITH C++ Instructor: Dr. Hany H. Ammar Dept. of Electrical and Computer Engineering, WVU.
Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel.
SugarCRM Use Case: Plans 1. Reminder When a service template is deployed, its implementation artifacts are deployed – From that time on, the operations.
Copyright © 2002 ProsoftTraining. All rights reserved. JavaServer Pages.
Topic 1 Object Oriented Programming. 1-2 Objectives To review the concepts and terminology of object-oriented programming To discuss some features of.
Distribution and components. 2 What is the problem? Enterprise computing is Large scale & complex: It supports large scale and complex organisations Spanning.
SugarCRM Service Template
Chapter 3 Understanding Ant datatypes and properties.
Restructuring Proposal for TOSCA Files 1. Goals Separation of concerns: only expose what is needed to different roles in the creation of TOSCA templates.
Overview of the Automated Build & Deployment Process Johnita Beasley Tuesday, April 29, 2008.
1 Technical & Business Writing (ENG-715) Muhammad Bilal Bashir UIIT, Rawalpindi.
Node Type Implementations How does Required Container Feature interact with Artifact Type? It seems that any given implementation will be based on artifacts.
ModTransf A Simple Model to Model Transformation Engine Cédric Dumoulin.
CSE3201/CSE4500 Information Retrieval Systems XSLT – Part 2.
Web Service Definition Language. Web Services: WSDL2 Web Service Definition Language ( WSDL ) What is a web service? [ F. Leymann 2003 ] A piece of code.
TOSCA Interoperability Demonstration
Copyright © 2015, 2012, 2009 Pearson Education, Inc., Publishing as Addison-Wesley All rights reserved. Chapter 13: Introduction to Classes.
Topology and Orchestration Specification for Cloud Applications (TOSCA) Standard TOSCA Interoperability Demonstration Join the TOSCA Technical Committee.
Class Diagrams Revisited. Parameterized Classes Parameterized Classes - are used to represent relationships between templates.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Function Templates 16.2.
Mr H Kandjimi 2016/01/03Mr Kandjimi1 Week 3 –Modularity in C++
An Introduction to Ant. What is Ant? How do you use it? Why would you want to?
TOSCA v1.0 Figures. Definition of building blocks for services … along with the implementation artifacts for manageability operations … and the definition.
Instance Model Considerations Instance Model Objectives Provide complete representation of the state of a TOSCA service template deployment.
SDN-O LCM for Mercury Release Key Points and Overview
NS2_Trace and Monitoring support 報告者:羅士捷
Distribution and components
Organization of Programming Languages
Introduction to Classes
Workflow-Instance Model Interaction
OASIS TOSCA Report for December ONAP Modeling Workshop
Data Modeling II XML Schema & JAXB Marc Dumontier May 4, 2004
TOSCA-Metadata (directory )
Introduction to Classes
Questions for Implementers Recommendation
6 Delegate and Lambda Expressions
Lecture 22 Inheritance Richard Gesick.
TOSCA-Metadata (directory )
point when a program element is bound to a characteristic or property
SPL – PS1 Introduction to C++.
Presentation transcript:

Script Invocation Conventions TOSCA Interop SC

Introduction / Background Current interop use case SugarCRM provides simple scripts as Implementation Artifacts for lifecycle operations of Node Types Conventions have to be defined to allow for interoperable invocation of those scripts in different TOSCA implementations – References to actual scripts in CSAR – Parameter passing from model to script – … Note: bindings to several script languages have to be defined. For now, only bash scripts are used, so we concentrate on a bash binding. 2

Script Artifact Definitions Non-normative Artifact Type “ScriptArtifact” defined in interop use case  Has to be documented; candidate for normative definition in TOSCA vNext – ScriptLanguage: specifies the used script language  impact on invocation convention, parameters passing, etc. – PrimaryScript: specifies the “entry script” to be invoked in cases where multiple files are referenced by an ArtifactTemplate (e.g. is main script brings with it additional helper or library files) ArtifactReferences element uses Ant fileset like notation – reference attribute can specify a file or directory – If reference points to a directory, files in the directory to be referenced by the ArtifactTemplate are specified thru include and exclude patterns – Relative reference URIs in ArtifactTemplate elements are interpreted relative to the CSAR root directory <ArtifactTemplate id="at-c1ab1a58-91f1-49ec-a3e0-57f46e3d72e1“ type="ns1:ScriptArtifact"> <ns1:ScriptArtifactProperties xmlns:ns1=" xmlns=" sh scripts/MySQL/configure.sh 3

Invocation Conventions for bash scripts Parameters are passed to script as environment variables – Script can access parameters by name using $ notation Scripts in current interop example are supposed to be executed on the target environment (i.e. VMs created during service instantiation) Invocation mechanism – Make script (incl. potential helper files) available on target environment – Create a new bash – Set all parameters to be passed to script as environment parameters – Invoke script – Process return code; read out potential return parameters the script may have written to environment variables 4

Parameter conventions for scripts of Node Type Operations Pass all properties of the Node instance (instantiated Node Template) to script as environment variables Pass special parameter like “PublicIP” as environment variables – Denotes the public IP address of the VM on which the Node is deployed (i.e. avoids having to define a PublicIP property for each Node Type) Example: configure.sh of SugarCRMApplication – NodeType SugarCRMApplication defines parameters AdminUser, AdminPassword, etc. – Script can access parameters like $AdminUser $AdminPassword … 5

Parameter passing for scripts of Relationship Type Operations Pass all properties of the Relationship instance (instantiated Relationship Template) as environment variables – Accessible by script as $ Pass all properties (and special properties like PublicIP) of the source Node instance of the relationship as environment variables with prefix “Source_” – Accessible by script as $Source_ Pass all properties (and special properties like PublicIP) of the target Node instance of the relationship as environment variables with prefix “Target_” – Accessible by script as $Target_ Example: connectToDatabase.sh of MySQLDatabaseConnection … sed -i -e 's/YOURDBHOST/'${Target_PublicIP}:${Target_mySqlPort}'/' $ResponseFile sed -i -e 's/YOURDBNAME/'${Target_DBName}'/' $ResponseFile sed -i -e 's/YOURDBUSER/'${Target_DBUser}'/' $ResponseFile … 6