From 44c41cd7967434ac08ec544b4708fc976ad9c878 Mon Sep 17 00:00:00 2001 From: mriedl Date: Tue, 12 Apr 2022 12:59:53 +0200 Subject: [PATCH 01/16] Dedicated yaml for proactive --- .gitlab-ci.yml | 75 ++++---------------------------------------------- 1 file changed, 5 insertions(+), 70 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 580a2a9..54d30a9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,7 +1,6 @@ # Gitlab CI/CD script for the Melodic Integration project variables: - DOCKER_PUSH: "true" DOCKER_REPO: "gitlab.ow2.org:4567" MAVEN_IMAGE: "maven:3.5.2-jdk-8" DOCKER_DIND_IMAGE: "docker:19.03.1" @@ -10,14 +9,10 @@ variables: LOCAL_REPO: "127.0.0.1:5000" DOCKER_CLI: "docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v $CI_PROJECT_DIR/maven_repo:/root/.m2 -w /usr/src/mymaven -v $CI_PROJECT_DIR:/usr/src/mymaven $MAVEN_IMAGE" - CONNECTORS_CLI: "mvn -DskipTests --batch-mode -U -f connectors/pom.xml" RAML_TO_JAXRS_CLI: "mvn -DskipTests --batch-mode -f raml-to-jaxrs-7bulls/pom.xml" INTERFACES_CLI: "mvn -DskipTests --batch-mode -f interfaces/pom.xml" MULE_ESB_CLI: "mvn -DskipTests --batch-mode -f mule_esb/pom.xml" - PROCESS_CLI: "mvn -DskipTests --batch-mode -f process/pom.xml" - DOCKER_DRIVER: overlay - DOCKER_TLS_CERTDIR: "/certs" - IMAGE_TAG: "morphemic-rc2.5" + IMAGE_TAG: "proactive-dev-2.5" cache: paths: @@ -41,19 +36,10 @@ after_script: - echo '==========================================================================' stages: - - build-connectors - build-raml - build-interfaces - - deploy-connectors - deploy-raml - deploy-interfaces - - deploy-rest - -build-connectors:connectors: - stage: build-connectors - image: $MAVEN_IMAGE - script: - - $CONNECTORS_CLI clean install build-raml:raml_to_jaxrs: stage: build-raml @@ -69,31 +55,11 @@ build-interfaces:interfaces: script: - $INTERFACES_CLI clean install -deploy-connectors:connectors: - stage: deploy-connectors - image: $MAVEN_IMAGE - only: - - master - - rc3.0 - - rc3.1 - - morph-rc1.5 - - morphemic-rc2.5 - - proactive-dev - dependencies: - - build-connectors:connectors - script: - - $CONNECTORS_CLI deploy - deploy-raml:raml_to_jaxrs: stage: deploy-raml image: $MAVEN_IMAGE only: - - master - - rc3.0 - - rc3.1 - - morph-rc1.5 - - morphemic-rc2.5 - - proactive-dev + - proactive-dev-2.5 dependencies: - build-raml:raml_to_jaxrs script: @@ -103,12 +69,7 @@ deploy-interfaces:interfaces: stage: deploy-interfaces image: $MAVEN_IMAGE only: - - master - - rc3.0 - - rc3.1 - - morph-rc1.5 - - morphemic-rc2.5 - - proactive-dev + - proactive-dev-2.5 dependencies: - build-interfaces:interfaces script: @@ -118,12 +79,7 @@ deploy-rest:mule_esb: stage: deploy-rest image: $DOCKER_DIND_IMAGE only: - - master - - rc3.0 - - rc3.1 - - morph-rc1.5 - - morphemic-rc2.5 - - proactive-dev + - proactive-dev-2.5 dependencies: - deploy-raml:raml_to_jaxrs - deploy-interfaces:interfaces @@ -133,25 +89,4 @@ deploy-rest:mule_esb: - $DOCKER_CLI $MULE_ESB_CLI -Ddocker.imagePrefix=melodic/ clean install - echo "$K8S_SECRET_DOCKER_PASSWORD" | docker login $DOCKER_REPO -u $K8S_SECRET_DOCKER_USER --password-stdin - docker tag $LOCAL_REPO/melodic/mule $DOCKER_REPO/melodic/melodic-integration/mule:$IMAGE_TAG - - docker push $DOCKER_REPO/melodic/melodic-integration/mule:$IMAGE_TAG - -deploy-rest:process: - stage: deploy-rest - image: $DOCKER_DIND_IMAGE - only: - - master - - rc3.0 - - rc3.1 - - morph-rc1.5 - - morphemic-rc2.5 - - proactive-dev - dependencies: - - deploy-raml:raml_to_jaxrs - - deploy-interfaces:interfaces - services: - - $DOCKER_DIND_SERVICE - script: - - $DOCKER_CLI $PROCESS_CLI -Ddocker.imagePrefix=melodic/ clean install - - echo "$K8S_SECRET_DOCKER_PASSWORD" | docker login $DOCKER_REPO -u $K8S_SECRET_DOCKER_USER --password-stdin - - docker tag $LOCAL_REPO/melodic/process $DOCKER_REPO/melodic/melodic-integration/process:$IMAGE_TAG - - docker push $DOCKER_REPO/melodic/melodic-integration/process:$IMAGE_TAG + - docker push $DOCKER_REPO/melodic/melodic-integration/mule:$IMAGE_TAG \ No newline at end of file -- GitLab From 4704d70301acbb3ba4162d9df338fde9f4d6beae Mon Sep 17 00:00:00 2001 From: mriedl Date: Tue, 12 Apr 2022 13:13:38 +0200 Subject: [PATCH 02/16] Dedicated yaml for proactive --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 54d30a9..24f620d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -40,6 +40,7 @@ stages: - build-interfaces - deploy-raml - deploy-interfaces + - deploy-rest build-raml:raml_to_jaxrs: stage: build-raml -- GitLab From ac7d9ffacbd54126990b379dc272d9d4456daa72 Mon Sep 17 00:00:00 2001 From: Jan Marchel Date: Fri, 15 Apr 2022 09:35:08 +0000 Subject: [PATCH 03/16] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 24f620d..a2e7ebe 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -38,8 +38,10 @@ after_script: stages: - build-raml - build-interfaces + - build-connectors - deploy-raml - deploy-interfaces + - deploy-connectors - deploy-rest build-raml:raml_to_jaxrs: @@ -56,6 +58,23 @@ build-interfaces:interfaces: script: - $INTERFACES_CLI clean install +build-connectors:connectors: + stage: build-connectors + image: $MAVEN_IMAGE + script: + - $CONNECTORS_CLI clean install + + +deploy-connectors:connectors: + stage: deploy-connectors + image: $MAVEN_IMAGE + only: + - proactive-dev-2.5 + dependencies: + - build-connectors:connectors + script: + - $CONNECTORS_CLI deploy + deploy-raml:raml_to_jaxrs: stage: deploy-raml image: $MAVEN_IMAGE -- GitLab From bf2b3024a517ceb6384dfbba3860dd613a838c33 Mon Sep 17 00:00:00 2001 From: Jan Marchel Date: Fri, 15 Apr 2022 13:04:32 +0000 Subject: [PATCH 04/16] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 44 ++++++++++++++++++++++++++++++++------------ 1 file changed, 32 insertions(+), 12 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a2e7ebe..8a879bd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,7 @@ -# Gitlab CI/CD script for the Melodic Integration project +## Gitlab CI/CD script for the Melodic Integration project variables: + DOCKER_PUSH: "true" DOCKER_REPO: "gitlab.ow2.org:4567" MAVEN_IMAGE: "maven:3.5.2-jdk-8" DOCKER_DIND_IMAGE: "docker:19.03.1" @@ -9,10 +10,14 @@ variables: LOCAL_REPO: "127.0.0.1:5000" DOCKER_CLI: "docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v $CI_PROJECT_DIR/maven_repo:/root/.m2 -w /usr/src/mymaven -v $CI_PROJECT_DIR:/usr/src/mymaven $MAVEN_IMAGE" + CONNECTORS_CLI: "mvn -DskipTests --batch-mode -U -f connectors/pom.xml" RAML_TO_JAXRS_CLI: "mvn -DskipTests --batch-mode -f raml-to-jaxrs-7bulls/pom.xml" INTERFACES_CLI: "mvn -DskipTests --batch-mode -f interfaces/pom.xml" MULE_ESB_CLI: "mvn -DskipTests --batch-mode -f mule_esb/pom.xml" - IMAGE_TAG: "proactive-dev-2.5" + PROCESS_CLI: "mvn -DskipTests --batch-mode -f process/pom.xml" + DOCKER_DRIVER: overlay + DOCKER_TLS_CERTDIR: "/certs" + IMAGE_TAG: "morphemic-rc2.0" cache: paths: @@ -36,14 +41,20 @@ after_script: - echo '==========================================================================' stages: + - build-connectors - build-raml - build-interfaces - - build-connectors + - deploy-connectors - deploy-raml - deploy-interfaces - - deploy-connectors - deploy-rest +build-connectors:connectors: + stage: build-connectors + image: $MAVEN_IMAGE + script: + - $CONNECTORS_CLI clean install + build-raml:raml_to_jaxrs: stage: build-raml image: $MAVEN_IMAGE @@ -58,13 +69,6 @@ build-interfaces:interfaces: script: - $INTERFACES_CLI clean install -build-connectors:connectors: - stage: build-connectors - image: $MAVEN_IMAGE - script: - - $CONNECTORS_CLI clean install - - deploy-connectors:connectors: stage: deploy-connectors image: $MAVEN_IMAGE @@ -109,4 +113,20 @@ deploy-rest:mule_esb: - $DOCKER_CLI $MULE_ESB_CLI -Ddocker.imagePrefix=melodic/ clean install - echo "$K8S_SECRET_DOCKER_PASSWORD" | docker login $DOCKER_REPO -u $K8S_SECRET_DOCKER_USER --password-stdin - docker tag $LOCAL_REPO/melodic/mule $DOCKER_REPO/melodic/melodic-integration/mule:$IMAGE_TAG - - docker push $DOCKER_REPO/melodic/melodic-integration/mule:$IMAGE_TAG \ No newline at end of file + - docker push $DOCKER_REPO/melodic/melodic-integration/mule:$IMAGE_TAG + +deploy-rest:process: + stage: deploy-rest + image: $DOCKER_DIND_IMAGE + only: + - proactive-dev-2.5 + dependencies: + - deploy-raml:raml_to_jaxrs + - deploy-interfaces:interfaces + services: + - $DOCKER_DIND_SERVICE + script: + - $DOCKER_CLI $PROCESS_CLI -Ddocker.imagePrefix=melodic/ clean install + - echo "$K8S_SECRET_DOCKER_PASSWORD" | docker login $DOCKER_REPO -u $K8S_SECRET_DOCKER_USER --password-stdin + - docker tag $LOCAL_REPO/melodic/process $DOCKER_REPO/melodic/melodic-integration/process:$IMAGE_TAG + - docker push $DOCKER_REPO/melodic/melodic-integration/process:$IMAGE_TAG \ No newline at end of file -- GitLab From 97cb189947cf1d0018ceb927a28285ce8b8a1fde Mon Sep 17 00:00:00 2001 From: Jan Marchel Date: Tue, 10 May 2022 09:32:38 +0200 Subject: [PATCH 05/16] changing client version --- connectors/pom.xml | 8 ++++++-- connectors/proactive_client/pom.xml | 4 ++-- mule_esb/mule-integration/pom.xml | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/connectors/pom.xml b/connectors/pom.xml index e267dfb..83c1757 100644 --- a/connectors/pom.xml +++ b/connectors/pom.xml @@ -6,7 +6,7 @@ cloud.morphemic.connectors connectors - 2.5-SNAPSHOT + 2.6-SNAPSHOT proactive_client @@ -38,7 +38,11 @@ maven-central https://repo1.maven.org/maven2/ - + + activeeon + repository.activeeon + http://repository.activeeon.com/content/groups/proactive/ + ow2 OW2 repository diff --git a/connectors/proactive_client/pom.xml b/connectors/proactive_client/pom.xml index 8a0cd37..854f3c5 100644 --- a/connectors/proactive_client/pom.xml +++ b/connectors/proactive_client/pom.xml @@ -7,11 +7,11 @@ connectors cloud.morphemic.connectors - 2.5-SNAPSHOT + 2.6-SNAPSHOT proactive_client - 2.5-SNAPSHOT + 2.6-SNAPSHOT 1.8 diff --git a/mule_esb/mule-integration/pom.xml b/mule_esb/mule-integration/pom.xml index 0cd9982..22daa99 100644 --- a/mule_esb/mule-integration/pom.xml +++ b/mule_esb/mule-integration/pom.xml @@ -261,7 +261,7 @@ cloud.morphemic.connectors proactive_client - 2.5-SNAPSHOT + 2.6-SNAPSHOT org.hibernate.validator -- GitLab From 81b73b8c5f47cd365c003f138a1200e5697f8a1f Mon Sep 17 00:00:00 2001 From: Jan Marchel Date: Tue, 10 May 2022 08:36:41 +0000 Subject: [PATCH 06/16] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8a879bd..40e91ac 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -112,7 +112,7 @@ deploy-rest:mule_esb: script: - $DOCKER_CLI $MULE_ESB_CLI -Ddocker.imagePrefix=melodic/ clean install - echo "$K8S_SECRET_DOCKER_PASSWORD" | docker login $DOCKER_REPO -u $K8S_SECRET_DOCKER_USER --password-stdin - - docker tag $LOCAL_REPO/melodic/mule $DOCKER_REPO/melodic/melodic-integration/mule:$IMAGE_TAG + - docker tag $LOCAL_REPO/melodic/mule:unknown $DOCKER_REPO/melodic/melodic-integration/mule:$IMAGE_TAG - docker push $DOCKER_REPO/melodic/melodic-integration/mule:$IMAGE_TAG deploy-rest:process: @@ -128,5 +128,5 @@ deploy-rest:process: script: - $DOCKER_CLI $PROCESS_CLI -Ddocker.imagePrefix=melodic/ clean install - echo "$K8S_SECRET_DOCKER_PASSWORD" | docker login $DOCKER_REPO -u $K8S_SECRET_DOCKER_USER --password-stdin - - docker tag $LOCAL_REPO/melodic/process $DOCKER_REPO/melodic/melodic-integration/process:$IMAGE_TAG + - docker tag $LOCAL_REPO/melodic/process:unknown $DOCKER_REPO/melodic/melodic-integration/process:$IMAGE_TAG - docker push $DOCKER_REPO/melodic/melodic-integration/process:$IMAGE_TAG \ No newline at end of file -- GitLab From 0311e05389e77fe1402134d4c03126baead3d420 Mon Sep 17 00:00:00 2001 From: Jan Marchel Date: Tue, 10 May 2022 10:55:45 +0000 Subject: [PATCH 07/16] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 40e91ac..68509a7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -112,7 +112,7 @@ deploy-rest:mule_esb: script: - $DOCKER_CLI $MULE_ESB_CLI -Ddocker.imagePrefix=melodic/ clean install - echo "$K8S_SECRET_DOCKER_PASSWORD" | docker login $DOCKER_REPO -u $K8S_SECRET_DOCKER_USER --password-stdin - - docker tag $LOCAL_REPO/melodic/mule:unknown $DOCKER_REPO/melodic/melodic-integration/mule:$IMAGE_TAG + - docker tag $LOCAL_REPO/melodic/mule:latest $DOCKER_REPO/melodic/melodic-integration/mule:$IMAGE_TAG - docker push $DOCKER_REPO/melodic/melodic-integration/mule:$IMAGE_TAG deploy-rest:process: @@ -128,5 +128,5 @@ deploy-rest:process: script: - $DOCKER_CLI $PROCESS_CLI -Ddocker.imagePrefix=melodic/ clean install - echo "$K8S_SECRET_DOCKER_PASSWORD" | docker login $DOCKER_REPO -u $K8S_SECRET_DOCKER_USER --password-stdin - - docker tag $LOCAL_REPO/melodic/process:unknown $DOCKER_REPO/melodic/melodic-integration/process:$IMAGE_TAG + - docker tag $LOCAL_REPO/melodic/process:latest $DOCKER_REPO/melodic/melodic-integration/process:$IMAGE_TAG - docker push $DOCKER_REPO/melodic/melodic-integration/process:$IMAGE_TAG \ No newline at end of file -- GitLab From be01ad49aa11db0c2dc5a9453a51bd9dc5220d7c Mon Sep 17 00:00:00 2001 From: Jan Marchel Date: Tue, 17 May 2022 09:12:38 +0200 Subject: [PATCH 08/16] pipeline fix --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8a879bd..a8b0665 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -112,7 +112,7 @@ deploy-rest:mule_esb: script: - $DOCKER_CLI $MULE_ESB_CLI -Ddocker.imagePrefix=melodic/ clean install - echo "$K8S_SECRET_DOCKER_PASSWORD" | docker login $DOCKER_REPO -u $K8S_SECRET_DOCKER_USER --password-stdin - - docker tag $LOCAL_REPO/melodic/mule $DOCKER_REPO/melodic/melodic-integration/mule:$IMAGE_TAG + - docker tag $LOCAL_REPO/melodic/mule:latest $DOCKER_REPO/melodic/melodic-integration/mule:$IMAGE_TAG - docker push $DOCKER_REPO/melodic/melodic-integration/mule:$IMAGE_TAG deploy-rest:process: @@ -128,5 +128,5 @@ deploy-rest:process: script: - $DOCKER_CLI $PROCESS_CLI -Ddocker.imagePrefix=melodic/ clean install - echo "$K8S_SECRET_DOCKER_PASSWORD" | docker login $DOCKER_REPO -u $K8S_SECRET_DOCKER_USER --password-stdin - - docker tag $LOCAL_REPO/melodic/process $DOCKER_REPO/melodic/melodic-integration/process:$IMAGE_TAG - - docker push $DOCKER_REPO/melodic/melodic-integration/process:$IMAGE_TAG \ No newline at end of file + - docker tag $LOCAL_REPO/melodic/process:latest $DOCKER_REPO/melodic/melodic-integration/process:$IMAGE_TAG + - docker push $DOCKER_REPO/melodic/melodic-integration/process:$IMAGE_TAG -- GitLab From ba7f28dd1c10e73af36d6eb59b31fb2b172f032a Mon Sep 17 00:00:00 2001 From: Jan Marchel Date: Tue, 17 May 2022 10:56:23 +0000 Subject: [PATCH 09/16] Update connectors/proactive_client/pom.xml --- connectors/proactive_client/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/connectors/proactive_client/pom.xml b/connectors/proactive_client/pom.xml index 854f3c5..35b0fce 100644 --- a/connectors/proactive_client/pom.xml +++ b/connectors/proactive_client/pom.xml @@ -21,7 +21,7 @@ org.activeeon scheduling-abstraction-layer - 4.5-SNAPSHOT + 4.6-SNAPSHOT -- GitLab From 206b90e6927c02cafb84e34ef346e97b51b62c76 Mon Sep 17 00:00:00 2001 From: Jan Marchel Date: Thu, 19 May 2022 13:01:51 +0200 Subject: [PATCH 10/16] sal version change --- connectors/proactive_client/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/connectors/proactive_client/pom.xml b/connectors/proactive_client/pom.xml index 854f3c5..35b0fce 100644 --- a/connectors/proactive_client/pom.xml +++ b/connectors/proactive_client/pom.xml @@ -21,7 +21,7 @@ org.activeeon scheduling-abstraction-layer - 4.5-SNAPSHOT + 4.6-SNAPSHOT -- GitLab From d26d46f3ba1ecc9e8927fb207e8d11f3f1b552ab Mon Sep 17 00:00:00 2001 From: Jan Marchel Date: Fri, 20 May 2022 13:02:47 +0000 Subject: [PATCH 11/16] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a8b0665..63bbb69 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -17,7 +17,7 @@ variables: PROCESS_CLI: "mvn -DskipTests --batch-mode -f process/pom.xml" DOCKER_DRIVER: overlay DOCKER_TLS_CERTDIR: "/certs" - IMAGE_TAG: "morphemic-rc2.0" + IMAGE_TAG: "proactive-dev-2.5" cache: paths: -- GitLab From 374a2ca0d3825fd19176c6cc63178dfbb154dcc7 Mon Sep 17 00:00:00 2001 From: Jan Marchel Date: Tue, 31 May 2022 09:08:13 +0200 Subject: [PATCH 12/16] adding ssh key properties --- .../ProactiveClientServiceForIntegrationImpl.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/mule_esb/mule-integration/src/main/java/cloud/morphemic/mule_integration/proactive/ProactiveClientServiceForIntegrationImpl.java b/mule_esb/mule-integration/src/main/java/cloud/morphemic/mule_integration/proactive/ProactiveClientServiceForIntegrationImpl.java index 72f473e..b3bc4b2 100644 --- a/mule_esb/mule-integration/src/main/java/cloud/morphemic/mule_integration/proactive/ProactiveClientServiceForIntegrationImpl.java +++ b/mule_esb/mule-integration/src/main/java/cloud/morphemic/mule_integration/proactive/ProactiveClientServiceForIntegrationImpl.java @@ -63,6 +63,10 @@ public class ProactiveClientServiceForIntegrationImpl extends ProactiveClientSer String defaultNetwork = null; String subnet = null; String regionBlacklist = null; + String sshUsername = null; + String sshKeyPairName = null; + String sshPrivateKey = null; + JSONObject scopeJSON = new JSONObject(); LinkedHashMap cloudConfiguration = (LinkedHashMap)((LinkedHashMap) cloudDefinition).get("cloudConfiguration"); @@ -70,10 +74,18 @@ public class ProactiveClientServiceForIntegrationImpl extends ProactiveClientSer identityVersion = (cloudConfiguration.get("identityVersion") != null) ? Integer.parseInt((String) cloudConfiguration.get("identityVersion")) : null; scopePrefix = (cloudConfiguration.get("scopePrefix") != null) ? (String) cloudConfiguration.get("scopePrefix") : null; scopeValue = (cloudConfiguration.get("scopeValue") != null) ? (String) cloudConfiguration.get("scopeValue") : null; + sshUsername = (cloudConfiguration.get("sshUsername") != null) ? (String) cloudConfiguration.get("sshUsername") : null; + sshKeyPairName = (cloudConfiguration.get("sshKeyPairName") != null) ? (String) cloudConfiguration.get("sshKeyPairName") : null; + sshPrivateKey = (cloudConfiguration.get("sshPrivateKey") != null) ? (String) cloudConfiguration.get("sshPrivateKey") : null; + cloudJSON.put("identityVersion", identityVersion); scopeJSON.put("prefix", scopePrefix); scopeJSON.put("value", scopeValue); cloudJSON.put("scope", scopeJSON); + cloudJSON.put("sshUsername", sshUsername); + cloudJSON.put("sshKyPairName", sshKeyPairName); + cloudJSON.put("sshPrivateKey", sshPrivateKey); + LinkedHashMap properties = (LinkedHashMap) cloudConfiguration.get("properties"); if (ObjectUtils.isNotEmpty(properties)) { securityGroup = (String) properties.get("securityGroup"); -- GitLab From 3a2a83091d97f3945ac6f9d41b43a9c1ce4a8c2a Mon Sep 17 00:00:00 2001 From: Jan Marchel Date: Tue, 31 May 2022 13:19:10 +0200 Subject: [PATCH 13/16] integration of adding key ssh --- ...activeClientServiceForIntegrationImpl.java | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/mule_esb/mule-integration/src/main/java/cloud/morphemic/mule_integration/proactive/ProactiveClientServiceForIntegrationImpl.java b/mule_esb/mule-integration/src/main/java/cloud/morphemic/mule_integration/proactive/ProactiveClientServiceForIntegrationImpl.java index b3bc4b2..1973ca3 100644 --- a/mule_esb/mule-integration/src/main/java/cloud/morphemic/mule_integration/proactive/ProactiveClientServiceForIntegrationImpl.java +++ b/mule_esb/mule-integration/src/main/java/cloud/morphemic/mule_integration/proactive/ProactiveClientServiceForIntegrationImpl.java @@ -70,21 +70,28 @@ public class ProactiveClientServiceForIntegrationImpl extends ProactiveClientSer JSONObject scopeJSON = new JSONObject(); LinkedHashMap cloudConfiguration = (LinkedHashMap)((LinkedHashMap) cloudDefinition).get("cloudConfiguration"); + LinkedHashMap SSHCredentials = (LinkedHashMap)((LinkedHashMap) cloudDefinition).get("SSHCredentials"); + + if(ObjectUtils.isNotEmpty(SSHCredentials)){ + sshUsername = (cloudConfiguration.get("username") != null) ? (String) cloudConfiguration.get("username") : null; + sshKeyPairName = (cloudConfiguration.get("keyPairName") != null) ? (String) cloudConfiguration.get("keyPairName") : null; + sshPrivateKey = (cloudConfiguration.get("privateKey") != null) ? (String) cloudConfiguration.get("privateKey") : null; + + cloudJSON.put("username", sshUsername); + cloudJSON.put("keyPairName", sshKeyPairName); + cloudJSON.put("privateKey", sshPrivateKey); + } + if(ObjectUtils.isNotEmpty(cloudConfiguration)) { identityVersion = (cloudConfiguration.get("identityVersion") != null) ? Integer.parseInt((String) cloudConfiguration.get("identityVersion")) : null; scopePrefix = (cloudConfiguration.get("scopePrefix") != null) ? (String) cloudConfiguration.get("scopePrefix") : null; scopeValue = (cloudConfiguration.get("scopeValue") != null) ? (String) cloudConfiguration.get("scopeValue") : null; - sshUsername = (cloudConfiguration.get("sshUsername") != null) ? (String) cloudConfiguration.get("sshUsername") : null; - sshKeyPairName = (cloudConfiguration.get("sshKeyPairName") != null) ? (String) cloudConfiguration.get("sshKeyPairName") : null; - sshPrivateKey = (cloudConfiguration.get("sshPrivateKey") != null) ? (String) cloudConfiguration.get("sshPrivateKey") : null; cloudJSON.put("identityVersion", identityVersion); scopeJSON.put("prefix", scopePrefix); scopeJSON.put("value", scopeValue); cloudJSON.put("scope", scopeJSON); - cloudJSON.put("sshUsername", sshUsername); - cloudJSON.put("sshKyPairName", sshKeyPairName); - cloudJSON.put("sshPrivateKey", sshPrivateKey); + LinkedHashMap properties = (LinkedHashMap) cloudConfiguration.get("properties"); if (ObjectUtils.isNotEmpty(properties)) { @@ -93,6 +100,7 @@ public class ProactiveClientServiceForIntegrationImpl extends ProactiveClientSer subnet = (String) properties.get("subnet"); regionBlacklist = (String) properties.get("regionBlacklist"); } + nodeGroup = (String) cloudConfiguration.get("nodeGroup"); } cloudJSON.put("securityGroup", MoreObjects.firstNonNull(securityGroup, JSONObject.NULL)); -- GitLab From 09e0c9f960ff631c30fa3c19f30f6834347fcfc4 Mon Sep 17 00:00:00 2001 From: Jan Marchel Date: Thu, 7 Jul 2022 11:19:08 +0200 Subject: [PATCH 14/16] small clean up --- ...activeClientServiceForIntegrationImpl.java | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/mule_esb/mule-integration/src/main/java/cloud/morphemic/mule_integration/proactive/ProactiveClientServiceForIntegrationImpl.java b/mule_esb/mule-integration/src/main/java/cloud/morphemic/mule_integration/proactive/ProactiveClientServiceForIntegrationImpl.java index 1973ca3..9281080 100644 --- a/mule_esb/mule-integration/src/main/java/cloud/morphemic/mule_integration/proactive/ProactiveClientServiceForIntegrationImpl.java +++ b/mule_esb/mule-integration/src/main/java/cloud/morphemic/mule_integration/proactive/ProactiveClientServiceForIntegrationImpl.java @@ -46,10 +46,12 @@ public class ProactiveClientServiceForIntegrationImpl extends ProactiveClientSer cloudJSON.put("cloudProviderName", ((LinkedHashMap) (((LinkedHashMap) cloudDefinition).get("api"))).get("providerName")); cloudJSON.put("endpoint", MoreObjects.firstNonNull(((LinkedHashMap) cloudDefinition).get("endpoint"), JSONObject.NULL)); LinkedHashMap credentials = (LinkedHashMap) ((LinkedHashMap) cloudDefinition).get("credential"); + if(ObjectUtils.isEmpty(credentials)) { log.error("ProactiveClientServiceForIntegrationImpl->callAddClouds: Got cloud definition without credentials - user and secret are required to operate with cloud service provider"); throw new RuntimeException("Got cloud definition without credentials - user and secret are required to operate with cloud service provider"); } + credentialsJSON = new JSONObject(); credentialsJSON.put("domain", credentials.get("domain")); credentialsJSON.put("user", credentials.get("user")); @@ -68,18 +70,21 @@ public class ProactiveClientServiceForIntegrationImpl extends ProactiveClientSer String sshPrivateKey = null; JSONObject scopeJSON = new JSONObject(); + JSONObject sshCredentialsJSON = new JSONObject(); LinkedHashMap cloudConfiguration = (LinkedHashMap)((LinkedHashMap) cloudDefinition).get("cloudConfiguration"); - LinkedHashMap SSHCredentials = (LinkedHashMap)((LinkedHashMap) cloudDefinition).get("SSHCredentials"); + LinkedHashMap SSHCredentials = (LinkedHashMap)((LinkedHashMap) cloudDefinition).get("sshcredentials"); if(ObjectUtils.isNotEmpty(SSHCredentials)){ - sshUsername = (cloudConfiguration.get("username") != null) ? (String) cloudConfiguration.get("username") : null; - sshKeyPairName = (cloudConfiguration.get("keyPairName") != null) ? (String) cloudConfiguration.get("keyPairName") : null; - sshPrivateKey = (cloudConfiguration.get("privateKey") != null) ? (String) cloudConfiguration.get("privateKey") : null; + sshUsername = (SSHCredentials.get("username") != null) ? (String) SSHCredentials.get("username") : null; + sshKeyPairName = (SSHCredentials.get("keyPairName") != null) ? (String) SSHCredentials.get("keyPairName") : null; + sshPrivateKey = (SSHCredentials.get("privateKey") != null) ? (String) SSHCredentials.get("privateKey") : null; + + sshCredentialsJSON.put("username", sshUsername); + sshCredentialsJSON.put("keyPairName", sshKeyPairName); + sshCredentialsJSON.put("privateKey", sshPrivateKey); - cloudJSON.put("username", sshUsername); - cloudJSON.put("keyPairName", sshKeyPairName); - cloudJSON.put("privateKey", sshPrivateKey); + cloudJSON.put("sshCredentials", sshCredentialsJSON); } if(ObjectUtils.isNotEmpty(cloudConfiguration)) { -- GitLab From 69cc3b2dc186b2cc48fb47db0757426e8758ac3b Mon Sep 17 00:00:00 2001 From: Jan Marchel Date: Fri, 2 Sep 2022 10:18:12 +0000 Subject: [PATCH 15/16] dockerfile- new java image --- mule_esb/mule-integration/src/main/docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mule_esb/mule-integration/src/main/docker/Dockerfile b/mule_esb/mule-integration/src/main/docker/Dockerfile index e698218..92b505e 100644 --- a/mule_esb/mule-integration/src/main/docker/Dockerfile +++ b/mule_esb/mule-integration/src/main/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM java:openjdk-8-jre +FROM openjdk:8-alpine MAINTAINER mprusinski@7bulls.com -- GitLab From 7ad05239646416d04570352be3dccc28291238ca Mon Sep 17 00:00:00 2001 From: mriedl Date: Fri, 2 Sep 2022 12:54:18 +0200 Subject: [PATCH 16/16] Updated alpine versions --- process/src/main/docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/process/src/main/docker/Dockerfile b/process/src/main/docker/Dockerfile index 2d59a9e..a573016 100644 --- a/process/src/main/docker/Dockerfile +++ b/process/src/main/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM java:8-alpine +FROM openjdk:8-alpine RUN /bin/sh -c "apk add --no-cache bash" VOLUME /tmp -- GitLab