From 4e2284d827b71fa9db20f5c3756095a0ade73044 Mon Sep 17 00:00:00 2001 From: "Kajur, Harish (vk250x)" Date: Wed, 28 Mar 2018 16:47:49 -0400 Subject: Update from titan to using janus graph Issue-ID: AAI-949 Change-Id: I1b2aa5cafaefca7cfde779f5c52fa54875fd25ea Signed-off-by: Kajur, Harish (vk250x) --- .../appconfig/janusgraph-cached.properties | 43 ++++++++++++++++++++++ .../appconfig/janusgraph-realtime.properties | 40 ++++++++++++++++++++ aai-resources/appconfig/titan-cached.properties | 39 -------------------- aai-resources/appconfig/titan-realtime.properties | 36 ------------------ .../appconfig/janusgraph-cached.properties | 43 ++++++++++++++++++++++ .../appconfig/janusgraph-realtime.properties | 40 ++++++++++++++++++++ aai-traversal/appconfig/titan-cached.properties | 39 -------------------- aai-traversal/appconfig/titan-realtime.properties | 36 ------------------ deploy_vm1.sh | 6 +++ deploy_vm2.sh | 8 ++-- docker-compose-app.yml | 19 ++++------ docker-compose-db.yml | 18 +++++---- 12 files changed, 193 insertions(+), 174 deletions(-) create mode 100644 aai-resources/appconfig/janusgraph-cached.properties create mode 100644 aai-resources/appconfig/janusgraph-realtime.properties delete mode 100644 aai-resources/appconfig/titan-cached.properties delete mode 100644 aai-resources/appconfig/titan-realtime.properties create mode 100644 aai-traversal/appconfig/janusgraph-cached.properties create mode 100644 aai-traversal/appconfig/janusgraph-realtime.properties delete mode 100644 aai-traversal/appconfig/titan-cached.properties delete mode 100644 aai-traversal/appconfig/titan-realtime.properties diff --git a/aai-resources/appconfig/janusgraph-cached.properties b/aai-resources/appconfig/janusgraph-cached.properties new file mode 100644 index 0000000..c2110f7 --- /dev/null +++ b/aai-resources/appconfig/janusgraph-cached.properties @@ -0,0 +1,43 @@ +# +# ============LICENSE_START======================================================= +# org.onap.aai +# ================================================================================ +# Copyright © 2017 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========================================================= +# +# ECOMP is a trademark and service mark of AT&T Intellectual Property. +# + +query.fast-property=true +query.smart-limit=false + +# the following parameters are not reloaded automatically and require a manual bounce +storage.backend=cassandra +storage.hostname=aai.hbase.simpledemo.onap.org + +storage.cassandra.keyspace=aaigraph + +#schema.default=none +storage.lock.wait-time=300 +storage.hbase.table=aaigraph-dev1.dev +storage.hbase.ext.zookeeper.znode.parent=/hbase +#caching on +cache.db-cache = true +cache.db-cache-clean-wait = 20 +cache.db-cache-time = 180000 +cache.db-cache-size = 0.3 + +#load graphson file on startup +load.snapshot.file=false diff --git a/aai-resources/appconfig/janusgraph-realtime.properties b/aai-resources/appconfig/janusgraph-realtime.properties new file mode 100644 index 0000000..4791431 --- /dev/null +++ b/aai-resources/appconfig/janusgraph-realtime.properties @@ -0,0 +1,40 @@ +# +# ============LICENSE_START======================================================= +# org.onap.aai +# ================================================================================ +# Copyright © 2017 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========================================================= +# +# ECOMP is a trademark and service mark of AT&T Intellectual Property. +# + +query.fast-property=true +query.smart-limit=false + +# the following parameters are not reloaded automatically and require a manual bounce +storage.backend=cassandra +storage.hostname=aai.hbase.simpledemo.onap.org + +storage.cassandra.keyspace=aaigraph + +#schema.default=none +storage.lock.wait-time=300 +storage.hbase.table=aaigraph-dev1.dev +storage.hbase.ext.zookeeper.znode.parent=/hbase +# Setting db-cache to false ensure the fastest propagation of changes across servers +cache.db-cache = false + +#load graphson file on startup +load.snapshot.file=false diff --git a/aai-resources/appconfig/titan-cached.properties b/aai-resources/appconfig/titan-cached.properties deleted file mode 100644 index 97bb818..0000000 --- a/aai-resources/appconfig/titan-cached.properties +++ /dev/null @@ -1,39 +0,0 @@ -# -# ============LICENSE_START======================================================= -# org.onap.aai -# ================================================================================ -# Copyright © 2017 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========================================================= -# -# ECOMP is a trademark and service mark of AT&T Intellectual Property. -# - -query.fast-property=true -# the following parameters are not reloaded automatically and require a manual bounce -storage.backend=hbase -storage.hostname=aai.hbase.simpledemo.onap.org - -#schema.default=none -storage.lock.wait-time=300 -storage.hbase.table=aaigraph-dev1.dev -storage.hbase.ext.zookeeper.znode.parent=/hbase -#caching on -cache.db-cache = true -cache.db-cache-clean-wait = 20 -cache.db-cache-time = 180000 -cache.db-cache-size = 0.3 - -#load graphson file on startup -load.snapshot.file=false diff --git a/aai-resources/appconfig/titan-realtime.properties b/aai-resources/appconfig/titan-realtime.properties deleted file mode 100644 index 0c97b75..0000000 --- a/aai-resources/appconfig/titan-realtime.properties +++ /dev/null @@ -1,36 +0,0 @@ -# -# ============LICENSE_START======================================================= -# org.onap.aai -# ================================================================================ -# Copyright © 2017 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========================================================= -# -# ECOMP is a trademark and service mark of AT&T Intellectual Property. -# - -query.fast-property=true -# the following parameters are not reloaded automatically and require a manual bounce -storage.backend=hbase -storage.hostname=aai.hbase.simpledemo.onap.org - -#schema.default=none -storage.lock.wait-time=300 -storage.hbase.table=aaigraph-dev1.dev -storage.hbase.ext.zookeeper.znode.parent=/hbase -# Setting db-cache to false ensure the fastest propagation of changes across servers -cache.db-cache = false - -#load graphson file on startup -load.snapshot.file=false diff --git a/aai-traversal/appconfig/janusgraph-cached.properties b/aai-traversal/appconfig/janusgraph-cached.properties new file mode 100644 index 0000000..c2110f7 --- /dev/null +++ b/aai-traversal/appconfig/janusgraph-cached.properties @@ -0,0 +1,43 @@ +# +# ============LICENSE_START======================================================= +# org.onap.aai +# ================================================================================ +# Copyright © 2017 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========================================================= +# +# ECOMP is a trademark and service mark of AT&T Intellectual Property. +# + +query.fast-property=true +query.smart-limit=false + +# the following parameters are not reloaded automatically and require a manual bounce +storage.backend=cassandra +storage.hostname=aai.hbase.simpledemo.onap.org + +storage.cassandra.keyspace=aaigraph + +#schema.default=none +storage.lock.wait-time=300 +storage.hbase.table=aaigraph-dev1.dev +storage.hbase.ext.zookeeper.znode.parent=/hbase +#caching on +cache.db-cache = true +cache.db-cache-clean-wait = 20 +cache.db-cache-time = 180000 +cache.db-cache-size = 0.3 + +#load graphson file on startup +load.snapshot.file=false diff --git a/aai-traversal/appconfig/janusgraph-realtime.properties b/aai-traversal/appconfig/janusgraph-realtime.properties new file mode 100644 index 0000000..4791431 --- /dev/null +++ b/aai-traversal/appconfig/janusgraph-realtime.properties @@ -0,0 +1,40 @@ +# +# ============LICENSE_START======================================================= +# org.onap.aai +# ================================================================================ +# Copyright © 2017 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========================================================= +# +# ECOMP is a trademark and service mark of AT&T Intellectual Property. +# + +query.fast-property=true +query.smart-limit=false + +# the following parameters are not reloaded automatically and require a manual bounce +storage.backend=cassandra +storage.hostname=aai.hbase.simpledemo.onap.org + +storage.cassandra.keyspace=aaigraph + +#schema.default=none +storage.lock.wait-time=300 +storage.hbase.table=aaigraph-dev1.dev +storage.hbase.ext.zookeeper.znode.parent=/hbase +# Setting db-cache to false ensure the fastest propagation of changes across servers +cache.db-cache = false + +#load graphson file on startup +load.snapshot.file=false diff --git a/aai-traversal/appconfig/titan-cached.properties b/aai-traversal/appconfig/titan-cached.properties deleted file mode 100644 index 97bb818..0000000 --- a/aai-traversal/appconfig/titan-cached.properties +++ /dev/null @@ -1,39 +0,0 @@ -# -# ============LICENSE_START======================================================= -# org.onap.aai -# ================================================================================ -# Copyright © 2017 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========================================================= -# -# ECOMP is a trademark and service mark of AT&T Intellectual Property. -# - -query.fast-property=true -# the following parameters are not reloaded automatically and require a manual bounce -storage.backend=hbase -storage.hostname=aai.hbase.simpledemo.onap.org - -#schema.default=none -storage.lock.wait-time=300 -storage.hbase.table=aaigraph-dev1.dev -storage.hbase.ext.zookeeper.znode.parent=/hbase -#caching on -cache.db-cache = true -cache.db-cache-clean-wait = 20 -cache.db-cache-time = 180000 -cache.db-cache-size = 0.3 - -#load graphson file on startup -load.snapshot.file=false diff --git a/aai-traversal/appconfig/titan-realtime.properties b/aai-traversal/appconfig/titan-realtime.properties deleted file mode 100644 index 0c97b75..0000000 --- a/aai-traversal/appconfig/titan-realtime.properties +++ /dev/null @@ -1,36 +0,0 @@ -# -# ============LICENSE_START======================================================= -# org.onap.aai -# ================================================================================ -# Copyright © 2017 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========================================================= -# -# ECOMP is a trademark and service mark of AT&T Intellectual Property. -# - -query.fast-property=true -# the following parameters are not reloaded automatically and require a manual bounce -storage.backend=hbase -storage.hostname=aai.hbase.simpledemo.onap.org - -#schema.default=none -storage.lock.wait-time=300 -storage.hbase.table=aaigraph-dev1.dev -storage.hbase.ext.zookeeper.znode.parent=/hbase -# Setting db-cache to false ensure the fastest propagation of changes across servers -cache.db-cache = false - -#load graphson file on startup -load.snapshot.file=false diff --git a/deploy_vm1.sh b/deploy_vm1.sh index 34a3d43..c07eb96 100755 --- a/deploy_vm1.sh +++ b/deploy_vm1.sh @@ -168,12 +168,18 @@ fi; chown -R $USER_ID:$USER_ID $RESOURCE_LOGS $TRAVERSAL_LOGS; +$DOCKER_COMPOSE_CMD run --rm aai-resources.api.simpledemo.onap.org createDBSchema.sh + RESOURCES_CONTAINER_NAME=$($DOCKER_COMPOSE_CMD up -d aai-resources.api.simpledemo.onap.org 2>&1 | grep 'Creating' | grep -v 'volume' | grep -v 'network' | awk '{ print $2; }' | head -1); wait_for_container $RESOURCES_CONTAINER_NAME 'Resources Microservice Started'; # Deploy haproxy and traversal at the same time for traversal to make updateQuery against resources using haproxy $DOCKER_COMPOSE_CMD up -d aai-traversal.api.simpledemo.onap.org aai.api.simpledemo.onap.org +sleep 3; + +$DOCKER_COMPOSE_CMD run --rm aai-traversal.api.simpledemo.onap.org install/updateQueryData.sh + $DOCKER_COMPOSE_CMD up -d sparky-be $DOCKER_COMPOSE_CMD up -d model-loader datarouter aai.searchservice.simpledemo.openecomp.org diff --git a/deploy_vm2.sh b/deploy_vm2.sh index 5ef9068..ccfa33f 100755 --- a/deploy_vm2.sh +++ b/deploy_vm2.sh @@ -34,15 +34,13 @@ function wait_for_container() { done } -docker pull ${HBASE_IMAGE}:${HBASE_VERSION}; +docker pull cassandra:2.1; # cleanup $DOCKER_COMPOSE_CMD stop $DOCKER_COMPOSE_CMD rm -f -v -HBASE_CONTAINER_NAME=$($DOCKER_COMPOSE_CMD up -d aai.hbase.simpledemo.onap.org 2>&1 | grep 'Creating' | grep -v 'volume' | grep -v 'network' | awk '{ print $2; }' | head -1); -wait_for_container $HBASE_CONTAINER_NAME ' Started SelectChannelConnector@0.0.0.0:8085'; -wait_for_container $HBASE_CONTAINER_NAME ' Started SelectChannelConnector@0.0.0.0:8080'; -wait_for_container $HBASE_CONTAINER_NAME ' Started SelectChannelConnector@0.0.0.0:9095'; +CASSANDRA_CONTAINER_NAME=$($DOCKER_COMPOSE_CMD up -d aai.hbase.simpledemo.onap.org 2>&1 | grep 'Creating' | grep -v 'volume' | grep -v 'network' | awk '{ print $2; }' | head -1); +wait_for_container $CASSANDRA_CONTAINER_NAME 'Listening for thrift clients'; $DOCKER_COMPOSE_CMD up -d aai.elasticsearch.simpledemo.openecomp.org diff --git a/docker-compose-app.yml b/docker-compose-app.yml index c0b5daa..15831be 100644 --- a/docker-compose-app.yml +++ b/docker-compose-app.yml @@ -6,12 +6,13 @@ services: environment: - LOCAL_USER_ID=${USER_ID} - LOCAL_GROUP_ID=${GROUP_ID} + - SKIP_CREATE_DB_SCHEMA_AT_STARTUP=true ports: - 8447:8447 volumes: - ${RESOURCES_LOGS}:/opt/aai/logroot/AAI-RES - - /opt/test-config/aai-resources/appconfig/titan-realtime.properties:/opt/app/aai-resources/resources/etc/appprops/titan-realtime.properties - - /opt/test-config/aai-resources/appconfig/titan-cached.properties:/opt/app/aai-resources/resources/etc/appprops/titan-cached.properties + - /opt/test-config/aai-resources/appconfig/janusgraph-realtime.properties:/opt/app/aai-resources/resources/etc/appprops/janusgraph-realtime.properties + - /opt/test-config/aai-resources/appconfig/janusgraph-cached.properties:/opt/app/aai-resources/resources/etc/appprops/janusgraph-cached.properties - /opt/test-config/aai-resources/appconfig/aaiconfig.properties:/opt/app/aai-resources/resources/etc/appprops/aaiconfig.properties - /opt/test-config/aai-resources/appconfig/application.properties:/opt/app/aai-resources/resources/application.properties - /opt/test-config/aai-resources/appconfig/logback.xml:/opt/app/aai-resources/resources/logback.xml @@ -27,16 +28,13 @@ services: image: ${DOCKER_REGISTRY}/onap/aai-traversal hostname: aai-traversal.api.simpledemo.onap.org environment: - - AAI_CHEF_ENV=simpledemo - - AAI_CHEF_LOC=/var/chef/aai-data/environments - - CHEF_BRANCH=master - - CHEF_GIT_URL=http://gerrit.onap.org/r/aai - - AAI_CORE_VERSION=1.1.0-SNAPSHOT - LOCAL_USER_ID=${USER_ID} + - LOCAL_GROUP_ID=${GROUP_ID} + - DISABLE_UPDATE_QUERY=true volumes: - ${TRAVERSAL_LOGS}:/opt/aai/logroot/AAI-GQ - - /opt/test-config/aai-traversal/appconfig/titan-realtime.properties:/opt/app/aai-traversal/resources/etc/appprops/titan-realtime.properties - - /opt/test-config/aai-traversal/appconfig/titan-cached.properties:/opt/app/aai-traversal/resources/etc/appprops/titan-cached.properties + - /opt/test-config/aai-traversal/appconfig/janusgraph-realtime.properties:/opt/app/aai-traversal/resources/etc/appprops/janusgraph-realtime.properties + - /opt/test-config/aai-traversal/appconfig/janusgraph-cached.properties:/opt/app/aai-traversal/resources/etc/appprops/janusgraph-cached.properties - /opt/test-config/aai-traversal/appconfig/aaiconfig.properties:/opt/app/aai-traversal/resources/etc/appprops/aaiconfig.properties - /opt/test-config/aai-traversal/appconfig/application.properties:/opt/app/aai-traversal/resources/application.properties - /opt/test-config/aai-traversal/appconfig/logback.xml:/opt/app/aai-traversal/resources/logback.xml @@ -203,8 +201,7 @@ services: driver: "json-file" options: max-size: "30m" - max-file: "5" - + max-file: "5" networks: default: driver: bridge diff --git a/docker-compose-db.yml b/docker-compose-db.yml index 3f93f48..24024d0 100644 --- a/docker-compose-db.yml +++ b/docker-compose-db.yml @@ -1,16 +1,18 @@ version: '2' services: aai.hbase.simpledemo.onap.org: - image: ${HBASE_IMAGE}:${HBASE_VERSION} + image: cassandra:2.1 hostname: aai.hbase.simpledemo.onap.org ports: - - 2181:2181 - - 8080:8080 - - 8085:8085 - - 9090:9090 - - 16000:16000 - - 16010:16010 - - 16201:16201 + - 7000:7000 + - 7001:7001 + - 7199:7199 + - 9042:9042 + environment: + - CASSANDRA_SEEDS=aai.hbase.simpledemo.onap.org + - CASSANDRA_DC=Heat + - CASSANDRA_RACK=Rack1 + - CASSANDRA_AUTO_BOOTSTRAP=true logging: driver: "json-file" options: -- cgit 1.2.3-korg