From: Eby, Robert (re2429) Date: Fri, 29 Jun 2018 21:12:29 +0000 (-0400) Subject: Initial move of code from ATT to LF repo X-Git-Tag: 0.0.1~5 X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=commitdiff_plain;h=77fbf8bf5a987920383302bd9dbd161ac263d498;p=camunda_workflow.git Initial move of code from ATT to LF repo Signed-off-by: Eby, Robert (re2429) --- diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..233dbf0 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,19 @@ +# Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +FROM java:8 +COPY config . +COPY camunda_workflow-*.jar . +EXPOSE 8015 +ENTRYPOINT [ "sh", "-c", "java $JAVA_OPTS -jar camunda_workflow-*.jar --server.port=8015" ] diff --git a/akraino/LICENSE b/akraino/LICENSE new file mode 100644 index 0000000..ad410e1 --- /dev/null +++ b/akraino/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/akraino/README.md b/akraino/README.md new file mode 100644 index 0000000..de9cc1a --- /dev/null +++ b/akraino/README.md @@ -0,0 +1,17 @@ +# camunda BPM - Getting Started with camunda BPM and Spring Boot + +This Repository contains the example Spring Boot application for the guide at [camunda.org](http://camunda.org/get-started/spring-boot.html). + +Every step of the tutorial was tagged in this repository. You can jump to the final state of each step +by the following command: + +``` +git checkout -f Step-X +``` + +If you want to follow the tutorial along please clone this repository and checkout the `Start` tag. + +``` +git clone https://github.com/camunda/camunda-get-started-spring-boot.git +git checkout -f Start +``` \ No newline at end of file diff --git a/akraino/RemoteSystemsTempFiles/.project b/akraino/RemoteSystemsTempFiles/.project new file mode 100644 index 0000000..5447a64 --- /dev/null +++ b/akraino/RemoteSystemsTempFiles/.project @@ -0,0 +1,12 @@ + + + RemoteSystemsTempFiles + + + + + + + org.eclipse.rse.ui.remoteSystemsTempNature + + diff --git a/akraino/Servers/.project b/akraino/Servers/.project new file mode 100644 index 0000000..0fa764d --- /dev/null +++ b/akraino/Servers/.project @@ -0,0 +1,11 @@ + + + Servers + + + + + + + + diff --git a/akraino/Servers/.settings/org.eclipse.wst.server.core.prefs b/akraino/Servers/.settings/org.eclipse.wst.server.core.prefs new file mode 100644 index 0000000..3fbf40d --- /dev/null +++ b/akraino/Servers/.settings/org.eclipse.wst.server.core.prefs @@ -0,0 +1,3 @@ +#Thu May 31 21:08:33 EDT 2018 +org.eclipse.wst.server.core.isServerProject=true +eclipse.preferences.version=1 diff --git a/akraino/Servers/Pivotal tc Server Developer Edition v3.2-config/catalina.policy b/akraino/Servers/Pivotal tc Server Developer Edition v3.2-config/catalina.policy new file mode 100644 index 0000000..58cf04a --- /dev/null +++ b/akraino/Servers/Pivotal tc Server Developer Edition v3.2-config/catalina.policy @@ -0,0 +1,257 @@ +// Licensed to the Apache Software Foundation (ASF) under one or more +// contributor license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright ownership. +// The ASF licenses this file to You under the Apache License, Version 2.0 +// (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// ============================================================================ +// catalina.policy - Security Policy Permissions for tc Server Runtime 8.0 +// +// This file contains a default set of security policies to be enforced (by the +// JVM) when Catalina is executed with the "-security" option. In addition +// to the permissions granted here, the following additional permissions are +// granted to each web application: +// +// * Read access to its document root directory +// * Read, write and delete access to its working directory +// ============================================================================ + + +// ========== SYSTEM CODE PERMISSIONS ========================================= + + +// These permissions apply to javac +grant codeBase "file:${java.home}/lib/-" { + permission java.security.AllPermission; +}; + +// These permissions apply to all shared system extensions +grant codeBase "file:${java.home}/jre/lib/ext/-" { + permission java.security.AllPermission; +}; + +// These permissions apply to javac when ${java.home] points at $JAVA_HOME/jre +grant codeBase "file:${java.home}/../lib/-" { + permission java.security.AllPermission; +}; + +// These permissions apply to all shared system extensions when +// ${java.home} points at $JAVA_HOME/jre +grant codeBase "file:${java.home}/lib/ext/-" { + permission java.security.AllPermission; +}; + +// ========== tc Server Service Wrapper Permissions =========================== + +grant codeBase "file:${catalina.base}/bin/winx86_64/-" { + permission java.security.AllPermission; +}; +grant codeBase "file:${catalina.base}/bin/win32/-" { + permission java.security.AllPermission; +}; + +// ========== CATALINA CODE PERMISSIONS ======================================= + + +// These permissions apply to the daemon code +grant codeBase "file:${catalina.home}/bin/commons-daemon.jar" { + permission java.security.AllPermission; +}; + +// These permissions apply to the logging API +// Note: If tomcat-juli.jar is in ${catalina.base} and not in ${catalina.home}, +// update this section accordingly. +// grant codeBase "file:${catalina.base}/bin/tomcat-juli.jar" {..} +grant codeBase "file:${catalina.home}/bin/tomcat-juli.jar" { + permission java.io.FilePermission + "${java.home}${file.separator}lib${file.separator}logging.properties", "read"; + + permission java.io.FilePermission + "${catalina.base}${file.separator}conf${file.separator}logging.properties", "read"; + permission java.io.FilePermission + "${catalina.base}${file.separator}logs", "read, write"; + permission java.io.FilePermission + "${catalina.base}${file.separator}logs${file.separator}*", "read, write"; + + permission java.lang.RuntimePermission "shutdownHooks"; + permission java.lang.RuntimePermission "getClassLoader"; + permission java.lang.RuntimePermission "setContextClassLoader"; + + permission java.lang.management.ManagementPermission "monitor"; + + permission java.util.logging.LoggingPermission "control"; + + permission java.util.PropertyPermission "java.util.logging.config.class", "read"; + permission java.util.PropertyPermission "java.util.logging.config.file", "read"; + permission java.util.PropertyPermission "org.apache.juli.AsyncLoggerPollInterval", "read"; + permission java.util.PropertyPermission "org.apache.juli.AsyncMaxRecordCount", "read"; + permission java.util.PropertyPermission "org.apache.juli.AsyncOverflowDropType", "read"; + permission java.util.PropertyPermission "org.apache.juli.ClassLoaderLogManager.debug", "read"; + permission java.util.PropertyPermission "catalina.base", "read"; + + // tc Server specific permissions + permission java.util.PropertyPermission "com.springsource.tcserver.serviceability.logging.jmxdelay", "read"; + permission java.lang.reflect.ReflectPermission "suppressAccessChecks"; + permission javax.management.MBeanServerPermission "createMBeanServer"; + permission javax.management.MBeanPermission "com.springsource.tcserver.serviceability.logging.TcServerLogManager#-[tcServer:name=LoggingManager,type=Serviceability]", "registerMBean"; + permission javax.management.MBeanTrustPermission "register"; + + // Note: To enable per context logging configuration, permit read access to + // the appropriate file. Be sure that the logging configuration is + // secure before enabling such access. + // E.g. for the examples web application (uncomment and unwrap + // the following to be on a single line): + // permission java.io.FilePermission "${catalina.base}${file.separator} + // webapps${file.separator}examples${file.separator}WEB-INF + // ${file.separator}classes${file.separator}logging.properties", "read"; +}; + +// These permissions apply to the server startup code +grant codeBase "file:${catalina.home}/bin/bootstrap.jar" { + permission java.security.AllPermission; +}; + +// These permissions apply to the servlet API classes +// and those that are shared across all class loaders +// located in the "lib" directory +grant codeBase "file:${catalina.home}/lib/-" { + permission java.security.AllPermission; +}; + + +// If using a per instance lib directory, i.e. ${catalina.base}/lib, +// then the following permission will need to be uncommented +// grant codeBase "file:${catalina.base}/lib/-" { +// permission java.security.AllPermission; +// }; + + +// ========== WEB APPLICATION PERMISSIONS ===================================== + + +// These permissions are granted by default to all web applications +// In addition, a web application will be given a read FilePermission +// for all files and directories in its document root. +grant { + // Required for JNDI lookup of named JDBC DataSource's and + // javamail named MimePart DataSource used to send mail + permission java.util.PropertyPermission "java.home", "read"; + permission java.util.PropertyPermission "java.naming.*", "read"; + permission java.util.PropertyPermission "javax.sql.*", "read"; + + // OS Specific properties to allow read access + permission java.util.PropertyPermission "os.name", "read"; + permission java.util.PropertyPermission "os.version", "read"; + permission java.util.PropertyPermission "os.arch", "read"; + permission java.util.PropertyPermission "file.separator", "read"; + permission java.util.PropertyPermission "path.separator", "read"; + permission java.util.PropertyPermission "line.separator", "read"; + + // JVM properties to allow read access + permission java.util.PropertyPermission "java.version", "read"; + permission java.util.PropertyPermission "java.vendor", "read"; + permission java.util.PropertyPermission "java.vendor.url", "read"; + permission java.util.PropertyPermission "java.class.version", "read"; + permission java.util.PropertyPermission "java.specification.version", "read"; + permission java.util.PropertyPermission "java.specification.vendor", "read"; + permission java.util.PropertyPermission "java.specification.name", "read"; + + permission java.util.PropertyPermission "java.vm.specification.version", "read"; + permission java.util.PropertyPermission "java.vm.specification.vendor", "read"; + permission java.util.PropertyPermission "java.vm.specification.name", "read"; + permission java.util.PropertyPermission "java.vm.version", "read"; + permission java.util.PropertyPermission "java.vm.vendor", "read"; + permission java.util.PropertyPermission "java.vm.name", "read"; + + // Required for OpenJMX + permission java.lang.RuntimePermission "getAttribute"; + + // Allow read of JAXP compliant XML parser debug + permission java.util.PropertyPermission "jaxp.debug", "read"; + + // All JSPs need to be able to read this package + permission java.lang.RuntimePermission "accessClassInPackage.org.apache.tomcat"; + + // Precompiled JSPs need access to these packages. + permission java.lang.RuntimePermission "accessClassInPackage.org.apache.jasper.el"; + permission java.lang.RuntimePermission "accessClassInPackage.org.apache.jasper.runtime"; + permission java.lang.RuntimePermission + "accessClassInPackage.org.apache.jasper.runtime.*"; + + // Precompiled JSPs need access to these system properties. + permission java.util.PropertyPermission + "org.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER", "read"; + permission java.util.PropertyPermission + "org.apache.el.parser.COERCE_TO_ZERO", "read"; + + // The cookie code needs these. + permission java.util.PropertyPermission + "org.apache.catalina.STRICT_SERVLET_COMPLIANCE", "read"; + permission java.util.PropertyPermission + "org.apache.tomcat.util.http.ServerCookie.STRICT_NAMING", "read"; + permission java.util.PropertyPermission + "org.apache.tomcat.util.http.ServerCookie.FWD_SLASH_IS_SEPARATOR", "read"; + + // Applications using Comet need to be able to access this package + permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.comet"; + + // Applications using WebSocket need to be able to access these packages + permission java.lang.RuntimePermission "accessClassInPackage.org.apache.tomcat.websocket"; + permission java.lang.RuntimePermission "accessClassInPackage.org.apache.tomcat.websocket.server"; +}; + + +// The Manager application needs access to the following packages to support the +// session display functionality +// Note: If the manager web application used by this instance is located outside +// of the webapps directory then the codeBase in the grant below will need +// to be updated accordingly +grant codeBase "file:${catalina.base}/webapps/manager/-" { + permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina"; + permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.ha.session"; + permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.manager"; + permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.manager.util"; + permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.util"; +}; + +// You can assign additional permissions to particular web applications by +// adding additional "grant" entries here, based on the code base for that +// application, /WEB-INF/classes/, or /WEB-INF/lib/ jar files. +// +// Different permissions can be granted to JSP pages, classes loaded from +// the /WEB-INF/classes/ directory, all jar files in the /WEB-INF/lib/ +// directory, or even to individual jar files in the /WEB-INF/lib/ directory. +// +// For instance, assume that the standard "examples" application +// included a JDBC driver that needed to establish a network connection to the +// corresponding database and used the scrape taglib to get the weather from +// the NOAA web server. You might create a "grant" entries like this: +// +// The permissions granted to the context root directory apply to JSP pages. +// grant codeBase "file:${catalina.base}/webapps/examples/-" { +// permission java.net.SocketPermission "dbhost.mycompany.com:5432", "connect"; +// permission java.net.SocketPermission "*.noaa.gov:80", "connect"; +// }; +// +// The permissions granted to the context WEB-INF/classes directory +// grant codeBase "file:${catalina.base}/webapps/examples/WEB-INF/classes/-" { +// }; +// +// The permission granted to your JDBC driver +// grant codeBase "jar:file:${catalina.base}/webapps/examples/WEB-INF/lib/driver.jar!/-" { +// permission java.net.SocketPermission "dbhost.mycompany.com:5432", "connect"; +// }; +// The permission granted to the scrape taglib +// grant codeBase "jar:file:${catalina.base}/webapps/examples/WEB-INF/lib/scrape.jar!/-" { +// permission java.net.SocketPermission "*.noaa.gov:80", "connect"; +// }; + diff --git a/akraino/Servers/Pivotal tc Server Developer Edition v3.2-config/catalina.properties b/akraino/Servers/Pivotal tc Server Developer Edition v3.2-config/catalina.properties new file mode 100644 index 0000000..eba84c2 --- /dev/null +++ b/akraino/Servers/Pivotal tc Server Developer Edition v3.2-config/catalina.properties @@ -0,0 +1,252 @@ + +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# +# List of comma-separated packages that start with or equal this string +# will cause a security exception to be thrown when +# passed to checkPackageAccess unless the +# corresponding RuntimePermission ("accessClassInPackage."+package) has +# been granted. +package.access = \ +sun.,\ +org.apache.catalina.,\ +org.apache.coyote.,\ +org.apache.jasper.,\ +org.apache.naming.resources.,\ +org.apache.tomcat. +# +# List of comma-separated packages that start with or equal this string +# will cause a security exception to be thrown when +# passed to checkPackageDefinition unless the +# corresponding RuntimePermission ("defineClassInPackage."+package) has +# been granted. +# +# by default, no packages are restricted for definition, and none of +# the class loaders supplied with the JDK call checkPackageDefinition. +# +package.definition = \ +sun.,\ +java.,\ +org.apache.catalina.,\ +org.apache.coyote.,\ +org.apache.jasper.,\ +org.apache.naming.,\ +org.apache.tomcat. +# +# List of comma-separated paths defining the contents of the "server" +# classloader. Prefixes should be used to define what is the repository type. +# Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute. +# If left as blank, the "common" loader will be used as Catalina's "server" +# loader. +# Examples: +# "foo": Add this folder as a class repository +# "foo/*.jar": Add all the JARs of the specified folder as class +# repositories +# "foo/bar.jar": Add bar.jar as a class repository +server.loader = +# +# List of comma-separated paths defining the contents of the "shared" +# classloader. Prefixes should be used to define what is the repository type. +# Path may be relative to the CATALINA_BASE path or absolute. If left as blank, +# the "common" loader will be used as Catalina's "shared" loader. +# Examples: +# "foo": Add this folder as a class repository +# "foo/*.jar": Add all the JARs of the specified folder as class +# repositories +# "foo/bar.jar": Add bar.jar as a class repository +# Please note that for single jars, e.g. bar.jar, you need the URL form +# starting with file:. +shared.loader = +# +# String cache configuration. +tomcat.util.buf.StringCache.byte.enabled = true +#tomcat.util.buf.StringCache.char.enabled=true +#tomcat.util.buf.StringCache.trainThreshold=500000 +#tomcat.util.buf.StringCache.cacheSize=5000 + + +#If this property is set to true, the startup phase will +#abort if there is an error during initialization +org.apache.catalina.startup.EXIT_ON_INIT_FAILURE = true +org.apache.tomcat.util.digester.PROPERTY_SOURCE = com.springsource.tcserver.security.PropertyDecoder +com.springsource.tcserver.security.PropertyDecoder.passphrase = springsource +# +# +# List of comma-separated paths defining the contents of the "common" +# classloader. Prefixes should be used to define what is the repository type. +# Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute. +# If left as blank,the JVM system loader will be used as Catalina's "common" +# loader. +# Examples: +# "foo": Add this folder as a class repository +# "foo/*.jar": Add all the JARs of the specified folder as class +# repositories +# "foo/bar.jar": Add bar.jar as a class repository +common.loader = \ +\"${catalina.base}/lib\",\ +\"${catalina.base}/lib/*.jar\",\ +\"${catalina.home}/lib\",\ +\"${catalina.home}/lib/*.jar\" +# List of JAR files that should not be scanned using the JarScanner +# functionality. This is typically used to scan JARs for configuration +# information. JARs that do not contain such information may be excluded from +# the scan to speed up the scanning process. This is the default list. JARs on +# this list are excluded from all scans. Scan specific lists (to exclude JARs +# from individual scans) follow this. The list must be a comma separated list of +# JAR file names. +# The JARs listed below include: +# - Tomcat Bootstrap JARs +# - Tomcat API JARs +# - Catalina JARs +# - Jasper JARs +# - Tomcat JARs +# - Common non-Tomcat JARs +tomcat.util.scan.StandardJarScanFilter.jarsToSkip = \ +annotations-api.jar,\ +ant.jar,\ +ant-junit*.jar,\ +ant-launcher.jar,\ +antlr-*.jar,\ +aopalliance-*.jar,\ +asm-*.jar,\ +aspectj*.jar,\ +bootstrap.jar,\ +catalina.jar,\ +catalina-ant.jar,\ +catalina-jmx-remote.jar,\ +catalina-ha.jar,\ +catalina-storeconfig.jar,\ +catalina-tribes.jar,\ +catalina-ws.jar,\ +cglib-*.jar,\ +cobertura-*.jar,\ +com.springsource.org.apache.tomcat.jdbc.jar,\ +commons-beanutils*.jar,\ +commons-codec*.jar,\ +commons-collections*.jar,\ +commons-daemon.jar,\ +commons-dbcp*.jar,\ +commons-digester*.jar,\ +commons-fileupload*.jar,\ +commons-httpclient*.jar,\ +commons-io*.jar,\ +commons-lang*.jar,\ +commons-logging*.jar,\ +commons-math*.jar,\ +commons-pool*.jar,\ +dom4j-*.jar,\ +ecj-*.jar,\ +ehcache-core-*.jar,\ +el-api.jar,\ +freemarker-*.jar,\ +gemfire-*.jar,\ +geronimo-spec-jaxrpc*.jar,\ +groovy-all-*.jar,\ +h2*.jar,\ +hibernate*.jar,\ +httpclient*.jar,\ +icu4j-*.jar,\ +insight-*.jar,\ +jackson-*.jar,\ +jasper.jar,\ +jasper-el.jar,\ +javassist-*.jar,\ +jaxen-*.jar,\ +jcommon-*.jar,\ +jdom-*.jar,\ +jetty-*.jar,\ +jfreechart-*.jar,\ +jline-*.jar,\ +jmx.jar,\ +jmx-tools.jar,\ +jsp-api.jar,\ +jstl.jar,\ +jta*.jar,\ +junit.jar,\ +junit-*.jar,\ +liquibase-core-*.jar,\ +log4j*.jar,\ +mail*.jar,\ +oro-*.jar,\ +servlet-api.jar,\ +slf4j*.jar,\ +spring-aop-*.jar,\ +spring-asm-*.jar,\ +spring-aspects-*.jar,\ +spring-beans-*.jar,\ +spring-context-*.jar,\ +spring-context-support-*.jar,\ +spring-core-*.jar,\ +spring-expression-*.jar,\ +spring-gemfire-*.jar,\ +spring-instrument-tomcat-*.jar,\ +spring-jdbc-*.jar,\ +spring-js-*.jar,\ +spring-orm-*.jar,\ +spring-security-core-*.jar,\ +spring-security-web-*.jar,\ +spring-tx-*.jar,\ +stax-*.jar,\ +tagsoup-*.jar,\ +tcServer.jar,\ +threaddumpwrapper.jar,\ +tiles-api-*.jar,\ +tiles-core-*.jar,\ +tiles-servlet-*.jar,\ +tomcat-api.jar,\ +tomcat-coyote.jar,\ +tomcat-dbcp.jar,\ +tomcat-i18n-en.jar,\ +tomcat-i18n-es.jar,\ +tomcat-i18n-fr.jar,\ +tomcat-i18n-ja.jar,\ +tomcat-jdbc.jar,\ +tomcat-jni.jar,\ +tomcat-juli.jar,\ +tomcat-juli-adapters.jar,\ +tomcat-spdy.jar,\ +tomcat-util.jar,\ +tomcat-util-scan.jar,\ +tools.jar,\ +websocket-api.jar,\ +wrapper.jar,\ +wsdl4j*.jar,\ +xercesImpl.jar,\ +xml-apis.jar,\ +xmlParserAPIs.jar,\ +xom-*.jar,\ +xpp3_min-*.jar,\ +xstream-*.jar +# Default list of JAR files that should be scanned that overrides the default +# jarsToSkip list above. This is typically used to include a specific JAR that +# has been excluded by a broad file name pattern in the jarsToSkip list. +# The list of JARs to scan may be over-ridden at a Context level for individual +# scan types by configuring a JarScanner with a nested JarScanFilter. +tomcat.util.scan.StandardJarScanFilter.jarsToScan = \ +log4j-core*.jar,\ +log4j-taglib*.jar +# Additional JARs (over and above the default JARs listed above) to skip when +# scanning for Servlet 3.0 pluggability features. These features include web +# fragments, annotations, SCIs and classes that match @HandlesTypes. The list +# must be a comma separated list of JAR file names. +org.apache.catalina.startup.ContextConfig.jarsToSkip = +# Additional JARs (over and above the default JARs listed above) to skip when +# scanning for TLDs. The list must be a comma separated list of JAR file names. +org.apache.catalina.startup.TldConfig.jarsToSkip = +base.shutdown.port=-1 +base.jmx.port=6969 +nio.http.port=8080 +nio.https.port=8443 diff --git a/akraino/Servers/Pivotal tc Server Developer Edition v3.2-config/context.xml b/akraino/Servers/Pivotal tc Server Developer Edition v3.2-config/context.xml new file mode 100644 index 0000000..c0f82a5 --- /dev/null +++ b/akraino/Servers/Pivotal tc Server Developer Edition v3.2-config/context.xml @@ -0,0 +1,15 @@ + + + + WEB-INF/web.xml + + + + + ${catalina.base}/conf/web.xml + \ No newline at end of file diff --git a/akraino/Servers/Pivotal tc Server Developer Edition v3.2-config/jmxremote.access b/akraino/Servers/Pivotal tc Server Developer Edition v3.2-config/jmxremote.access new file mode 100644 index 0000000..2320c39 --- /dev/null +++ b/akraino/Servers/Pivotal tc Server Developer Edition v3.2-config/jmxremote.access @@ -0,0 +1,2 @@ +#admin readonly +admin readwrite diff --git a/akraino/Servers/Pivotal tc Server Developer Edition v3.2-config/jmxremote.password b/akraino/Servers/Pivotal tc Server Developer Edition v3.2-config/jmxremote.password new file mode 100644 index 0000000..33ea195 --- /dev/null +++ b/akraino/Servers/Pivotal tc Server Developer Edition v3.2-config/jmxremote.password @@ -0,0 +1,2 @@ +# For security reasons the "admin" role has a random password unless the property is overridden at instance creation time. +admin esytfjtuhtvgnvfifgwakfldlqwgvobtgohmufe diff --git a/akraino/Servers/Pivotal tc Server Developer Edition v3.2-config/server.xml b/akraino/Servers/Pivotal tc Server Developer Edition v3.2-config/server.xml new file mode 100644 index 0000000..c818dc2 --- /dev/null +++ b/akraino/Servers/Pivotal tc Server Developer Edition v3.2-config/server.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/akraino/Servers/Pivotal tc Server Developer Edition v3.2-config/tomcat-users.xml b/akraino/Servers/Pivotal tc Server Developer Edition v3.2-config/tomcat-users.xml new file mode 100644 index 0000000..84efcd8 --- /dev/null +++ b/akraino/Servers/Pivotal tc Server Developer Edition v3.2-config/tomcat-users.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/akraino/Servers/Pivotal tc Server Developer Edition v3.2-config/web.xml b/akraino/Servers/Pivotal tc Server Developer Edition v3.2-config/web.xml new file mode 100644 index 0000000..8e18a73 --- /dev/null +++ b/akraino/Servers/Pivotal tc Server Developer Edition v3.2-config/web.xml @@ -0,0 +1,4548 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + default + org.apache.catalina.servlets.DefaultServlet + + debug + 0 + + + listings + false + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + jsp + org.apache.jasper.servlet.JspServlet + + fork + false + + + xpoweredBy + false + + 3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + default + / + + + + jsp + *.jsp + *.jspx + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 30 + + + + + + + + + + 123 + application/vnd.lotus-1-2-3 + + + 3dml + text/vnd.in3d.3dml + + + 3ds + image/x-3ds + + + 3g2 + video/3gpp2 + + + 3gp + video/3gpp + + + 7z + application/x-7z-compressed + + + aab + application/x-authorware-bin + + + aac + audio/x-aac + + + aam + application/x-authorware-map + + + aas + application/x-authorware-seg + + + abs + audio/x-mpeg + + + abw + application/x-abiword + + + ac + application/pkix-attr-cert + + + acc + application/vnd.americandynamics.acc + + + ace + application/x-ace-compressed + + + acu + application/vnd.acucobol + + + acutc + application/vnd.acucorp + + + adp + audio/adpcm + + + aep + application/vnd.audiograph + + + afm + application/x-font-type1 + + + afp + application/vnd.ibm.modcap + + + ahead + application/vnd.ahead.space + + + ai + application/postscript + + + aif + audio/x-aiff + + + aifc + audio/x-aiff + + + aiff + audio/x-aiff + + + aim + application/x-aim + + + air + application/vnd.adobe.air-application-installer-package+zip + + + ait + application/vnd.dvb.ait + + + ami + application/vnd.amiga.ami + + + anx + application/annodex + + + apk + application/vnd.android.package-archive + + + appcache + text/cache-manifest + + + application + application/x-ms-application + + + apr + application/vnd.lotus-approach + + + arc + application/x-freearc + + + art + image/x-jg + + + asc + application/pgp-signature + + + asf + video/x-ms-asf + + + asm + text/x-asm + + + aso + application/vnd.accpac.simply.aso + + + asx + video/x-ms-asf + + + atc + application/vnd.acucorp + + + atom + application/atom+xml + + + atomcat + application/atomcat+xml + + + atomsvc + application/atomsvc+xml + + + atx + application/vnd.antix.game-component + + + au + audio/basic + + + avi + video/x-msvideo + + + avx + video/x-rad-screenplay + + + aw + application/applixware + + + axa + audio/annodex + + + axv + video/annodex + + + azf + application/vnd.airzip.filesecure.azf + + + azs + application/vnd.airzip.filesecure.azs + + + azw + application/vnd.amazon.ebook + + + bat + application/x-msdownload + + + bcpio + application/x-bcpio + + + bdf + application/x-font-bdf + + + bdm + application/vnd.syncml.dm+wbxml + + + bed + application/vnd.realvnc.bed + + + bh2 + application/vnd.fujitsu.oasysprs + + + bin + application/octet-stream + + + blb + application/x-blorb + + + blorb + application/x-blorb + + + bmi + application/vnd.bmi + + + bmp + image/bmp + + + body + text/html + + + book + application/vnd.framemaker + + + box + application/vnd.previewsystems.box + + + boz + application/x-bzip2 + + + bpk + application/octet-stream + + + btif + image/prs.btif + + + bz + application/x-bzip + + + bz2 + application/x-bzip2 + + + c + text/x-c + + + c11amc + application/vnd.cluetrust.cartomobile-config + + + c11amz + application/vnd.cluetrust.cartomobile-config-pkg + + + c4d + application/vnd.clonk.c4group + + + c4f + application/vnd.clonk.c4group + + + c4g + application/vnd.clonk.c4group + + + c4p + application/vnd.clonk.c4group + + + c4u + application/vnd.clonk.c4group + + + cab + application/vnd.ms-cab-compressed + + + caf + audio/x-caf + + + cap + application/vnd.tcpdump.pcap + + + car + application/vnd.curl.car + + + cat + application/vnd.ms-pki.seccat + + + cb7 + application/x-cbr + + + cba + application/x-cbr + + + cbr + application/x-cbr + + + cbt + application/x-cbr + + + cbz + application/x-cbr + + + cc + text/x-c + + + cct + application/x-director + + + ccxml + application/ccxml+xml + + + cdbcmsg + application/vnd.contact.cmsg + + + cdf + application/x-cdf + + + cdkey + application/vnd.mediastation.cdkey + + + cdmia + application/cdmi-capability + + + cdmic + application/cdmi-container + + + cdmid + application/cdmi-domain + + + cdmio + application/cdmi-object + + + cdmiq + application/cdmi-queue + + + cdx + chemical/x-cdx + + + cdxml + application/vnd.chemdraw+xml + + + cdy + application/vnd.cinderella + + + cer + application/pkix-cert + + + cfs + application/x-cfs-compressed + + + cgm + image/cgm + + + chat + application/x-chat + + + chm + application/vnd.ms-htmlhelp + + + chrt + application/vnd.kde.kchart + + + cif + chemical/x-cif + + + cii + application/vnd.anser-web-certificate-issue-initiation + + + cil + application/vnd.ms-artgalry + + + cla + application/vnd.claymore + + + class + application/java + + + clkk + application/vnd.crick.clicker.keyboard + + + clkp + application/vnd.crick.clicker.palette + + + clkt + application/vnd.crick.clicker.template + + + clkw + application/vnd.crick.clicker.wordbank + + + clkx + application/vnd.crick.clicker + + + clp + application/x-msclip + + + cmc + application/vnd.cosmocaller + + + cmdf + chemical/x-cmdf + + + cml + chemical/x-cml + + + cmp + application/vnd.yellowriver-custom-menu + + + cmx + image/x-cmx + + + cod + application/vnd.rim.cod + + + com + application/x-msdownload + + + conf + text/plain + + + cpio + application/x-cpio + + + cpp + text/x-c + + + cpt + application/mac-compactpro + + + crd + application/x-mscardfile + + + crl + application/pkix-crl + + + crt + application/x-x509-ca-cert + + + cryptonote + application/vnd.rig.cryptonote + + + csh + application/x-csh + + + csml + chemical/x-csml + + + csp + application/vnd.commonspace + + + css + text/css + + + cst + application/x-director + + + csv + text/csv + + + cu + application/cu-seeme + + + curl + text/vnd.curl + + + cww + application/prs.cww + + + cxt + application/x-director + + + cxx + text/x-c + + + dae + model/vnd.collada+xml + + + daf + application/vnd.mobius.daf + + + dart + application/vnd.dart + + + dataless + application/vnd.fdsn.seed + + + davmount + application/davmount+xml + + + dbk + application/docbook+xml + + + dcr + application/x-director + + + dcurl + text/vnd.curl.dcurl + + + dd2 + application/vnd.oma.dd2+xml + + + ddd + application/vnd.fujixerox.ddd + + + deb + application/x-debian-package + + + def + text/plain + + + deploy + application/octet-stream + + + der + application/x-x509-ca-cert + + + dfac + application/vnd.dreamfactory + + + dgc + application/x-dgc-compressed + + + dib + image/bmp + + + dic + text/x-c + + + dir + application/x-director + + + dis + application/vnd.mobius.dis + + + dist + application/octet-stream + + + distz + application/octet-stream + + + djv + image/vnd.djvu + + + djvu + image/vnd.djvu + + + dll + application/x-msdownload + + + dmg + application/x-apple-diskimage + + + dmp + application/vnd.tcpdump.pcap + + + dms + application/octet-stream + + + dna + application/vnd.dna + + + doc + application/msword + + + docm + application/vnd.ms-word.document.macroenabled.12 + + + docx + application/vnd.openxmlformats-officedocument.wordprocessingml.document + + + dot + application/msword + + + dotm + application/vnd.ms-word.template.macroenabled.12 + + + dotx + application/vnd.openxmlformats-officedocument.wordprocessingml.template + + + dp + application/vnd.osgi.dp + + + dpg + application/vnd.dpgraph + + + dra + audio/vnd.dra + + + dsc + text/prs.lines.tag + + + dssc + application/dssc+der + + + dtb + application/x-dtbook+xml + + + dtd + application/xml-dtd + + + dts + audio/vnd.dts + + + dtshd + audio/vnd.dts.hd + + + dump + application/octet-stream + + + dv + video/x-dv + + + dvb + video/vnd.dvb.file + + + dvi + application/x-dvi + + + dwf + model/vnd.dwf + + + dwg + image/vnd.dwg + + + dxf + image/vnd.dxf + + + dxp + application/vnd.spotfire.dxp + + + dxr + application/x-director + + + ecelp4800 + audio/vnd.nuera.ecelp4800 + + + ecelp7470 + audio/vnd.nuera.ecelp7470 + + + ecelp9600 + audio/vnd.nuera.ecelp9600 + + + ecma + application/ecmascript + + + edm + application/vnd.novadigm.edm + + + edx + application/vnd.novadigm.edx + + + efif + application/vnd.picsel + + + ei6 + application/vnd.pg.osasli + + + elc + application/octet-stream + + + emf + application/x-msmetafile + + + eml + message/rfc822 + + + emma + application/emma+xml + + + emz + application/x-msmetafile + + + eol + audio/vnd.digital-winds + + + eot + application/vnd.ms-fontobject + + + eps + application/postscript + + + epub + application/epub+zip + + + es3 + application/vnd.eszigno3+xml + + + esa + application/vnd.osgi.subsystem + + + esf + application/vnd.epson.esf + + + et3 + application/vnd.eszigno3+xml + + + etx + text/x-setext + + + eva + application/x-eva + + + evy + application/x-envoy + + + exe + application/octet-stream + + + exi + application/exi + + + ext + application/vnd.novadigm.ext + + + ez + application/andrew-inset + + + ez2 + application/vnd.ezpix-album + + + ez3 + application/vnd.ezpix-package + + + f + text/x-fortran + + + f4v + video/x-f4v + + + f77 + text/x-fortran + + + f90 + text/x-fortran + + + fbs + image/vnd.fastbidsheet + + + fcdt + application/vnd.adobe.formscentral.fcdt + + + fcs + application/vnd.isac.fcs + + + fdf + application/vnd.fdf + + + fe_launch + application/vnd.denovo.fcselayout-link + + + fg5 + application/vnd.fujitsu.oasysgp + + + fgd + application/x-director + + + fh + image/x-freehand + + + fh4 + image/x-freehand + + + fh5 + image/x-freehand + + + fh7 + image/x-freehand + + + fhc + image/x-freehand + + + fig + application/x-xfig + + + flac + audio/flac + + + fli + video/x-fli + + + flo + application/vnd.micrografx.flo + + + flv + video/x-flv + + + flw + application/vnd.kde.kivio + + + flx + text/vnd.fmi.flexstor + + + fly + text/vnd.fly + + + fm + application/vnd.framemaker + + + fnc + application/vnd.frogans.fnc + + + for + text/x-fortran + + + fpx + image/vnd.fpx + + + frame + application/vnd.framemaker + + + fsc + application/vnd.fsc.weblaunch + + + fst + image/vnd.fst + + + ftc + application/vnd.fluxtime.clip + + + fti + application/vnd.anser-web-funds-transfer-initiation + + + fvt + video/vnd.fvt + + + fxp + application/vnd.adobe.fxp + + + fxpl + application/vnd.adobe.fxp + + + fzs + application/vnd.fuzzysheet + + + g2w + application/vnd.geoplan + + + g3 + image/g3fax + + + g3w + application/vnd.geospace + + + gac + application/vnd.groove-account + + + gam + application/x-tads + + + gbr + application/rpki-ghostbusters + + + gca + application/x-gca-compressed + + + gdl + model/vnd.gdl + + + geo + application/vnd.dynageo + + + gex + application/vnd.geometry-explorer + + + ggb + application/vnd.geogebra.file + + + ggt + application/vnd.geogebra.tool + + + ghf + application/vnd.groove-help + + + gif + image/gif + + + gim + application/vnd.groove-identity-message + + + gml + application/gml+xml + + + gmx + application/vnd.gmx + + + gnumeric + application/x-gnumeric + + + gph + application/vnd.flographit + + + gpx + application/gpx+xml + + + gqf + application/vnd.grafeq + + + gqs + application/vnd.grafeq + + + gram + application/srgs + + + gramps + application/x-gramps-xml + + + gre + application/vnd.geometry-explorer + + + grv + application/vnd.groove-injector + + + grxml + application/srgs+xml + + + gsf + application/x-font-ghostscript + + + gtar + application/x-gtar + + + gtm + application/vnd.groove-tool-message + + + gtw + model/vnd.gtw + + + gv + text/vnd.graphviz + + + gxf + application/gxf + + + gxt + application/vnd.geonext + + + gz + application/x-gzip + + + h + text/x-c + + + h261 + video/h261 + + + h263 + video/h263 + + + h264 + video/h264 + + + hal + application/vnd.hal+xml + + + hbci + application/vnd.hbci + + + hdf + application/x-hdf + + + hh + text/x-c + + + hlp + application/winhlp + + + hpgl + application/vnd.hp-hpgl + + + hpid + application/vnd.hp-hpid + + + hps + application/vnd.hp-hps + + + hqx + application/mac-binhex40 + + + htc + text/x-component + + + htke + application/vnd.kenameaapp + + + htm + text/html + + + html + text/html + + + hvd + application/vnd.yamaha.hv-dic + + + hvp + application/vnd.yamaha.hv-voice + + + hvs + application/vnd.yamaha.hv-script + + + i2g + application/vnd.intergeo + + + icc + application/vnd.iccprofile + + + ice + x-conference/x-cooltalk + + + icm + application/vnd.iccprofile + + + ico + image/x-icon + + + ics + text/calendar + + + ief + image/ief + + + ifb + text/calendar + + + ifm + application/vnd.shana.informed.formdata + + + iges + model/iges + + + igl + application/vnd.igloader + + + igm + application/vnd.insors.igm + + + igs + model/iges + + + igx + application/vnd.micrografx.igx + + + iif + application/vnd.shana.informed.interchange + + + imp + application/vnd.accpac.simply.imp + + + ims + application/vnd.ms-ims + + + in + text/plain + + + ink + application/inkml+xml + + + inkml + application/inkml+xml + + + install + application/x-install-instructions + + + iota + application/vnd.astraea-software.iota + + + ipfix + application/ipfix + + + ipk + application/vnd.shana.informed.package + + + irm + application/vnd.ibm.rights-management + + + irp + application/vnd.irepository.package+xml + + + iso + application/x-iso9660-image + + + itp + application/vnd.shana.informed.formtemplate + + + ivp + application/vnd.immervision-ivp + + + ivu + application/vnd.immervision-ivu + + + jad + text/vnd.sun.j2me.app-descriptor + + + jam + application/vnd.jam + + + jar + application/java-archive + + + java + text/x-java-source + + + jisp + application/vnd.jisp + + + jlt + application/vnd.hp-jlyt + + + jnlp + application/x-java-jnlp-file + + + joda + application/vnd.joost.joda-archive + + + jpe + image/jpeg + + + jpeg + image/jpeg + + + jpg + image/jpeg + + + jpgm + video/jpm + + + jpgv + video/jpeg + + + jpm + video/jpm + + + js + application/javascript + + + jsf + text/plain + + + json + application/json + + + jsonml + application/jsonml+json + + + jspf + text/plain + + + kar + audio/midi + + + karbon + application/vnd.kde.karbon + + + kfo + application/vnd.kde.kformula + + + kia + application/vnd.kidspiration + + + kml + application/vnd.google-earth.kml+xml + + + kmz + application/vnd.google-earth.kmz + + + kne + application/vnd.kinar + + + knp + application/vnd.kinar + + + kon + application/vnd.kde.kontour + + + kpr + application/vnd.kde.kpresenter + + + kpt + application/vnd.kde.kpresenter + + + kpxx + application/vnd.ds-keypoint + + + ksp + application/vnd.kde.kspread + + + ktr + application/vnd.kahootz + + + ktx + image/ktx + + + ktz + application/vnd.kahootz + + + kwd + application/vnd.kde.kword + + + kwt + application/vnd.kde.kword + + + lasxml + application/vnd.las.las+xml + + + latex + application/x-latex + + + lbd + application/vnd.llamagraphics.life-balance.desktop + + + lbe + application/vnd.llamagraphics.life-balance.exchange+xml + + + les + application/vnd.hhe.lesson-player + + + lha + application/x-lzh-compressed + + + link66 + application/vnd.route66.link66+xml + + + list + text/plain + + + list3820 + application/vnd.ibm.modcap + + + listafp + application/vnd.ibm.modcap + + + lnk + application/x-ms-shortcut + + + log + text/plain + + + lostxml + application/lost+xml + + + lrf + application/octet-stream + + + lrm + application/vnd.ms-lrm + + + ltf + application/vnd.frogans.ltf + + + lvp + audio/vnd.lucent.voice + + + lwp + application/vnd.lotus-wordpro + + + lzh + application/x-lzh-compressed + + + m13 + application/x-msmediaview + + + m14 + application/x-msmediaview + + + m1v + video/mpeg + + + m21 + application/mp21 + + + m2a + audio/mpeg + + + m2v + video/mpeg + + + m3a + audio/mpeg + + + m3u + audio/x-mpegurl + + + m3u8 + application/vnd.apple.mpegurl + + + m4a + audio/mp4 + + + m4b + audio/mp4 + + + m4r + audio/mp4 + + + m4u + video/vnd.mpegurl + + + m4v + video/mp4 + + + ma + application/mathematica + + + mac + image/x-macpaint + + + mads + application/mads+xml + + + mag + application/vnd.ecowin.chart + + + maker + application/vnd.framemaker + + + man + text/troff + + + mar + application/octet-stream + + + mathml + application/mathml+xml + + + mb + application/mathematica + + + mbk + application/vnd.mobius.mbk + + + mbox + application/mbox + + + mc1 + application/vnd.medcalcdata + + + mcd + application/vnd.mcd + + + mcurl + text/vnd.curl.mcurl + + + mdb + application/x-msaccess + + + mdi + image/vnd.ms-modi + + + me + text/troff + + + mesh + model/mesh + + + meta4 + application/metalink4+xml + + + metalink + application/metalink+xml + + + mets + application/mets+xml + + + mfm + application/vnd.mfmp + + + mft + application/rpki-manifest + + + mgp + application/vnd.osgeo.mapguide.package + + + mgz + application/vnd.proteus.magazine + + + mid + audio/midi + + + midi + audio/midi + + + mie + application/x-mie + + + mif + application/x-mif + + + mime + message/rfc822 + + + mj2 + video/mj2 + + + mjp2 + video/mj2 + + + mk3d + video/x-matroska + + + mka + audio/x-matroska + + + mks + video/x-matroska + + + mkv + video/x-matroska + + + mlp + application/vnd.dolby.mlp + + + mmd + application/vnd.chipnuts.karaoke-mmd + + + mmf + application/vnd.smaf + + + mmr + image/vnd.fujixerox.edmics-mmr + + + mng + video/x-mng + + + mny + application/x-msmoney + + + mobi + application/x-mobipocket-ebook + + + mods + application/mods+xml + + + mov + video/quicktime + + + movie + video/x-sgi-movie + + + mp1 + audio/mpeg + + + mp2 + audio/mpeg + + + mp21 + application/mp21 + + + mp2a + audio/mpeg + + + mp3 + audio/mpeg + + + mp4 + video/mp4 + + + mp4a + audio/mp4 + + + mp4s + application/mp4 + + + mp4v + video/mp4 + + + mpa + audio/mpeg + + + mpc + application/vnd.mophun.certificate + + + mpe + video/mpeg + + + mpeg + video/mpeg + + + mpega + audio/x-mpeg + + + mpg + video/mpeg + + + mpg4 + video/mp4 + + + mpga + audio/mpeg + + + mpkg + application/vnd.apple.installer+xml + + + mpm + application/vnd.blueice.multipass + + + mpn + application/vnd.mophun.application + + + mpp + application/vnd.ms-project + + + mpt + application/vnd.ms-project + + + mpv2 + video/mpeg2 + + + mpy + application/vnd.ibm.minipay + + + mqy + application/vnd.mobius.mqy + + + mrc + application/marc + + + mrcx + application/marcxml+xml + + + ms + text/troff + + + mscml + application/mediaservercontrol+xml + + + mseed + application/vnd.fdsn.mseed + + + mseq + application/vnd.mseq + + + msf + application/vnd.epson.msf + + + msh + model/mesh + + + msi + application/x-msdownload + + + msl + application/vnd.mobius.msl + + + msty + application/vnd.muvee.style + + + mts + model/vnd.mts + + + mus + application/vnd.musician + + + musicxml + application/vnd.recordare.musicxml+xml + + + mvb + application/x-msmediaview + + + mwf + application/vnd.mfer + + + mxf + application/mxf + + + mxl + application/vnd.recordare.musicxml + + + mxml + application/xv+xml + + + mxs + application/vnd.triscape.mxs + + + mxu + video/vnd.mpegurl + + + n-gage + application/vnd.nokia.n-gage.symbian.install + + + n3 + text/n3 + + + nb + application/mathematica + + + nbp + application/vnd.wolfram.player + + + nc + application/x-netcdf + + + ncx + application/x-dtbncx+xml + + + nfo + text/x-nfo + + + ngdat + application/vnd.nokia.n-gage.data + + + nitf + application/vnd.nitf + + + nlu + application/vnd.neurolanguage.nlu + + + nml + application/vnd.enliven + + + nnd + application/vnd.noblenet-directory + + + nns + application/vnd.noblenet-sealer + + + nnw + application/vnd.noblenet-web + + + npx + image/vnd.net-fpx + + + nsc + application/x-conference + + + nsf + application/vnd.lotus-notes + + + ntf + application/vnd.nitf + + + nzb + application/x-nzb + + + oa2 + application/vnd.fujitsu.oasys2 + + + oa3 + application/vnd.fujitsu.oasys3 + + + oas + application/vnd.fujitsu.oasys + + + obd + application/x-msbinder + + + obj + application/x-tgif + + + oda + application/oda + + + + odb + application/vnd.oasis.opendocument.database + + + + odc + application/vnd.oasis.opendocument.chart + + + + odf + application/vnd.oasis.opendocument.formula + + + odft + application/vnd.oasis.opendocument.formula-template + + + + odg + application/vnd.oasis.opendocument.graphics + + + + odi + application/vnd.oasis.opendocument.image + + + + odm + application/vnd.oasis.opendocument.text-master + + + + odp + application/vnd.oasis.opendocument.presentation + + + + ods + application/vnd.oasis.opendocument.spreadsheet + + + + odt + application/vnd.oasis.opendocument.text + + + oga + audio/ogg + + + ogg + audio/ogg + + + ogv + video/ogg + + + + ogx + application/ogg + + + omdoc + application/omdoc+xml + + + onepkg + application/onenote + + + onetmp + application/onenote + + + onetoc + application/onenote + + + onetoc2 + application/onenote + + + opf + application/oebps-package+xml + + + opml + text/x-opml + + + oprc + application/vnd.palm + + + org + application/vnd.lotus-organizer + + + osf + application/vnd.yamaha.openscoreformat + + + osfpvg + application/vnd.yamaha.openscoreformat.osfpvg+xml + + + otc + application/vnd.oasis.opendocument.chart-template + + + otf + application/x-font-otf + + + + otg + application/vnd.oasis.opendocument.graphics-template + + + + oth + application/vnd.oasis.opendocument.text-web + + + oti + application/vnd.oasis.opendocument.image-template + + + + otp + application/vnd.oasis.opendocument.presentation-template + + + + ots + application/vnd.oasis.opendocument.spreadsheet-template + + + + ott + application/vnd.oasis.opendocument.text-template + + + oxps + application/oxps + + + oxt + application/vnd.openofficeorg.extension + + + p + text/x-pascal + + + p10 + application/pkcs10 + + + p12 + application/x-pkcs12 + + + p7b + application/x-pkcs7-certificates + + + p7c + application/pkcs7-mime + + + p7m + application/pkcs7-mime + + + p7r + application/x-pkcs7-certreqresp + + + p7s + application/pkcs7-signature + + + p8 + application/pkcs8 + + + pas + text/x-pascal + + + paw + application/vnd.pawaafile + + + pbd + application/vnd.powerbuilder6 + + + pbm + image/x-portable-bitmap + + + pcap + application/vnd.tcpdump.pcap + + + pcf + application/x-font-pcf + + + pcl + application/vnd.hp-pcl + + + pclxl + application/vnd.hp-pclxl + + + pct + image/pict + + + pcurl + application/vnd.curl.pcurl + + + pcx + image/x-pcx + + + pdb + application/vnd.palm + + + pdf + application/pdf + + + pfa + application/x-font-type1 + + + pfb + application/x-font-type1 + + + pfm + application/x-font-type1 + + + pfr + application/font-tdpfr + + + pfx + application/x-pkcs12 + + + pgm + image/x-portable-graymap + + + pgn + application/x-chess-pgn + + + pgp + application/pgp-encrypted + + + pic + image/pict + + + pict + image/pict + + + pkg + application/octet-stream + + + pki + application/pkixcmp + + + pkipath + application/pkix-pkipath + + + plb + application/vnd.3gpp.pic-bw-large + + + plc + application/vnd.mobius.plc + + + plf + application/vnd.pocketlearn + + + pls + audio/x-scpls + + + pml + application/vnd.ctc-posml + + + png + image/png + + + pnm + image/x-portable-anymap + + + pnt + image/x-macpaint + + + portpkg + application/vnd.macports.portpkg + + + pot + application/vnd.ms-powerpoint + + + potm + application/vnd.ms-powerpoint.template.macroenabled.12 + + + potx + application/vnd.openxmlformats-officedocument.presentationml.template + + + ppam + application/vnd.ms-powerpoint.addin.macroenabled.12 + + + ppd + application/vnd.cups-ppd + + + ppm + image/x-portable-pixmap + + + pps + application/vnd.ms-powerpoint + + + ppsm + application/vnd.ms-powerpoint.slideshow.macroenabled.12 + + + ppsx + application/vnd.openxmlformats-officedocument.presentationml.slideshow + + + ppt + application/vnd.ms-powerpoint + + + pptm + application/vnd.ms-powerpoint.presentation.macroenabled.12 + + + pptx + application/vnd.openxmlformats-officedocument.presentationml.presentation + + + pqa + application/vnd.palm + + + prc + application/x-mobipocket-ebook + + + pre + application/vnd.lotus-freelance + + + prf + application/pics-rules + + + ps + application/postscript + + + psb + application/vnd.3gpp.pic-bw-small + + + psd + image/vnd.adobe.photoshop + + + psf + application/x-font-linux-psf + + + pskcxml + application/pskc+xml + + + ptid + application/vnd.pvi.ptid1 + + + pub + application/x-mspublisher + + + pvb + application/vnd.3gpp.pic-bw-var + + + pwn + application/vnd.3m.post-it-notes + + + pya + audio/vnd.ms-playready.media.pya + + + pyv + video/vnd.ms-playready.media.pyv + + + qam + application/vnd.epson.quickanime + + + qbo + application/vnd.intu.qbo + + + qfx + application/vnd.intu.qfx + + + qps + application/vnd.publishare-delta-tree + + + qt + video/quicktime + + + qti + image/x-quicktime + + + qtif + image/x-quicktime + + + qwd + application/vnd.quark.quarkxpress + + + qwt + application/vnd.quark.quarkxpress + + + qxb + application/vnd.quark.quarkxpress + + + qxd + application/vnd.quark.quarkxpress + + + qxl + application/vnd.quark.quarkxpress + + + qxt + application/vnd.quark.quarkxpress + + + ra + audio/x-pn-realaudio + + + ram + audio/x-pn-realaudio + + + rar + application/x-rar-compressed + + + ras + image/x-cmu-raster + + + rcprofile + application/vnd.ipunplugged.rcprofile + + + rdf + application/rdf+xml + + + rdz + application/vnd.data-vision.rdz + + + rep + application/vnd.businessobjects + + + res + application/x-dtbresource+xml + + + rgb + image/x-rgb + + + rif + application/reginfo+xml + + + rip + audio/vnd.rip + + + ris + application/x-research-info-systems + + + rl + application/resource-lists+xml + + + rlc + image/vnd.fujixerox.edmics-rlc + + + rld + application/resource-lists-diff+xml + + + rm + application/vnd.rn-realmedia + + + rmi + audio/midi + + + rmp + audio/x-pn-realaudio-plugin + + + rms + application/vnd.jcp.javame.midlet-rms + + + rmvb + application/vnd.rn-realmedia-vbr + + + rnc + application/relax-ng-compact-syntax + + + roa + application/rpki-roa + + + roff + text/troff + + + rp9 + application/vnd.cloanto.rp9 + + + rpss + application/vnd.nokia.radio-presets + + + rpst + application/vnd.nokia.radio-preset + + + rq + application/sparql-query + + + rs + application/rls-services+xml + + + rsd + application/rsd+xml + + + rss + application/rss+xml + + + rtf + application/rtf + + + rtx + text/richtext + + + s + text/x-asm + + + s3m + audio/s3m + + + saf + application/vnd.yamaha.smaf-audio + + + sbml + application/sbml+xml + + + sc + application/vnd.ibm.secure-container + + + scd + application/x-msschedule + + + scm + application/vnd.lotus-screencam + + + scq + application/scvp-cv-request + + + scs + application/scvp-cv-response + + + scurl + text/vnd.curl.scurl + + + sda + application/vnd.stardivision.draw + + + sdc + application/vnd.stardivision.calc + + + sdd + application/vnd.stardivision.impress + + + sdkd + application/vnd.solent.sdkm+xml + + + sdkm + application/vnd.solent.sdkm+xml + + + sdp + application/sdp + + + sdw + application/vnd.stardivision.writer + + + see + application/vnd.seemail + + + seed + application/vnd.fdsn.seed + + + sema + application/vnd.sema + + + semd + application/vnd.semd + + + semf + application/vnd.semf + + + ser + application/java-serialized-object + + + setpay + application/set-payment-initiation + + + setreg + application/set-registration-initiation + + + sfd-hdstx + application/vnd.hydrostatix.sof-data + + + sfs + application/vnd.spotfire.sfs + + + sfv + text/x-sfv + + + sgi + image/sgi + + + sgl + application/vnd.stardivision.writer-global + + + sgm + text/sgml + + + sgml + text/sgml + + + sh + application/x-sh + + + shar + application/x-shar + + + shf + application/shf+xml + + + + sid + image/x-mrsid-image + + + sig + application/pgp-signature + + + sil + audio/silk + + + silo + model/mesh + + + sis + application/vnd.symbian.install + + + sisx + application/vnd.symbian.install + + + sit + application/x-stuffit + + + sitx + application/x-stuffitx + + + skd + application/vnd.koan + + + skm + application/vnd.koan + + + skp + application/vnd.koan + + + skt + application/vnd.koan + + + sldm + application/vnd.ms-powerpoint.slide.macroenabled.12 + + + sldx + application/vnd.openxmlformats-officedocument.presentationml.slide + + + slt + application/vnd.epson.salt + + + sm + application/vnd.stepmania.stepchart + + + smf + application/vnd.stardivision.math + + + smi + application/smil+xml + + + smil + application/smil+xml + + + smv + video/x-smv + + + smzip + application/vnd.stepmania.package + + + snd + audio/basic + + + snf + application/x-font-snf + + + so + application/octet-stream + + + spc + application/x-pkcs7-certificates + + + spf + application/vnd.yamaha.smaf-phrase + + + spl + application/x-futuresplash + + + spot + text/vnd.in3d.spot + + + spp + application/scvp-vp-response + + + spq + application/scvp-vp-request + + + spx + audio/ogg + + + sql + application/x-sql + + + src + application/x-wais-source + + + srt + application/x-subrip + + + sru + application/sru+xml + + + srx + application/sparql-results+xml + + + ssdl + application/ssdl+xml + + + sse + application/vnd.kodak-descriptor + + + ssf + application/vnd.epson.ssf + + + ssml + application/ssml+xml + + + st + application/vnd.sailingtracker.track + + + stc + application/vnd.sun.xml.calc.template + + + std + application/vnd.sun.xml.draw.template + + + stf + application/vnd.wt.stf + + + sti + application/vnd.sun.xml.impress.template + + + stk + application/hyperstudio + + + stl + application/vnd.ms-pki.stl + + + str + application/vnd.pg.format + + + stw + application/vnd.sun.xml.writer.template + + + sub + text/vnd.dvb.subtitle + + + sus + application/vnd.sus-calendar + + + susp + application/vnd.sus-calendar + + + sv4cpio + application/x-sv4cpio + + + sv4crc + application/x-sv4crc + + + svc + application/vnd.dvb.service + + + svd + application/vnd.svd + + + svg + image/svg+xml + + + svgz + image/svg+xml + + + swa + application/x-director + + + swf + application/x-shockwave-flash + + + swi + application/vnd.aristanetworks.swi + + + sxc + application/vnd.sun.xml.calc + + + sxd + application/vnd.sun.xml.draw + + + sxg + application/vnd.sun.xml.writer.global + + + sxi + application/vnd.sun.xml.impress + + + sxm + application/vnd.sun.xml.math + + + sxw + application/vnd.sun.xml.writer + + + t + text/troff + + + t3 + application/x-t3vm-image + + + taglet + application/vnd.mynfc + + + tao + application/vnd.tao.intent-module-archive + + + tar + application/x-tar + + + tcap + application/vnd.3gpp2.tcap + + + tcl + application/x-tcl + + + teacher + application/vnd.smart.teacher + + + tei + application/tei+xml + + + teicorpus + application/tei+xml + + + tex + application/x-tex + + + texi + application/x-texinfo + + + texinfo + application/x-texinfo + + + text + text/plain + + + tfi + application/thraud+xml + + + tfm + application/x-tex-tfm + + + tga + image/x-tga + + + thmx + application/vnd.ms-officetheme + + + tif + image/tiff + + + tiff + image/tiff + + + tmo + application/vnd.tmobile-livetv + + + torrent + application/x-bittorrent + + + tpl + application/vnd.groove-tool-template + + + tpt + application/vnd.trid.tpt + + + tr + text/troff + + + tra + application/vnd.trueapp + + + trm + application/x-msterminal + + + tsd + application/timestamped-data + + + tsv + text/tab-separated-values + + + ttc + application/x-font-ttf + + + ttf + application/x-font-ttf + + + ttl + text/turtle + + + twd + application/vnd.simtech-mindmapper + + + twds + application/vnd.simtech-mindmapper + + + txd + application/vnd.genomatix.tuxedo + + + txf + application/vnd.mobius.txf + + + txt + text/plain + + + u32 + application/x-authorware-bin + + + udeb + application/x-debian-package + + + ufd + application/vnd.ufdl + + + ufdl + application/vnd.ufdl + + + ulw + audio/basic + + + ulx + application/x-glulx + + + umj + application/vnd.umajin + + + unityweb + application/vnd.unity + + + uoml + application/vnd.uoml+xml + + + uri + text/uri-list + + + uris + text/uri-list + + + urls + text/uri-list + + + ustar + application/x-ustar + + + utz + application/vnd.uiq.theme + + + uu + text/x-uuencode + + + uva + audio/vnd.dece.audio + + + uvd + application/vnd.dece.data + + + uvf + application/vnd.dece.data + + + uvg + image/vnd.dece.graphic + + + uvh + video/vnd.dece.hd + + + uvi + image/vnd.dece.graphic + + + uvm + video/vnd.dece.mobile + + + uvp + video/vnd.dece.pd + + + uvs + video/vnd.dece.sd + + + uvt + application/vnd.dece.ttml+xml + + + uvu + video/vnd.uvvu.mp4 + + + uvv + video/vnd.dece.video + + + uvva + audio/vnd.dece.audio + + + uvvd + application/vnd.dece.data + + + uvvf + application/vnd.dece.data + + + uvvg + image/vnd.dece.graphic + + + uvvh + video/vnd.dece.hd + + + uvvi + image/vnd.dece.graphic + + + uvvm + video/vnd.dece.mobile + + + uvvp + video/vnd.dece.pd + + + uvvs + video/vnd.dece.sd + + + uvvt + application/vnd.dece.ttml+xml + + + uvvu + video/vnd.uvvu.mp4 + + + uvvv + video/vnd.dece.video + + + uvvx + application/vnd.dece.unspecified + + + uvvz + application/vnd.dece.zip + + + uvx + application/vnd.dece.unspecified + + + uvz + application/vnd.dece.zip + + + vcard + text/vcard + + + vcd + application/x-cdlink + + + vcf + text/x-vcard + + + vcg + application/vnd.groove-vcard + + + vcs + text/x-vcalendar + + + vcx + application/vnd.vcx + + + vis + application/vnd.visionary + + + viv + video/vnd.vivo + + + vob + video/x-ms-vob + + + vor + application/vnd.stardivision.writer + + + vox + application/x-authorware-bin + + + vrml + model/vrml + + + vsd + application/vnd.visio + + + vsf + application/vnd.vsf + + + vss + application/vnd.visio + + + vst + application/vnd.visio + + + vsw + application/vnd.visio + + + vtu + model/vnd.vtu + + + vxml + application/voicexml+xml + + + w3d + application/x-director + + + wad + application/x-doom + + + wav + audio/x-wav + + + wax + audio/x-ms-wax + + + + wbmp + image/vnd.wap.wbmp + + + wbs + application/vnd.criticaltools.wbs+xml + + + wbxml + application/vnd.wap.wbxml + + + wcm + application/vnd.ms-works + + + wdb + application/vnd.ms-works + + + wdp + image/vnd.ms-photo + + + weba + audio/webm + + + webm + video/webm + + + webp + image/webp + + + wg + application/vnd.pmi.widget + + + wgt + application/widget + + + wks + application/vnd.ms-works + + + wm + video/x-ms-wm + + + wma + audio/x-ms-wma + + + wmd + application/x-ms-wmd + + + wmf + application/x-msmetafile + + + + wml + text/vnd.wap.wml + + + + wmlc + application/vnd.wap.wmlc + + + + wmls + text/vnd.wap.wmlscript + + + + wmlsc + application/vnd.wap.wmlscriptc + + + wmv + video/x-ms-wmv + + + wmx + video/x-ms-wmx + + + wmz + application/x-msmetafile + + + woff + application/x-font-woff + + + wpd + application/vnd.wordperfect + + + wpl + application/vnd.ms-wpl + + + wps + application/vnd.ms-works + + + wqd + application/vnd.wqd + + + wri + application/x-mswrite + + + wrl + model/vrml + + + wsdl + application/wsdl+xml + + + wspolicy + application/wspolicy+xml + + + wtb + application/vnd.webturbo + + + wvx + video/x-ms-wvx + + + x32 + application/x-authorware-bin + + + x3d + model/x3d+xml + + + x3db + model/x3d+binary + + + x3dbz + model/x3d+binary + + + x3dv + model/x3d+vrml + + + x3dvz + model/x3d+vrml + + + x3dz + model/x3d+xml + + + xaml + application/xaml+xml + + + xap + application/x-silverlight-app + + + xar + application/vnd.xara + + + xbap + application/x-ms-xbap + + + xbd + application/vnd.fujixerox.docuworks.binder + + + xbm + image/x-xbitmap + + + xdf + application/xcap-diff+xml + + + xdm + application/vnd.syncml.dm+xml + + + xdp + application/vnd.adobe.xdp+xml + + + xdssc + application/dssc+xml + + + xdw + application/vnd.fujixerox.docuworks + + + xenc + application/xenc+xml + + + xer + application/patch-ops-error+xml + + + xfdf + application/vnd.adobe.xfdf + + + xfdl + application/vnd.xfdl + + + xht + application/xhtml+xml + + + xhtml + application/xhtml+xml + + + xhvml + application/xv+xml + + + xif + image/vnd.xiff + + + xla + application/vnd.ms-excel + + + xlam + application/vnd.ms-excel.addin.macroenabled.12 + + + xlc + application/vnd.ms-excel + + + xlf + application/x-xliff+xml + + + xlm + application/vnd.ms-excel + + + xls + application/vnd.ms-excel + + + xlsb + application/vnd.ms-excel.sheet.binary.macroenabled.12 + + + xlsm + application/vnd.ms-excel.sheet.macroenabled.12 + + + xlsx + application/vnd.openxmlformats-officedocument.spreadsheetml.sheet + + + xlt + application/vnd.ms-excel + + + xltm + application/vnd.ms-excel.template.macroenabled.12 + + + xltx + application/vnd.openxmlformats-officedocument.spreadsheetml.template + + + xlw + application/vnd.ms-excel + + + xm + audio/xm + + + xml + application/xml + + + xo + application/vnd.olpc-sugar + + + xop + application/xop+xml + + + xpi + application/x-xpinstall + + + xpl + application/xproc+xml + + + xpm + image/x-xpixmap + + + xpr + application/vnd.is-xpr + + + xps + application/vnd.ms-xpsdocument + + + xpw + application/vnd.intercon.formnet + + + xpx + application/vnd.intercon.formnet + + + xsl + application/xml + + + xslt + application/xslt+xml + + + xsm + application/vnd.syncml+xml + + + xspf + application/xspf+xml + + + xul + application/vnd.mozilla.xul+xml + + + xvm + application/xv+xml + + + xvml + application/xv+xml + + + xwd + image/x-xwindowdump + + + xyz + chemical/x-xyz + + + xz + application/x-xz + + + yang + application/yang + + + yin + application/yin+xml + + + z + application/x-compress + + + Z + application/x-compress + + + z1 + application/x-zmachine + + + z2 + application/x-zmachine + + + z3 + application/x-zmachine + + + z4 + application/x-zmachine + + + z5 + application/x-zmachine + + + z6 + application/x-zmachine + + + z7 + application/x-zmachine + + + z8 + application/x-zmachine + + + zaz + application/vnd.zzazz.deck+xml + + + zip + application/zip + + + zir + application/vnd.zul + + + zirz + application/vnd.zul + + + zmm + application/vnd.handheld-entertainment+xml + + + + + + + + + + + + + + + + index.html + index.htm + index.jsp + + \ No newline at end of file diff --git a/akraino/pom.xml b/akraino/pom.xml new file mode 100644 index 0000000..370572f --- /dev/null +++ b/akraino/pom.xml @@ -0,0 +1,69 @@ + + 4.0.0 + org.camunda.bpm.getstarted + akraino + 0.0.1-SNAPSHOT + jar + + + + + org.springframework.boot + spring-boot-dependencies + 1.5.8.RELEASE + pom + import + + + + + + + org.camunda.bpm.springboot + camunda-bpm-spring-boot-starter-webapp + 2.3.0 + + + com.h2database + h2 + + + + org.yaml + snakeyaml + 1.21 + + + + commons-net + commons-net + 3.3 + + + + com.jcraft + jsch + 0.1.54 + + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + repackage + + + + + + + + + \ No newline at end of file diff --git a/akraino/src/main/java/com/akraino/bpm/AkrainoSpringBootApplication.java b/akraino/src/main/java/com/akraino/bpm/AkrainoSpringBootApplication.java new file mode 100644 index 0000000..d93e52f --- /dev/null +++ b/akraino/src/main/java/com/akraino/bpm/AkrainoSpringBootApplication.java @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.akraino.bpm; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class AkrainoSpringBootApplication { + public static void main(String... args) { + System.setProperty("server.connection-timeout","36000000"); + SpringApplication.run(AkrainoSpringBootApplication.class, args); + } +} diff --git a/akraino/src/main/java/com/akraino/bpm/Exception/TaskExecutorException.java b/akraino/src/main/java/com/akraino/bpm/Exception/TaskExecutorException.java new file mode 100644 index 0000000..d266661 --- /dev/null +++ b/akraino/src/main/java/com/akraino/bpm/Exception/TaskExecutorException.java @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.akraino.bpm.Exception; + +public class TaskExecutorException extends RuntimeException { + + private static final long serialVersionUID = 1L; + + public TaskExecutorException(String message) { + super(message); + } + + +} diff --git a/akraino/src/main/java/com/akraino/bpm/config/CamundaCorsFilter.java b/akraino/src/main/java/com/akraino/bpm/config/CamundaCorsFilter.java new file mode 100644 index 0000000..5b3c294 --- /dev/null +++ b/akraino/src/main/java/com/akraino/bpm/config/CamundaCorsFilter.java @@ -0,0 +1,147 @@ +/* + * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.akraino.bpm.config; + + +import java.io.IOException; + + +import javax.sql.DataSource; + +import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl; +import org.camunda.bpm.engine.impl.jobexecutor.CallerRunsRejectedJobsHandler; +import org.camunda.bpm.engine.impl.jobexecutor.JobExecutor; +import org.camunda.bpm.engine.spring.SpringProcessEngineConfiguration; +import org.camunda.bpm.engine.spring.components.jobexecutor.SpringJobExecutor; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.boot.web.client.RestTemplateBuilder; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Primary; +import org.springframework.core.io.support.PathMatchingResourcePatternResolver; +import org.springframework.core.task.TaskExecutor; +import org.springframework.jdbc.datasource.DataSourceTransactionManager; +import org.springframework.transaction.PlatformTransactionManager; +import org.springframework.web.client.RestTemplate; +import org.springframework.web.cors.CorsConfiguration; +import org.springframework.web.cors.UrlBasedCorsConfigurationSource; +import org.springframework.web.filter.CorsFilter; + + + +@Configuration + + public class CamundaCorsFilter { + + + @Value("${camunda.bpm.buildresponseurl}") + private String buildresponseurl; + + @Autowired + private DataSource dataSource; + + @Autowired + private PlatformTransactionManager transactionManager; + + @Autowired + private JobExecutor jobExecutor; + + public String getBuildresponseurl() { + return buildresponseurl; + } + + public void setBuildresponseurl(String buildresponseurl) { + this.buildresponseurl = buildresponseurl; + } + + @Bean + public RestTemplate restTemplate(RestTemplateBuilder builder) { + // Do any additional configuration here + return builder.build(); + } + + /*@Bean + public JobExecutor jobExecutor() { + final JobExecutor jobExecutor = new RuntimeContainerJobExecutor(); + jobExecutor.setWaitTimeInMillis(5000); + jobExecutor.setLockTimeInMillis(18000000); + return jobExecutor; + } + @Bean + + public ProcessEngineConfiguration SpringProcessEngineConfiguration () { + + ProcessEngineConfiguration ProcessEngineConfiguration=new SpringProcessEngineConfiguration().setJobExecutor(jobexecutor).setProcessEngineName("default"); + return ProcessEngineConfiguration; + }*/ + + @Bean + @Primary + public static JobExecutor jobExecutor(@Qualifier("camundaTaskExecutor") final TaskExecutor taskExecutor) { + final SpringJobExecutor springJobExecutor = new SpringJobExecutor(); + springJobExecutor.setTaskExecutor(taskExecutor); + springJobExecutor.setRejectedJobsHandler(new CallerRunsRejectedJobsHandler()); + springJobExecutor.setWaitTimeInMillis(5000); + springJobExecutor.setLockTimeInMillis(36000000); + return springJobExecutor; + } + + @Bean + @Primary + public ProcessEngineConfigurationImpl processEngineConfiguration() throws IOException { + SpringProcessEngineConfiguration config = (SpringProcessEngineConfiguration) new SpringProcessEngineConfiguration().setJobExecutor(jobExecutor); + config.setDataSource(dataSource); + config.setTransactionManager(transactionManager); + config.setDatabaseSchemaUpdate("true"); + config.setJobExecutorActivate(true); + config.setAuthorizationEnabled(true); + config.setDefaultSerializationFormat("application/json"); + PathMatchingResourcePatternResolver resolver = new PathMatchingResourcePatternResolver(); + config.setDeploymentResources(resolver.getResources("classpath:*.bpmn")); + return config; + } + + @Bean + public PlatformTransactionManager getTransactionManager() { + PlatformTransactionManager ptm=new DataSourceTransactionManager(dataSource); + return ptm; + } + + + @Bean + public CorsFilter corsFilter() { + UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); + CorsConfiguration config = new CorsConfiguration(); + config.setAllowCredentials(true); + config.addAllowedOrigin("*"); + config.addAllowedHeader("*"); + config.addAllowedMethod("OPTIONS"); + config.addAllowedMethod("GET"); + config.addAllowedMethod("POST"); + config.addAllowedMethod("PATCH"); + config.addAllowedMethod("PUT"); + config.addAllowedMethod("DELETE"); + source.registerCorsConfiguration("/**", config); + return new CorsFilter(source); + } + + + } + + diff --git a/akraino/src/main/java/com/akraino/bpm/controller/CamundaRestController.java b/akraino/src/main/java/com/akraino/bpm/controller/CamundaRestController.java new file mode 100644 index 0000000..1c5b599 --- /dev/null +++ b/akraino/src/main/java/com/akraino/bpm/controller/CamundaRestController.java @@ -0,0 +1,221 @@ +/* + * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.akraino.bpm.controller; + +import org.camunda.bpm.engine.ProcessEngine; +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.camunda.bpm.engine.variable.Variables; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RestController; + +import com.akraino.bpm.Exception.TaskExecutorException; +import com.akraino.bpm.model.Airship; +import com.akraino.bpm.model.Apache; +import com.akraino.bpm.model.Build; +import com.akraino.bpm.model.Deploy; +import com.akraino.bpm.model.Onap; +import com.akraino.bpm.model.Tempest; +import com.akraino.bpm.model.WorkflowResponse; + +@RestController +public class CamundaRestController { + + @Autowired + private ProcessEngine camunda; + + private static Logger logger = LoggerFactory.getLogger(CamundaRestController.class); + + @PostMapping("/build/") + public ResponseEntity build(@RequestBody Build build) { + logger.debug("Request received for Build ",build.toString()); + + try { + executeBuildProcess(build); + }catch(TaskExecutorException ex) { + return new ResponseEntity(new WorkflowResponse(500,"Problem while executing Build . exception : "+ex.getMessage()),HttpStatus.OK); + } + return new ResponseEntity(new WorkflowResponse(200,"Build successfully completed."),HttpStatus.OK); + } + + private ProcessInstance executeBuildProcess(Build build) { + + String filepath=build.getFilepath()+" "+(build.getFileparams()!=null?build.getFileparams().replaceAll(",", " "):" "); + return camunda.getRuntimeService().startProcessInstanceByKey("build", + Variables.putValue("filepath", filepath).putValue("targetfolder", build.getTargetfolder())); + } + + + @PostMapping("/deploy/") + public ResponseEntity deploy(@RequestBody Deploy deploy) { + logger.debug("Request received for executing {} and targetDirectory {} ",deploy.toString()); + try { + executeDeployProcess(deploy); + }catch(TaskExecutorException ex) { + return new ResponseEntity(new WorkflowResponse(500,"Problem while executing genesis build. exception : "+ex.getMessage()),HttpStatus.OK); + } + return new ResponseEntity(new WorkflowResponse(200,"Genesis build completed ."),HttpStatus.OK); + } + + private ProcessInstance executeDeployProcess(Deploy deploy) { + + String filepath1=deploy.getFilepath()+" "+(deploy.getFileparams()!=null?deploy.getFileparams().replaceAll(",", " "):" "); + String filepath2=deploy.getWinscpfilepath()+" "+(deploy.getWinscpfileparams()!=null?deploy.getWinscpfileparams().replaceAll(",", " "):" "); + return camunda.getRuntimeService().startProcessInstanceByKey("deploy", + Variables.putValue("filepath", filepath1).putValue("ScpScriptFilepath", filepath2).putValue("remotserver", deploy.getRemotserver()) + .putValue("username", deploy.getUsername()) + .putValue("password", deploy.getPassword()) + .putValue("port", deploy.getPort()).putValue("destdir",deploy.getDestdir()).putValue("remotefilename", deploy.getRemotefilename()) + .putValue("fileparams", deploy.getFileparams()). + putValue("verifier", deploy.getDeploymentverifier()).putValue("verifierfileparams", + deploy.getDeploymentverifierfileparams()).putValue("waittime", deploy.getWaittime()). + putValue("iterations", deploy.getNoofiterations()).putValue("postverificationscript", deploy.getPostverificationscript()).putValue("postverificationScriptparams", deploy.getDeploymentverifierfileparams())); + + } + + + @PostMapping("/airship/") + public ResponseEntity deploy(@RequestBody Airship airship) { + logger.debug("Request received for airship {} and targetDirectory {} ",airship.toString()); + try { + executeAirshipProcess(airship); + }catch(TaskExecutorException ex) { + return new ResponseEntity(new WorkflowResponse(500,"Problem while executing genesis airship. exception : "+ex.getMessage()),HttpStatus.OK); + } + return new ResponseEntity(new WorkflowResponse(200,"Airship is completed ."),HttpStatus.OK); + } + + private ProcessInstance executeAirshipProcess(Airship airship) { + + String filepath1=airship.getFilepath()+" "+(airship.getFileparams()!=null?airship.getFileparams().replaceAll(",", " "):" "); + String filepath2=airship.getWinscpfilepath()+" "+(airship.getWinscpfileparams()!=null?airship.getWinscpfileparams().replaceAll(",", " "):" "); + return camunda.getRuntimeService().startProcessInstanceByKey("airship", + Variables.putValue("filepath", filepath1).putValue("scpdir", airship.getWinscpdir()).putValue("ScpScriptFilepath", filepath2).putValue("remotserver", airship.getRemotserver()) + .putValue("username", airship.getUsername()) + .putValue("password", airship.getPassword()) + .putValue("port", airship.getPort()).putValue("destdir",airship.getDestdir()).putValue("remotefilename", airship.getRemotefilename()) + .putValue("remotefileparams", airship.getRemotefileparams())); + + } + + + @PostMapping("/tempest/") + public ResponseEntity tempest(@RequestBody Tempest tempest) { + logger.debug("Request received for onap ",tempest.toString()); + try { + executeTempestProcess(tempest); + }catch(TaskExecutorException ex) { + return new ResponseEntity(new WorkflowResponse(500,"Problem while executing Tempset API. exception : "+ex.getMessage()),HttpStatus.OK); + } + return new ResponseEntity(new WorkflowResponse(200,"tempeset is completed successfully."),HttpStatus.OK); + } + + private ProcessInstance executeTempestProcess(Tempest tempest) { + + String transferfile= tempest.getFiletrasferscript()+" "+(tempest.getFiletransferparams()!=null?tempest.getFiletransferparams().replaceAll(",", " "):" "); + + return camunda.getRuntimeService().startProcessInstanceByKey("tempest", + Variables.putValue("filename", tempest.getFilename()).putValue("fileparams", tempest.getFileparams()). + putValue("verifier", tempest.getDeploymentverifier()).putValue("verifierfileparams", tempest.getVerifierparams()).putValue("waittime", tempest.getWaittime()). + putValue("iterations", tempest.getNoofiterations()).putValue("remotserver", tempest.getRemoteserver()) + .putValue("username", tempest.getUsername()) + .putValue("password", tempest.getPassword()) + .putValue("port", tempest.getPortnumber()).putValue("srcdir", tempest.getSrcdir()).putValue("destdir",tempest.getDestdir()).putValue("filepath", transferfile) + ); + + } + + + @PostMapping("/apache/") + public ResponseEntity apache(@RequestBody Apache apache) { + logger.debug("Request received for onap ",apache.toString()); + try { + executeapacheProcess(apache); + }catch(TaskExecutorException ex) { + return new ResponseEntity(new WorkflowResponse(500,"Problem while executing Apache API. exception : "+ex.getMessage()),HttpStatus.OK); + } + return new ResponseEntity(new WorkflowResponse(200,"apache is completed successfully."),HttpStatus.OK); + } + + private ProcessInstance executeapacheProcess(Apache apache) { + + String transferfile= apache.getFiletrasferscript()+" "+(apache.getFiletransferparams()!=null?apache.getFiletransferparams().replaceAll(",", " "):" "); + + return camunda.getRuntimeService().startProcessInstanceByKey("apache", + Variables.putValue("filename", apache.getFilename()).putValue("fileparams", apache.getFileparams()). + putValue("verifier", apache.getDeploymentverifier()).putValue("verifierfileparams", apache.getVerifierparams()).putValue("waittime", apache.getWaittime()). + putValue("iterations", apache.getNoofiterations()).putValue("remotserver", apache.getRemoteserver()) + .putValue("username", apache.getUsername()) + .putValue("password", apache.getPassword()) + .putValue("port", apache.getPortnumber()).putValue("srcdir", apache.getSrcdir()).putValue("destdir",apache.getDestdir()).putValue("filepath", transferfile) + ); + + } + + + @PostMapping("/onap/") + public ResponseEntity onap(@RequestBody Onap onap) { + logger.debug("Request received for onap ",onap.toString()); + try { + executeOnapProcess(onap); + }catch(TaskExecutorException ex) { + return new ResponseEntity(new WorkflowResponse(500,"Problem while executing onap build. exception : "+ex.getMessage()),HttpStatus.OK); + } + return new ResponseEntity(new WorkflowResponse(200,"Onap build completed ."),HttpStatus.OK); + } + + private ProcessInstance executeOnapProcess(Onap onap) { + + String transferfile= onap.getFiletrasferscript()+" "+(onap.getFiletransferparams()!=null?onap.getFiletransferparams().replaceAll(",", " "):" "); + return camunda.getRuntimeService().startProcessInstanceByKey("onap", + Variables.putValue("filename", onap.getFilename()).putValue("fileparams", onap.getFileparams()). + putValue("verifier", onap.getDeploymentverifier()).putValue("verifierfileparams", onap.getVerifierparams()).putValue("waittime", onap.getWaittime()). + putValue("iterations", onap.getNoofiterations()).putValue("remotserver", onap.getRemoteserver()) + .putValue("username", onap.getUsername()) + .putValue("password", onap.getPassword()) + .putValue("port", onap.getPortnumber()).putValue("srcdir", onap.getSrcdir()).putValue("destdir",onap.getDestdir()).putValue("filepath", transferfile) + ); + + } + + + + + /*@PostMapping("/singlestepdeploy/") + public ResponseEntity singelStepDeploy(@RequestBody Deploy deploy) { + logger.debug("Request received for onap ",deploy.toString()); + try { + executeOnapProcess(deploy); + }catch(TaskExecutorException ex) { + return new ResponseEntity(new WorkflowResponse(500,"Problem while executing single step deploymewnt. exception : "+ex.getMessage()),HttpStatus.OK); + } + return new ResponseEntity(new WorkflowResponse(200," single step deployment completed ."),HttpStatus.OK); + } + + private ProcessInstance executeOnapProcess(Deploy deploy) { + + String filepath1="bash " + deploy.getFilepath1()+" "+(deploy.getFile1params()!=null?deploy.getFile1params().replaceAll(",", " "):" "); + return camunda.getRuntimeService().startProcessInstanceByKey("singlestepdeploy",Variables.putValue("filepath", filepath1)); + + }*/ + +} diff --git a/akraino/src/main/java/com/akraino/bpm/delegate/AirshipRemoteScriptExecutorTaskDelegate.java b/akraino/src/main/java/com/akraino/bpm/delegate/AirshipRemoteScriptExecutorTaskDelegate.java new file mode 100644 index 0000000..05113ac --- /dev/null +++ b/akraino/src/main/java/com/akraino/bpm/delegate/AirshipRemoteScriptExecutorTaskDelegate.java @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.akraino.bpm.delegate; + +import org.camunda.bpm.engine.delegate.DelegateExecution; +import org.camunda.bpm.engine.delegate.JavaDelegate; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + + +import com.akraino.bpm.service.RemoteScriptExecutionService; + + + +@Component +public class AirshipRemoteScriptExecutorTaskDelegate implements JavaDelegate { + + private static Logger logger = LoggerFactory.getLogger(AirshipRemoteScriptExecutorTaskDelegate.class); + + @Autowired + RemoteScriptExecutionService remoteScriptExecutionService; + + public void execute(DelegateExecution ctx) throws Exception { + String remotserver=(String)ctx.getVariable("remotserver"); + int portnumner=(Integer)ctx.getVariable("port"); + String username=(String)ctx.getVariable("username"); + String password=(String)ctx.getVariable("password"); + String filename=(String)ctx.getVariable("remotefilename"); + String fileparams=(String)ctx.getVariable("remotefileparams"); + String srcdir=(String)ctx.getVariable("srcdir"); + String destdir=(String)ctx.getVariable("destdir"); + + logger.debug("task execution started remotserver {} , portnumner {},username {}, password {},filename : {} ,fileparams={},src dir={},dest dir={}", + remotserver,portnumner,username,password,filename,fileparams,srcdir,destdir); + String command="cd "+destdir+ ";" +" ./"+filename+" "+ (fileparams!=null?fileparams:" ") ; + logger.debug("Execution command {}",command); + remoteScriptExecutionService.executeRemoteScript(remotserver,username,password,portnumner,filename,fileparams,srcdir,destdir,command); + } + +} diff --git a/akraino/src/main/java/com/akraino/bpm/delegate/AirshipScriptExecutorTaskDelegate.java b/akraino/src/main/java/com/akraino/bpm/delegate/AirshipScriptExecutorTaskDelegate.java new file mode 100644 index 0000000..31ec7ab --- /dev/null +++ b/akraino/src/main/java/com/akraino/bpm/delegate/AirshipScriptExecutorTaskDelegate.java @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.akraino.bpm.delegate; + + +import org.camunda.bpm.engine.delegate.DelegateExecution; +import org.camunda.bpm.engine.delegate.JavaDelegate; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import com.akraino.bpm.service.ScriptExecutionService; + +@Component +public class AirshipScriptExecutorTaskDelegate implements JavaDelegate { + + private static Logger logger = LoggerFactory.getLogger(AirshipScriptExecutorTaskDelegate.class); + + @Autowired + ScriptExecutionService scriptExecutionService; + + public void execute(DelegateExecution ctx) throws Exception { + + String filepath=(String)ctx.getVariable("filepath"); + logger.debug("task execution started :"+filepath); + scriptExecutionService.executeScript(filepath); + + } + +} diff --git a/akraino/src/main/java/com/akraino/bpm/delegate/AirshipWinScpScriptDelegate.java b/akraino/src/main/java/com/akraino/bpm/delegate/AirshipWinScpScriptDelegate.java new file mode 100644 index 0000000..89576ea --- /dev/null +++ b/akraino/src/main/java/com/akraino/bpm/delegate/AirshipWinScpScriptDelegate.java @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.akraino.bpm.delegate; + + +import org.camunda.bpm.engine.delegate.DelegateExecution; +import org.camunda.bpm.engine.delegate.JavaDelegate; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + + +import com.akraino.bpm.service.ScriptExecutionService; + + +@Component +public class AirshipWinScpScriptDelegate implements JavaDelegate { + + private static Logger logger = LoggerFactory.getLogger(AirshipWinScpScriptDelegate.class); + + + @Autowired + ScriptExecutionService scriptExecutionService; + + public void execute(DelegateExecution ctx) throws Exception { + + String filepath=(String)ctx.getVariable("ScpScriptFilepath"); + String dir=(String)ctx.getVariable("scpdir"); + logger.debug("Win SCP task execution started :{} , Directory :{} ",filepath,dir); + scriptExecutionService.executeCDScript(dir, filepath); + + //scriptExecutionService.executeScript(filepath); + + + } + +} diff --git a/akraino/src/main/java/com/akraino/bpm/delegate/ApacheRemoteDeploymentVerificationDelegate.java b/akraino/src/main/java/com/akraino/bpm/delegate/ApacheRemoteDeploymentVerificationDelegate.java new file mode 100644 index 0000000..7c1c5a0 --- /dev/null +++ b/akraino/src/main/java/com/akraino/bpm/delegate/ApacheRemoteDeploymentVerificationDelegate.java @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.akraino.bpm.delegate; + + +import org.camunda.bpm.engine.delegate.DelegateExecution; +import org.camunda.bpm.engine.delegate.JavaDelegate; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import com.akraino.bpm.Exception.TaskExecutorException; +import com.akraino.bpm.service.RemoteDeploymentVerificationService; + + + +@Component +public class ApacheRemoteDeploymentVerificationDelegate implements JavaDelegate { + + private static Logger logger = LoggerFactory.getLogger(ApacheRemoteDeploymentVerificationDelegate.class); + + @Autowired + RemoteDeploymentVerificationService remotedeploymentVerificationService; + + + public void execute(DelegateExecution ctx) throws Exception { + + try { + String verifierFilename=(String)ctx.getVariable("verifier"); + int waittime=(Integer)ctx.getVariable("waittime"); + int iterations=(Integer)ctx.getVariable("iterations"); + String remotserver=(String)ctx.getVariable("remotserver"); + int portnumner=(Integer)ctx.getVariable("port"); + String username=(String)ctx.getVariable("username"); + String password=(String)ctx.getVariable("password"); + String srcdir=(String)ctx.getVariable("srcdir"); + String destdir=(String)ctx.getVariable("destdir"); + String filepparams=(String)ctx.getVariable("verifierfileparams"); + + logger.debug("task execution started remotserver {} , portnumner {},username {}, password {},filename : {} , waittime : {},No of iterations :{}", + remotserver,portnumner,username,password,verifierFilename,srcdir,destdir,waittime,iterations); + + String command= "cd "+destdir+ ";" + (filepparams!=null?filepparams:" ") + " ./"+verifierFilename; + logger.debug("Execution command {}",command); + remotedeploymentVerificationService.executeScript(remotserver,username,password,portnumner,verifierFilename,filepparams,srcdir,destdir,waittime,iterations,command); + }catch(TaskExecutorException ex) { + throw ex; + } + + + } + +} + diff --git a/akraino/src/main/java/com/akraino/bpm/delegate/ApacheRemoteScriptExecutorTaskDelegate.java b/akraino/src/main/java/com/akraino/bpm/delegate/ApacheRemoteScriptExecutorTaskDelegate.java new file mode 100644 index 0000000..85bcf97 --- /dev/null +++ b/akraino/src/main/java/com/akraino/bpm/delegate/ApacheRemoteScriptExecutorTaskDelegate.java @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.akraino.bpm.delegate; + +import org.camunda.bpm.engine.delegate.DelegateExecution; +import org.camunda.bpm.engine.delegate.JavaDelegate; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import com.akraino.bpm.service.RemoteScriptExecutionService; + + + +@Component +public class ApacheRemoteScriptExecutorTaskDelegate implements JavaDelegate { + + + + private static Logger logger = LoggerFactory.getLogger(ApacheRemoteScriptExecutorTaskDelegate.class); + + @Autowired + RemoteScriptExecutionService remoteScriptExecutionService; + + public void execute(DelegateExecution ctx) throws Exception { + String remotserver=(String)ctx.getVariable("remotserver"); + int portnumner=(Integer)ctx.getVariable("port"); + String username=(String)ctx.getVariable("username"); + String password=(String)ctx.getVariable("password"); + String filename=(String)ctx.getVariable("filename"); + String fileparams=(String)ctx.getVariable("fileparams"); + String srcdir=(String)ctx.getVariable("srcdir"); + String destdir=(String)ctx.getVariable("destdir"); + + + logger.debug("task execution started remotserver {} , portnumner {},username {}, password {},filename : {} ,fileparams={},src dir={},dest dir={}", + remotserver,portnumner,username,password,filename,fileparams,srcdir,destdir); + String command= "cd "+destdir+ ";" + (fileparams!=null?fileparams:" ") + " ./"+filename; + logger.debug("Execution command {}",command); + remoteScriptExecutionService.executeRemoteScript(remotserver,username,password,portnumner,filename,fileparams,srcdir,destdir,command); + } + +} diff --git a/akraino/src/main/java/com/akraino/bpm/delegate/ApacheScriptExecutorTaskDelegate.java b/akraino/src/main/java/com/akraino/bpm/delegate/ApacheScriptExecutorTaskDelegate.java new file mode 100644 index 0000000..e0c5f12 --- /dev/null +++ b/akraino/src/main/java/com/akraino/bpm/delegate/ApacheScriptExecutorTaskDelegate.java @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.akraino.bpm.delegate; + +import org.camunda.bpm.engine.RuntimeService; +import org.camunda.bpm.engine.delegate.DelegateExecution; +import org.camunda.bpm.engine.delegate.JavaDelegate; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + + +import com.akraino.bpm.service.ScriptExecutionService; + + +@Component +public class ApacheScriptExecutorTaskDelegate implements JavaDelegate { + + @Autowired + RuntimeService runtimeService; + + private static Logger logger = LoggerFactory.getLogger(ApacheScriptExecutorTaskDelegate.class); + + @Autowired + ScriptExecutionService scriptExecutionService; + + public void execute(DelegateExecution ctx) throws Exception { + String filepath=(String)ctx.getVariable("filepath"); + logger.debug("task execution started :"+filepath); + scriptExecutionService.executeScript(filepath); + } + +} diff --git a/akraino/src/main/java/com/akraino/bpm/delegate/BashScriptExecutorTaskDelegate.java b/akraino/src/main/java/com/akraino/bpm/delegate/BashScriptExecutorTaskDelegate.java new file mode 100644 index 0000000..7e3257d --- /dev/null +++ b/akraino/src/main/java/com/akraino/bpm/delegate/BashScriptExecutorTaskDelegate.java @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.akraino.bpm.delegate; + +import org.camunda.bpm.engine.RuntimeService; +import org.camunda.bpm.engine.delegate.DelegateExecution; +import org.camunda.bpm.engine.delegate.JavaDelegate; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import com.akraino.bpm.service.BashScriptExecutionService; + + + +@Component +public class BashScriptExecutorTaskDelegate implements JavaDelegate { + + @Autowired + RuntimeService runtimeService; + + private static Logger logger = LoggerFactory.getLogger(BashScriptExecutorTaskDelegate.class); + + @Autowired + BashScriptExecutionService bashscriptExecutionService; + + public void execute(DelegateExecution ctx) throws Exception { + String filepath=(String)ctx.getVariable("filepath"); + logger.debug("task execution started :"+filepath); + bashscriptExecutionService.executeScript(filepath); + } + +} diff --git a/akraino/src/main/java/com/akraino/bpm/delegate/DeployPostVerficationRemoteScriptExecutor.java b/akraino/src/main/java/com/akraino/bpm/delegate/DeployPostVerficationRemoteScriptExecutor.java new file mode 100644 index 0000000..0d64278 --- /dev/null +++ b/akraino/src/main/java/com/akraino/bpm/delegate/DeployPostVerficationRemoteScriptExecutor.java @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.akraino.bpm.delegate; + +import org.camunda.bpm.engine.delegate.DelegateExecution; +import org.camunda.bpm.engine.delegate.JavaDelegate; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import com.akraino.bpm.model.BuildResponse; +import com.akraino.bpm.service.DeployResponseSenderService; +import com.akraino.bpm.service.RemoteScriptExecutionService; + + + +@Component +public class DeployPostVerficationRemoteScriptExecutor implements JavaDelegate { + + + + private static Logger logger = LoggerFactory.getLogger(DeployPostVerficationRemoteScriptExecutor.class); + + @Autowired + RemoteScriptExecutionService remoteScriptExecutionService; + + @Autowired + DeployResponseSenderService deployResponseSenderService; + + public void execute(DelegateExecution ctx) throws Exception { + String remotserver=(String)ctx.getVariable("remotserver"); + int portnumner=(Integer)ctx.getVariable("port"); + String username=(String)ctx.getVariable("username"); + String password=(String)ctx.getVariable("password"); + String filename=(String)ctx.getVariable("postverificationscript"); + String fileparams=(String)ctx.getVariable("postverificationScriptparams"); + String srcdir=(String)ctx.getVariable("srcdir"); + String destdir=(String)ctx.getVariable("destdir"); + + deployResponseSenderService.sendResponse(new BuildResponse("completed", "completed", "completed", "completed","inprogress","Boston")); + logger.debug("task execution started remotserver {} , portnumner {},username {}, password {},filename : {} ,fileparams={},src dir={},dest dir={}", + remotserver,portnumner,username,password,filename,fileparams,srcdir,destdir); + + String command="sh " +destdir+"/"+filename+" "+(fileparams!=null?fileparams.replaceAll(",", " "):" "); + logger.debug("Execution command {}",command); + remoteScriptExecutionService.executeRemoteScript(remotserver,username,password,portnumner,filename,fileparams,srcdir,destdir,command); + + deployResponseSenderService.sendResponse(new BuildResponse("completed", "completed", "completed", "completed","completed","Boston")); + } + +} diff --git a/akraino/src/main/java/com/akraino/bpm/delegate/DeployRemoteDeploymentVerificationDelegate.java b/akraino/src/main/java/com/akraino/bpm/delegate/DeployRemoteDeploymentVerificationDelegate.java new file mode 100644 index 0000000..328f0dd --- /dev/null +++ b/akraino/src/main/java/com/akraino/bpm/delegate/DeployRemoteDeploymentVerificationDelegate.java @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.akraino.bpm.delegate; + + +import org.camunda.bpm.engine.delegate.DelegateExecution; +import org.camunda.bpm.engine.delegate.JavaDelegate; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import com.akraino.bpm.Exception.TaskExecutorException; +import com.akraino.bpm.model.BuildResponse; +import com.akraino.bpm.service.DeployResponseSenderService; +import com.akraino.bpm.service.RemoteDeploymentVerificationService; + + + +@Component +public class DeployRemoteDeploymentVerificationDelegate implements JavaDelegate { + + private static Logger logger = LoggerFactory.getLogger(DeployRemoteDeploymentVerificationDelegate.class); + + @Autowired + RemoteDeploymentVerificationService remotedeploymentVerificationService; + + @Autowired + DeployResponseSenderService deployResponseSenderService; + + + public void execute(DelegateExecution ctx) throws Exception { + + try { + String verifierFilename=(String)ctx.getVariable("verifier"); + int waittime=(Integer)ctx.getVariable("waittime"); + int iterations=(Integer)ctx.getVariable("iterations"); + String remotserver=(String)ctx.getVariable("remotserver"); + int portnumner=(Integer)ctx.getVariable("port"); + String username=(String)ctx.getVariable("username"); + String password=(String)ctx.getVariable("password"); + String srcdir=(String)ctx.getVariable("srcdir"); + String destdir=(String)ctx.getVariable("destdir"); + String filepparams=(String)ctx.getVariable("verifierfileparams"); + + deployResponseSenderService.sendResponse(new BuildResponse("completed", "completed", "completed", "inprogress","not started", "Boston")); + + logger.debug("task execution started remotserver {} , portnumner {},username {}, password {},filename : {} , waittime : {},No of iterations :{}", + remotserver,portnumner,username,password,verifierFilename,srcdir,destdir,waittime,iterations); + + String command="sh " +destdir+"/"+verifierFilename+" "+(filepparams!=null?filepparams.replaceAll(",", " "):" "); + logger.debug("Execution command {}",command); + remotedeploymentVerificationService.executeScript(remotserver,username,password,portnumner,verifierFilename,filepparams,srcdir,destdir,waittime,iterations,command); + }catch(TaskExecutorException ex) { + throw ex; + } + + + } + +} + diff --git a/akraino/src/main/java/com/akraino/bpm/delegate/DeployRemoteScriptExecutorTaskDelegate.java b/akraino/src/main/java/com/akraino/bpm/delegate/DeployRemoteScriptExecutorTaskDelegate.java new file mode 100644 index 0000000..c6cf733 --- /dev/null +++ b/akraino/src/main/java/com/akraino/bpm/delegate/DeployRemoteScriptExecutorTaskDelegate.java @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.akraino.bpm.delegate; + +import org.camunda.bpm.engine.delegate.DelegateExecution; +import org.camunda.bpm.engine.delegate.JavaDelegate; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import com.akraino.bpm.model.BuildResponse; +import com.akraino.bpm.service.DeployResponseSenderService; +import com.akraino.bpm.service.RemoteScriptExecutionService; + + + +@Component +public class DeployRemoteScriptExecutorTaskDelegate implements JavaDelegate { + + + + private static Logger logger = LoggerFactory.getLogger(DeployRemoteScriptExecutorTaskDelegate.class); + + @Autowired + RemoteScriptExecutionService remoteScriptExecutionService; + + @Autowired + DeployResponseSenderService deployResponseSenderService; + + public void execute(DelegateExecution ctx) throws Exception { + String remotserver=(String)ctx.getVariable("remotserver"); + int portnumner=(Integer)ctx.getVariable("port"); + String username=(String)ctx.getVariable("username"); + String password=(String)ctx.getVariable("password"); + String filename=(String)ctx.getVariable("filename"); + String fileparams=(String)ctx.getVariable("fileparams"); + String srcdir=(String)ctx.getVariable("srcdir"); + String destdir=(String)ctx.getVariable("destdir"); + + deployResponseSenderService.sendResponse(new BuildResponse("completed", "completed", "inprogress", "not started","not started", "Boston")); + logger.debug("task execution started remotserver {} , portnumner {},username {}, password {},filename : {} ,fileparams={},src dir={},dest dir={}", + remotserver,portnumner,username,password,filename,fileparams,srcdir,destdir); + + String command="sh " +destdir+"/"+filename+" "+(fileparams!=null?fileparams.replaceAll(",", " "):" "); + logger.debug("Execution command {}",command); + remoteScriptExecutionService.executeRemoteScript(remotserver,username,password,portnumner,filename,fileparams,srcdir,destdir,command); + } + +} diff --git a/akraino/src/main/java/com/akraino/bpm/delegate/DeployScriptExecutorTaskDelegate.java b/akraino/src/main/java/com/akraino/bpm/delegate/DeployScriptExecutorTaskDelegate.java new file mode 100644 index 0000000..32654d1 --- /dev/null +++ b/akraino/src/main/java/com/akraino/bpm/delegate/DeployScriptExecutorTaskDelegate.java @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.akraino.bpm.delegate; + + +import org.camunda.bpm.engine.delegate.DelegateExecution; +import org.camunda.bpm.engine.delegate.JavaDelegate; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import com.akraino.bpm.model.BuildResponse; +import com.akraino.bpm.service.DeployResponseSenderService; +import com.akraino.bpm.service.ScriptExecutionService; + + +@Component +public class DeployScriptExecutorTaskDelegate implements JavaDelegate { + + private static Logger logger = LoggerFactory.getLogger(DeployScriptExecutorTaskDelegate.class); + + @Autowired + ScriptExecutionService scriptExecutionService; + + @Autowired + DeployResponseSenderService deployResponseSenderService; + + public void execute(DelegateExecution ctx) throws Exception { + deployResponseSenderService.sendResponse(new BuildResponse("completed", "inprogress", "not started", "not started","not started","Boston")); + String filepath=(String)ctx.getVariable("filepath"); + logger.debug("task execution started :"+filepath); + scriptExecutionService.executeScript(filepath); + + } + +} diff --git a/akraino/src/main/java/com/akraino/bpm/delegate/DeploymentVerificationDelegate.java b/akraino/src/main/java/com/akraino/bpm/delegate/DeploymentVerificationDelegate.java new file mode 100644 index 0000000..4d5dc22 --- /dev/null +++ b/akraino/src/main/java/com/akraino/bpm/delegate/DeploymentVerificationDelegate.java @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.akraino.bpm.delegate; + + +import org.camunda.bpm.engine.delegate.DelegateExecution; +import org.camunda.bpm.engine.delegate.JavaDelegate; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import com.akraino.bpm.Exception.TaskExecutorException; +import com.akraino.bpm.model.BuildResponse; +import com.akraino.bpm.service.DeployResponseSenderService; +import com.akraino.bpm.service.DeploymentVerificationService; + + + +@Component +public class DeploymentVerificationDelegate implements JavaDelegate { + + private static Logger logger = LoggerFactory.getLogger(DeploymentVerificationDelegate.class); + + @Autowired + DeploymentVerificationService deploymentVerificationService; + + @Autowired + DeployResponseSenderService deployResponseSenderService; + + public void execute(DelegateExecution ctx) throws Exception { + + deployResponseSenderService.sendResponse(new BuildResponse("completed", "completed", "completed", "inprogress","not started", "Boston")); + try { + String verifierFilepath=(String)ctx.getVariable("verifier"); + int waittime=(Integer)ctx.getVariable("waittime"); + int iterations=(Integer)ctx.getVariable("iterations"); + logger.debug("task execution started filename : {} , waittime : {},No of iterations :{}",verifierFilepath,waittime,iterations); + deploymentVerificationService.executeScript(verifierFilepath,waittime,iterations); + }catch(TaskExecutorException ex) { + throw ex; + } + + deployResponseSenderService.sendResponse(new BuildResponse("completed", "completed", "completed", "completed","not started","Boston")); + } + +} + diff --git a/akraino/src/main/java/com/akraino/bpm/delegate/File3ScriptExecutor.java b/akraino/src/main/java/com/akraino/bpm/delegate/File3ScriptExecutor.java new file mode 100644 index 0000000..cb3e154 --- /dev/null +++ b/akraino/src/main/java/com/akraino/bpm/delegate/File3ScriptExecutor.java @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.akraino.bpm.delegate; + +import org.camunda.bpm.engine.RuntimeService; +import org.camunda.bpm.engine.delegate.DelegateExecution; +import org.camunda.bpm.engine.delegate.JavaDelegate; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + + +import com.akraino.bpm.service.ScriptExecutionService; + + +@Component +public class File3ScriptExecutor implements JavaDelegate { + + @Autowired + RuntimeService runtimeService; + + private static Logger logger = LoggerFactory.getLogger(File3ScriptExecutor.class); + + @Autowired + ScriptExecutionService scriptExecutionService; + + public void execute(DelegateExecution ctx) throws Exception { + String filepath=(String)ctx.getVariable("filepath3"); + logger.debug("task execution started :"+filepath); + scriptExecutionService.executeScript(filepath); + } + +} diff --git a/akraino/src/main/java/com/akraino/bpm/delegate/FileTransferDelegator.java b/akraino/src/main/java/com/akraino/bpm/delegate/FileTransferDelegator.java new file mode 100644 index 0000000..20cb0ab --- /dev/null +++ b/akraino/src/main/java/com/akraino/bpm/delegate/FileTransferDelegator.java @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.akraino.bpm.delegate; + + +import org.camunda.bpm.engine.delegate.DelegateExecution; +import org.camunda.bpm.engine.delegate.JavaDelegate; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import com.akraino.bpm.Exception.TaskExecutorException; +import com.akraino.bpm.service.FileTransferService; + + + + +@Component +public class FileTransferDelegator implements JavaDelegate { + + private static Logger logger = LoggerFactory.getLogger(FileTransferDelegator.class); + + @Autowired + FileTransferService fileTransferService; + + + public void execute(DelegateExecution ctx) throws Exception { + + try { + + String remotserver=(String)ctx.getVariable("remotserver"); + int port=(Integer)ctx.getVariable("port"); + String username=(String)ctx.getVariable("username"); + String password=(String)ctx.getVariable("password"); + String srcdir=(String)ctx.getVariable("srcdir"); + String destdir=(String)ctx.getVariable("destdir"); + + logger.debug("File transfer started remotserver {} , portnumner {},username {}, password {},src ={}, dest={}", + remotserver,port,username,password,srcdir,destdir); + fileTransferService.transferFile(srcdir, destdir,remotserver, username, password, port); + }catch(TaskExecutorException ex) { + throw ex; + } + + + } + +} + diff --git a/akraino/src/main/java/com/akraino/bpm/delegate/RemoteDeploymentVerificationDelegate.java b/akraino/src/main/java/com/akraino/bpm/delegate/RemoteDeploymentVerificationDelegate.java new file mode 100644 index 0000000..30204bb --- /dev/null +++ b/akraino/src/main/java/com/akraino/bpm/delegate/RemoteDeploymentVerificationDelegate.java @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.akraino.bpm.delegate; + + +import org.camunda.bpm.engine.delegate.DelegateExecution; +import org.camunda.bpm.engine.delegate.JavaDelegate; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import com.akraino.bpm.Exception.TaskExecutorException; +import com.akraino.bpm.service.RemoteDeploymentVerificationService; + + + +@Component +public class RemoteDeploymentVerificationDelegate implements JavaDelegate { + + private static Logger logger = LoggerFactory.getLogger(RemoteDeploymentVerificationDelegate.class); + + @Autowired + RemoteDeploymentVerificationService remotedeploymentVerificationService; + + + public void execute(DelegateExecution ctx) throws Exception { + + try { + String verifierFilename=(String)ctx.getVariable("verifier"); + int waittime=(Integer)ctx.getVariable("waittime"); + int iterations=(Integer)ctx.getVariable("iterations"); + String remotserver=(String)ctx.getVariable("remotserver"); + int portnumner=(Integer)ctx.getVariable("port"); + String username=(String)ctx.getVariable("username"); + String password=(String)ctx.getVariable("password"); + String srcdir=(String)ctx.getVariable("srcdir"); + String destdir=(String)ctx.getVariable("destdir"); + String filepparams=(String)ctx.getVariable("verifierfileparams"); + + logger.debug("task execution started remotserver {} , portnumner {},username {}, password {},filename : {} , waittime : {},No of iterations :{}", + remotserver,portnumner,username,password,verifierFilename,srcdir,destdir,waittime,iterations); + + String command="sh " +destdir+"/"+(verifierFilename!=null?verifierFilename:" ")+" "+(filepparams!=null?filepparams.replaceAll(",", " "):" "); + logger.debug("Execution command {}",command); + remotedeploymentVerificationService.executeScript(remotserver,username,password,portnumner,verifierFilename,filepparams,srcdir,destdir,waittime,iterations,command); + }catch(TaskExecutorException ex) { + throw ex; + } + + + } + +} + diff --git a/akraino/src/main/java/com/akraino/bpm/delegate/RemoteScriptExecutorTaskDelegate.java b/akraino/src/main/java/com/akraino/bpm/delegate/RemoteScriptExecutorTaskDelegate.java new file mode 100644 index 0000000..d5db4f6 --- /dev/null +++ b/akraino/src/main/java/com/akraino/bpm/delegate/RemoteScriptExecutorTaskDelegate.java @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.akraino.bpm.delegate; + +import org.camunda.bpm.engine.delegate.DelegateExecution; +import org.camunda.bpm.engine.delegate.JavaDelegate; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import com.akraino.bpm.service.RemoteScriptExecutionService; + + + +@Component +public class RemoteScriptExecutorTaskDelegate implements JavaDelegate { + + + + private static Logger logger = LoggerFactory.getLogger(RemoteScriptExecutorTaskDelegate.class); + + @Autowired + RemoteScriptExecutionService remoteScriptExecutionService; + + public void execute(DelegateExecution ctx) throws Exception { + String remotserver=(String)ctx.getVariable("remotserver"); + int portnumner=(Integer)ctx.getVariable("port"); + String username=(String)ctx.getVariable("username"); + String password=(String)ctx.getVariable("password"); + String filename=(String)ctx.getVariable("filename"); + String fileparams=(String)ctx.getVariable("fileparams"); + String srcdir=(String)ctx.getVariable("srcdir"); + String destdir=(String)ctx.getVariable("destdir"); + + + logger.debug("task execution started remotserver {} , portnumner {},username {}, password {},filename : {} ,fileparams={},src dir={},dest dir={}", + remotserver,portnumner,username,password,filename,fileparams,srcdir,destdir); + String command="cd "+destdir+ ";"+"sh "+filename+" "+(fileparams!=null?fileparams.replaceAll(",", " "):" "); + logger.debug("Execution command {}",command); + remoteScriptExecutionService.executeRemoteScript(remotserver,username,password,portnumner,filename,fileparams,srcdir,destdir,command); + } + +} diff --git a/akraino/src/main/java/com/akraino/bpm/delegate/ScriptExecutorTaskDelegate.java b/akraino/src/main/java/com/akraino/bpm/delegate/ScriptExecutorTaskDelegate.java new file mode 100644 index 0000000..59beee8 --- /dev/null +++ b/akraino/src/main/java/com/akraino/bpm/delegate/ScriptExecutorTaskDelegate.java @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.akraino.bpm.delegate; + +import org.camunda.bpm.engine.RuntimeService; +import org.camunda.bpm.engine.delegate.DelegateExecution; +import org.camunda.bpm.engine.delegate.JavaDelegate; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import com.akraino.bpm.service.ScriptExecutionService; + + +@Component +public class ScriptExecutorTaskDelegate implements JavaDelegate { + + @Autowired + RuntimeService runtimeService; + + private static Logger logger = LoggerFactory.getLogger(ScriptExecutorTaskDelegate.class); + + @Autowired + ScriptExecutionService scriptExecutionService; + + public void execute(DelegateExecution ctx) throws Exception { + String filepath=(String)ctx.getVariable("filepath"); + logger.debug("task execution started :"+filepath); + scriptExecutionService.executeScript(filepath); + } + +} diff --git a/akraino/src/main/java/com/akraino/bpm/delegate/TempestRemoteDeploymentVerificationDelegate.java b/akraino/src/main/java/com/akraino/bpm/delegate/TempestRemoteDeploymentVerificationDelegate.java new file mode 100644 index 0000000..6824d4c --- /dev/null +++ b/akraino/src/main/java/com/akraino/bpm/delegate/TempestRemoteDeploymentVerificationDelegate.java @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.akraino.bpm.delegate; + + +import org.camunda.bpm.engine.delegate.DelegateExecution; +import org.camunda.bpm.engine.delegate.JavaDelegate; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import com.akraino.bpm.Exception.TaskExecutorException; +import com.akraino.bpm.service.RemoteDeploymentVerificationService; + + + +@Component +public class TempestRemoteDeploymentVerificationDelegate implements JavaDelegate { + + private static Logger logger = LoggerFactory.getLogger(TempestRemoteDeploymentVerificationDelegate.class); + + @Autowired + RemoteDeploymentVerificationService remotedeploymentVerificationService; + + + public void execute(DelegateExecution ctx) throws Exception { + + try { + String verifierFilename=(String)ctx.getVariable("verifier"); + int waittime=(Integer)ctx.getVariable("waittime"); + int iterations=(Integer)ctx.getVariable("iterations"); + String remotserver=(String)ctx.getVariable("remotserver"); + int portnumner=(Integer)ctx.getVariable("port"); + String username=(String)ctx.getVariable("username"); + String password=(String)ctx.getVariable("password"); + String srcdir=(String)ctx.getVariable("srcdir"); + String destdir=(String)ctx.getVariable("destdir"); + String filepparams=(String)ctx.getVariable("verifierfileparams"); + + logger.debug("task execution started remotserver {} , portnumner {},username {}, password {},filename : {} , waittime : {},No of iterations :{}", + remotserver,portnumner,username,password,verifierFilename,srcdir,destdir,waittime,iterations); + + String command= "cd "+destdir+ ";" + (filepparams!=null?filepparams:" ")+ " ./"+verifierFilename; + logger.debug("Execution command {}",command); + remotedeploymentVerificationService.executeScript(remotserver,username,password,portnumner,verifierFilename,filepparams,srcdir,destdir,waittime,iterations,command); + }catch(TaskExecutorException ex) { + throw ex; + } + + + } + +} + diff --git a/akraino/src/main/java/com/akraino/bpm/delegate/TempestRemoteScriptExecutorTaskDelegate.java b/akraino/src/main/java/com/akraino/bpm/delegate/TempestRemoteScriptExecutorTaskDelegate.java new file mode 100644 index 0000000..c992918 --- /dev/null +++ b/akraino/src/main/java/com/akraino/bpm/delegate/TempestRemoteScriptExecutorTaskDelegate.java @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.akraino.bpm.delegate; + +import org.camunda.bpm.engine.delegate.DelegateExecution; +import org.camunda.bpm.engine.delegate.JavaDelegate; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import com.akraino.bpm.service.RemoteScriptExecutionService; + + + +@Component +public class TempestRemoteScriptExecutorTaskDelegate implements JavaDelegate { + + + + private static Logger logger = LoggerFactory.getLogger(TempestRemoteScriptExecutorTaskDelegate.class); + + @Autowired + RemoteScriptExecutionService remoteScriptExecutionService; + + public void execute(DelegateExecution ctx) throws Exception { + String remotserver=(String)ctx.getVariable("remotserver"); + int portnumner=(Integer)ctx.getVariable("port"); + String username=(String)ctx.getVariable("username"); + String password=(String)ctx.getVariable("password"); + String filename=(String)ctx.getVariable("filename"); + String fileparams=(String)ctx.getVariable("fileparams"); + String srcdir=(String)ctx.getVariable("srcdir"); + String destdir=(String)ctx.getVariable("destdir"); + + + logger.debug("task execution started remotserver {} , portnumner {},username {}, password {},filename : {} ,fileparams={},src dir={},dest dir={}", + remotserver,portnumner,username,password,filename,fileparams,srcdir,destdir); + + String command= "cd "+destdir+ ";" + (fileparams!=null?fileparams:" ") + " ./"+filename; + logger.debug("Execution command {}",command); + remoteScriptExecutionService.executeRemoteScript(remotserver,username,password,portnumner,filename,fileparams,srcdir,destdir,command); + } + +} diff --git a/akraino/src/main/java/com/akraino/bpm/delegate/TempestScriptExecutorTaskDelegate.java b/akraino/src/main/java/com/akraino/bpm/delegate/TempestScriptExecutorTaskDelegate.java new file mode 100644 index 0000000..9671642 --- /dev/null +++ b/akraino/src/main/java/com/akraino/bpm/delegate/TempestScriptExecutorTaskDelegate.java @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.akraino.bpm.delegate; + +import org.camunda.bpm.engine.RuntimeService; +import org.camunda.bpm.engine.delegate.DelegateExecution; +import org.camunda.bpm.engine.delegate.JavaDelegate; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import com.akraino.bpm.service.ScriptExecutionService; + + +@Component +public class TempestScriptExecutorTaskDelegate implements JavaDelegate { + + @Autowired + RuntimeService runtimeService; + + private static Logger logger = LoggerFactory.getLogger(TempestScriptExecutorTaskDelegate.class); + + @Autowired + ScriptExecutionService scriptExecutionService; + + public void execute(DelegateExecution ctx) throws Exception { + String filepath=(String)ctx.getVariable("filepath"); + logger.debug("task execution started :"+filepath); + scriptExecutionService.executeScript(filepath); + } + +} diff --git a/akraino/src/main/java/com/akraino/bpm/delegate/WinScpScriptDelegate.java b/akraino/src/main/java/com/akraino/bpm/delegate/WinScpScriptDelegate.java new file mode 100644 index 0000000..e4ffcc0 --- /dev/null +++ b/akraino/src/main/java/com/akraino/bpm/delegate/WinScpScriptDelegate.java @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.akraino.bpm.delegate; + + +import org.camunda.bpm.engine.delegate.DelegateExecution; +import org.camunda.bpm.engine.delegate.JavaDelegate; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import com.akraino.bpm.model.BuildResponse; +import com.akraino.bpm.service.DeployResponseSenderService; +import com.akraino.bpm.service.ScriptExecutionService; + + +@Component +public class WinScpScriptDelegate implements JavaDelegate { + + private static Logger logger = LoggerFactory.getLogger(WinScpScriptDelegate.class); + + @Autowired + DeployResponseSenderService deployResponseSenderService; + + @Autowired + ScriptExecutionService scriptExecutionService; + + public void execute(DelegateExecution ctx) throws Exception { + + deployResponseSenderService.sendResponse(new BuildResponse("completed", "completed", "inprogress", "not started","not started","Boston")); + String filepath=(String)ctx.getVariable("ScpScriptFilepath"); + logger.debug("Win SCP task execution started :"+filepath); + scriptExecutionService.executeScript(filepath); + + + } + +} diff --git a/akraino/src/main/java/com/akraino/bpm/delegate/YamlVerificationDelegate.java b/akraino/src/main/java/com/akraino/bpm/delegate/YamlVerificationDelegate.java new file mode 100644 index 0000000..55c584a --- /dev/null +++ b/akraino/src/main/java/com/akraino/bpm/delegate/YamlVerificationDelegate.java @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.akraino.bpm.delegate; + + +import org.camunda.bpm.engine.RuntimeService; +import org.camunda.bpm.engine.delegate.DelegateExecution; +import org.camunda.bpm.engine.delegate.JavaDelegate; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import com.akraino.bpm.service.YamlVerificationService; + + +@Component +public class YamlVerificationDelegate implements JavaDelegate { + + @Autowired + RuntimeService runtimeService; + + private static Logger logger = LoggerFactory.getLogger(YamlVerificationDelegate.class); + + @Autowired + YamlVerificationService yamlVerificationService; + + public void execute(DelegateExecution ctx) throws Exception { + String targetFolder=(String)ctx.getVariable("targetfolder"); + logger.debug("task execution started :"+targetFolder); + yamlVerificationService.verify(targetFolder); + } + +} diff --git a/akraino/src/main/java/com/akraino/bpm/model/Airship.java b/akraino/src/main/java/com/akraino/bpm/model/Airship.java new file mode 100644 index 0000000..9a59e2c --- /dev/null +++ b/akraino/src/main/java/com/akraino/bpm/model/Airship.java @@ -0,0 +1,120 @@ +/* + * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.akraino.bpm.model; + +public class Airship { + + private String filepath; + private String fileparams; + private String winscpdir; + private String winscpfilepath; + private String winscpfileparams; + private String remotserver; + private int port; + private String username; + private String password; + private String destdir; + private String remotefilename; + private String remotefileparams; + + + public String getFilepath() { + return filepath; + } + public void setFilepath(String filepath) { + this.filepath = filepath; + } + public String getFileparams() { + return fileparams; + } + public void setFileparams(String fileparams) { + this.fileparams = fileparams; + } + public String getWinscpfilepath() { + return winscpfilepath; + } + public void setWinscpfilepath(String winscpfilepath) { + this.winscpfilepath = winscpfilepath; + } + public String getWinscpfileparams() { + return winscpfileparams; + } + public void setWinscpfileparams(String winscpfileparams) { + this.winscpfileparams = winscpfileparams; + } + public String getDestdir() { + return destdir; + } + public void setDestdir(String destdir) { + this.destdir = destdir; + } + + public String getRemotserver() { + return remotserver; + } + public void setRemotserver(String remotserver) { + this.remotserver = remotserver; + } + public int getPort() { + return port; + } + public void setPort(int port) { + this.port = port; + } + public String getUsername() { + return username; + } + public void setUsername(String username) { + this.username = username; + } + public String getPassword() { + return password; + } + public void setPassword(String password) { + this.password = password; + } + public String getRemotefilename() { + return remotefilename; + } + public void setRemotefilename(String remotefilename) { + this.remotefilename = remotefilename; + } + public String getRemotefileparams() { + return remotefileparams; + } + public void setRemotefileparams(String remotefileparams) { + this.remotefileparams = remotefileparams; + } + public String getWinscpdir() { + return winscpdir; + } + public void setWinscpdir(String winscpdir) { + this.winscpdir = winscpdir; + } + @Override + public String toString() { + return "Airship [filepath=" + filepath + ", fileparams=" + fileparams + ", winscpdir=" + winscpdir + + ", winscpfilepath=" + winscpfilepath + ", winscpfileparams=" + winscpfileparams + ", remotserver=" + + remotserver + ", port=" + port + ", username=" + username + ", password=" + password + ", destdir=" + + destdir + ", remotefilename=" + remotefilename + ", remotefileparams=" + remotefileparams + "]"; + } + + + + + + } diff --git a/akraino/src/main/java/com/akraino/bpm/model/Apache.java b/akraino/src/main/java/com/akraino/bpm/model/Apache.java new file mode 100644 index 0000000..eef8f96 --- /dev/null +++ b/akraino/src/main/java/com/akraino/bpm/model/Apache.java @@ -0,0 +1,194 @@ +/* + * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.akraino.bpm.model; + +public class Apache { + + private String remoteserver; + private String username; + private String password; + private int portnumber; + private String srcdir; + private String destdir; + private String filename; + private String fileparams; + private String deploymentverifier; + private String verifierparams; + int noofiterations; + int waittime; + String filetrasferscript; + String filetransferparams; + + + public String getSrcdir() { + return srcdir; + } + + + public void setSrcdir(String srcdir) { + this.srcdir = srcdir; + } + + + public String getDestdir() { + return destdir; + } + + + public void setDestdir(String destdir) { + this.destdir = destdir; + } + + + public String getRemoteserver() { + return remoteserver; + } + + + public void setRemoteserver(String remoteserver) { + this.remoteserver = remoteserver; + } + + + public String getUsername() { + return username; + } + + + public void setUsername(String username) { + this.username = username; + } + + + public String getPassword() { + return password; + } + + + public void setPassword(String password) { + this.password = password; + } + + + public int getPortnumber() { + return portnumber; + } + + + public void setPortnumber(int portnumber) { + this.portnumber = portnumber; + } + + + + + + public String getFilename() { + return filename; + } + + + public void setFilename(String filename) { + this.filename = filename; + } + + + public String getFileparams() { + return fileparams; + } + + + public void setFileparams(String fileparams) { + this.fileparams = fileparams; + } + + + public String getDeploymentverifier() { + return deploymentverifier; + } + + + public void setDeploymentverifier(String deploymentverifier) { + this.deploymentverifier = deploymentverifier; + } + + + public int getNoofiterations() { + return noofiterations; + } + + + public void setNoofiterations(int noofiterations) { + this.noofiterations = noofiterations; + } + + + public int getWaittime() { + return waittime; + } + + + public void setWaittime(int waittime) { + this.waittime = waittime; + } + + + + + public String getVerifierparams() { + return verifierparams; + } + + + public void setVerifierparams(String verifierparams) { + this.verifierparams = verifierparams; + } + + + public String getFiletrasferscript() { + return filetrasferscript; + } + + + public void setFiletrasferscript(String filetrasferscript) { + this.filetrasferscript = filetrasferscript; + } + + + public String getFiletransferparams() { + return filetransferparams; + } + + + public void setFiletransferparams(String filetransferparams) { + this.filetransferparams = filetransferparams; + } + + + @Override + public String toString() { + return "Apache [remoteserver=" + remoteserver + ", username=" + username + ", password=" + password + + ", portnumber=" + portnumber + ", srcdir=" + srcdir + ", destdir=" + destdir + ", filename=" + + filename + ", fileparams=" + fileparams + ", deploymentverifier=" + deploymentverifier + + ", verifierparams=" + verifierparams + ", noofiterations=" + noofiterations + ", waittime=" + waittime + + ", filetrasferscript=" + filetrasferscript + ", filetransferparams=" + filetransferparams + "]"; + } + + + + + } diff --git a/akraino/src/main/java/com/akraino/bpm/model/Build.java b/akraino/src/main/java/com/akraino/bpm/model/Build.java new file mode 100644 index 0000000..d8a0cd6 --- /dev/null +++ b/akraino/src/main/java/com/akraino/bpm/model/Build.java @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.akraino.bpm.model; + +public class Build { + + private String filepath; + private String fileparams; + private String targetfolder; + + + public String getFilepath() { + return filepath; + } + public void setFilepath(String filepath) { + this.filepath = filepath; + } + public String getFileparams() { + return fileparams; + } + public void setFileparams(String fileparams) { + this.fileparams = fileparams; + } + public String getTargetfolder() { + return targetfolder; + } + public void setTargetfolder(String targetfolder) { + this.targetfolder = targetfolder; + } + @Override + public String toString() { + return "Build [filepath=" + filepath + ", fileparams=" + fileparams + ", targetfolder=" + targetfolder + "]"; + } + + + + +} diff --git a/akraino/src/main/java/com/akraino/bpm/model/BuildResponse.java b/akraino/src/main/java/com/akraino/bpm/model/BuildResponse.java new file mode 100644 index 0000000..a365156 --- /dev/null +++ b/akraino/src/main/java/com/akraino/bpm/model/BuildResponse.java @@ -0,0 +1,113 @@ +/* + * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.akraino.bpm.model; + +public class BuildResponse { + + private String buildStatus; + private String createTarStatus; + private String genesisNodeStatus; + private String deployToolsStatus; + private String deployStatus; + private String siteName; + + + public BuildResponse(String buildStatus, String createTarStatus, String genesisNodeStatus, String deployToolsStatus,String deployStatus, + String siteName) { + super(); + this.buildStatus = buildStatus; + this.createTarStatus = createTarStatus; + this.genesisNodeStatus = genesisNodeStatus; + this.deployToolsStatus = deployToolsStatus; + this.deployStatus=deployStatus; + this.siteName = "siteName"; + } + + + public String getBuildStatus() { + return buildStatus; + } + + + public void setBuildStatus(String buildStatus) { + this.buildStatus = buildStatus; + } + + public String getCreateTarStatus() { + return createTarStatus; + } + + public void setCreateTarStatus(String createTarStatus) { + this.createTarStatus = createTarStatus; + } + + + public String getGenesisNodeStatus() { + return genesisNodeStatus; + } + + + public void setGenesisNodeStatus(String genesisNodeStatus) { + this.genesisNodeStatus = genesisNodeStatus; + } + + + public String getDeployToolsStatus() { + return deployToolsStatus; + } + + + public void setDeployToolsStatus(String deployToolsStatus) { + this.deployToolsStatus = deployToolsStatus; + } + + + public String getSiteName() { + return siteName; + } + + public void setSiteName(String siteName) { + this.siteName = siteName; + } + + + + + public String getDeployStatus() { + return deployStatus; + } + + + public void setDeployStatus(String deployStatus) { + this.deployStatus = deployStatus; + } + + + @Override + public String toString() { + return "BuildResponse [buildStatus=" + buildStatus + ", createTarStatus=" + createTarStatus + + ", genesisNodeStatus=" + genesisNodeStatus + ", deployToolsStatus=" + deployToolsStatus + + ", deployStatus=" + deployStatus + ", siteName=" + siteName + "]"; + } + + + + + + + +} diff --git a/akraino/src/main/java/com/akraino/bpm/model/Deploy.java b/akraino/src/main/java/com/akraino/bpm/model/Deploy.java new file mode 100644 index 0000000..221a981 --- /dev/null +++ b/akraino/src/main/java/com/akraino/bpm/model/Deploy.java @@ -0,0 +1,162 @@ +/* + * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.akraino.bpm.model; + +public class Deploy { + + private String filepath; + private String fileparams; + private String winscpfilepath; + private String winscpfileparams; + private String remotserver; + private int port; + private String username; + private String password; + private String destdir; + private String remotefilename; + private String remotefileparams; + private String deploymentverifier; + private String deploymentverifierfileparams; + int noofiterations; + int waittime; + String postverificationscript; + String postverificationScriptparams; + + public String getFilepath() { + return filepath; + } + public void setFilepath(String filepath) { + this.filepath = filepath; + } + public String getFileparams() { + return fileparams; + } + public void setFileparams(String fileparams) { + this.fileparams = fileparams; + } + public String getWinscpfilepath() { + return winscpfilepath; + } + public void setWinscpfilepath(String winscpfilepath) { + this.winscpfilepath = winscpfilepath; + } + public String getWinscpfileparams() { + return winscpfileparams; + } + public void setWinscpfileparams(String winscpfileparams) { + this.winscpfileparams = winscpfileparams; + } + public String getDestdir() { + return destdir; + } + public void setDestdir(String destdir) { + this.destdir = destdir; + } + + + + public String getRemotserver() { + return remotserver; + } + public void setRemotserver(String remotserver) { + this.remotserver = remotserver; + } + public int getPort() { + return port; + } + public void setPort(int port) { + this.port = port; + } + public String getUsername() { + return username; + } + public void setUsername(String username) { + this.username = username; + } + public String getPassword() { + return password; + } + public void setPassword(String password) { + this.password = password; + } + public String getRemotefilename() { + return remotefilename; + } + public void setRemotefilename(String remotefilename) { + this.remotefilename = remotefilename; + } + public String getRemotefileparams() { + return remotefileparams; + } + public void setRemotefileparams(String remotefileparams) { + this.remotefileparams = remotefileparams; + } + public String getDeploymentverifier() { + return deploymentverifier; + } + public void setDeploymentverifier(String deploymentverifier) { + this.deploymentverifier = deploymentverifier; + } + public int getNoofiterations() { + return noofiterations; + } + public void setNoofiterations(int noofiterations) { + this.noofiterations = noofiterations; + } + public int getWaittime() { + return waittime; + } + public void setWaittime(int waittime) { + this.waittime = waittime; + } + + public String getDeploymentverifierfileparams() { + return deploymentverifierfileparams; + } + + public void setDeploymentverifierfileparams(String deploymentverifierfileparams) { + this.deploymentverifierfileparams = deploymentverifierfileparams; + } + + public String getPostverificationscript() { + return postverificationscript; + } + + public void setPostverificationscript(String postverificationscript) { + this.postverificationscript = postverificationscript; + } + + public String getPostverificationScriptparams() { + return postverificationScriptparams; + } + + + public void setPostverificationScriptparams(String postverificationScriptparams) { + this.postverificationScriptparams = postverificationScriptparams; + } + @Override + public String toString() { + return "Deploy [filepath=" + filepath + ", fileparams=" + fileparams + ", winscpfilepath=" + winscpfilepath + + ", winscpfileparams=" + winscpfileparams + ", remotserver=" + remotserver + ", port=" + port + + ", username=" + username + ", password=" + password + ", destdir=" + destdir + ", remotefilename=" + + remotefilename + ", remotefileparams=" + remotefileparams + ", deploymentverifier=" + + deploymentverifier + ", deploymentverifierfileparams=" + deploymentverifierfileparams + + ", noofiterations=" + noofiterations + ", waittime=" + waittime + ", postverificationscript=" + + postverificationscript + ", postverificationScriptparams=" + postverificationScriptparams + "]"; + } + + } diff --git a/akraino/src/main/java/com/akraino/bpm/model/Onap.java b/akraino/src/main/java/com/akraino/bpm/model/Onap.java new file mode 100644 index 0000000..e30e527 --- /dev/null +++ b/akraino/src/main/java/com/akraino/bpm/model/Onap.java @@ -0,0 +1,193 @@ +/* + * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.akraino.bpm.model; + +public class Onap { + + private String remoteserver; + private String username; + private String password; + private int portnumber; + private String srcdir; + private String destdir; + private String filename; + private String fileparams; + private String deploymentverifier; + private String verifierparams; + int noofiterations; + int waittime; + String filetrasferscript; + String filetransferparams; + + + public String getSrcdir() { + return srcdir; + } + + + public void setSrcdir(String srcdir) { + this.srcdir = srcdir; + } + + + public String getDestdir() { + return destdir; + } + + + public void setDestdir(String destdir) { + this.destdir = destdir; + } + + + public String getRemoteserver() { + return remoteserver; + } + + + public void setRemoteserver(String remoteserver) { + this.remoteserver = remoteserver; + } + + + public String getUsername() { + return username; + } + + + public void setUsername(String username) { + this.username = username; + } + + + public String getPassword() { + return password; + } + + + public void setPassword(String password) { + this.password = password; + } + + + public int getPortnumber() { + return portnumber; + } + + + public void setPortnumber(int portnumber) { + this.portnumber = portnumber; + } + + + + + + public String getFilename() { + return filename; + } + + + public void setFilename(String filename) { + this.filename = filename; + } + + + public String getFileparams() { + return fileparams; + } + + + public void setFileparams(String fileparams) { + this.fileparams = fileparams; + } + + + public String getDeploymentverifier() { + return deploymentverifier; + } + + + public void setDeploymentverifier(String deploymentverifier) { + this.deploymentverifier = deploymentverifier; + } + + + public int getNoofiterations() { + return noofiterations; + } + + + public void setNoofiterations(int noofiterations) { + this.noofiterations = noofiterations; + } + + + public int getWaittime() { + return waittime; + } + + + public void setWaittime(int waittime) { + this.waittime = waittime; + } + + + + + public String getVerifierparams() { + return verifierparams; + } + + + public void setVerifierparams(String verifierparams) { + this.verifierparams = verifierparams; + } + + + public String getFiletrasferscript() { + return filetrasferscript; + } + + + public void setFiletrasferscript(String filetrasferscript) { + this.filetrasferscript = filetrasferscript; + } + + + + public String getFiletransferparams() { + return filetransferparams; + } + + + public void setFiletransferparams(String filetransferparams) { + this.filetransferparams = filetransferparams; + } + + + @Override + public String toString() { + return "Onap [remoteserver=" + remoteserver + ", username=" + username + ", password=" + password + + ", portnumber=" + portnumber + ", srcdir=" + srcdir + ", destdir=" + destdir + ", filename=" + + filename + ", fileparams=" + fileparams + ", deploymentverifier=" + deploymentverifier + + ", verifierparams=" + verifierparams + ", noofiterations=" + noofiterations + ", waittime=" + waittime + + ", filetrasferscript=" + filetrasferscript + ", filetransferparams=" + filetransferparams + "]"; + } + + + } diff --git a/akraino/src/main/java/com/akraino/bpm/model/Tempest.java b/akraino/src/main/java/com/akraino/bpm/model/Tempest.java new file mode 100644 index 0000000..2010cd3 --- /dev/null +++ b/akraino/src/main/java/com/akraino/bpm/model/Tempest.java @@ -0,0 +1,195 @@ +/* + * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.akraino.bpm.model; + +public class Tempest { + + private String remoteserver; + private String username; + private String password; + private int portnumber; + private String srcdir; + private String destdir; + private String filename; + private String fileparams; + private String deploymentverifier; + private String verifierparams; + int noofiterations; + int waittime; + String filetrasferscript; + String filetransferparams; + + + public String getSrcdir() { + return srcdir; + } + + + public void setSrcdir(String srcdir) { + this.srcdir = srcdir; + } + + + public String getDestdir() { + return destdir; + } + + + public void setDestdir(String destdir) { + this.destdir = destdir; + } + + + public String getRemoteserver() { + return remoteserver; + } + + + public void setRemoteserver(String remoteserver) { + this.remoteserver = remoteserver; + } + + + public String getUsername() { + return username; + } + + + public void setUsername(String username) { + this.username = username; + } + + + public String getPassword() { + return password; + } + + + public void setPassword(String password) { + this.password = password; + } + + + public int getPortnumber() { + return portnumber; + } + + + public void setPortnumber(int portnumber) { + this.portnumber = portnumber; + } + + + + + + public String getFilename() { + return filename; + } + + + public void setFilename(String filename) { + this.filename = filename; + } + + + public String getFileparams() { + return fileparams; + } + + + public void setFileparams(String fileparams) { + this.fileparams = fileparams; + } + + + public String getDeploymentverifier() { + return deploymentverifier; + } + + + public void setDeploymentverifier(String deploymentverifier) { + this.deploymentverifier = deploymentverifier; + } + + + public int getNoofiterations() { + return noofiterations; + } + + + public void setNoofiterations(int noofiterations) { + this.noofiterations = noofiterations; + } + + + public int getWaittime() { + return waittime; + } + + + public void setWaittime(int waittime) { + this.waittime = waittime; + } + + + + + public String getVerifierparams() { + return verifierparams; + } + + + public void setVerifierparams(String verifierparams) { + this.verifierparams = verifierparams; + } + + + public String getFiletrasferscript() { + return filetrasferscript; + } + + + public void setFiletrasferscript(String filetrasferscript) { + this.filetrasferscript = filetrasferscript; + } + + + + + public String getFiletransferparams() { + return filetransferparams; + } + + + public void setFiletransferparams(String filetransferparams) { + this.filetransferparams = filetransferparams; + } + + + @Override + public String toString() { + return "Tempest [remoteserver=" + remoteserver + ", username=" + username + ", password=" + password + + ", portnumber=" + portnumber + ", srcdir=" + srcdir + ", destdir=" + destdir + ", filename=" + + filename + ", fileparams=" + fileparams + ", deploymentverifier=" + deploymentverifier + + ", verifierparams=" + verifierparams + ", noofiterations=" + noofiterations + ", waittime=" + waittime + + ", filetrasferscript=" + filetrasferscript + ", filetransferparams=" + filetransferparams + "]"; + } + + + + } diff --git a/akraino/src/main/java/com/akraino/bpm/model/WorkflowResponse.java b/akraino/src/main/java/com/akraino/bpm/model/WorkflowResponse.java new file mode 100644 index 0000000..0250334 --- /dev/null +++ b/akraino/src/main/java/com/akraino/bpm/model/WorkflowResponse.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.akraino.bpm.model; + +public class WorkflowResponse { + int status; + String message; + + + public WorkflowResponse(int status, String message) { + super(); + this.status = status; + this.message = message; + } + public int getStatus() { + return status; + } + public void setStatus(int status) { + this.status = status; + } + public String getMessage() { + return message; + } + public void setMessage(String message) { + this.message = message; + } + +} diff --git a/akraino/src/main/java/com/akraino/bpm/service/BashScriptExecutionService.java b/akraino/src/main/java/com/akraino/bpm/service/BashScriptExecutionService.java new file mode 100644 index 0000000..d4ceef6 --- /dev/null +++ b/akraino/src/main/java/com/akraino/bpm/service/BashScriptExecutionService.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.akraino.bpm.service; + +public interface BashScriptExecutionService { + + public void executeScript(String filepatch); + + +} diff --git a/akraino/src/main/java/com/akraino/bpm/service/DeployResponseSenderService.java b/akraino/src/main/java/com/akraino/bpm/service/DeployResponseSenderService.java new file mode 100644 index 0000000..8c0463d --- /dev/null +++ b/akraino/src/main/java/com/akraino/bpm/service/DeployResponseSenderService.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.akraino.bpm.service; + +import com.akraino.bpm.model.BuildResponse; + +public interface DeployResponseSenderService { + + public void sendResponse(BuildResponse response); + +} diff --git a/akraino/src/main/java/com/akraino/bpm/service/DeploymentVerificationService.java b/akraino/src/main/java/com/akraino/bpm/service/DeploymentVerificationService.java new file mode 100644 index 0000000..24d9379 --- /dev/null +++ b/akraino/src/main/java/com/akraino/bpm/service/DeploymentVerificationService.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.akraino.bpm.service; + +public interface DeploymentVerificationService { + + public void executeScript(String filepatch,int waittime,int iterations); + + +} diff --git a/akraino/src/main/java/com/akraino/bpm/service/FileTransferService.java b/akraino/src/main/java/com/akraino/bpm/service/FileTransferService.java new file mode 100644 index 0000000..b776dc4 --- /dev/null +++ b/akraino/src/main/java/com/akraino/bpm/service/FileTransferService.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.akraino.bpm.service; + +public interface FileTransferService { + + public void transferFile(String srcdir,String destdir,String filename,String servername,String username,String password,int port); + public void transferFile(String srcdir,String destdir,String servername,String username,String password,int port); + + +} diff --git a/akraino/src/main/java/com/akraino/bpm/service/RemoteDeploymentVerificationService.java b/akraino/src/main/java/com/akraino/bpm/service/RemoteDeploymentVerificationService.java new file mode 100644 index 0000000..9a1426e --- /dev/null +++ b/akraino/src/main/java/com/akraino/bpm/service/RemoteDeploymentVerificationService.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.akraino.bpm.service; + +public interface RemoteDeploymentVerificationService { + + public void executeScript(String remoteserver,String username,String password,int portnumber,String filename, + String fileparams,String srcdir,String destdir,int waittime,int iterations,String command); + + +} diff --git a/akraino/src/main/java/com/akraino/bpm/service/RemoteScriptExecutionService.java b/akraino/src/main/java/com/akraino/bpm/service/RemoteScriptExecutionService.java new file mode 100644 index 0000000..5968d63 --- /dev/null +++ b/akraino/src/main/java/com/akraino/bpm/service/RemoteScriptExecutionService.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.akraino.bpm.service; + +public interface RemoteScriptExecutionService { + + public void executeRemoteScript(String remoteserver,String username,String password,int portnumber,String filename,String fileparams,String srcdir,String destdir,String command); + +} diff --git a/akraino/src/main/java/com/akraino/bpm/service/ScriptExecutionService.java b/akraino/src/main/java/com/akraino/bpm/service/ScriptExecutionService.java new file mode 100644 index 0000000..86f2dd6 --- /dev/null +++ b/akraino/src/main/java/com/akraino/bpm/service/ScriptExecutionService.java @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.akraino.bpm.service; + +public interface ScriptExecutionService { + + public void executeScript(String filepatch); + + public void executeCDScript(String dir,String cmd); + + //public void executeAirshipScript(String cmd); + + +} diff --git a/akraino/src/main/java/com/akraino/bpm/service/YamlVerificationService.java b/akraino/src/main/java/com/akraino/bpm/service/YamlVerificationService.java new file mode 100644 index 0000000..6eb6280 --- /dev/null +++ b/akraino/src/main/java/com/akraino/bpm/service/YamlVerificationService.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.akraino.bpm.service; + +public interface YamlVerificationService { + + public void verify (String target); + + +} diff --git a/akraino/src/main/java/com/akraino/bpm/service/impl/BashScriptExecutionServiceImpl.java b/akraino/src/main/java/com/akraino/bpm/service/impl/BashScriptExecutionServiceImpl.java new file mode 100644 index 0000000..c6cea57 --- /dev/null +++ b/akraino/src/main/java/com/akraino/bpm/service/impl/BashScriptExecutionServiceImpl.java @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.akraino.bpm.service.impl; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Service; + +import com.akraino.bpm.Exception.TaskExecutorException; +import com.akraino.bpm.service.BashScriptExecutionService; + + +@Service("bashscriptExecutionService") +public class BashScriptExecutionServiceImpl implements BashScriptExecutionService{ + + private static Logger logger = LoggerFactory.getLogger(BashScriptExecutionServiceImpl.class); + + public void executeScript(String filepatch) { + + try { + logger.debug("Executing the script............."); + Process p = Runtime.getRuntime().exec(filepatch); + p.waitFor(); + BufferedReader input = new BufferedReader(new InputStreamReader(p.getInputStream())); + String line = ""; + while ((line = input.readLine()) != null) { + logger.debug(line); + if(line.contains("Error:")) { + throw new TaskExecutorException("problem while executing the Bash script. "+line); + } + + } + + } catch (IOException e) { + throw new TaskExecutorException(filepatch + " not found."); + } catch (InterruptedException e) { + throw new TaskExecutorException("problem while executing the script "+filepatch); + } + + + } + +} diff --git a/akraino/src/main/java/com/akraino/bpm/service/impl/DeployResponseSenderServiceImpl.java b/akraino/src/main/java/com/akraino/bpm/service/impl/DeployResponseSenderServiceImpl.java new file mode 100644 index 0000000..842274b --- /dev/null +++ b/akraino/src/main/java/com/akraino/bpm/service/impl/DeployResponseSenderServiceImpl.java @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.akraino.bpm.service.impl; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpEntity; +import org.springframework.http.HttpMethod; +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Service; +import org.springframework.web.client.RestTemplate; + +import com.akraino.bpm.Exception.TaskExecutorException; +import com.akraino.bpm.config.CamundaCorsFilter; +import com.akraino.bpm.model.BuildResponse; +import com.akraino.bpm.service.DeployResponseSenderService; + +@Service("deployResponseSenderService") +public class DeployResponseSenderServiceImpl implements DeployResponseSenderService { + + private static Logger logger = LoggerFactory.getLogger(DeployResponseSenderServiceImpl.class); + + @Autowired + private RestTemplate restTemplate; + + @Autowired + private CamundaCorsFilter camundaCorsFilter; + + public void sendResponse(BuildResponse response) { + try { + logger.debug(response.toString()); + HttpEntity request = new HttpEntity(response); + ResponseEntity httpresposne =restTemplate + .exchange(camundaCorsFilter.getBuildresponseurl(), HttpMethod.POST, request, Void.class); + + logger.debug("Build response HttpResponseStatus :"+httpresposne.getStatusCodeValue()); + }catch (Exception e ) { + logger.error("problem while sending deploy response :"+e.getMessage()); + + throw new TaskExecutorException("problem while sending deploy response :"+e.getMessage()); + + } + } + + } diff --git a/akraino/src/main/java/com/akraino/bpm/service/impl/DeploymentverificationServiceImpl.java b/akraino/src/main/java/com/akraino/bpm/service/impl/DeploymentverificationServiceImpl.java new file mode 100644 index 0000000..dd62a5d --- /dev/null +++ b/akraino/src/main/java/com/akraino/bpm/service/impl/DeploymentverificationServiceImpl.java @@ -0,0 +1,74 @@ +/* + * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.akraino.bpm.service.impl; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Service; + +import com.akraino.bpm.Exception.TaskExecutorException; +import com.akraino.bpm.service.DeploymentVerificationService; + + +@Service("deploymentVerificationService") +public class DeploymentverificationServiceImpl implements DeploymentVerificationService{ + + private static Logger logger = LoggerFactory.getLogger(DeploymentverificationServiceImpl.class); + + public void executeScript(String filepatch,int waitttime,int iterations) { + + boolean issuccess=false; + for( int i=0;i<=iterations;i++) { + try { + logger.debug("Executing the deployment verification script.............iteration : {}",i); + Thread.sleep(waitttime*1000); + Process p = Runtime.getRuntime().exec(filepatch); + p.waitFor(); + BufferedReader input = new BufferedReader(new InputStreamReader(p.getInputStream())); + String line = ""; + while ((line = input.readLine()) != null) { + if(line.equals("0")) { + issuccess=true; + } + } + + logger.debug("Script exit code :"+p.exitValue()); + if(p.exitValue()!=0) { + throw new TaskExecutorException("problem while executing the script . exist code :"+p.exitValue()); + } + } catch (IOException e) { + throw new TaskExecutorException(filepatch + " not found."); + } catch (InterruptedException e) { + throw new TaskExecutorException("problem while executing the script "+filepatch); + } + if(issuccess) { + break; + } + + } + + if(!issuccess) { + logger.debug("verification script returned 1 "); + throw new TaskExecutorException("1"); + } + } + +} diff --git a/akraino/src/main/java/com/akraino/bpm/service/impl/FileTransferServiceImpl.java b/akraino/src/main/java/com/akraino/bpm/service/impl/FileTransferServiceImpl.java new file mode 100644 index 0000000..d8b158c --- /dev/null +++ b/akraino/src/main/java/com/akraino/bpm/service/impl/FileTransferServiceImpl.java @@ -0,0 +1,93 @@ +/* + * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.akraino.bpm.service.impl; + +import java.io.File; +import java.io.FileInputStream; +import java.util.ArrayList; +import java.util.List; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Service; + +import com.akraino.bpm.Exception.TaskExecutorException; +import com.akraino.bpm.service.FileTransferService; +import com.jcraft.jsch.ChannelSftp; +import com.jcraft.jsch.JSch; +import com.jcraft.jsch.Session; + +@Service("fileTransferService") +public class FileTransferServiceImpl implements FileTransferService { + + private static Logger logger = LoggerFactory.getLogger(FileTransferServiceImpl.class); + + public void transferFile(String srcdir, String destdir, String filename,String servername,String username,String password,int port) { + + logger.debug("file transfor filename={},srcdir={},destdir={}",filename,srcdir,destdir); + ChannelSftp sftpChannel=null; + try { + JSch jsch = new JSch(); + Session session = jsch.getSession(username, servername, port); + session.setConfig("StrictHostKeyChecking", "no"); + session.setPassword(password); + session.connect(); + sftpChannel = (ChannelSftp)session.openChannel("sftp"); + sftpChannel.setPty(true); + sftpChannel.connect(); + sftpChannel.cd(destdir); + sftpChannel.put(new FileInputStream(new File (srcdir+"/"+filename)), filename); + sftpChannel.chmod(Integer.parseInt("777", 8),filename); + } catch (Exception e) { + logger.error("Exception occured while ftp : "+e); + throw new TaskExecutorException("problem while transfering the file to remote machine :"+e.getMessage()); + } finally { + sftpChannel.disconnect(); + } + } + + + public void transferFile(String srcdir, String destdir,String servername,String username,String password,int port) { + + List files=getAllfiles(new File(srcdir)); + for(File file: files) { + transferFile(srcdir,destdir,file.getName(),servername,username,password,port); + } + + + } + + private List getAllfiles(File rootDirectory){ + List results = new ArrayList(); + + if(rootDirectory==null) { + throw new TaskExecutorException("problem while transfering the file to remote machine : src diectory Not found"); + } + + for(File currentItem : rootDirectory.listFiles()){ + if(currentItem.isDirectory()){ + results.addAll(getAllfiles(currentItem)); + } + else{ + results.add(currentItem); + } + } + return results; + } + + +} diff --git a/akraino/src/main/java/com/akraino/bpm/service/impl/RemoteDeploymentverificationServiceImpl.java b/akraino/src/main/java/com/akraino/bpm/service/impl/RemoteDeploymentverificationServiceImpl.java new file mode 100644 index 0000000..b3335e7 --- /dev/null +++ b/akraino/src/main/java/com/akraino/bpm/service/impl/RemoteDeploymentverificationServiceImpl.java @@ -0,0 +1,110 @@ +/* + * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.akraino.bpm.service.impl; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; + + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Service; + +import com.akraino.bpm.Exception.TaskExecutorException; +import com.akraino.bpm.service.RemoteDeploymentVerificationService; +import com.jcraft.jsch.ChannelExec; +import com.jcraft.jsch.JSch; +import com.jcraft.jsch.Session; + + +@Service("remoteDeploymentVerificationService") +public class RemoteDeploymentverificationServiceImpl implements RemoteDeploymentVerificationService{ + + private static Logger logger = LoggerFactory.getLogger(RemoteDeploymentverificationServiceImpl.class); + + public void executeScript(String remoteserver,String username,String password,int portnumber, + String filename,String fileparams,String srcdir,String destdir,int waitttime,int iterations,String command) { + + boolean issuccess=false; + //String filepath=destdir+"/"+filename+" "+(fileparams!=null?fileparams.replaceAll(",", " "):" "); + ChannelExec channelExec=null; + BufferedReader reader =null; + Session session=null; + for( int i=0;i<=iterations;i++) { + try { + logger.debug("Executing the deployment verification script.............iteration : {}",i); + Thread.sleep(waitttime*1000); + JSch jsch = new JSch(); + session = jsch.getSession(username, remoteserver, portnumber); + session.setConfig("StrictHostKeyChecking", "no"); + session.setPassword(password); + session.connect(); + channelExec = (ChannelExec)session.openChannel("exec"); + InputStream in = channelExec.getInputStream(); + channelExec.setPty(true); + channelExec.setCommand(command); + channelExec.connect(); + reader = new BufferedReader(new InputStreamReader(in)); + String line; + logger.debug("Script output......................"); + while ((line = reader.readLine()) != null){ + logger.debug(line); + } + channelExec.disconnect(); + while (!channelExec.isClosed()) { + + } + int exitStatus = channelExec.getExitStatus(); + logger.debug("Script exit code :"+exitStatus); + if(exitStatus==0) { + issuccess=true; + } + } + catch (IOException e) { + throw new TaskExecutorException(filename + " not found."); + } catch (Exception e) { + throw new TaskExecutorException("problem while executing the script "+command); + }finally{ + if(reader!=null) { + try { + reader.close(); + }catch(Exception e) { + throw new TaskExecutorException("onap build failed"); + } + } + if(session!=null) { + session.disconnect(); + } + } + + if(issuccess) { + break; + } + + } + + if(!issuccess) { + logger.debug("verification script returned 1 "); + throw new TaskExecutorException(" verification script exit code : 1"); + } + } + + + +} diff --git a/akraino/src/main/java/com/akraino/bpm/service/impl/RemoteScriptExecutionServiceImpl.java b/akraino/src/main/java/com/akraino/bpm/service/impl/RemoteScriptExecutionServiceImpl.java new file mode 100644 index 0000000..0a05f9f --- /dev/null +++ b/akraino/src/main/java/com/akraino/bpm/service/impl/RemoteScriptExecutionServiceImpl.java @@ -0,0 +1,106 @@ +/* + * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.akraino.bpm.service.impl; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; + + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Service; + +import com.akraino.bpm.Exception.TaskExecutorException; +import com.akraino.bpm.service.RemoteScriptExecutionService; +import com.jcraft.jsch.ChannelExec; +import com.jcraft.jsch.JSch; +import com.jcraft.jsch.Session; + +@Service("remoteScriptExecutionService") +public class RemoteScriptExecutionServiceImpl implements RemoteScriptExecutionService{ + + private static Logger logger = LoggerFactory.getLogger(RemoteScriptExecutionServiceImpl.class); + + public void executeRemoteScript(String remoteserver,String username,String password,int portnumber,String filename, + String fileparams,String srcdir,String destdir,String command) { + + //String filepath=destdir+"/"+filename+" "+(fileparams!=null?fileparams.replaceAll(",", " "):" "); + ChannelExec channelExec=null; + Session session=null; + BufferedReader reader =null; + try { + //tranferFile(remoteserver,portnumber,username,password,filename,srcdir,destdir); + logger.debug("executing the script "+command); + JSch jsch = new JSch(); + session = jsch.getSession(username, remoteserver, portnumber); + session.setConfig("StrictHostKeyChecking", "no"); + session.setPassword(password); + session.connect(); + channelExec = (ChannelExec)session.openChannel("exec"); + InputStream in = channelExec.getInputStream(); + channelExec.setCommand(command); + channelExec.setPty(true); + channelExec.connect(); + reader = new BufferedReader(new InputStreamReader(in)); + String line; + logger.debug("Script output......................"); + while ((line = reader.readLine()) != null){ + logger.debug(line); + } + + channelExec.disconnect(); + while (!channelExec.isClosed()) { + + } + + int exitStatus = channelExec.getExitStatus(); + + logger.debug("Script exit code :"+exitStatus); + if(exitStatus!=0) { + throw new TaskExecutorException("problem while executing the script . exist code :"+exitStatus); + } + + + } catch (IOException e) { + throw new TaskExecutorException(filename + " not found."); + } catch (Exception e) { + throw new TaskExecutorException("Problem while executing script"+e.getMessage()); + }finally{ + if(reader!=null) { + try { + reader.close(); + }catch(Exception e) { + throw new TaskExecutorException("onap build failed"); + } + } + if(session!=null) { + session.disconnect(); + } + } + + + + } + + + + +} + + diff --git a/akraino/src/main/java/com/akraino/bpm/service/impl/ScriptExecutionServiceImpl.java b/akraino/src/main/java/com/akraino/bpm/service/impl/ScriptExecutionServiceImpl.java new file mode 100644 index 0000000..ee02934 --- /dev/null +++ b/akraino/src/main/java/com/akraino/bpm/service/impl/ScriptExecutionServiceImpl.java @@ -0,0 +1,115 @@ +/* + * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.akraino.bpm.service.impl; + +import java.io.BufferedReader; +import java.io.File; +import java.io.IOException; +import java.io.InputStreamReader; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Service; + +import com.akraino.bpm.Exception.TaskExecutorException; +import com.akraino.bpm.service.ScriptExecutionService; + +@Service("scriptExecutionService") +public class ScriptExecutionServiceImpl implements ScriptExecutionService{ + + private static Logger logger = LoggerFactory.getLogger(ScriptExecutionServiceImpl.class); + + public void executeScript(String filepatch) { + + try { + logger.debug("Executing the script............."); + Process p = Runtime.getRuntime().exec(filepatch); + p.waitFor(); + BufferedReader input = new BufferedReader(new InputStreamReader(p.getInputStream())); + String line = ""; + while ((line = input.readLine()) != null) { + logger.debug(line); + } + logger.debug("Script exit code :"+p.exitValue()); + if(p.exitValue()!=0) { + throw new TaskExecutorException("problem while executing the script . exist code :"+p.exitValue()); + } + + + } catch (IOException e) { + throw new TaskExecutorException(filepatch + " not found."); + } catch (InterruptedException e) { + throw new TaskExecutorException("problem while executing the script "+filepatch); + } + + } + public void executeCDScript(String dir,String cmd) { + + try { + logger.debug("Executing the script.............dir:{},command:{}",dir,cmd); + + String[] command = { "/bin/sh", "-c", "sh "+cmd }; + Process p = Runtime.getRuntime().exec(command, null, new File(dir)); + p.waitFor(); + BufferedReader input = new BufferedReader(new InputStreamReader(p.getInputStream())); + String line = ""; + while ((line = input.readLine()) != null) { + logger.debug(line); + } + logger.debug("Script exit code :"+p.exitValue()); + if(p.exitValue()!=0) { + throw new TaskExecutorException("problem while executing the script . exist code :"+p.exitValue()); + } + + + } catch (IOException e) { + throw new TaskExecutorException(cmd + " not found."); + } catch (InterruptedException e) { + throw new TaskExecutorException("problem while executing the script "+cmd); + } + + } + + + /*public void executeAirshipScript(String cmd) { + + try { + logger.debug("Executing the script.............{}",cmd); + ProcessBuilder pb = new ProcessBuilder(cmd); + Process shellProcess = pb.start(); + + shellProcess.waitFor(); + BufferedReader input = new BufferedReader(new InputStreamReader(shellProcess.getInputStream())); + String line = ""; + while ((line = input.readLine()) != null) { + logger.debug(line); + } + logger.debug("Script exit code :"+shellProcess.exitValue()); + if(shellProcess.exitValue()!=0) { + throw new TaskExecutorException("problem while executing the script . exist code :"+shellProcess.exitValue()); + } + + + } catch (IOException e) { + throw new TaskExecutorException(cmd + " not found."); + } catch (InterruptedException e) { + throw new TaskExecutorException("problem while executing the script "+cmd); + } + + }*/ + +} diff --git a/akraino/src/main/java/com/akraino/bpm/service/impl/YamlFileFilter.java b/akraino/src/main/java/com/akraino/bpm/service/impl/YamlFileFilter.java new file mode 100644 index 0000000..38fb232 --- /dev/null +++ b/akraino/src/main/java/com/akraino/bpm/service/impl/YamlFileFilter.java @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.akraino.bpm.service.impl; + +import java.io.File; +import java.io.FileFilter; + +import org.springframework.stereotype.Component; + +@Component +public class YamlFileFilter implements FileFilter { + + private final String[] okFileExtensions = new String[] {"yaml", "YAML"}; + + public boolean accept(File file) + { + for (String extension : okFileExtensions) + { + if (file.getName().toLowerCase().endsWith(extension)) + { + return true; + } + } + return false; + } + +} diff --git a/akraino/src/main/java/com/akraino/bpm/service/impl/YamlVerificationServiceImpl.java b/akraino/src/main/java/com/akraino/bpm/service/impl/YamlVerificationServiceImpl.java new file mode 100644 index 0000000..7265d45 --- /dev/null +++ b/akraino/src/main/java/com/akraino/bpm/service/impl/YamlVerificationServiceImpl.java @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.akraino.bpm.service.impl; + +import java.io.File; +import java.io.FileFilter; +import java.io.FileInputStream; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.yaml.snakeyaml.Yaml; + +import com.akraino.bpm.Exception.TaskExecutorException; +import com.akraino.bpm.service.YamlVerificationService; + +@Service("yamlVerificationService") +public class YamlVerificationServiceImpl implements YamlVerificationService{ + + private static Logger logger = LoggerFactory.getLogger(YamlVerificationServiceImpl.class); + + @Autowired + YamlFileFilter yamlFileFilter; + + public void verify(String taget) { + + logger.debug("Verifying the YAML files ............."); + List yamlFileList =searchForFile(new File(taget),yamlFileFilter); + for(File file:yamlFileList) { + try { + Object obj =check(file); + if(obj==null) { + throw new TaskExecutorException(file + "parsing failed."); + } + }catch(Exception ex ) { + throw new TaskExecutorException(file + " not found."); + } + + + + } + } + + private List searchForFile(File rootDirectory, FileFilter filter){ + List results = new ArrayList(); + for(File currentItem : rootDirectory.listFiles(filter)){ + if(currentItem.isDirectory()){ + results.addAll(searchForFile(currentItem, filter)); + } + else{ + results.add(currentItem); + } + } + return results; + } + + + + private Object check(File file) throws IOException { + Yaml yaml = new Yaml(); + Object obj = yaml.load(new FileInputStream(file)); + return obj; + } + + +} diff --git a/akraino/src/main/resources/airship.bpmn b/akraino/src/main/resources/airship.bpmn new file mode 100644 index 0000000..b7c47e2 --- /dev/null +++ b/akraino/src/main/resources/airship.bpmn @@ -0,0 +1,106 @@ + + + + + + SequenceFlow_125l5l0 + + + SequenceFlow_125l5l0 + SequenceFlow_0ji1v0x + + + + SequenceFlow_0ji1v0x + SequenceFlow_1jh4nm3 + + + + SequenceFlow_1jh4nm3 + + + Rest + + + + Script execution Task + + + + Win Scp Script Executor + + + + Remote Script Executor + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/akraino/src/main/resources/apache.bpmn b/akraino/src/main/resources/apache.bpmn new file mode 100644 index 0000000..d1cd957 --- /dev/null +++ b/akraino/src/main/resources/apache.bpmn @@ -0,0 +1,80 @@ + + + + + SequenceFlow_05ci0iu + + + SequenceFlow_0envlli + + + + + SequenceFlow_05ci0iu + SequenceFlow_0envlli + + + Rest + + + + Script execution Task + + + + File transfer script + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/akraino/src/main/resources/application.yaml b/akraino/src/main/resources/application.yaml new file mode 100644 index 0000000..3063508 --- /dev/null +++ b/akraino/src/main/resources/application.yaml @@ -0,0 +1,14 @@ +camunda.bpm: + admin-user: + id: admin + password: admin + firstName: administrator + filter: + create: All tasks + buildresponseurl: http://localhost:8069/AECPortalMgmt/install/status/ +logging: + file: C:/tmp/scriptexecutor.log + level: + com.camunda.bpm: debug + org.camunda.bpm: warn + org.springframework: warn \ No newline at end of file diff --git a/akraino/src/main/resources/build.bpmn b/akraino/src/main/resources/build.bpmn new file mode 100644 index 0000000..9d7ca24 --- /dev/null +++ b/akraino/src/main/resources/build.bpmn @@ -0,0 +1,80 @@ + + + + + + SequenceFlow_125l5l0 + + + SequenceFlow_125l5l0 + SequenceFlow_0ji1v0x + + + + SequenceFlow_0ji1v0x + + + Rest + + + + Script execution Task + + + + Yaml File validtor + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/akraino/src/main/resources/deploy.bpmn b/akraino/src/main/resources/deploy.bpmn new file mode 100644 index 0000000..29c2330 --- /dev/null +++ b/akraino/src/main/resources/deploy.bpmn @@ -0,0 +1,155 @@ + + + + + + SequenceFlow_125l5l0 + + + SequenceFlow_125l5l0 + SequenceFlow_0ji1v0x + + + + SequenceFlow_0ji1v0x + SequenceFlow_1jh4nm3 + + + + SequenceFlow_064ccvc + SequenceFlow_0e9qo9c + + + + SequenceFlow_1jh4nm3 + SequenceFlow_064ccvc + + + + SequenceFlow_0e9qo9c + + + Rest + + + + Script execution Task + + + + Win Scp Script Executor + + + + Deployment verifier + + + + Remote Script Executor + + + + Post verification  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/akraino/src/main/resources/onap.bpmn b/akraino/src/main/resources/onap.bpmn new file mode 100644 index 0000000..656ecd1 --- /dev/null +++ b/akraino/src/main/resources/onap.bpmn @@ -0,0 +1,106 @@ + + + + + SequenceFlow_05ci0iu + + + SequenceFlow_0envlli + SequenceFlow_1ssw8fq + + + SequenceFlow_1ssw8fq + + + + + + SequenceFlow_05ci0iu + SequenceFlow_0envlli + + + Rest + + + + Script execution Task + + + + Deployment verifier + + + + File transfer script + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/akraino/src/main/resources/singledeploy.bpmn b/akraino/src/main/resources/singledeploy.bpmn new file mode 100644 index 0000000..b20b067 --- /dev/null +++ b/akraino/src/main/resources/singledeploy.bpmn @@ -0,0 +1,54 @@ + + + + + + SequenceFlow_125l5l0 + + + SequenceFlow_125l5l0 + + + Rest + + + + Script execution Task + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/akraino/src/main/resources/tespest.bpmn b/akraino/src/main/resources/tespest.bpmn new file mode 100644 index 0000000..65c0b7a --- /dev/null +++ b/akraino/src/main/resources/tespest.bpmn @@ -0,0 +1,106 @@ + + + + + SequenceFlow_05ci0iu + + + SequenceFlow_0envlli + SequenceFlow_1ssw8fq + + + SequenceFlow_1ssw8fq + + + + + + SequenceFlow_05ci0iu + SequenceFlow_0envlli + + + Rest + + + + Script execution Task + + + + Deployment verifier + + + + File transfer script + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..a61683c --- /dev/null +++ b/build.sh @@ -0,0 +1,32 @@ +#!/bin/bash +# +# Copyright (c) 2018 AT&T Intellectual Property. All other rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +#Pass version number as argument to run script: +#example : ./build.sh 1.0.0-SNAPSHOT +CON_NAME="akraino-camunda-workflow-engine" +version=$1 +build=`curl -s http://nexus3.att-akraino.org/repository/maven-snapshots/org/akraino/camunda_workflow/$version/maven-metadata.xml | grep '' | head -1 | sed "s/.*\([^<]*\)<\/value>.*/\1/"` +jar=camunda_workflow-$build.jar +path="http://nexus3.att-akraino.org/repository/maven-snapshots/org/akraino/camunda_workflow/$version" +JARURL="$path/$jar" +wget $JARURL + +VERSION=$build +sudo docker build -f Dockerfile -t "nexus3.att-akraino.org:10001/${CON_NAME}:${VERSION}" . +sudo docker tag "nexus3.att-akraino.org:10001/${CON_NAME}:${VERSION}" "nexus3.att-akraino.org:10001/${CON_NAME}:latest" +sudo docker login --username jenkins --password ZFXsSJjs nexus3.att-akraino.org:10001 +sudo docker push "nexus3.att-akraino.org:10001/${CON_NAME}:${VERSION}" +sudo docker push "nexus3.att-akraino.org:10001/${CON_NAME}:latest" diff --git a/config/.application.yaml.swp b/config/.application.yaml.swp new file mode 100644 index 0000000..e1f2e82 Binary files /dev/null and b/config/.application.yaml.swp differ diff --git a/config/airship.bpmn b/config/airship.bpmn new file mode 100644 index 0000000..b7c47e2 --- /dev/null +++ b/config/airship.bpmn @@ -0,0 +1,106 @@ + + + + + + SequenceFlow_125l5l0 + + + SequenceFlow_125l5l0 + SequenceFlow_0ji1v0x + + + + SequenceFlow_0ji1v0x + SequenceFlow_1jh4nm3 + + + + SequenceFlow_1jh4nm3 + + + Rest + + + + Script execution Task + + + + Win Scp Script Executor + + + + Remote Script Executor + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/apache.bpmn b/config/apache.bpmn new file mode 100644 index 0000000..dadb140 --- /dev/null +++ b/config/apache.bpmn @@ -0,0 +1,80 @@ + + + + + SequenceFlow_05ci0iu + + + SequenceFlow_0envlli + + + + + SequenceFlow_05ci0iu + SequenceFlow_0envlli + + + Rest + + + + Script execution Task + + + + File transfer script + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/application.yaml b/config/application.yaml new file mode 100644 index 0000000..111c60b --- /dev/null +++ b/config/application.yaml @@ -0,0 +1,15 @@ +camunda.bpm: + admin-user: + id: admin + password: admin + firstName: administrator + filter: + create: All tasks + buildresponseurl: http://135.16.101.85:8069/AECPortalMgmt/edgeSites/status +logging: + file: /var/log/scriptexecutor.log + level: + com.camunda.bpm: debug + org.camunda.bpm: warn + org.springframework: warn +spring.transaction.default-timeout: 21600 diff --git a/config/build.bpmn b/config/build.bpmn new file mode 100644 index 0000000..9d7ca24 --- /dev/null +++ b/config/build.bpmn @@ -0,0 +1,80 @@ + + + + + + SequenceFlow_125l5l0 + + + SequenceFlow_125l5l0 + SequenceFlow_0ji1v0x + + + + SequenceFlow_0ji1v0x + + + Rest + + + + Script execution Task + + + + Yaml File validtor + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/deploy.bpmn b/config/deploy.bpmn new file mode 100644 index 0000000..29c2330 --- /dev/null +++ b/config/deploy.bpmn @@ -0,0 +1,155 @@ + + + + + + SequenceFlow_125l5l0 + + + SequenceFlow_125l5l0 + SequenceFlow_0ji1v0x + + + + SequenceFlow_0ji1v0x + SequenceFlow_1jh4nm3 + + + + SequenceFlow_064ccvc + SequenceFlow_0e9qo9c + + + + SequenceFlow_1jh4nm3 + SequenceFlow_064ccvc + + + + SequenceFlow_0e9qo9c + + + Rest + + + + Script execution Task + + + + Win Scp Script Executor + + + + Deployment verifier + + + + Remote Script Executor + + + + Post verification  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/onap.bpmn b/config/onap.bpmn new file mode 100644 index 0000000..656ecd1 --- /dev/null +++ b/config/onap.bpmn @@ -0,0 +1,106 @@ + + + + + SequenceFlow_05ci0iu + + + SequenceFlow_0envlli + SequenceFlow_1ssw8fq + + + SequenceFlow_1ssw8fq + + + + + + SequenceFlow_05ci0iu + SequenceFlow_0envlli + + + Rest + + + + Script execution Task + + + + Deployment verifier + + + + File transfer script + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/tespest.bpmn b/config/tespest.bpmn new file mode 100644 index 0000000..65c0b7a --- /dev/null +++ b/config/tespest.bpmn @@ -0,0 +1,106 @@ + + + + + SequenceFlow_05ci0iu + + + SequenceFlow_0envlli + SequenceFlow_1ssw8fq + + + SequenceFlow_1ssw8fq + + + + + + SequenceFlow_05ci0iu + SequenceFlow_0envlli + + + Rest + + + + Script execution Task + + + + Deployment verifier + + + + File transfer script + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +