diff --git a/Jenkinsfile b/Jenkinsfile index eeb9989e..a0f4e6d6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -77,15 +77,28 @@ pipeline { } } parallel { - // stage('Group Oracle') { + // stage('Group Oracle / Optimize') { + // when { + // anyOf { + // expression { return params.TEST } + // changeset "templates/sag-db-oracle" + // changeset "templates/sag-optimize-*" + // changeset "templates/sag-infradc" + // } + // } // agent { label 'docker' } // environment { // CC_ENV = 'oracle' // } // steps { + // sh 'docker-compose pull cc' // sh 'docker-compose up -V -d --remove-orphans cc' // sh 'docker-compose -f templates/sag-db-oracle/docker-compose.yml up -d oracle' + // sh './provisionw sag-db-oracle' + // sh './provisionw sag-infradc' + // sh './provisionw sag-optimize-analysis' + // sh './provisionw sag-optimize-wsdc' // } // post { // always { @@ -94,15 +107,28 @@ pipeline { // } // } // } - // stage('Group SQLServer') { + // stage('Group SQLServer / MWS') { + // when { + // anyOf { + // expression { return params.TEST } + // changeset "templates/sag-db-sqlserver" + // changeset "templates/sag-mws-*" + // } + // } // agent { label 'docker' } // environment { // CC_ENV = 'sqlserver' // } // steps { + // sh 'docker-compose pull cc' // sh 'docker-compose up -V -d --remove-orphans cc' // sh 'docker-compose -f templates/sag-db-sqlserver/docker-compose.yml up -d sqlserver' + // sh './provisionw sag-db-sqlserver' + // sh './provisionw sag-mws-server' + // sh './provisionw sag-mws-infradcui' + // sh './provisionw sag-mws-applatform' + // sh './provisionw sag-mws-mftui' // } // post { // always { @@ -111,25 +137,91 @@ pipeline { // } // } // } - stage('Group Core') { + stage('Group MySQL / DAP') { + when { + anyOf { + expression { return params.TEST } + changeset "templates/sag-db-mysql" + changeset "templates/sag-is-*" + changeset "templates/sag-des-*" + } + } + agent { label 'docker' } + environment { + CC_ENV = 'mysql' + } + steps { + sh 'docker-compose pull cc' + sh 'docker-compose up -V -d --remove-orphans cc' + sh 'docker-compose -f templates/sag-db-mysql/docker-compose.yml up -d mysql' + + sh './provisionw sag-db-mysql' + sh './provisionw sag-is-cluster db.type=mysqlce' + sh './provisionw sag-is-config' + sh './provisionw sag-des' + sh './provisionw sag-des-config' + sh "./provisionw sag-is-mft" + // sh "./provisionw sag-mft-config" # FAILING! + } + post { + always { + sh 'docker-compose -f templates/sag-db-mysql/docker-compose.yml down' + sh 'docker-compose down' + } + } + } + stage('Group IoT') { + when { + anyOf { + expression { return params.TEST } + changeset "templates/sag-um-*" + changeset "templates/sag-tc-*" + changeset "templates/sag-tdb-*" + changeset "templates/sag-apama-*" + } + } agent { label 'docker' } environment { CC_ENV = 'dev' } steps { - // checkout scm - // sh 'docker-compose pull cc' + sh 'docker-compose pull cc' sh 'docker-compose up -V -d --remove-orphans cc' sh './provisionw sag-um-server' sh './provisionw sag-um-config' + + sh './provisionw sag-apama-correlator' + sh './provisionw sag-tc-server' - // sh './provisionw sag-tdb-server' - sh './provisionw sag-is-server' + //sh './provisionw sag-tdb-server' + } + post { + always { + sh 'docker-compose down' + } + } + } + stage('Group Integration') { + when { + anyOf { + expression { return params.TEST } + changeset "templates/sag-is-*" + changeset "templates/sag-msc-*" + } + } + agent { label 'docker' } + environment { + CC_ENV = 'dev' + } + steps { + sh 'docker-compose pull cc' + sh 'docker-compose up -V -d --remove-orphans cc' + + sh "./provisionw sag-msc-server" + sh './provisionw sag-is-cloudstreams' + sh './provisionw sag-is-applatform' sh './provisionw sag-is-config' - // sh './provisionw sag-des' - // sh './provisionw sag-des-config' - // sh './provisionw sag-apama-correlator' } post { always { @@ -137,33 +229,66 @@ pipeline { } } } - // stage('Group 2') { - // agent { label 'docker' } - // environment { - // CC_ENV = 'dev' - // } - // steps { - // // sh 'docker-compose pull cc' - // sh 'docker-compose up -V -d --remove-orphans cc' + stage('Group Tools') { + when { + anyOf { + expression { return params.TEST } + changeset "templates/sag-abe" + changeset "templates/sag-designer-*" + } + } + agent { label 'docker' } + environment { + CC_ENV = 'dev' + } + steps { + // sh 'docker-compose pull cc' + sh 'docker-compose up -V -d --remove-orphans cc' - // sh './provisionw sag-abe' - // sh "./provisionw sag-msc-server" - // sh './provisionw sag-is-cloudstreams' - // sh './provisionw sag-designer-services' - // sh './provisionw sag-designer-cloudstreams' - // sh './provisionw sag-exx-broker' - // sh './provisionw sag-exx-c-rpc-server' - // sh './provisionw sag-exx-java-rpc-server' - // sh './provisionw sag-exx-xml-rpc-server' - // sh './provisionw sag-infradc' - // // sh './provisionw sag-onedata' - // } - // post { - // always { - // sh 'docker-compose down' - // } - // } - // } + sh './provisionw sag-abe' + + sh './provisionw sag-designer-services' + sh './provisionw sag-designer-cloudstreams' + + // sh './provisionw sag-onedata' + } + post { + always { + sh 'docker-compose down' + } + } + } + stage('Group EntireX') { + when { + anyOf { + expression { return params.TEST } + changeset "templates/sag-exx-**" + } + } + agent { label 'docker' } + environment { + CC_ENV = 'dev' + } + steps { + sh 'docker-compose pull cc' + sh 'docker-compose up -V -d --remove-orphans cc' + + sh './provisionw sag-exx-broker' + sh './provisionw sag-exx-c-rpc-server' + sh './provisionw sag-exx-java-rpc-server' + sh './provisionw sag-exx-xml-rpc-server' + sh './provisionw sag-exx-csl-rpc-server' + sh './provisionw sag-exx-ims-rpc-server' + sh './provisionw sag-exx-mf-broker' + sh './provisionw sag-exx-mq-rpc-server' + sh './provisionw sag-exx-net-rpc-server' + } + post { + always { + sh 'docker-compose down' + } + } + } } } stage("Build Images") { @@ -184,26 +309,26 @@ pipeline { } } } - // stage('Group 2') { - // agent { label 'docker' } - // steps { - // dir ('containers') { - // sh 'docker-compose config' - // sh 'docker-compose build --no-cache --force-rm asset-builder microservices-runtime cloud-streams' - // sh 'docker-compose push asset-builder microservices-runtime cloud-streams' - // } - // } - // } - // stage('Group 3') { - // agent { label 'docker' } - // steps { - // dir ('containers') { - // sh 'docker-compose config' - // sh 'docker-compose build --no-cache --force-rm entirex-broker entirex-java-rpc-server entirex-xml-rpc-server' - // sh 'docker-compose push entirex-broker entirex-java-rpc-server entirex-xml-rpc-server' - // } - // } - // } + stage('Group 2') { + agent { label 'docker' } + steps { + dir ('containers') { + sh 'docker-compose config' + sh 'docker-compose build --no-cache --force-rm asset-builder microservices-runtime cloud-streams' + sh 'docker-compose push asset-builder microservices-runtime cloud-streams' + } + } + } + stage('Group 3') { + agent { label 'docker' } + steps { + dir ('containers') { + sh 'docker-compose config' + sh 'docker-compose build --no-cache --force-rm entirex-broker entirex-java-rpc-server entirex-xml-rpc-server' + sh 'docker-compose push entirex-broker entirex-java-rpc-server entirex-xml-rpc-server' + } + } + } } } stage("Deploy") { diff --git a/README.md b/README.md index 23998a06..74a024ab 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,8 @@ Template alias | Provisions Platform Manager Template alias | Description -------------------------|-------------------------------- [sag-db-oracle](templates/sag-db-oracle) | Creates a user, database, and webMethods database schemas on an Oracle database server. -[sag-db-sqlserver](templates/sag-db-sqlserver) | Creates a user, database, and webMethods database schemas on an SQL Server database server. +[sag-db-sqlserver](templates/sag-db-sqlserver) | Creates a user, database, and webMethods database schemas on a SQL Server database server. +[sag-db-mysql](templates/sag-db-mysql) | Creates a user, database, and webMethods database schemas on a MySQL database server. ### Micro Templates for provisioning Software AG products @@ -75,8 +76,8 @@ Template alias | Provisions [sag-is-cloudstreams](templates/sag-is-applatform) | Cloudstreams on Integration Server or Microservices runtime [sag-is-applatform](templates/sag-is-applatform) | Application Platform on Integration Server or Microservices runtime [sag-msc-server](templates/sag-msc-server) | webMethods Microservices Runtime -[sag-mws-server](templates/sag-mws-server) | My webMethods server -[sag-mws-infradc](templates/sag-mws-server) | Infrastructure Data Collector UI on My webMethods server + [sag-tc-server](templates/sag-tc-server) | Terracotta BigMemory server [sag-tc-cluster](templates/sag-tc-cluster) | Terracotta BigMemory cluster [sag-tdb-server](templates/sag-tdb-server) | Terracotta DB server diff --git a/environments/mysql/env.properties b/environments/mysql/env.properties new file mode 100644 index 00000000..0e32c25f --- /dev/null +++ b/environments/mysql/env.properties @@ -0,0 +1,41 @@ +############################################################################### +# Copyright � 2013 - 2018 Software AG, Darmstadt, Germany and/or its licensors +# +# SPDX-License-Identifier: Apache-2.0 +# +# 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. +# +############################################################################### +# properties for local development/testing on TRUNK + +db.host=mysql +db.type=mysql +db.username=webm +db.password=webm +db.name=webm +db.url="jdbc:mysql://mysql:3306/webm" +db.admin.password=root +db.admin.username=root + +um.fixes=[] +um.url=nsp://localhost:9000 +tc.fixes=[] +is.fixes=[] +is.um.url=nsp://localhost:9000 +des.fixes=[] +des.um.url=nsp://localhost:9000 +apama.fixes=[] +cst.fixes=[] +infradc.jms.host=localhost +infradc.fixes=[] +mws.infradcui.fixes=[] diff --git a/environments/sqlserver/env.properties b/environments/sqlserver/env.properties index e121a6ef..bf60fe4a 100644 --- a/environments/sqlserver/env.properties +++ b/environments/sqlserver/env.properties @@ -38,3 +38,4 @@ cst.fixes=[] infradc.jms.host=localhost infradc.fixes=[] mws.infradcui.fixes=[] +mws.applatform.fixes=[] diff --git a/provisionw b/provisionw index ff6a1830..b4012e85 100755 --- a/provisionw +++ b/provisionw @@ -1,6 +1,6 @@ -#!/bin/sh +#!/bin/sh -e ############################################################################### -# Copyright © 2013 - 2018 Software AG, Darmstadt, Germany and/or its licensors +# Copyright � 2013 - 2018 Software AG, Darmstadt, Germany and/or its licensors # # SPDX-License-Identifier: Apache-2.0 # @@ -43,10 +43,32 @@ echo "NOTE: it takes up to a minute to become available" echo "====================================================================" echo "" -docker-compose exec -T \ - cc bash -c \ - "cd /opt/sagtools/profiles/CCE/data/templates/composite/$TEMPLATE_ALIAS; if /opt/sagtools/provision.sh $TEMPLATE_ALIAS $PARAMS; then if [ -f test.sh ]; then ./test.sh ; fi; fi" +# apply template +docker-compose exec -T cc bash -c "/opt/sagtools/provision.sh $TEMPLATE_ALIAS $PARAMS" +echo "" echo "====================================================================" echo "Command Central Web UI: https://`docker-compose -f $DIRNAME/docker-compose.yml port cc 8091`" echo "====================================================================" +echo "" +echo "Testing '$TEMPLATE_ALIAS' ..." +echo "" + +# test +if docker-compose exec -T cc bash -c "cd /opt/sagtools/profiles/CCE/data/templates/composite/$TEMPLATE_ALIAS; if [ -f test.sh ]; then ./test.sh ; else echo 'WARNING: No test.sh found!'; fi" ; then + echo "" + echo "====================================================================" + echo "Command Central Web UI: https://`docker-compose -f $DIRNAME/docker-compose.yml port cc 8091`" + echo "====================================================================" + echo "" + echo "TEST '$TEMPLATE_ALIAS' SUCCESSFUL" + exit 0 +else + echo "" + echo "====================================================================" + echo "Command Central Web UI: https://`docker-compose -f $DIRNAME/docker-compose.yml port cc 8091`" + echo "====================================================================" + echo "" + echo "TEST '$TEMPLATE_ALIAS' FAILED" + exit 101 +fi diff --git a/templates/sag-db-mysql/README.md b/templates/sag-db-mysql/README.md new file mode 100644 index 00000000..b7392640 --- /dev/null +++ b/templates/sag-db-mysql/README.md @@ -0,0 +1,113 @@ + + +# Creating webMethods database on MySQL server + +> STATUS: INCUBATING + +With this template you can create user, database, and webMethods database schemas on a MySQL Server. + +## Requirements + +### Supported Software AG releases + +* Command Central 10.3 or higher +* Database Component Configurator 10.3 or higher +* webMethods database schemas for products version 10.3 or higher +* [MySQL JDBC Driver](https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.47.zip) + +### Supported platforms + +* All supported Windows and UNIX platforms +* All supported versions of MySQL Server database +* Docker Engine 17.09 or higher + +## Running as a standalone Composite Template + +To install Database Component Configurator 10.3 on the Command Central node with alias `local`, +create a database named `webm` and a database user named `webm` with password `webm`, +and create ISInternal and ISCoreAudit database components with user `root` with password `root`: + +```bash +sagcc exec templates composite apply sag-db-mysql \ + db.version=latest repo.product=products-10.3 repo.fix=fixes-10.3 nodes=local \ + db.host=mysql db.admin.username=root db.admin.password=root \ + db.name=webm db.username=webm db.password=webm \ + db.components=[ISInternal,ISCoreAudit] \ + --sync-job --wait 360 +``` + +## Using for local development and testing on Docker platforms + +Launch the Command Central container from the root folder of this project: + +```bash +docker-compose up -d cc +``` + +Launch the [MySQL](https://hub.docker.com/_/mysql/) container: + +```bash +docker-compose -f templates/sag-db-mysql/docker-compose.yml up -d mysql +``` + +Provision sag-db-mysql template and run tests: + +```bash +CC_ENV=mysql ./provisionw sag-db-mysql +``` + +Successful test output looks like this: + +```bash +... +********************************** +* Executing action +* Action : catalog +* Database : SQL Server +* URL : jdbc:mysql://mysql:3306/webm +* User : webm +********************************** + +********************************** +* Installed Components * +********************************** +* XRF 11 CrossReference +* ISC 60 ISCoreAudit +* ISI 75 ISInternal +********************************** + +The expected values were successfully retrieved after 1 call within 4 seconds. +TEST SUCCESSFUL +``` + +You can now use this database for creating instances of webMethods products (Integration Server, My webMethods Server) with the following database connection properties: + +```bash +db.url=jdbc:mysql://mysql:3306/webm +db.username=webm +db.password=webm +db.type=mysql +``` + +The properties are preset in `environments/mysql/env.properties` file and you can use them by poiting to the environment name. For example: + +```bash +CC_ENV=mysql ./provisionw sag-is-cluster +``` diff --git a/templates/sag-db-mysql/docker-compose.yml b/templates/sag-db-mysql/docker-compose.yml new file mode 100644 index 00000000..dae9d8e6 --- /dev/null +++ b/templates/sag-db-mysql/docker-compose.yml @@ -0,0 +1,52 @@ +############################################################################### +# Copyright 2013 - 2018 Software AG, Darmstadt, Germany and/or its licensors +# +# SPDX-License-Identifier: Apache-2.0 +# +# 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. +# +############################################################################### +version: "3.2" + +volumes: + mysql_data: {} + +services: + # this is the sqlserver itself + mysql: + image: mysql:5.7.24 + ports: + - 3306 + volumes: + - ./mysql.cnf:/etc/mysql/conf.d/mysql.cnf + - mysql_data:/var/lib/mysql + environment: + - MYSQL_ROOT_PASSWORD=root + - MYSQL_DATABASE=webm + - MYSQL_USER=webm + - MYSQL_PASSWORD=webm + + # provisioner for webm db schemas using template.yaml + provision: + image: daerepository03.eur.ad.sag:4443/ccdevops/commandcentral-client:10.3 + command: > + sagcc exec templates composite apply sag-db-mysql + repo.product=products repo.fix=fixes db.url="jdbc:mysql://mysql:3306/webm" db.name=webm + release=10.3 nodes=node db.host=mysql db.admin.user=root db.admin.password=root db.username=webm db.password=webm --wait-for-cc --wait 600 --sync-job + depends_on: + - mysql + +networks: + default: + external: + name: sagdevops-templates_default diff --git a/templates/sag-db-mysql/mysql-connector-java-5.1.47.jar b/templates/sag-db-mysql/mysql-connector-java-5.1.47.jar new file mode 100644 index 00000000..f3398ed1 Binary files /dev/null and b/templates/sag-db-mysql/mysql-connector-java-5.1.47.jar differ diff --git a/templates/sag-db-mysql/mysql.cnf b/templates/sag-db-mysql/mysql.cnf new file mode 100644 index 00000000..55617431 --- /dev/null +++ b/templates/sag-db-mysql/mysql.cnf @@ -0,0 +1,9 @@ +[mysqld] +sql-mode="PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS" +character-set-server=utf8 +collation-server=utf8_general_ci +max_allowed_packet = 24M +default-storage-engine = innodb +lower_case_table_names = 1 +innodb_buffer_pool_size = 5G +innodb_log_file_size = 80M diff --git a/templates/sag-db-mysql/template.yaml b/templates/sag-db-mysql/template.yaml new file mode 100644 index 00000000..306ab6de --- /dev/null +++ b/templates/sag-db-mysql/template.yaml @@ -0,0 +1,89 @@ +############################################################################### +# Copyright 2013 - 2018 Software AG, Darmstadt, Germany and/or its licensors +# +# SPDX-License-Identifier: Apache-2.0 +# +# 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. +# +############################################################################### + +alias: sag-db-mysql +description: MySQL server database and component schemas + +environments: + default: + db.host: ${} # REQUIRED: Database server hostname + db.version: latest # 10.3.0.0 # REQUIRED: e.g. 10.3.0.0 + db.type: mysql # This is MySQL database + db.port: 3306 # Default port + db.admin.username: root # Admin username for db and user creation + db.admin.password: ${} # REQUIRED: sa password for webm db and user creation + db.admin.url: "jdbc:mysql://${db.host}:${db.port}" + db.url: "jdbc:mysql://${db.host}:${db.port}/{db.name}" + db.name: webm # webM database name + db.username: ${db.name} # webM database username + db.password: ${db.name} # webM database password + db.products: [] + # - IS + # - BPM + # - MWS + # - OPTI + db.components: + - ProcessEngine + - DynamicBusinessOrchestrator + - OperationManagement + - ISInternal + - ISCoreAudit + - ProcessAudit + db.fixes: [wMFix.DatabaseScripts] # Database component configurator fixes to install + +layers: + db: + productRepo: ${repo.product} # install products from + fixRepo: ${repo.fix} # install fixes from + templates: + - dbc + databases: + # storage: + # components: + # - STR + # version: latest + # db.type: ${db.type} + # db.url: ${db.admin.url} + # db.admin.username: ${db.admin.username} + # db.admin.password: ${db.admin.password} + # db.username: ${db.username} + # db.password: ${db.password} + # db.name: ${db.name} + schemas: + products: ${db.products} + components: ${db.components} + version: ${db.version} + db.type: ${db.type} + db.url: ${db.url} + db.username: ${db.username} + db.password: ${db.password} + db.name: ${db.name} + +templates: + dbc: + products: + DatabaseComponentConfigurator: + fixes: ${db.fixes} + files: + # Using the fact that DCC picks up sl53* jars dynamically + common/lib/ext/sl53-mysql.jar: mysql-connector-java-5.1.47.jar # MySQL JDBC driver + +provision: + default: + db: ${nodes} diff --git a/templates/sag-db-mysql/test.sh b/templates/sag-db-mysql/test.sh new file mode 100755 index 00000000..4939e2fa --- /dev/null +++ b/templates/sag-db-mysql/test.sh @@ -0,0 +1,29 @@ +#!/bin/sh -e +#******************************************************************************* +# Copyright � 2013 - 2018 Software AG, Darmstadt, Germany and/or its licensors +# +# SPDX-License-Identifier: Apache-2.0 +# +# 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. +# +#******************************************************************************* + +# point to local SPM +export CC_SERVER=cc + +sagcc list administration product node DatabaseComponentConfigurator database catalog \ + db.type=mysql db.username=webm db.password=webm db.name=webm db.url="jdbc:mysql://mysql:3306/webm" \ + -e "ISI" + #-e "ISI & MWS & PRE" + +echo "TEST SUCCESSFUL" diff --git a/templates/sag-db-oracle/README.md b/templates/sag-db-oracle/README.md index d76ebc7e..1553bb9d 100644 --- a/templates/sag-db-oracle/README.md +++ b/templates/sag-db-oracle/README.md @@ -16,6 +16,7 @@ limitations under the License. --> + # Creating webMethods database on Oracle With this template you can create user, storage tablespaces and webMethods database components on an Oracle database server. diff --git a/templates/sag-db-oracle/docker-compose.yml b/templates/sag-db-oracle/docker-compose.yml index d4d1fa72..22dd9dd0 100644 --- a/templates/sag-db-oracle/docker-compose.yml +++ b/templates/sag-db-oracle/docker-compose.yml @@ -21,7 +21,7 @@ version: "3.2" services: # this is the oracle db itself oracle: - image: ${CC_REG}/oracle:11.1 + image: wnameless/oracle-xe-11g:18.04 ports: - 1521 environment: diff --git a/templates/sag-db-sqlserver/docker-compose.yml b/templates/sag-db-sqlserver/docker-compose.yml index 8cf027a9..24bad3f2 100644 --- a/templates/sag-db-sqlserver/docker-compose.yml +++ b/templates/sag-db-sqlserver/docker-compose.yml @@ -35,19 +35,6 @@ services: sagcc exec templates composite apply sag-db-sqlserver repo.product=products repo.fix=fixes nodes=node db.host=sqlserver db.admin.password=MaNaGe123 --wait-for-cc --wait 600 --sync-job - # volumes: - # - ./:/src/ # required for accessing .properties file - depends_on: - - sqlserver - - # tester for webm db schemas - test: - image: daerepository03.eur.ad.sag:4443/ccdevops/commandcentral-client:10.3 - command: > - sagcc list administration product node DatabaseComponentConfigurator - database catalog db.type=sqlserver db.username=webm - db.password=webm db.name=webm db.url="jdbc:wm:sqlserver://sqlserver:1433;databaseName=webm" - -e "ISI & MWS & PRE" depends_on: - sqlserver diff --git a/templates/sag-exx-c-rpc-server/template.yaml b/templates/sag-exx-c-rpc-server/template.yaml index 22633e8c..34bf2103 100644 --- a/templates/sag-exx-c-rpc-server/template.yaml +++ b/templates/sag-exx-c-rpc-server/template.yaml @@ -47,7 +47,7 @@ environments: exx.server.library.directory1: /opt/softwareag/MyApp exx.server.library.directory2: /opt/softwareag/MyApp2 - exx.server.license.key: "EXX_LINSUSE_103" # license key, alias name of license key in + exx.server.license.key: "*_EXX_10.*_*_*" # license key, alias name of license key in # license repository exx.server.fixes: # minimal recommended set of fixes to apply diff --git a/templates/sag-exx-cics-socket-listener-rpc-server/README.md b/templates/sag-exx-csl-rpc-server/README.md similarity index 100% rename from templates/sag-exx-cics-socket-listener-rpc-server/README.md rename to templates/sag-exx-csl-rpc-server/README.md diff --git a/templates/sag-exx-cics-socket-listener-rpc-server/template.yaml b/templates/sag-exx-csl-rpc-server/template.yaml similarity index 97% rename from templates/sag-exx-cics-socket-listener-rpc-server/template.yaml rename to templates/sag-exx-csl-rpc-server/template.yaml index ac65cc78..f51ee1cc 100644 --- a/templates/sag-exx-cics-socket-listener-rpc-server/template.yaml +++ b/templates/sag-exx-csl-rpc-server/template.yaml @@ -60,7 +60,7 @@ environments: exx.server.cics.transaction: XRFE # exx.server.trace.level: 1 # trace level - exx.server.license.key: "EXX_LINSUSE_103" # license key, alias name of license key in + exx.server.license.key: "*_EXX_10.*_*_*" # license key, alias name of license key in # license repository exx.server.fixes: diff --git a/templates/sag-exx-ims-rpc-server/template.yaml b/templates/sag-exx-ims-rpc-server/template.yaml index b94b4d67..e98f9b55 100644 --- a/templates/sag-exx-ims-rpc-server/template.yaml +++ b/templates/sag-exx-ims-rpc-server/template.yaml @@ -57,7 +57,7 @@ environments: # Exit Name. If left blank, the following defaults will be used: *SAMPLE* for old exit, *SAMPLE1* for new exit exx.server.ims.exit.name: '' - exx.server.license.key: "EXX_LINSUSE_103" # license key, alias name of license key in + exx.server.license.key: "*_EXX_10.*_*_*" # license key, alias name of license key in # license repository # fixes diff --git a/templates/sag-exx-mq-rpc-server/template.yaml b/templates/sag-exx-mq-rpc-server/template.yaml index 77df3ab0..19546bb5 100644 --- a/templates/sag-exx-mq-rpc-server/template.yaml +++ b/templates/sag-exx-mq-rpc-server/template.yaml @@ -59,7 +59,7 @@ environments: # URL of the classpath for user exit exx.server.mq.user.exit.classpath: /opt/softwareag/MQ/UserEXit - exx.server.license.key: "EXX_LINSUSE_103" # license key, alias name of license key in + exx.server.license.key: "*_EXX_10.*_*_*" # license key, alias name of license key in # license repository exx.server.fixes: # minimal recommended set of fixes to apply diff --git a/templates/sag-exx-net-rpc-server/template.yaml b/templates/sag-exx-net-rpc-server/template.yaml index 1f574956..b70b9e61 100644 --- a/templates/sag-exx-net-rpc-server/template.yaml +++ b/templates/sag-exx-net-rpc-server/template.yaml @@ -56,7 +56,7 @@ environments: # Full path of DLL exx.server.dotnet.assembly2: C:\assemblies\terminator\terminator.dll - exx.server.license.key: "EXX_WIN_103" # license key, alias name of license key in + exx.server.license.key: "*_EXX_10.*_*_*" # license key, alias name of license key in # license repository exx.server.fixes: # minimal recommended set of fixes to apply diff --git a/templates/sag-is-cluster/test.sh b/templates/sag-is-cluster/test.sh new file mode 100755 index 00000000..4a92b187 --- /dev/null +++ b/templates/sag-is-cluster/test.sh @@ -0,0 +1,50 @@ +#!/bin/sh -e +#******************************************************************************* +# Copyright � 2013 - 2018 Software AG, Darmstadt, Germany and/or its licensors +# +# SPDX-License-Identifier: Apache-2.0 +# +# 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. +# +#******************************************************************************* + +# if managed image +if [ -d $SAG_HOME/profiles/SPM ] ; then + # point to local SPM + export CC_SERVER=http://localhost:8092/spm + export __is_instance_name=${__is_instance_name:-default} + + echo "Verifying managed container $CC_SERVER ..." + sagcc get inventory products -e integrationServer --wait-for-cc + + export CC_WAIT=180 + + echo "Verifying fixes ..." + sagcc get inventory fixes + # -e wMFix.integrationServer.Core + + echo "Verifying instances ..." + sagcc get inventory components -e "OSGI-IS_${__is_instance_name}" + + echo "Start the instance ..." + sagcc exec lifecycle components "OSGI-IS_${__is_instance_name}" start -e DONE --sync-job + + echo "Verifying status ..." + sagcc get monitoring runtimestatus "OSGI-IS_${__is_instance_name}" -e ONLINE + sagcc get monitoring runtimestatus "integrationServer-${__is_instance_name}" -e ONLINE +fi + +echo "Verifying product runtime ..." +curl -u Administrator:manage -s http://`hostname`:5555/ + +echo "TEST SUCCESSFUL" diff --git a/templates/sag-is-mft/README.md b/templates/sag-is-mft/README.md new file mode 100644 index 00000000..b6a3f667 --- /dev/null +++ b/templates/sag-is-mft/README.md @@ -0,0 +1,33 @@ +# ActiveTransfer Server/Gateway + +Use this template to provision ActiveTransfer server/Gateway 10.1 and higher. + +## Requirements + +### Supported Software AG releases + +* Command Central 10.1 and higher +* Integration Server 10.1 and higher +* ActiveTransfer Server/Gateway 10.1 and higher + +### Supported platforms + +All supported Windows and UNIX platforms. + +### Supported use cases + +* Provisioning of new environments +* Installing latest fixes + +## Running as a composite template + +> Important: Apply this template on top of an existing [Integration Server](../templates/sag-is-server) instance of the same release version as ActiveTransfer + +## Provisioning ActiveTransfer Server/Gateway on Integration server + +```bash +sagcc exec templates composite apply sag-mft-server nodes=dev \ + repo.product=products-10.1 \ + repo.fix=fixes-10.1 \ + --sync-job --wait 600 +``` diff --git a/templates/sag-is-mft/template.yaml b/templates/sag-is-mft/template.yaml new file mode 100644 index 00000000..cdabec85 --- /dev/null +++ b/templates/sag-is-mft/template.yaml @@ -0,0 +1,56 @@ +alias: sag-is-mft +description: ActiveTransfer Server/Gateway + +environments: + default: + is.instance.name: default # Integration Server instance name + mft.license.key: "*_(MAT|MAG)_10.*_*_*" # ActiveTransfer license key + mft.fixes: ALL # ActiveTransfer fixes to install + db.type: ${} # REQUIRED: database type: oracle|sqlserver + db.url: ${} # REQUIRED: database JDBC url + db.password: ${} # REQUIRED: database username + db.username: ${} # REQUIRED: database password + +layers: + runtime: + productRepo: ${repo.product} + fixRepo: ${repo.fix} + templates: + - mft-server + +templates: + mft-server: + licenses: + "IntegrationServer/instances/${is.instance.name}/packages/WmMFT/config/licenseKey.xml": ${mft.license.key} + fixes: ${mft.fixes} + products: + MFT: + MFTSupport: + integrationServer: + ${is.instance.name}: + package.list: WmMFT + configuration: + integrationServer-${instance.name}: + COMMON-JDBC: + COMMON-JDBC-Default: + Pool: + "@alias": "Default" + Name: "Default" + Description: "Default DBConnection" + MinSize: "0" + MaxSize: "10" + MaxIdleTime: "60000" + DatabaseServer: + "@type": ${db.type} + URL: ${db.url} + User: ${db.username} + Password: ${db.password} + COMMON-DBFUNCTION: + COMMON-DBFUNCTION-ActiveTransfer: + Function: + "@alias": "ActiveTransfer" + Description: "ActiveTransfer Function" + PoolAlias: "Default" +provision: + default: + runtime: ${nodes} diff --git a/templates/sag-is-mft/test.sh b/templates/sag-is-mft/test.sh new file mode 100755 index 00000000..950ac8d2 --- /dev/null +++ b/templates/sag-is-mft/test.sh @@ -0,0 +1,37 @@ +#!/bin/sh -e + +# if managed image +if [ -d $SAG_HOME/profiles/SPM ] ; then + # point to local SPM + export CC_SERVER=http://localhost:8092/spm + export is_instance_name=${is_instance_name:-default} + + echo "Verifying managed container $CC_SERVER ..." + sagcc get inventory products -e MFTSupport --wait-for-cc + + export CC_WAIT=180 + + echo "Verifying fixes ..." + sagcc get inventory fixes -e wMFix.MFTServer + + echo "Verifying instances ..." + sagcc get inventory components -e "OSGI-IS_${is_instance_name}" + + # echo "Restart the instance ..." + # sagcc exec lifecycle components "OSGI-IS_${is_instance_name}" restart -e DONE --sync-job + + echo "Verifying instance status ..." + sagcc get monitoring runtimestatus "integrationServer-${is_instance_name}" -e ONLINE + + echo "Verifying WmMFT status ..." + sagcc get monitoring runtimestatus "OSGI-IS_${is_instance_name}-WmMFT" -e ONLINE +fi + +echo "Verifying product runtime ..." +curl -u Administrator:manage -s http://localhost:5555/ + +# echo "Verifying ActiveTransfer runtime..." +# curl -u Administrator:manage -s http://localhost:2080/WebInterface/login.html +curl -u Administrator:manage -s http://localhost:5555/WmMFT/ + +echo "TEST SUCCESSFUL" diff --git a/templates/sag-is-statefull-cluster/template.yaml b/templates/sag-is-stateful-cluster/template.yaml similarity index 97% rename from templates/sag-is-statefull-cluster/template.yaml rename to templates/sag-is-stateful-cluster/template.yaml index b810d981..53bd8b71 100644 --- a/templates/sag-is-statefull-cluster/template.yaml +++ b/templates/sag-is-stateful-cluster/template.yaml @@ -16,8 +16,8 @@ # limitations under the License. # ############################################################################### -alias: sag-is-statefull-cluster -description: Integration Server statefull cluster using Terracotta BigMemory +alias: sag-is-stateful-cluster +description: Integration Server stateful cluster using Terracotta BigMemory environments: default: diff --git a/templates/sag-mft-config/README.md b/templates/sag-mft-config/README.md new file mode 100644 index 00000000..b0a94909 --- /dev/null +++ b/templates/sag-mft-config/README.md @@ -0,0 +1,30 @@ +# ActiveTransfer Listener ports configuration + +> STATUS: INCUBATING + +Use this template to configure ports on Active Transfer 10.1 and higher. + +## Requirements + +### Supported Software AG releases + +* Command Central 10.1 and higher +* ActiveTransfer Server/Gateway 10.1 and higher + +### Supported platforms + +All supported Windows and UNIX platforms. + +### Supported configurations + +* Listener ports configuration + +## Running as a composite template + +### Listener ports configuration in ActiveTransfer + +```bash +sagcc exec templates composite apply sag-mft-config nodes=dev \ + mft.port.protocol=HTTP mft.port.number=4081 mft.port.name=p1 \ + --sync-job --wait 600 +``` diff --git a/templates/sag-mft-config/template.yaml b/templates/sag-mft-config/template.yaml new file mode 100644 index 00000000..c520b46b --- /dev/null +++ b/templates/sag-mft-config/template.yaml @@ -0,0 +1,42 @@ +alias: sag-mft-config +description: ActiveTransfer Server configuration + +environments: + default: + is.instance.name: default # ActiveTransfer IS instance name + mft.port.name: ATS_HTTP # port name + mft.port.number: 4080 # port number + mft.port.protocol: HTTP # protocol: HTTP|HTTPS|FTP|SFTP + +layers: + runtime: + templates: + - mft-config + +templates: + mft-config: + products: + integrationServer: + ${is.instance.name}: + configuration: + OSGI-IS_${instance.name}-WmMFT: + COMMON-PORTS: + COMMON-PORTS-MFT${mft.port.name}_${mft.port.number}: + Port: + '@alias': ${mft.port.name} + Enabled: 'true' + Number: '${mft.port.number}' + Protocol: ${mft.port.protocol} + BindAddress: ${node.host} + ExtendedProperties: + Property: + - '@name': commandDelayInterval + $: '0' + - '@name': instanceName + $: Default Server Instance + - '@name': description + $: '' + +provision: + default: + runtime: ${nodes} diff --git a/templates/sag-mft-config/test.sh b/templates/sag-mft-config/test.sh new file mode 100755 index 00000000..e8b8226f --- /dev/null +++ b/templates/sag-mft-config/test.sh @@ -0,0 +1,29 @@ +#!/bin/sh -e + +# if managed image +if [ -d $SAG_HOME/profiles/SPM ] ; then + # point to local SPM + export __mft_port_number=4080 + export __mft_port_name=ATS_HTTP + export CC_SERVER=http://localhost:8092/spm + export is_instance_name=${is_instance_name:-default} + + echo "Verifying managed container $CC_SERVER ..." + sagcc get inventory products -e MFTSupport --wait-for-cc + + export CC_WAIT=180 + + echo "Verifying instances ..." + sagcc get inventory components -e "OSGI-IS_${is_instance_name}-WmMFT" + + echo "Verifying status ..." + sagcc get monitoring runtimestatus "OSGI-IS_${is_instance_name}-WmMFT" -e ONLINE + + echo "Verifying configuration" + sagcc get configuration data OSGI-IS_${is_instance_name}-WmMFT COMMON-PORTS-MFT${__mft_port_name} +fi + +echo "Verifying product runtime ..." +curl -u Administrator:manage http://localhost:${__mft_port_number}/WebInterface/login.html + +echo "TEST SUCCESSFUL" diff --git a/templates/sag-mws-applatform/template.yaml b/templates/sag-mws-applatform/template.yaml index d0e401f1..a3931751 100644 --- a/templates/sag-mws-applatform/template.yaml +++ b/templates/sag-mws-applatform/template.yaml @@ -1,10 +1,10 @@ -alias: sag-mws-appplatform +alias: sag-mws-applatform description: Application platform on MWS environments: default: mws.instance.name: default # MWS instance name - mws.applatform.fixes: ALL + mws.applatform.fixes: ALL layers: runtime: diff --git a/templates/sag-mws-mftui/README.md b/templates/sag-mws-mftui/README.md new file mode 100644 index 00000000..d433b227 --- /dev/null +++ b/templates/sag-mws-mftui/README.md @@ -0,0 +1,33 @@ +# ActiveTransfer User Iterface on My webMethods Server + +Use this template to provision ActiveTransfer Web UI 10.1 and higher. + +## Requirements + +### Supported Software AG releases + +* Command Central 10.1 and higher +* ActiveTransfer Server/Gateway 10.1 and higher +* My webMethods Server 10.1 and higher + +### Supported platforms + +All supported Windows and UNIX platforms. + +### Supported use cases + +* Provisioning of new environments +* Installing latest fixes + +## Running as a composite template + +> Important: Apply this template on top of existing [My WebMethods server](../sag-mws-server) instance with same releases version as ActiveTransfer + +### Provisioning ActiveTransfer MWS_UI on My WebMethods server + +```bash +sagcc exec templates composite apply sag-mws-mftui nodes=dev \ + repo.product=products-10.1 \ + repo.fix=fixes-10.1 \ + --sync-job --wait 600 +``` diff --git a/templates/sag-mws-mftui/template.yaml b/templates/sag-mws-mftui/template.yaml new file mode 100644 index 00000000..5dde166e --- /dev/null +++ b/templates/sag-mws-mftui/template.yaml @@ -0,0 +1,26 @@ +alias: sag-mws-mftui +description: ActiveTransfer UI provisioning on top of MWS + +environments: + default: + mws.instance.name: default # MWS instance name + mws.mftui.fixes: ALL # MFT UI fixes + +layers: + runtime: + productRepo: ${repo.product} + fixRepo: ${repo.fix} + templates: + - mft-portal + +templates: + mft-portal: + fixes: ${mws.mftui.fixes} + products: + MFTTransfer: + MwsProgramFiles: + ${mws.instance.name}: + +provision: + default: + runtime: ${nodes} diff --git a/templates/sag-mws-mftui/test.sh b/templates/sag-mws-mftui/test.sh new file mode 100644 index 00000000..f6df7d66 --- /dev/null +++ b/templates/sag-mws-mftui/test.sh @@ -0,0 +1,33 @@ +#!/bin/sh -e + +# if managed image +if [ -d $SAG_HOME/profiles/SPM ] ; then + # point to local SPM + export CC_SERVER=http://localhost:8092/spm + export mws_instance_name=${__mws_instance_name:-default} + + echo "Verifying managed container $CC_SERVER ..." + sagcc get inventory products -e MFTTransfer --wait-for-cc + + export CC_WAIT=180 + + echo "Verifying fixes ..." + sagcc get inventory fixes -e wMFix.MFTPortal + + echo "Verifying instances ..." + sagcc get inventory components -e "OSGI-MWS_${__mws_instance_name}" + + echo "Start the instance ..." + sagcc exec lifecycle components "OSGI-MWS_${__mws_instance_name}" restart -e DONE --sync-job + + echo "Verifying status ..." + sagcc get monitoring runtimestatus "OSGI-MWS_${__mws_instance_name}" -e ONLINE +fi + +echo "Verifying product runtime ..." +curl -u Administrator:manage -s http://localhost:8585/ + +echo "Verifying ActiveTransfer MWS UI ..." +curl -u Administrator:manage -s http://localhost:8585/webm.apps.tasks.admin.integration.mft.server.mgmt + +echo "TEST SUCCESSFUL" diff --git a/templates/sag-optimize-analysis/test.sh b/templates/sag-optimize-analysis/test.sh old mode 100644 new mode 100755 diff --git a/templates/sag-optimize-wsdc/README.md b/templates/sag-optimize-wsdc/README.md index c246567d..67f509c7 100644 --- a/templates/sag-optimize-wsdc/README.md +++ b/templates/sag-optimize-wsdc/README.md @@ -16,8 +16,11 @@ limitations under the License. --> + # Optimize Web Service Data Collector +> STATUS: INCUBATING + Use this template to install Optimize Web Service Data Collector 10.1 and higher. ## Requirements diff --git a/templates/sag-optimize-wsdc/test.sh b/templates/sag-optimize-wsdc/test.sh old mode 100644 new mode 100755 index b1f6dfae..5dfa484f --- a/templates/sag-optimize-wsdc/test.sh +++ b/templates/sag-optimize-wsdc/test.sh @@ -18,28 +18,31 @@ # #******************************************************************************* + # if managed image -export CC_SERVER=http://localhost:8092/spm +if [ -d $SAG_HOME/profiles/SPM ] ; then + export CC_SERVER=http://localhost:8092/spm -echo "Verifying managed container $CC_SERVER ..." -sagcc get inventory products -e SPM --wait-for-cc + echo "Verifying managed container $CC_SERVER ..." + sagcc get inventory products -e SPM --wait-for-cc -export CC_WAIT=5 -echo "Verifying fixes ..." -sagcc get inventory fixes + export CC_WAIT=5 + echo "Verifying fixes ..." + sagcc get inventory fixes -echo "Verifying instances ..." -sagcc get inventory components -e optimizeWSDataCollector-dataCollector + echo "Verifying instances ..." + sagcc get inventory components -e optimizeWSDataCollector-dataCollector -echo "Verifying configs ..." -sagcc get configuration instances optimizeWSDataCollector-dataCollector COMMON-COMPONENT-ENDPOINTS-JMS-Provider -e JMS-Provider -sagcc get configuration instances optimizeWSDataCollector-dataCollector COMMON-COMPONENT-ENDPOINTS-Configuration-Agent -e Configuration-Agent -sagcc get configuration instances optimizeWSDataCollector-dataCollector COMMON-COMPONENT-ENDPOINTS-WS-Registry -e WS-Registry + echo "Verifying configs ..." + sagcc get configuration instances optimizeWSDataCollector-dataCollector COMMON-COMPONENT-ENDPOINTS-JMS-Provider -e JMS-Provider + sagcc get configuration instances optimizeWSDataCollector-dataCollector COMMON-COMPONENT-ENDPOINTS-Configuration-Agent -e Configuration-Agent + sagcc get configuration instances optimizeWSDataCollector-dataCollector COMMON-COMPONENT-ENDPOINTS-WS-Registry -e WS-Registry -echo "Verifying status ..." -sagcc get monitoring runtimestatus optimizeWSDataCollector-dataCollector -e ONLINE + echo "Verifying status ..." + sagcc get monitoring runtimestatus optimizeWSDataCollector-dataCollector -e ONLINE +fi echo "Verifying product runtime ..." curl -H Accept:text http://localhost:12603/services/WSProcessDataCollector.wsdl -echo "DONE testing" +echo "TEST SUCCESSFUL"