From 48d76b552efaa7f3ac068519a0c06ab1ad65f2ea Mon Sep 17 00:00:00 2001 From: Pavel Paroulek Date: Mon, 13 May 2019 20:23:31 +0200 Subject: Maven based building Building the project (docker, user interface) via maven Change-Id: I94ef02b435f0684cedbafb63b5daeb44abfe22cc Issue-ID: AAI-531 Signed-off-by: Pavel Paroulek --- README.md | 15 +--- pom.xml | 117 +++++++++++++++++++++++++-- src/main/resources/application.properties | 18 ++++- src/main/resources/docker-assembly.xml | 23 ++++++ src/main/resources/etc/auth/aai_keystore | Bin 0 -> 4928 bytes src/main/resources/etc/auth/realm.properties | 13 +++ 6 files changed, 164 insertions(+), 22 deletions(-) create mode 100644 src/main/resources/docker-assembly.xml create mode 100644 src/main/resources/etc/auth/aai_keystore create mode 100644 src/main/resources/etc/auth/realm.properties diff --git a/README.md b/README.md index 167f40f..9cfa65c 100644 --- a/README.md +++ b/README.md @@ -16,18 +16,7 @@ Then go to http://localhost:3000 In order to start the webservices run the App.java from your Java IDE (the service runs on localhost port 8080). -## Running from command line +## Building docker images -To run GraphGraph from the command line just run the shell script: -### `./run.sh` - -## Creating a standalone jar - -To create a standalone Java jar file run the build script: - -### `./buildjar.sh` - -Afterwards you can start GraphGraph just by running the command: - -### `java -jar ./target/graphgraph-1.0-SNAPSHOT.jar` +### `mvn clean install -Pdocker diff --git a/pom.xml b/pom.xml index eb7e378..10a4669 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ https://nexus.onap.org - /content/sites/site/org/onap/aai/resources/${project.artifactId}/${project.version} + /content/sites/site/org/onap/aai/graphgraph/${project.artifactId}/${project.version} /content/repositories/releases/ /content/repositories/snapshots/ UTF-8 @@ -18,6 +18,13 @@ 1.8 1.8 1.5.19.RELEASE + + 0.23.0 + docker.io + localhost:5000 + onap + ${project.build.directory}/${project.artifactId}-${project.version}-build/ + src/main/resources/ @@ -78,15 +85,116 @@ + + + docker + + /graphgraph/ + + + + + io.fabric8 + fabric8-maven-plugin + 4.1.0 + + true + + + graphgraph:${project.version} + + aaionap/aai-common:1.3.0 + + + java + -jar + /graphgraph/${project.artifactId}-${project.version}.${project.packaging} + + + + /graphgraph + ${project.basedir}/src/main/resources/docker-assembly.xml + + + + + + + + generate-images + install + + build + + + + push-images + deploy + + push + + + + + + + + + - + + + src/main/resources + true + + - + + com.github.eirslett + frontend-maven-plugin + 1.7.6 + + + install node + + install-node-and-npm + + generate-resources + + ${project.basedir}/graphgraph-fe + v10.10.0 + + + + npm install + + npm + + generate-resources + + ${project.basedir}/graphgraph-fe + install + + + + npm build + + npm + + generate-resources + + ${project.basedir}/graphgraph-fe + run build + + + + + maven-resources-plugin 3.1.0 - copy-resources + copy-resources-ui validate copy-resources @@ -116,7 +224,6 @@ - diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 07d5a00..c152118 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -7,7 +7,7 @@ schema.source.name=onap schema.nodes.location=${server.local.startpath}/schema/${schema.source.name}/oxm/ schema.edges.location=${server.local.startpath}/schema/${schema.source.name}/dbedgerules/ -server.local.startpath=src/main/resources/ +server.local.startpath=${graphgraph.startpath} schema.ingest.file=${server.local.startpath}/application.properties # Schema Version Related Attributes @@ -29,10 +29,20 @@ schema.version.edge.label.start=v12 # Specifies the version that the application should default to schema.version.api.default=v16 schema.translator.list=schema-service -schema.service.base.url=http://localhost:8452/aai/schema-service/v1/ -schema.service.client=no-auth +schema.service.base.url=https://localhost:8452/aai/schema-service/v1/ +# schema.service.client=no-auth schema.service.nodes.endpoint=nodes?version= schema.service.edges.endpoint=edgerules?version= schema.service.versions.endpoint=versions -schema.service.versions.override=false \ No newline at end of file +schema.service.versions.override=false + +schema.service.ssl.enabled-protocols=TLSv1.1,TLSv1.2 +schema.service.ssl.key-store=${server.local.startpath}etc/auth/aai_keystore +schema.service.ssl.key-store-password=changeit +schema.service.ssl.trust-store=${server.local.startpath}etc/auth/aai_keystore +schema.service.ssl.trust-store-password=changeit +schema.service.ssl.client-auth=want +schema.service.ssl.key-store-type=JKS + +schema.service.client=one-way-ssl \ No newline at end of file diff --git a/src/main/resources/docker-assembly.xml b/src/main/resources/docker-assembly.xml new file mode 100644 index 0000000..afd1970 --- /dev/null +++ b/src/main/resources/docker-assembly.xml @@ -0,0 +1,23 @@ + + distribution + + jar + + + + src/main/resources/etc/auth + /etc/auth + false + + + + + + target/${project.artifactId}-${project.version}.${project.packaging} + / + false + + + \ No newline at end of file diff --git a/src/main/resources/etc/auth/aai_keystore b/src/main/resources/etc/auth/aai_keystore new file mode 100644 index 0000000..16d93a7 Binary files /dev/null and b/src/main/resources/etc/auth/aai_keystore differ diff --git a/src/main/resources/etc/auth/realm.properties b/src/main/resources/etc/auth/realm.properties new file mode 100644 index 0000000..f0e0172 --- /dev/null +++ b/src/main/resources/etc/auth/realm.properties @@ -0,0 +1,13 @@ +# format : username: password[,rolename ...] +# default username/password: AAI/AAI, MSO/MSO, ModelLoader/ModelLoader... +AAI:OBF:1gfr1ev31gg7,admin +MSO:OBF:1jzx1lz31k01,admin +SDNC:OBF:1itr1i0l1i151isv,admin +DCAE:OBF:1g8u1f9d1f991g8w,admin +POLICY:OBF:1mk61i171ima1im41i0j1mko,admin +ASDC:OBF:1f991j0u1j001f9d,admin +VID:OBF:1jm91i0v1jl9,admin +APPC:OBF:1f991ksf1ksf1f9d,admin +ModelLoader:OBF:1qvu1v2h1sov1sar1wfw1j7j1wg21saj1sov1v1x1qxw,admin +AaiUI:OBF:1gfr1p571unz1p4j1gg7,admin +OOF:OBF:1img1ke71ily,admin -- cgit 1.2.3-korg