Add build of robot container 30/79130/1
authorJerry Flood <jflood@att.com>
Mon, 25 Feb 2019 20:02:53 +0000 (15:02 -0500)
committerJerry Flood <jflood@att.com>
Mon, 25 Feb 2019 20:03:20 +0000 (15:03 -0500)
Issue-ID: OPTFRA-393
Change-Id: Ifa0ea6100f997793ccafe2164318bc802d75700a
Signed-off-by: Jerry Flood <jflood@att.com>
20 files changed:
cmso-robot/docker/Dockerfile
cmso-robot/docker/assembly/cmso-files.xml [new file with mode: 0644]
cmso-robot/docker/cmso-service/docker-compose.yml [new file with mode: 0644]
cmso-robot/docker/cmso-service/ete_test.sh [new file with mode: 0755]
cmso-robot/docker/etc/config/cmso.properties [new file with mode: 0644]
cmso-robot/docker/etc/config/liquibase.properties [new file with mode: 0644]
cmso-robot/docker/etc/config/optimizer.properties [new file with mode: 0644]
cmso-robot/docker/etc/config/ticketmgt.properties [new file with mode: 0644]
cmso-robot/docker/etc/startDbinitService.sh [new file with mode: 0644]
cmso-robot/docker/etc/startJacocoService.sh [new file with mode: 0644]
cmso-robot/docker/lighttpd.conf [deleted file]
cmso-robot/docker/mariadb/conf1/my.cnf [new file with mode: 0644]
cmso-robot/docker/mariadb/conf2/my.cnf [new file with mode: 0644]
cmso-robot/docker/mariadb/conf3/my.cnf [new file with mode: 0644]
cmso-robot/docker/script/TagVersion.groovy [new file with mode: 0644]
cmso-robot/ete.sh
cmso-robot/pom.xml [new file with mode: 0644]
cmso-robot/robot/testsuites/AAAwait_for_server.robot [new file with mode: 0644]
cmso-robot/server.py [new file with mode: 0644]
pom.xml

index 3e0a917..4fd80d0 100644 (file)
@@ -1,52 +1,39 @@
-FROM dockercentral.it.att.com:5300/library/ubuntu:16.04
-## Be careful of Windows newlines
-
-MAINTAINER "Scheduler"
-
-LABEL name="Docker image for the Scheduler Robot Testing Framework"
-LABEL usage="docker run -e <testname> scheduler_robot
-
-# Install Python Pip, Robot framework, firefox, lighttpd web server, wget
-RUN apt-get update
-RUN apt-get --assume-yes upgrade
-RUN apt-get --assume-yes install python2.7 
-RUN apt-get --assume-yes install build-essential
-RUN apt-get --assume-yes install dbus
-RUN apt-get --assume-yes install dnsutils
-RUN apt-get --assume-yes install git
-RUN apt-get --assume-yes install libappindicator1
-RUN apt-get --assume-yes install libffi-dev
-RUN apt-get --assume-yes install libindicator7
-RUN apt-get --assume-yes install libssl-dev
-RUN apt-get --assume-yes install libxss1
-RUN apt-get --assume-yes install lighttpd
-RUN apt-get --assume-yes install net-tools
-RUN apt-get --assume-yes install python-dev
-RUN apt-get --assume-yes install python-pip
-RUN apt-get --assume-yes install unzip
-RUN apt-get --assume-yes install wget 
-RUN apt-get --assume-yes install xvfb
-RUN pip install --upgrade pip
-RUN pip install robotframework
-RUN python --version
-
-# Install chrome
-RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
-    echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list  && \
-    apt-get update && \
-    apt-get --assume-yes install google-chrome-stable
-
-# Copy the robot code
-
-COPY / /opt/app/scheduler_robot/
-COPY docker/lighttpd.conf /etc/lighttpd/lighttpd.conf
-RUN ls -ltr /opt/app/scheduler_robot
-RUN chmod 777 /opt/app/scheduler_robot/setup.sh
-
-# Update the ssh library so that it will run properly in the docker env
-RUN cd  /opt/app/scheduler_robot/ && ./setup.sh && apt-get clean
-
-###CMD ["lighttpd", "-D", "-f",  "/etc/lighttpd/lighttpd.conf"]
+FROM ppodgorsek/robot-framework:latest
 
