sw360 / sw360chores

WARNING - Work in Progress - It is not Bug Free! Use with Caution. This repository contains Dockerfiles and accompanying scripts that allow deployment of sw360 via docker
Eclipse Public License 1.0
13 stars 18 forks source link

Test the integration with SW360Rest #39

Open bs-jokri opened 6 years ago

bs-jokri commented 6 years ago

From @bs-jokri on October 9, 2017 11:1

From @maxhbr on June 19, 2017 11:4

using the current https://github.com/sw360/sw360rest/commit/6ce17c15e595cf8cfa8d9a54229ebb11012caa57 one can integrate its docker-compose setup into sw360chores via the following changes:

1. name the images created by sw360rest

diff --git a/docker-compose.yml b/docker-compose.yml
index 65d8271..a0b6f1b 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -15,6 +15,7 @@ services:

   sw360-authorization-server:
     build: subprojects/authorization-server
+    image: sw360restauthorization
     ports:
       - 8090:8090
     environment:
@@ -22,6 +23,7 @@ services:

   sw360-resource-server:
     build: subprojects/resource-server
+    image: sw360restresource
     ports:
       - 8091:8091
     links:

(should be moved to upstream)

2. build the named images (in sw360rest):

$ ./gradlew build preparedocker
$ docker-compose build

3. include the new images to the sw360chores docker-compose setup

diff --git a/deployment/configuration.env b/deployment/configuration.env
index b757d81..37e6c7e 100644
--- a/deployment/configuration.env
+++ b/deployment/configuration.env
@@ -7,6 +7,7 @@
 # http://www.eclipse.org/legal/epl-v10.html

 DEV_MODE=true
+REST=true
 # CVE_SEARCH=false
 # HTTPS_COUCHDB=false
 # BACKUP_FOLDER=./_backup
diff --git a/deployment/docker-compose.rest.yml b/deployment/docker-compose.rest.yml
new file mode 100644
index 0000000..d3b799b
--- /dev/null
+++ b/deployment/docker-compose.rest.yml
@@ -0,0 +1,30 @@
+# Copyright Bosch Software Innovations GmbH, 2017.
+# Part of the SW360 Portal Project.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+
+
+# This file adds a cve-search server to the sw360 environment.
+# Use it together with the main docker-compose.yml as described
+# in README.md
+
+version: '2'
+services:
+  sw360-authorization-server:
+    image: sw360restauthorization
+    ports:
+      - 8090:8090
+    environment:
+      - SW360_AUTHORIZATION_SERVER_ARGS=-Dspring.profiles.active=dev
+
+  sw360-resource-server:
+    image: sw360restresource
+    ports:
+      - 8091:8091
+    networks:
+      - sw360front
+    environment:
+      - SW360_THRIFT_SERVER_URL=http://sw360:8080
diff --git a/deployment/docker-compose.sh b/deployment/docker-compose.sh
index 3fcac89..5b718f4 100755
--- a/deployment/docker-compose.sh
+++ b/deployment/docker-compose.sh
@@ -92,6 +92,7 @@ addSudoIfNeeded() {
 cmdDocker="$(addSudoIfNeeded) env $(grep -v '^#' proxy.env | xargs) docker"
 cmdDockerCompose="${cmdDocker}-compose -f $DIR/docker-compose.yml"
 [ "$DEV_MODE" == "true" ] && cmdDockerCompose="$cmdDockerCompose -f $DIR/docker-compose.dev.yml"
+[ "$REST" == "true" ] && cmdDockerCompose="$cmdDockerCompose -f $DIR/docker-compose.rest.yml"
 [ "$CVE_SEARCH" == "true" ] && {
     cmdDockerCompose="$cmdDockerCompose -f $DIR/docker-compose.cve-search-server.yml"
     [ "$DEV_MODE" == "true" ] && cmdDockerCompose="$cmdDockerCompose -f $DIR/docker-compose.dev.cve-search-server.yml"

(based on https://github.com/bsinno/sw360-chores/tree/integration/2017_05_31)

Copied from original issue: bsinno/sw360#442

Copied from original issue: sw360/sw360portal#649

bs-jokri commented 6 years ago

From @maxhbr on July 5, 2017 14:21

created as public PR: https://github.com/sw360/sw360rest/pull/2

bs-jokri commented 6 years ago

From @maxhbr on August 17, 2017 8:18

@bodetc, @bs-jokri this was closed accidentially.