summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVenkata Harish K Kajur <vk250x@att.com>2018-09-19 19:09:41 +0000
committerVenkata Harish K Kajur <vk250x@att.com>2018-09-19 19:12:11 +0000
commit3e70dcedd2fa73c064b435922be711bd2815cb8d (patch)
tree98badc224390177761343beeb48662b12b6c687c
parentfb417886112d22b8261de37c5eb2a030d6b4c1db (diff)
Update haproxy for graphadmin
and also remove the dynamic schema Issue-ID: AAI-1545 Change-Id: I77cea3e42d94ba758ce11c5965df54a1851280ce Signed-off-by: Venkata Harish K Kajur <vk250x@att.com>
-rwxr-xr-xdeploy_vm1.sh40
-rw-r--r--docker-compose-app.yml3
-rw-r--r--haproxy/haproxy.cfg12
3 files changed, 12 insertions, 43 deletions
diff --git a/deploy_vm1.sh b/deploy_vm1.sh
index e1f9dd7..f307e98 100755
--- a/deploy_vm1.sh
+++ b/deploy_vm1.sh
@@ -150,46 +150,6 @@ function check_if_user_exists(){
}
}
-# Instead of duplicating the changes from aai-common
-# Clone the repo and extract the oxm and dbedgerules
-function retrieve_schema_edgerules(){
-
- local current_branch=$(git rev-parse --abbrev-ref HEAD);
- local current_dir=$(pwd);
-
- local microservice_name=aai-common;
- temp_dir=/tmp/${microservice_name}-$(uuidgen);
- (
- mkdir -p ${temp_dir} && cd ${temp_dir};
- rm -r ${current_dir}/aai-schema
-
- git init
- git remote add origin https://gerrit.onap.org/r/aai/aai-common
- git config core.sparsecheckout true
-
- # Specifies which folders to checkout from the repo
- # Limited to only the aai-resources as we don't need other folders from
- # microservice deployment for this repository
-
- echo "aai-schema/src/main/resources/**" >> .git/info/sparse-checkout
-
- git fetch --depth=1 origin ${current_branch} && {
- git checkout ${current_branch}
- } || {
- echo "Unable to find the branch ${current_branch} in aai-common, so using default branch ${default_branch}";
- git fetch --depth=1 origin ${default_branch}
- git checkout ${default_branch}
- }
-
- mkdir -p ${current_dir}/aai-schema
- cp -R ${temp_dir}/aai-schema/src/main/resources/onap/ ${current_dir}/aai-schema
-
- rm -rf ${temp_dir}
- );
-}
-
-retrieve_schema_edgerules;
-
docker pull ${DOCKER_REGISTRY}/onap/aai-graphadmin:${GRAPHADMIN_DOCKER_IMAGE_VERSION};
docker tag $DOCKER_REGISTRY/onap/aai-graphadmin:${GRAPHADMIN_DOCKER_IMAGE_VERSION} $DOCKER_REGISTRY/onap/aai-graphadmin:latest;
diff --git a/docker-compose-app.yml b/docker-compose-app.yml
index 67cacf0..fd5c7b9 100644
--- a/docker-compose-app.yml
+++ b/docker-compose-app.yml
@@ -18,7 +18,6 @@ services:
- /opt/test-config/aai-resources/appconfig/localhost-access-logback.xml:/opt/app/aai-resources/resources/localhost-access-logback.xml
- /opt/test-config/aai-resources/appconfig/aai_keystore:/opt/app/aai-resources/resources/etc/auth/aai_keystore
- /opt/test-config/aai-resources/appconfig/realm.properties:/opt/app/aai-resources/resources/etc/auth/realm.properties
- - /opt/test-config/aai-schema/:/opt/app/aai-resources/resources/schema/
- /opt/test-config/aai-resources/appconfig/aaf/cadi.properties:/opt/app/aai-resources/resources/cadi.properties
- /opt/test-config/aai-resources/appconfig/aaf/org.onap.aai.keyfile:/opt/app/aai-resources/resources/aaf/org.onap.aai.keyfile
- /opt/test-config/aai-resources/appconfig/aaf/org.onap.aai.p12:/opt/app/aai-resources/resources/aaf/org.onap.aai.p12
@@ -48,7 +47,6 @@ services:
- /opt/test-config/aai-traversal/appconfig/localhost-access-logback.xml:/opt/app/aai-traversal/resources/localhost-access-logback.xml
- /opt/test-config/aai-traversal/appconfig/aai_keystore:/opt/app/aai-traversal/resources/etc/auth/aai_keystore
- /opt/test-config/aai-traversal/appconfig/realm.properties:/opt/app/aai-traversal/resources/etc/auth/realm.properties
- - /opt/test-config/aai-schema/:/opt/app/aai-resources/resources/schema/
- /opt/test-config/aai-traversal/appconfig/aaf/cadi.properties:/opt/app/aai-traversal/resources/cadi.properties
- /opt/test-config/aai-traversal/appconfig/aaf/org.onap.aai.keyfile:/opt/app/aai-traversal/resources/aaf/org.onap.aai.keyfile
- /opt/test-config/aai-traversal/appconfig/aaf/org.onap.aai.p12:/opt/app/aai-traversal/resources/aaf/org.onap.aai.p12
@@ -79,7 +77,6 @@ services:
- /opt/test-config/aai-graphadmin/appconfig/localhost-access-logback.xml:/opt/app/aai-graphadmin/resources/localhost-access-logback.xml
- /opt/test-config/aai-graphadmin/appconfig/aai_keystore:/opt/app/aai-graphadmin/resources/etc/auth/aai_keystore
- /opt/test-config/aai-graphadmin/appconfig/realm.properties:/opt/app/aai-graphadmin/resources/etc/auth/realm.properties
- - /opt/test-config/aai-schema/:/opt/app/aai-resources/resources/schema/
ports:
- 8449:8449
logging:
diff --git a/haproxy/haproxy.cfg b/haproxy/haproxy.cfg
index 8a4001e..058e6b5 100644
--- a/haproxy/haproxy.cfg
+++ b/haproxy/haproxy.cfg
@@ -83,10 +83,16 @@ frontend IST_8443
acl is_Port_8446_generic path_reg -i ^/aai/v[0-9]+/search/generic-query$
acl is_Port_8446_nodes path_reg -i ^/aai/v[0-9]+/search/nodes-query$
acl is_Port_8446_version path_reg -i ^/aai/v[0-9]+/query$
+
acl is_named-query path_beg -i /aai/search/named-query
acl is_search-model path_beg -i /aai/search/model
+
+ acl is_dbquery path_reg -i ^/aai/v[0-9]+/dbquery$
+
use_backend IST_AAI_8446 if is_Port_8446_generic or is_Port_8446_nodes or is_Port_8446_version or is_named-query or is_search-model
+ use_backend IST_AAI_8449 if is_dbquery
+
default_backend IST_Default_8447
@@ -110,6 +116,12 @@ backend IST_AAI_8446
http-response set-header Strict-Transport-Security max-age=16000000;\ includeSubDomains;\ preload;
server aai-traversal.api.simpledemo.onap.org aai-traversal.api.simpledemo.onap.org:8446 port 8446 ssl verify none
+backend IST_AAI_8449
+ balance roundrobin
+ http-request set-header X-Forwarded-Port %[src_port]
+ http-response set-header Strict-Transport-Security max-age=16000000;\ includeSubDomains;\ preload;
+ server aai-graphadmin.api.simpledemo.onap.org aai-graphadmin.api.simpledemo.onap.org:8449 port 8449 ssl verify none
+
listen IST_AAI_STATS
mode http
bind *:8080