+MAINTAINER "CMSO"
+
+LABEL name="Docker image for the CMSO Robot Testing Framework"
+LABEL usage="docker run -e <testname> optf-cmso-robot"
+
+COPY /onap-cmso/robot /opt/cmso-robot/robot
+
+COPY /onap-cmso/ete.sh /opt/cmso-robot
+RUN chmod 777 /opt/cmso-robot/ete.sh
+
+COPY /onap-cmso/server.py /opt/cmso-robot
+RUN pip install Flask
+RUN pip install 'PyYAML==3.12'
+RUN pip install  'selenium' 
+RUN pip install  'requests'
+RUN pip install  'robotframework-selenium2library'
+RUN pip install  'robotframework-databaselibrary'
+RUN pip install  'robotframework-extendedselenium2library'
+RUN pip install  'robotframework-requests'
+RUN pip install  'robotframework-sshlibrary'
+RUN pip install  'robotframework-sudslibrary'
+RUN pip install  'robotframework-ftplibrary'
+RUN pip install  'robotframework-rammbock'
+RUN pip install  'deepdiff'
+RUN pip install  'dnspython'
+RUN pip install  'robotframework-httplibrary'
+RUN pip install  'robotframework-archivelibrary'
+
+
+
+###Just to keep it running
+CMD ["/usr/bin/python", "/opt/cmso-robot/server.py"]
+
+### Use --entrypoint to override to run the tests test and exit
+### --entrypoint /opt/cmso-robot/ete.sh
 
 
diff --git a/cmso-robot/docker/assembly/cmso-files.xml b/cmso-robot/docker/assembly/cmso-files.xml
new file mode 100644 (file)
index 0000000..a96ebe7
--- /dev/null
@@ -0,0 +1,46 @@
+<!--
+  ============LICENSE_START=======================================================
+  ECOMP CMSO
+  ================================================================================
+  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.
+  ============LICENSE_END=========================================================
+  -->
+
+<assembly
+       xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1 http://maven.apache.org/xsd/assembly-1.1.1.xsd">
+       <id>cmso-files</id>
+    <includeBaseDirectory>false</includeBaseDirectory>
+    
+       <fileSets>
+               <fileSet>
+                       <includes>
+                               <include>**</include>
+                       </includes>
+                       <directory>${project.basedir}/robot</directory>
+                       <outputDirectory>/robot</outputDirectory>
+               </fileSet>
+               <fileSet>
+                       <includes>
+                               <include>ete.sh</include>
+                               <include>server.py</include>
+                       </includes>
+                       <directory>${project.basedir}</directory>
+                       <outputDirectory>/</outputDirectory>
+               </fileSet>
+       </fileSets>
+
+</assembly>
diff --git a/cmso-robot/docker/cmso-service/docker-compose.yml b/cmso-robot/docker/cmso-service/docker-compose.yml
new file mode 100644 (file)
index 0000000..44f7c27
--- /dev/null
@@ -0,0 +1,51 @@
+version: '3'
+
+services:
+  mariadb:
+    image: mariadb:10.1.11
+    volumes:
+      - "/var/lib/mysql"
+      - "../mariadb/conf1:/etc/mysql/conf.d:ro"
+    environment:
+      - MYSQL_ROOT_PASSWORD=beer
+    ports:
+      - "8806:3306"
+
+  db-init:
+    image: onap/optf-cmso-dbinit
+    volumes:
+      - "../etc:/share/etc:rw"
+      - "../logs:/share/logs:rw"
+    depends_on:
+      - mariadb
+    environment: 
+      - DB_HOST=mariadb
+    entrypoint: "bash -x /share/etc/startDbinitService.sh"
+
+  cmso-service:
+    image: onap/optf-cmso-service
+    volumes:
+      - "../etc:/share/etc:rw"
+      - "../logs:/share/logs:rw"
+      - "../debug-logs:/share/debug-logs:rw"
+    depends_on:
+      - db-init
+    entrypoint: "bash -x /share/etc/startJacocoService.sh"
+    ports:
+      - "8080:8080"
+    environment: 
+      - DB_HOST=mariadb
+
+  cmso-robot:
+    image: onap/optf-cmso-robot
+    volumes:
+      - "../logs:/share:rw"
+    depends_on:
+      - cmso-service
+    environment:
+      - GLOBAL_SCHEDULER_URL=http://cmso-service:8080
+      - TAGS=-i ete
+      - OUTPUT=-d /share
+    working_dir: /opt/cmso-robot  
+    entrypoint: "bash -x /opt/cmso-robot/ete.sh"
+
diff --git a/cmso-robot/docker/cmso-service/ete_test.sh b/cmso-robot/docker/cmso-service/ete_test.sh
new file mode 100755 (executable)
index 0000000..cd77ba5
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/bash
+docker-compose up >up.txt 2>&1 &
+
+### Wait for robot to finish
+sleep 60
+docker exec -it cmso-service_cmso-robot_1 ls
+while [ $? -ne 1 ]; do
+  sleep 60
+  docker exec -it cmso-service_cmso-robot_1 ls
+done
+
+### Shut down java with to give time to write the jacoco_exec file
+docker exec cmso-service_cmso-service_1 pkill java
+sleep 10
+
+### wait for  cmso-service container to exit
+docker exec -it cmso-service_cmso-service_1 ls
+while [ $? -ne 1 ]; do
+  sleep 60
+  docker exec -it cmso-service_cmso-service_1 ls
+done
+
+docker ps -a
+docker-compose down
+docker ps -a
diff --git a/cmso-robot/docker/etc/config/cmso.properties b/cmso-robot/docker/etc/config/cmso.properties
new file mode 100644 (file)
index 0000000..00bd326
--- /dev/null
@@ -0,0 +1,104 @@
+
+#-------------------------------------------------------------------------------
+# Copyright © 2017-2018 AT&T Intellectual Property.
+# Modifications Copyright © 2018 IBM.
+# 
+# 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.
+# 
+# 
+# Unless otherwise specified, all documentation contained herein is licensed
+# under the Creative Commons License, Attribution 4.0 Intl. (the â??Licenseâ?\9d);
+# you may not use this documentation except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+#         https://creativecommons.org/licenses/by/4.0/
+# 
+# Unless required by applicable law or agreed to in writing, documentation
+# 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.
+#-------------------------------------------------------------------------------
+###
+
+### MySQL DB.
+spring.datasource.url=jdbc:mariadb://${DB_HOST}:3306/cmso
+spring.datasource.driver-class-name=org.mariadb.jdbc.Driver
+spring.datasource.username=root
+spring.datasource.password=beer
+cmso.database.password=beer
+
+spring.datasource.initialize=false
+spring.datasource.tomcat.max-wait=10000
+spring.datasource.tomcat.initialSize=5
+spring.datasource.tomcat.max-active=25
+spring.datasource.tomcat.test-on-borrow=true
+
+spring.jpa.show-sql=true
+spring.jpa.hibernate.ddl-auto=none
+spring.jpa.hibernate.naming.strategy=org.hibernate.cfg.EJB3NamingStrategy
+spring.jpa.database-platform=org.hibernate.dialect.MySQL5InnoDBDialect
+spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
+spring.jpa.hibernate.id.new_generator_mappings=false
+hibernate.id.new_generator_mappings=false
+
+logging.level.org.hibernate.SQL=TRACE
+
+logging.level.org.hibernate=TRACE
+
+#
+cmso.aaf.enabled=false
+
+# Enable swagger - Enable in development and test only
+cmso.swagger.enabled=true
+
+# Enable schedule immediate to be dispatched without ticket approvals
+# Has no effect when in vTM loopback mode as always approved.
+cmso.cm.dispatch.immediate.enabled = true
+
+# NUmber of seconds between sniro dispatch jobs
+cmso.optimizer.job.interval.ms=10000
+
+# NUmber of seconds between change management cmso polling jobs
+# Controls frequenct of polling to the ChangeManagementScheduler table...
+cmso.cm.polling.job.interval.ms=10000
+# How many management cmso polling intervals to look ahead to dispatch
+# (To account for possible latency of the polling job)
+cmso.cm.polling.job.lookahead.intervals=5
+# Lead time before event time to enable dispatcher to 
+# test that it is safe to dispatch (i.e. meeting reminder lead time)
+cmso.cm.dispatcher.lead.time.ms=5000
+# Lead time to prepare and call VID to dispatch work to MSO
+# Includes latency from VID call to the start of the workflow
+cmso.cm.dispatch.lead.time.ms=1000
+
+# Interval between polling to check status of schedules in Notifications Initiated status
+cmso.status.job.interval.ms=60000
+
+org.quartz.jobStore.class=org.quartz.simpl.RAMJobStore
+
+loopback.mso.requestId=dummy123
+
+so.polling.interval.ms=10000
+#mso.user=cmso@onap.org
+#mso.pass=enc:bfodXf8qRfCqMvlxVBYNWQ==
+
+## loopback settings
+so.url=http://localhost:8080/cmso/v1/loopbacktest/onap/so/infra/orchestrationRequests/v7
+so.user=cmso@onap.org
+so.pass=enc:bfodXf8qRfCqMvlxVBYNWQ==
+
+mechid.user=cmso@onap.org
+mechid.pass=enc:bfodXf8qRfCqMvlxVBYNWQ==
+
+cmso.dispatch.url=http://localhost:8089
diff --git a/cmso-robot/docker/etc/config/liquibase.properties b/cmso-robot/docker/etc/config/liquibase.properties
new file mode 100644 (file)
index 0000000..b8c850e
--- /dev/null
@@ -0,0 +1,54 @@
+###
+# Copyright &#194;© 2017-2018 AT&T Intellectual Property. 
+# Modifications Copyright &#194;© 2018 IBM. 
+#  
+# 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. 
+#  
+#  
+# Unless otherwise specified, all documentation contained herein is licensed 
+# under the Creative Commons License, Attribution 4.0 Intl. (the &#195;¢&#226;?&#172;&#197;"License&#195;¢&#226;?&#172;&#157;); 
+# you may not use this documentation except in compliance with the License. 
+# You may obtain a copy of the License at 
+#  
+#         https://creativecommons.org/licenses/by/4.0/ 
+#  
+# Unless required by applicable law or agreed to in writing, documentation 
+# 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.
+###
+spring.datasource.jdbcUrl=jdbc:mariadb://${DB_HOST}:3306/cmso?createDatabaseIfNotExist=true
+spring.datasource.driver-class-name=org.mariadb.jdbc.Driver
+spring.datasource.username=root
+spring.datasource.password=beer
+
+spring.datasource.initialize=false
+spring.datasource.tomcat.max-wait=10000
+spring.datasource.tomcat.initialSize=5
+spring.datasource.tomcat.max-active=25
+spring.datasource.tomcat.test-on-borrow=true
+
+
+#changeLogFile=calendar-liquibase-changeLog.xml
+changeLogFile=cmso-liquibase-changeLog.xml
+
+
+#spring.main.web-environment=false
+#outputChangeLogFile=src/main/resources/cmso-output-changelog.xml
+#url=jdbc:mariadb://localhost:3306/calendar
+#url=jdbc:mysql://localhost:3306/cmso
+#username=root
+#password=root
+#driver=org.mariadb.jdbc.Driver
+#driver=com.mysql.jdbc.Driver
diff --git a/cmso-robot/docker/etc/config/optimizer.properties b/cmso-robot/docker/etc/config/optimizer.properties
new file mode 100644 (file)
index 0000000..b222d7b
--- /dev/null
@@ -0,0 +1,34 @@
+#-------------------------------------------------------------------------------
+# Copyright © 2017-2018 AT&T Intellectual Property.
+# Modifications Copyright © 2018 IBM.
+# 
+# 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.
+# 
+# 
+# Unless otherwise specified, all documentation contained herein is licensed
+# under the Creative Commons License, Attribution 4.0 Intl. (the â??Licenseâ?\9d);
+# you may not use this documentation except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+#         https://creativecommons.org/licenses/by/4.0/
+# 
+# Unless required by applicable law or agreed to in writing, documentation
+# 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.
+#-------------------------------------------------------------------------------
+
+cmso.optimizer.url=http://localhost:8080/cmso/v1/loopbacktest/optimizer
+cmso.optimizer.callbackurl=http://localhost:8080/cmso/v1/optimizerCallback
+
diff --git a/cmso-robot/docker/etc/config/ticketmgt.properties b/cmso-robot/docker/etc/config/ticketmgt.properties
new file mode 100644 (file)
index 0000000..bfdaec6
--- /dev/null
@@ -0,0 +1,38 @@
+#-------------------------------------------------------------------------------
+# Copyright © 2017-2018 AT&T Intellectual Property.
+# Modifications Copyright © 2018 IBM.
+# 
+# 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.
+# 
+# 
+# Unless otherwise specified, all documentation contained herein is licensed
+# under the Creative Commons License, Attribution 4.0 Intl. (the â??Licenseâ?\9d);
+# you may not use this documentation except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+#         https://creativecommons.org/licenses/by/4.0/
+# 
+# Unless required by applicable law or agreed to in writing, documentation
+# 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.
+#-------------------------------------------------------------------------------
+
+tm.vnfs.per.ticket=1
+tm.getPath=http://localhost:8080/cmso/v1/tm/getChangeRecord
+tm.createPath=http://localhost:8080/cmso/v1/tm/createChangeRecord
+tm.closePath=http://localhost:8080/cmso/v1/tm/closeCancelChangeRecord
+tm.updatePath=http://localhost:8080/cmso/v1/tm/updateChangeRecord
+tm.approvalStatus=Approved|Scheduled,Approved|Assigned
+tm.template.folder=data/templates/tm
diff --git a/cmso-robot/docker/etc/startDbinitService.sh b/cmso-robot/docker/etc/startDbinitService.sh
new file mode 100644 (file)
index 0000000..e6d6d9f
--- /dev/null
@@ -0,0 +1,17 @@
+#!/bin/sh
+apt update
+apt install netcat --assume-yes
+COUNTER=10
+while [  $COUNTER -gt 0  ]; do
+    nc -z ${DB_HOST} 3306
+    if [ $? -eq 0 ]; then
+        let COUNTER=0
+    else
+       let COUNTER=COUNTER-1 
+       sleep 10
+    fi
+done
+
+echo "VM_ARGS="${VM_ARGS}
+
+java -Djava.security.egd=file:/dev/./urandom  ${VM_ARGS} -Xms256m -Xmx1024m  -jar  ./app.jar  --spring.config.location=/share/etc/config/liquibase.properties
diff --git a/cmso-robot/docker/etc/startJacocoService.sh b/cmso-robot/docker/etc/startJacocoService.sh
new file mode 100644 (file)
index 0000000..0db6f1f
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/sh
+apt update
+apt install wget
+apt install unzip  --assume-yes
+wget http://repo1.maven.org/maven2/org/jacoco/org.jacoco.agent/0.8.2/org.jacoco.agent-0.8.2.jar
+unzip org.jacoco.agent-0.8.2.jar
+cp org.jacoco.agent-0.8.2/jacocoagent.jar .
+ls -l
+
+VM_ARGS="${VM_ARGS} -javaagent:./jacocoagent.jar=destfile=/share/logs/jacoco.exec,dumponexit=true,jmx=true,append=true,output=file,includes=org.onap.optf.cmso.*"
+
+echo "VM_ARGS=${VM_ARGS}"
+
+java -Djava.security.egd=file:/dev/./urandom -Xms256m -Xmx1024m ${VM_ARGS} -jar ./app.jar
diff --git a/cmso-robot/docker/lighttpd.conf b/cmso-robot/docker/lighttpd.conf
deleted file mode 100644 (file)
index 5cd4d9a..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-server.document-root = "/opt/app/testsuite/html/"
-
-server.port = 88
-
-server.username = "www-data"
-server.groupname = "www-data"
-
-dir-listing.activate = "disable"
-
-mimetype.assign = (
-  ".html" => "text/html"
-)
-
-static-file.exclude-extensions = ( ".fcgi", ".php", ".rb", "~", ".inc", ".cgi" )
-index-file.names = ( "index.html" )
-
-server.modules += ( "mod_auth" )
-auth.debug = 2
-auth.backend = "plain"
-auth.backend.plain.userfile = "/etc/lighttpd/authorization"
-auth.require = ( "/" =>
-(
-"method" => "basic",
-"realm" => "Password protected area",
-"require" => "valid-user"
-)
-)
diff --git a/cmso-robot/docker/mariadb/conf1/my.cnf b/cmso-robot/docker/mariadb/conf1/my.cnf
new file mode 100644 (file)
index 0000000..c6631fb
--- /dev/null
@@ -0,0 +1,194 @@
+# Example MySQL config file for medium systems.
+#
+# This is for a system with memory 8G where MySQL plays
+# an important part, or systems up to 128M where MySQL is used together with
+# other programs (such as a web server)
+#
+# In this file, you can use all long options that a program supports.
+# If you want to know which options a program supports, run the program
+# with the "--help" option.
+
+# The following options will be passed to all MySQL clients
+##[client]
+##user            = root
+##port            = 3306
+##socket          = //opt/app/mysql/mysql.sock
+
+# Here follows entries for some specific programs
+
+# The MySQL server
+[mysqld]
+##performance_schema
+
+slow_query_log =ON
+long_query_time =2
+slow_query_log_file =//var/lib/mysql/slow_query.log
+##basedir         = //opt/app/mysql/product/mariadb-10.1.11-linux-x86_64
+##datadir         = //opt/app/mysql/data
+##port            = 3306
+##socket          = //opt/app/mysql/mysql.sock
+skip-external-locking
+explicit_defaults_for_timestamp = true
+skip-symbolic-links
+local-infile = 0
+#ignore_db_dir=lost+found
+key_buffer_size = 16M
+max_allowed_packet = 4M
+table_open_cache = 100
+sort_buffer_size = 512K
+net_buffer_length = 8K
+read_buffer_size = 256K
+read_rnd_buffer_size = 512K
+myisam_sort_buffer_size = 8M
+max_connections = 500
+lower_case_table_names = 1
+thread_stack = 256K
+thread_cache_size = 25
+query_cache_size = 8M
+query_cache_type = 0
+query_prealloc_size = 512K
+query_cache_limit = 1M
+
+# Password validation
+##plugin-load-add=simple_password_check.so
+##simple_password_check_other_characters=0
+
+# Audit Log settings
+plugin-load-add=server_audit.so
+server_audit=FORCE_PLUS_PERMANENT
+server_audit_file_path=//var/lib/mysql/audit.log
+server_audit_file_rotate_size=50M
+server_audit_events=CONNECT,QUERY,TABLE
+server_audit_logging=on
+
+# Don't listen on a TCP/IP port at all. This can be a security enhancement,
+# if all processes that need to connect to mysqld run on the same host.
+# All interaction with mysqld must be made via Unix sockets or named pipes.
+# Note that using this option without enabling named pipes on Windows
+# (via the "enable-named-pipe" option) will render mysqld useless!
+#
+#skip-networking
+
+# Replication Master Server (default)
+# binary logging is required for replication
+##log-bin=//var/lib/mysql/mysql-bin
+
+# binary logging format - mixed recommended
+binlog_format=row
+
+# required unique id between 1 and 2^32 - 1
+# defaults to 1 if master-host is not set
+# but will not function as a master if omitted
+
+# Replication Slave (comment out master section to use this)
+#
+# To configure this host as a replication slave, you can choose between
+# two methods :
+#
+# 1) Use the CHANGE MASTER TO command (fully described in our manual) -
+#    the syntax is:
+#
+#    CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
+#    MASTER_USER=<user>, MASTER_PASSWORD=<password> ;
+#
+#    where you replace <host>, <user>, <password> by quoted strings and
+#    <port> by the master's port number (3306 by default).
+#
+#    Example:
+#
+#    CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
+#    MASTER_USER='joe', MASTER_PASSWORD='secret';
+#
+# OR
+#
+# 2) Set the variables below. However, in case you choose this method, then
+#    start replication for the first time (even unsuccessfully, for example
+#    if you mistyped the password in master-password and the slave fails to
+#    connect), the slave will create a master.info file, and any later
+#    change in this file to the variables' values below will be ignored and
+#    overridden by the content of the master.info file, unless you shutdown
+#    the slave server, delete master.info and restart the slaver server.
+#    For that reason, you may want to leave the lines below untouched
+#    (commented) and instead use CHANGE MASTER TO (see above)
+#
+# required unique id between 2 and 2^32 - 1
+# (and different from the master)
+# defaults to 2 if master-host is set
+# but will not function as a slave if omitted
+#server-id       = 2
+#
+# The replication master for this slave - required
+#master-host     =   <hostname>
+#
+# The username the slave will use for authentication when connecting
+# to the master - required
+#master-user     =   <username>
+#
+# The password the slave will authenticate with when connecting to
+# the master - required
+#master-password =   <password>
+#
+# The port the master is listening on.
+# optional - defaults to 3306
+#master-port     =  <port>
+#
+# binary logging - not required for slaves, but recommended
+#log-bin=mysql-bin
+
+# Uncomment the following if you are using InnoDB tables
+##innodb_data_home_dir = //opt/app/mysql/data
+##innodb_data_file_path = ibdata1:20M:autoextend:max:32G
+##innodb_log_group_home_dir = //opt/app/mysql/iblogs
+# You can set .._buffer_pool_size up to 50 - 80 %
+# of RAM but beware of setting memory usage too high
+innodb_buffer_pool_size = 128M
+#innodb_additional_mem_pool_size = 2M
+# Set .._log_file_size to 25 % of buffer pool size
+innodb_log_file_size = 10M
+innodb_log_files_in_group = 3
+innodb_log_buffer_size = 8M
+#innodb_flush_log_at_trx_commit = 1
+innodb_lock_wait_timeout = 50
+innodb_autoextend_increment = 100
+expire_logs_days = 8
+open_files_limit = 2000
+transaction-isolation=READ-COMMITTED
+####### Galera parameters #######
+## Galera Provider configuration
+wsrep_provider=/usr/lib/galera/libgalera_smm.so
+wsrep_provider_options="gcache.size=128M; gcache.page_size=10M"
+## Galera Cluster configuration
+wsrep_cluster_name="MSO-automated-tests-cluster"
+wsrep_cluster_address="gcomm://"
+#wsrep_cluster_address="gcomm://mariadb1,mariadb2,mariadb3"
+##wsrep_cluster_address="gcomm://192.169.3.184,192.169.3.185,192.169.3.186"
+## Galera Synchronization configuration
+wsrep_sst_method=rsync
+#wsrep_sst_method=xtrabackup-v2
+#wsrep_sst_auth="sstuser:Mon#2o!6"
+## Galera Node configuration
+wsrep_node_name="mariadb1"
+##wsrep_node_address="192.169.3.184"
+wsrep_on=OFF
+## Status notification
+#wsrep_notify_cmd=/opt/app/mysql/bin/wsrep_notify
+#######
+
+
+[mysqldump]
+quick
+max_allowed_packet = 16M
+
+[mysql]
+no-auto-rehash
+# Remove the next comment character if you are not familiar with SQL
+#safe-updates
+
+[myisamchk]
+key_buffer_size = 20971520
+
+##[mysqlhotcopy]
+##interactive-timeout
+##[mysqld_safe]
+##malloc-lib=//opt/app/mysql/local/lib/libjemalloc.so.1
+##log-error=//opt/app/mysql/log/mysqld.log
\ No newline at end of file
diff --git a/cmso-robot/docker/mariadb/conf2/my.cnf b/cmso-robot/docker/mariadb/conf2/my.cnf
new file mode 100644 (file)
index 0000000..bf5f9c1
--- /dev/null
@@ -0,0 +1,193 @@
+# Example MySQL config file for medium systems.
+#
+# This is for a system with memory 8G where MySQL plays
+# an important part, or systems up to 128M where MySQL is used together with
+# other programs (such as a web server)
+#
+# In this file, you can use all long options that a program supports.
+# If you want to know which options a program supports, run the program
+# with the "--help" option.
+
+# The following options will be passed to all MySQL clients
+##[client]
+##user            = root
+##port            = 3306
+##socket          = //opt/app/mysql/mysql.sock
+
+# Here follows entries for some specific programs
+
+# The MySQL server
+[mysqld]
+##performance_schema
+
+slow_query_log =ON
+long_query_time =2
+slow_query_log_file =//var/lib/mysql/slow_query.log
+##basedir         = //opt/app/mysql/product/mariadb-10.1.11-linux-x86_64
+##datadir         = //opt/app/mysql/data
+##port            = 3306
+##socket          = //opt/app/mysql/mysql.sock
+skip-external-locking
+explicit_defaults_for_timestamp = true
+skip-symbolic-links
+local-infile = 0
+#ignore_db_dir=lost+found
+key_buffer_size = 16M
+max_allowed_packet = 4M
+table_open_cache = 100
+sort_buffer_size = 512K
+net_buffer_length = 8K
+read_buffer_size = 256K
+read_rnd_buffer_size = 512K
+myisam_sort_buffer_size = 8M
+max_connections = 500
+lower_case_table_names = 1
+thread_stack = 256K
+thread_cache_size = 25
+query_cache_size = 8M
+query_cache_type = 0
+query_prealloc_size = 512K
+query_cache_limit = 1M
+
+# Password validation
+##plugin-load-add=simple_password_check.so
+##simple_password_check_other_characters=0
+
+# Audit Log settings
+plugin-load-add=server_audit.so
+server_audit=FORCE_PLUS_PERMANENT
+server_audit_file_path=//var/lib/mysql/audit.log
+server_audit_file_rotate_size=50M
+server_audit_events=CONNECT,QUERY,TABLE
+server_audit_logging=on
+
+# Don't listen on a TCP/IP port at all. This can be a security enhancement,
+# if all processes that need to connect to mysqld run on the same host.
+# All interaction with mysqld must be made via Unix sockets or named pipes.
+# Note that using this option without enabling named pipes on Windows
+# (via the "enable-named-pipe" option) will render mysqld useless!
+#
+#skip-networking
+
+# Replication Master Server (default)
+# binary logging is required for replication
+##log-bin=//var/lib/mysql/mysql-bin
+
+# binary logging format - mixed recommended
+binlog_format=row
+
+# required unique id between 1 and 2^32 - 1
+# defaults to 1 if master-host is not set
+# but will not function as a master if omitted
+
+# Replication Slave (comment out master section to use this)
+#
+# To configure this host as a replication slave, you can choose between
+# two methods :
+#
+# 1) Use the CHANGE MASTER TO command (fully described in our manual) -
+#    the syntax is:
+#
+#    CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
+#    MASTER_USER=<user>, MASTER_PASSWORD=<password> ;
+#
+#    where you replace <host>, <user>, <password> by quoted strings and
+#    <port> by the master's port number (3306 by default).
+#
+#    Example:
+#
+#    CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
+#    MASTER_USER='joe', MASTER_PASSWORD='secret';
+#
+# OR
+#
+# 2) Set the variables below. However, in case you choose this method, then
+#    start replication for the first time (even unsuccessfully, for example
+#    if you mistyped the password in master-password and the slave fails to
+#    connect), the slave will create a master.info file, and any later
+#    change in this file to the variables' values below will be ignored and
+#    overridden by the content of the master.info file, unless you shutdown
+#    the slave server, delete master.info and restart the slaver server.
+#    For that reason, you may want to leave the lines below untouched
+#    (commented) and instead use CHANGE MASTER TO (see above)
+#
+# required unique id between 2 and 2^32 - 1
+# (and different from the master)
+# defaults to 2 if master-host is set
+# but will not function as a slave if omitted
+#server-id       = 2
+#
+# The replication master for this slave - required
+#master-host     =   <hostname>
+#
+# The username the slave will use for authentication when connecting
+# to the master - required
+#master-user     =   <username>
+#
+# The password the slave will authenticate with when connecting to
+# the master - required
+#master-password =   <password>
+#
+# The port the master is listening on.
+# optional - defaults to 3306
+#master-port     =  <port>
+#
+# binary logging - not required for slaves, but recommended
+#log-bin=mysql-bin
+
+# Uncomment the following if you are using InnoDB tables
+##innodb_data_home_dir = //opt/app/mysql/data
+##innodb_data_file_path = ibdata1:20M:autoextend:max:32G
+##innodb_log_group_home_dir = //opt/app/mysql/iblogs
+# You can set .._buffer_pool_size up to 50 - 80 %
+# of RAM but beware of setting memory usage too high
+innodb_buffer_pool_size = 6380M
+#innodb_additional_mem_pool_size = 2M
+# Set .._log_file_size to 25 % of buffer pool size
+innodb_log_file_size = 150M
+innodb_log_files_in_group = 3
+innodb_log_buffer_size = 8M
+#innodb_flush_log_at_trx_commit = 1
+innodb_lock_wait_timeout = 50
+innodb_autoextend_increment = 100
+expire_logs_days = 8
+open_files_limit = 2000
+transaction-isolation=READ-COMMITTED
+####### Galera parameters #######
+## Galera Provider configuration
+wsrep_provider=/usr/lib/galera/libgalera_smm.so
+wsrep_provider_options="gcache.size=2G; gcache.page_size=1G"
+## Galera Cluster configuration
+wsrep_cluster_name="MSO-automated-tests-cluster"
+wsrep_cluster_address="gcomm://mariadb1,mariadb2,mariadb3"
+##wsrep_cluster_address="gcomm://192.169.3.184,192.169.3.185,192.169.3.186"
+## Galera Synchronization configuration
+wsrep_sst_method=rsync
+#wsrep_sst_method=xtrabackup-v2
+#wsrep_sst_auth="sstuser:Mon#2o!6"
+## Galera Node configuration
+wsrep_node_name="mariadb2"
+##wsrep_node_address="192.169.3.184"
+wsrep_on=ON
+## Status notification
+#wsrep_notify_cmd=/opt/app/mysql/bin/wsrep_notify
+#######
+
+
+[mysqldump]
+quick
+max_allowed_packet = 16M
+
+[mysql]
+no-auto-rehash
+# Remove the next comment character if you are not familiar with SQL
+#safe-updates
+
+[myisamchk]
+key_buffer_size = 20971520
+
+##[mysqlhotcopy]
+##interactive-timeout
+##[mysqld_safe]
+##malloc-lib=//opt/app/mysql/local/lib/libjemalloc.so.1
+##log-error=//opt/app/mysql/log/mysqld.log
\ No newline at end of file
diff --git a/cmso-robot/docker/mariadb/conf3/my.cnf b/cmso-robot/docker/mariadb/conf3/my.cnf
new file mode 100644 (file)
index 0000000..74f7a31
--- /dev/null
@@ -0,0 +1,193 @@
+# Example MySQL config file for medium systems.
+#
+# This is for a system with memory 8G where MySQL plays
+# an important part, or systems up to 128M where MySQL is used together with
+# other programs (such as a web server)
+#
+# In this file, you can use all long options that a program supports.
+# If you want to know which options a program supports, run the program
+# with the "--help" option.
+
+# The following options will be passed to all MySQL clients
+##[client]
+##user            = root
+##port            = 3306
+##socket          = //opt/app/mysql/mysql.sock
+
+# Here follows entries for some specific programs
+
+# The MySQL server
+[mysqld]
+##performance_schema
+
+slow_query_log =ON
+long_query_time =2
+slow_query_log_file =//var/lib/mysql/slow_query.log
+##basedir         = //opt/app/mysql/product/mariadb-10.1.11-linux-x86_64
+##datadir         = //opt/app/mysql/data
+##port            = 3306
+##socket          = //opt/app/mysql/mysql.sock
+skip-external-locking
+explicit_defaults_for_timestamp = true
+skip-symbolic-links
+local-infile = 0
+#ignore_db_dir=lost+found
+key_buffer_size = 16M
+max_allowed_packet = 4M
+table_open_cache = 100
+sort_buffer_size = 512K
+net_buffer_length = 8K
+read_buffer_size = 256K
+read_rnd_buffer_size = 512K
+myisam_sort_buffer_size = 8M
+max_connections = 500
+lower_case_table_names = 1
+thread_stack = 256K
+thread_cache_size = 25
+query_cache_size = 8M
+query_cache_type = 0
+query_prealloc_size = 512K
+query_cache_limit = 1M
+
+# Password validation
+##plugin-load-add=simple_password_check.so
+##simple_password_check_other_characters=0
+
+# Audit Log settings
+plugin-load-add=server_audit.so
+server_audit=FORCE_PLUS_PERMANENT
+server_audit_file_path=//var/lib/mysql/audit.log
+server_audit_file_rotate_size=50M
+server_audit_events=CONNECT,QUERY,TABLE
+server_audit_logging=on
+
+# Don't listen on a TCP/IP port at all. This can be a security enhancement,
+# if all processes that need to connect to mysqld run on the same host.
+# All interaction with mysqld must be made via Unix sockets or named pipes.
+# Note that using this option without enabling named pipes on Windows
+# (via the "enable-named-pipe" option) will render mysqld useless!
+#
+#skip-networking
+
+# Replication Master Server (default)
+# binary logging is required for replication
+##log-bin=//var/lib/mysql/mysql-bin
+
+# binary logging format - mixed recommended
+binlog_format=row
+
+# required unique id between 1 and 2^32 - 1
+# defaults to 1 if master-host is not set
+# but will not function as a master if omitted
+
+# Replication Slave (comment out master section to use this)
+#
+# To configure this host as a replication slave, you can choose between
+# two methods :
+#
+# 1) Use the CHANGE MASTER TO command (fully described in our manual) -
+#    the syntax is:
+#
+#    CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
+#    MASTER_USER=<user>, MASTER_PASSWORD=<password> ;
+#
+#    where you replace <host>, <user>, <password> by quoted strings and
+#    <port> by the master's port number (3306 by default).
+#
+#    Example:
+#
+#    CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
+#    MASTER_USER='joe', MASTER_PASSWORD='secret';
+#
+# OR
+#
+# 2) Set the variables below. However, in case you choose this method, then
+#    start replication for the first time (even unsuccessfully, for example
+#    if you mistyped the password in master-password and the slave fails to
+#    connect), the slave will create a master.info file, and any later
+#    change in this file to the variables' values below will be ignored and
+#    overridden by the content of the master.info file, unless you shutdown
+#    the slave server, delete master.info and restart the slaver server.
+#    For that reason, you may want to leave the lines below untouched
+#    (commented) and instead use CHANGE MASTER TO (see above)
+#
+# required unique id between 2 and 2^32 - 1
+# (and different from the master)
+# defaults to 2 if master-host is set
+# but will not function as a slave if omitted
+#server-id       = 2
+#
+# The replication master for this slave - required
+#master-host     =   <hostname>
+#
+# The username the slave will use for authentication when connecting
+# to the master - required
+#master-user     =   <username>
+#
+# The password the slave will authenticate with when connecting to
+# the master - required
+#master-password =   <password>
+#
+# The port the master is listening on.
+# optional - defaults to 3306
+#master-port     =  <port>
+#
+# binary logging - not required for slaves, but recommended
+#log-bin=mysql-bin
+
+# Uncomment the following if you are using InnoDB tables
+##innodb_data_home_dir = //opt/app/mysql/data
+##innodb_data_file_path = ibdata1:20M:autoextend:max:32G
+##innodb_log_group_home_dir = //opt/app/mysql/iblogs
+# You can set .._buffer_pool_size up to 50 - 80 %
+# of RAM but beware of setting memory usage too high
+innodb_buffer_pool_size = 6380M
+#innodb_additional_mem_pool_size = 2M
+# Set .._log_file_size to 25 % of buffer pool size
+innodb_log_file_size = 150M
+innodb_log_files_in_group = 3
+innodb_log_buffer_size = 8M
+#innodb_flush_log_at_trx_commit = 1
+innodb_lock_wait_timeout = 50
+innodb_autoextend_increment = 100
+expire_logs_days = 8
+open_files_limit = 2000
+transaction-isolation=READ-COMMITTED
+####### Galera parameters #######
+## Galera Provider configuration
+wsrep_provider=/usr/lib/galera/libgalera_smm.so
+wsrep_provider_options="gcache.size=2G; gcache.page_size=1G"
+## Galera Cluster configuration
+wsrep_cluster_name="MSO-automated-tests-cluster"
+wsrep_cluster_address="gcomm://mariadb1,mariadb2,mariadb3"
+##wsrep_cluster_address="gcomm://192.169.3.184,192.169.3.185,192.169.3.186"
+## Galera Synchronization configuration
+wsrep_sst_method=rsync
+#wsrep_sst_method=xtrabackup-v2
+#wsrep_sst_auth="sstuser:Mon#2o!6"
+## Galera Node configuration
+wsrep_node_name="mariadb3"
+##wsrep_node_address="192.169.3.184"
+wsrep_on=ON
+## Status notification
+#wsrep_notify_cmd=/opt/app/mysql/bin/wsrep_notify
+#######
+
+
+[mysqldump]
+quick
+max_allowed_packet = 16M
+
+[mysql]
+no-auto-rehash
+# Remove the next comment character if you are not familiar with SQL
+#safe-updates
+
+[myisamchk]
+key_buffer_size = 20971520
+
+##[mysqlhotcopy]
+##interactive-timeout
+##[mysqld_safe]
+##malloc-lib=//opt/app/mysql/local/lib/libjemalloc.so.1
+##log-error=//opt/app/mysql/log/mysqld.log
\ No newline at end of file
diff --git a/cmso-robot/docker/script/TagVersion.groovy b/cmso-robot/docker/script/TagVersion.groovy
new file mode 100644 (file)
index 0000000..c682f7f
--- /dev/null
@@ -0,0 +1,40 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP CMSO
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END============================================
+ * ===================================================================
+ * 
+ */
+
+package org.onap.cmso.maven.scripts
+
+println project.properties['cmso.project.version']; 
+def versionArray; 
+if ( project.properties['cmso.project.version'] != null ) { 
+    versionArray = project.properties['cmso.project.version'].split('\\.'); 
+} 
+
+if ( project.properties['cmso.project.version'].endsWith("-SNAPSHOT") ) { 
+    project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-SNAPSHOT-latest";
+    project.properties['project.docker.latesttagtimestamp.version']=versionArray[0] + '.' + versionArray[1] + "-SNAPSHOT-"+project.properties['cmso.build.timestamp']; 
+} else { 
+    project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
+    project.properties['project.docker.latesttagtimestamp.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-"+project.properties['cmso.build.timestamp'];
+} 
+
+println 'New Tag for docker:' + project.properties['project.docker.latesttag.version'];
\ No newline at end of file
index 084f9ca..0991b86 100644 (file)
@@ -6,12 +6,7 @@ ROBOT_PATH=${ROBOT_PATH}:${ROBOT_HOME}/robot/library
 ROBOT_PATH=${ROBOT_PATH}:${ROBOT_HOME}/robot/locallibrary/cmsoUtils
 VARIABLE_FILES="${VARIABLE_FILES} -V ${ROBOT_HOME}/robot/assets/test_properties.py" 
 
-VARIABLES="${VARIABLES} -v GLOBAL_VID_USERID:${GLOBAL_VID_USERID}"
-VARIABLES="${VARIABLES} -v GLOBAL_SCHEDULER_HOST:${GLOBAL_SCHEDULER_HOST}"
-VARIABLES="${VARIABLES} -v GLOBAL_SCHEDULER_PORT:${GLOBAL_SCHEDULER_PORT}"
-VARIABLES="${VARIABLES} -v GLOBAL_SCHEDULER_USER:${GLOBAL_SCHEDULER_USER}"
-VARIABLES="${VARIABLES} -v GLOBAL_SCHEDULER_PASSWORD:${GLOBAL_SCHEDULER_PASSWORD}"
-VARIABLES="${VARIABLES} -v GLOBAL_SCHEDULER_PROTOCOL:${GLOBAL_SCHEDULER_PROTOCOL}"
+VARIABLES="${VARIABLES} -v GLOBAL_SCHEDULER_URL:${GLOBAL_SCHEDULER_URL}"
 
 HTTP_PROXY=
 HTTPS_PROXY=
diff --git a/cmso-robot/pom.xml b/cmso-robot/pom.xml
new file mode 100644 (file)
index 0000000..37ae95b
--- /dev/null
@@ -0,0 +1,142 @@
+<!-- Copyright © 2018 AT&T Intellectual Property. Modifications Copyright \r
+       © 2018 IBM. Licensed under the Apache License, Version 2.0 (the "License"); \r
+       you may not use this file except in compliance with the License. You may \r
+       obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 \r
+       Unless required by applicable law or agreed to in writing, software distributed \r
+       under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES \r
+       OR CONDITIONS OF ANY KIND, either express or implied. See the License for \r
+       the specific language governing permissions and limitations under the License. \r
+       Unless otherwise specified, all documentation contained herein is licensed \r
+       under the Creative Commons License, Attribution 4.0 Intl. (the "License"); \r
+       you may not use this documentation except in compliance with the License. \r
+       You may obtain a copy of the License at https://creativecommons.org/licenses/by/4.0/ \r
+       Unless required by applicable law or agreed to in writing, documentation \r
+       distributed under the License is distributed on an "AS IS" BASIS, WITHOUT \r
+       WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the \r
+       License for the specific language governing permissions and limitations under \r
+       the License. -->\r
+\r
+<project xmlns="http://maven.apache.org/POM/4.0.0"\r
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
+       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">\r
+       <modelVersion>4.0.0</modelVersion>\r
+\r
+       <parent>\r
+               <groupId>org.onap.optf.cmso</groupId>\r
+               <artifactId>cmso</artifactId>\r
+               <version>1.0.1-SNAPSHOT</version>\r
+       </parent>\r
+\r
+       <groupId>org.onap.optf.cmso</groupId>\r
+       <artifactId>cmso-robot</artifactId>\r
+\r
+       <name>cmso-robot</name>\r
+       <description>Robot Framework for testing CMSO  Service</description>\r
+\r
+       <properties>\r
+               <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>\r
+\r
+               <cmso.project.version>${project.version}</cmso.project.version>\r
+               <cmso.build.timestamp>${maven.build.timestamp}</cmso.build.timestamp>\r
+\r
+               <service.name>cmso-robot</service.name>\r
+               <release-tag>Casablanca</release-tag>\r
+               <name.space>org.onap.optf</name.space>\r
+               <serviceArtifactName>cmso-robot</serviceArtifactName>\r
+\r
+               <build.number>${maven.build.timestamp}</build.number>\r
+               <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\r
+               <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>\r
+               <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>\r
+\r
+               <docker.push.registry>localhost:5000</docker.push.registry>\r
+               <docker.pull.registry>nexus3.onap.org:10001</docker.pull.registry>\r
+               <docker.skip.build>false</docker.skip.build>\r
+               <docker.skip.push>false</docker.skip.push>\r
+               <docker.skip.tag>false</docker.skip.tag>\r
+               <skip.staging.artifacts>false</skip.staging.artifacts>\r
+\r
+       </properties>\r
+\r
+       <build>\r
+               <plugins>\r
+                       <plugin>\r
+                               <groupId>org.codehaus.groovy.maven</groupId>\r
+                               <artifactId>gmaven-plugin</artifactId>\r
+                               <version>1.0</version>\r
+                               <executions>\r
+                                       <execution>\r
+                                               <phase>validate</phase>\r
+                                               <goals>\r
+                                                       <goal>execute</goal>\r
+                                               </goals>\r
+                                               <configuration>\r
+                                                       <source>${project.basedir}/docker/script/TagVersion.groovy</source>\r
+                                               </configuration>\r
+                                       </execution>\r
+                               </executions>\r
+                       </plugin>\r
+                       <plugin>\r
+                               <groupId>io.fabric8</groupId>\r
+                               <artifactId>docker-maven-plugin</artifactId>\r
+                               <version>0.26.0</version>\r
+                               <configuration>\r
+                                       <verbose>true</verbose>\r
+                                       <apiVersion>1.23</apiVersion>\r
+                                       <images>\r
+                                               <image>\r
+                                                       <name>onap/optf-cmso-robot</name>\r
+                                                       <alias>onap-optf-cmso-robot</alias>\r
+                                                       <build>\r
+                                                               <cleanup>true</cleanup>\r
+                                                               <tags>\r
+                                                                       <tag>latest</tag>\r
+                                                                       <tag>${project.docker.latesttagtimestamp.version}</tag>\r
+                                                                       <tag>${project.docker.latesttag.version}</tag>\r
+                                                               </tags>\r
+                                                               <dockerFile>${project.basedir}/docker/Dockerfile</dockerFile>\r
+                                                               <assembly>\r
+                                                                       <descriptor>${project.basedir}/docker/assembly/cmso-files.xml</descriptor>\r
+                                                                       <name>onap-cmso</name>\r
+                                                               </assembly>\r
+\r
+                                                       </build>\r
+                                               </image>\r
+                                       </images>\r
+                               </configuration>\r
+                               <executions>\r
+                                       <execution>\r
+                                               <id>generate-images</id>\r
+                                               <phase>install</phase>\r
+                                               <goals>\r
+                                                       <goal>build</goal>\r
+                                               </goals>\r
+                                       </execution>\r
+                                       <execution>\r
+                                               <id>push-images</id>\r
+                                               <phase>deploy</phase>\r
+                                               <goals>\r
+                                                       <goal>build</goal>\r
+                                                       <goal>push</goal>\r
+                                               </goals>\r
+                                               <configuration>\r
+                                                       <image>onap/optf-cmso-robot:%l</image>\r
+                                               </configuration>\r
+                                       </execution>\r
+                               </executions>\r
+                       </plugin>\r
+                       <plugin>\r
+                               <groupId>org.jacoco</groupId>\r
+                               <artifactId>jacoco-maven-plugin</artifactId>\r
+                               <executions>\r
+                                       <execution>\r
+                                               <id>disable</id>\r
+                                               <phase>none</phase>\r
+                                       </execution>\r
+                               </executions>\r
+                       </plugin>\r
+\r
+               </plugins>\r
+               <finalName>optf-cmso-robot</finalName>\r
+       </build>\r
+</project>\r
diff --git a/cmso-robot/robot/testsuites/AAAwait_for_server.robot b/cmso-robot/robot/testsuites/AAAwait_for_server.robot
new file mode 100644 (file)
index 0000000..c655c98
--- /dev/null
@@ -0,0 +1,18 @@
+*** Settings ***
+Documentation    Wait for service to be up before starting 
+
+Library   StringTemplater
+Library   UUID
+
+Resource    ../resources/scheduler_common.robot
+
+
+*** Test Cases ***
+Wait For Healthy CMSO
+    [Tags]   ete
+    Wait Until Keyword Succeeds   240s   30s   CMSO Health Check
+    
+*** Keywords ***
+CMSO Health Check
+    ${resp}=   Get Change Management   alias   health
+    Should Be Equal as Strings    ${resp.status_code}    200
\ No newline at end of file
diff --git a/cmso-robot/server.py b/cmso-robot/server.py
new file mode 100644 (file)
index 0000000..c47af1e
--- /dev/null
@@ -0,0 +1,8 @@
+#!flask/bin/python
+from flask import Flask
+app = Flask(__name__)
+@app.route('/')
+def index():
+    return "Hello, World!"
+if __name__ == '__main__':
+    app.run(debug=True)
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index e8e6f14..51bdd6d 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -64,6 +64,7 @@
     <modules>\r
         <module>cmso-service</module>\r
         <module>cmso-database</module>\r
+        <module>cmso-robot</module>\r
     </modules>\r
 \r
        <build> \r