aboutsummaryrefslogtreecommitdiffstats
path: root/bootstrap/vagrant-onap
diff options
context:
space:
mode:
authorGary Wu <gary.i.wu@huawei.com>2017-08-21 23:45:33 +0000
committerGerrit Code Review <gerrit@onap.org>2017-08-21 23:45:33 +0000
commitecc8354f5c586713650a4d2eb1f7c94ddcb4665a (patch)
tree0f728cc41467dfdc080894b6fa764f57dad0618f /bootstrap/vagrant-onap
parentc0209aec7f136192a984017e1ae5db5443c89466 (diff)
parent8e08c873aae0d762a193a261c1d821c2d9aaadaa (diff)
Merge "Refactor AAI source folder variable"
Diffstat (limited to 'bootstrap/vagrant-onap')
-rwxr-xr-xbootstrap/vagrant-onap/lib/aai22
-rw-r--r--bootstrap/vagrant-onap/tests/test_aai76
2 files changed, 48 insertions, 50 deletions
diff --git a/bootstrap/vagrant-onap/lib/aai b/bootstrap/vagrant-onap/lib/aai
index 4d828557f..cbf5c5f7d 100755
--- a/bootstrap/vagrant-onap/lib/aai
+++ b/bootstrap/vagrant-onap/lib/aai
@@ -5,7 +5,7 @@ set -o xtrace
source /var/onap/functions
hbase_version=1.2.3
-src_folder=$git_src_folder/aai
+aai_src_folder=$git_src_folder/aai
aai_repos=("aai-common" "aai-config" "aai-data" "aai-service" "data-router" "logging-service" "model-loader" "resources" "rest-client" "router-core" "search-data-service" "test-config" "traversal" "sparky-fe" "sparky-be")
# install_hadoop() - Function that installs Hadoop
@@ -48,7 +48,7 @@ function install_haproxy {
# clone_all_aai_repos() - Function that clones AAI source repo.
function clone_all_aai_repos {
for dirc in ${aai_repos[@]}; do
- clone_repo aai/$dirc $src_folder/$dirc
+ clone_repo aai/$dirc $aai_src_folder/$dirc
done
}
@@ -60,7 +60,7 @@ function compile_aai_repos {
fi
for dirc in ${repos[@]}; do
- compile_src $src_folder/$dirc
+ compile_src $aai_src_folder/$dirc
done
}
@@ -71,15 +71,15 @@ function setup_titan {
for dirc in resources/aai-resources traversal/aai-travers; do
for file in titan-cached.properties titan-realtime.properties; do
- crudini --set --existing $src_folder/$dirc/$subdirectory/$file "" storage.backend cassandra
- crudini --set --existing $src_folder/$dirc/$subdirectory/$file "" storage.hostname localhost
+ crudini --set --existing $aai_src_folder/$dirc/$subdirectory/$file "" storage.backend cassandra
+ crudini --set --existing $aai_src_folder/$dirc/$subdirectory/$file "" storage.hostname localhost
done
done
# Addthe schema to the local isntance
- pushd $src_folder
+ pushd $aai_src_folder
install_java
- java -DAJSC_HOME=$src_folder/resources/aai-resources -DBUNDLECONFIG_DIR="bundleconfig-local" -cp aai-common/aai-core/target/aai-core-1.1.0-SNAPSHOT.jar:resources/aai-resources/target/aai-resources.jar:resources/aai-resources/target/userjars/* org.openecomp.aai.dbgen.GenTester
+ java -DAJSC_HOME=$aai_src_folder/resources/aai-resources -DBUNDLECONFIG_DIR="bundleconfig-local" -cp aai-common/aai-core/target/aai-core-1.1.0-SNAPSHOT.jar:resources/aai-resources/target/aai-resources.jar:resources/aai-resources/target/userjars/* org.openecomp.aai.dbgen.GenTester
popd
}
@@ -87,7 +87,7 @@ function setup_titan {
function start_aai_microservices {
MAVEN_OPTS="-Xms1024m -Xmx5120m -XX:PermSize=2024m -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=9446,server=y,suspend=n"
for svc in resources traversal; do
- pushd $src_folder/resources
+ pushd $aai_src_folder/resources
mvn -P runAjsc
popd
done
@@ -116,7 +116,7 @@ docker_gitbranch=master
EOL
docker rm -f aai-service
if [[ "$build_image" == "True" ]]; then
- build_docker_image $src_folder/aai-service/ajsc-aai
+ build_docker_image $aai_src_folder/aai-service/ajsc-aai
else
pull_openecomp_image ajsc-aai
fi
@@ -126,7 +126,6 @@ EOL
# install_model_loader() Install Model Loader
function install_model_loader {
- local src_folder=/opt/aai/model-loader/
cat <<EOL > /etc/model-loader.conf
DISTR_CLIENT_ASDC_ADDRESS=${SDC_ADDRESS:-c2.vm1.sdc.simpledemo.openecomp.org:8443}
DISTR_CLIENT_CONSUMER_GROUP=${UEB_CONSUMER_GROUP:-SDCGroup}
@@ -145,8 +144,7 @@ EOL
docker rm -f model-loader-service
if [[ "$build_image" == "True" ]]; then
- clone_repo aai/model-loader $src_folder
- build_docker_image $src_folder
+ build_docker_image $aai_src_folder/model-loader/
ARGS+="--env-file /etc/model-loader.conf model-loader"
else
pull_openecomp_image model-loader
diff --git a/bootstrap/vagrant-onap/tests/test_aai b/bootstrap/vagrant-onap/tests/test_aai
index b0f8888f3..713238d1a 100644
--- a/bootstrap/vagrant-onap/tests/test_aai
+++ b/bootstrap/vagrant-onap/tests/test_aai
@@ -34,21 +34,21 @@ function test_install_haproxy {
function test_clone_all_aai_repos {
clone_all_aai_repos
- asserts_file_exist $src_folder/aai-common/pom.xml
- asserts_file_exist $src_folder/aai-config/cookbooks/aai-resources/runlist-aai-resources.json
- asserts_file_exist $src_folder/aai-data/environments/solo.json
- asserts_file_exist $src_folder/aai-service/pom.xml
- asserts_file_exist $src_folder/data-router/pom.xml
- asserts_file_exist $src_folder/logging-service/pom.xml
- asserts_file_exist $src_folder/model-loader/pom.xml
- asserts_file_exist $src_folder/resources/pom.xml
- asserts_file_exist $src_folder/rest-client/pom.xml
- asserts_file_exist $src_folder/router-core/pom.xml
- asserts_file_exist $src_folder/search-data-service/pom.xml
- asserts_file_exist $src_folder/sparky-be/pom.xml
- asserts_file_exist $src_folder/sparky-fe/pom.xml
- asserts_file_exist $src_folder/test-config/docker-compose-app.yml
- asserts_file_exist $src_folder/traversal/pom.xml
+ asserts_file_exist $aai_src_folder/aai-common/pom.xml
+ asserts_file_exist $aai_src_folder/aai-config/cookbooks/aai-resources/runlist-aai-resources.json
+ asserts_file_exist $aai_src_folder/aai-data/environments/solo.json
+ asserts_file_exist $aai_src_folder/aai-service/pom.xml
+ asserts_file_exist $aai_src_folder/data-router/pom.xml
+ asserts_file_exist $aai_src_folder/logging-service/pom.xml
+ asserts_file_exist $aai_src_folder/model-loader/pom.xml
+ asserts_file_exist $aai_src_folder/resources/pom.xml
+ asserts_file_exist $aai_src_folder/rest-client/pom.xml
+ asserts_file_exist $aai_src_folder/router-core/pom.xml
+ asserts_file_exist $aai_src_folder/search-data-service/pom.xml
+ asserts_file_exist $aai_src_folder/sparky-be/pom.xml
+ asserts_file_exist $aai_src_folder/sparky-fe/pom.xml
+ asserts_file_exist $aai_src_folder/test-config/docker-compose-app.yml
+ asserts_file_exist $aai_src_folder/traversal/pom.xml
}
# test_compile_aai_repos() - Verify that all the AAI Repositories complile properly
@@ -57,29 +57,29 @@ function test_compile_aai_repos {
export compile_repo="True"
compile_aai_repos
- asserts_file_exist $src_folder/aai-common/aai-annotations/target/aai-annotations-1.1.0-SNAPSHOT.jar
- asserts_file_exist $src_folder/aai-common/aai-auth/target/aai-auth-1.1.0-SNAPSHOT.jar
- asserts_file_exist $src_folder/aai-common/aai-core/target/aai-core-1.1.0-SNAPSHOT.jar
- asserts_file_exist $src_folder/aai-common/aai-schema/target/aai-schema-1.1.0-SNAPSHOT.jar
-
- asserts_file_exist $src_folder/aai-service/aai-schema/target/aai-schema-1.1.0-SNAPSHOT.jar
- asserts_file_exist $src_folder/aai-service/ajsc-aai/target/aai.jar
- asserts_file_exist $src_folder/aai-service/annotations/target/annotations-1.1.0-SNAPSHOT.jar
-
- asserts_file_exist $src_folder/data-router/target/data-router-1.1.0-SNAPSHOT.jar
-
- asserts_file_exist $src_folder/logging-service/common-logging/target/common-logging-1.1.0-SNAPSHOT.jar
- asserts_file_exist $src_folder/logging-service/eelf-logging/target/eelf-logging-1.1.0-SNAPSHOT.jar
- asserts_file_exist $src_folder/logging-service/logging-api/target/logging-api-1.1.0-SNAPSHOT.jar
-
- asserts_file_exist $src_folder/model-loader/target/model-loader-1.1.0-SNAPSHOT.jar
- asserts_file_exist $src_folder/resources/aai-resources/target/aai-resources.jar
- asserts_file_exist $src_folder/rest-client/target/rest-client-1.1.0-SNAPSHOT.jar
- asserts_file_exist $src_folder/router-core/target/router-core-1.1.0-SNAPSHOT.jar
- asserts_file_exist $src_folder/search-data-service/target/search-data-service-1.1.0-SNAPSHOT.jar
- asserts_file_exist $src_folder/sparky-be/target/sparky-be-1.0-SNAPSHOT.jar
- asserts_file_exist $src_folder/sparky-fe/target/sparky-fe-1.0.0-SNAPSHOT.war
- asserts_file_exist $src_folder/traversal/aai-traversal/target/traversal.jar
+ asserts_file_exist $aai_src_folder/aai-common/aai-annotations/target/aai-annotations-1.1.0-SNAPSHOT.jar
+ asserts_file_exist $aai_src_folder/aai-common/aai-auth/target/aai-auth-1.1.0-SNAPSHOT.jar
+ asserts_file_exist $aai_src_folder/aai-common/aai-core/target/aai-core-1.1.0-SNAPSHOT.jar
+ asserts_file_exist $aai_src_folder/aai-common/aai-schema/target/aai-schema-1.1.0-SNAPSHOT.jar
+
+ asserts_file_exist $aai_src_folder/aai-service/aai-schema/target/aai-schema-1.1.0-SNAPSHOT.jar
+ asserts_file_exist $aai_src_folder/aai-service/ajsc-aai/target/aai.jar
+ asserts_file_exist $aai_src_folder/aai-service/annotations/target/annotations-1.1.0-SNAPSHOT.jar
+
+ asserts_file_exist $aai_src_folder/data-router/target/data-router-1.1.0-SNAPSHOT.jar
+
+ asserts_file_exist $aai_src_folder/logging-service/common-logging/target/common-logging-1.1.0-SNAPSHOT.jar
+ asserts_file_exist $aai_src_folder/logging-service/eelf-logging/target/eelf-logging-1.1.0-SNAPSHOT.jar
+ asserts_file_exist $aai_src_folder/logging-service/logging-api/target/logging-api-1.1.0-SNAPSHOT.jar
+
+ asserts_file_exist $aai_src_folder/model-loader/target/model-loader-1.1.0-SNAPSHOT.jar
+ asserts_file_exist $aai_src_folder/resources/aai-resources/target/aai-resources.jar
+ asserts_file_exist $aai_src_folder/rest-client/target/rest-client-1.1.0-SNAPSHOT.jar
+ asserts_file_exist $aai_src_folder/router-core/target/router-core-1.1.0-SNAPSHOT.jar
+ asserts_file_exist $aai_src_folder/search-data-service/target/search-data-service-1.1.0-SNAPSHOT.jar
+ asserts_file_exist $aai_src_folder/sparky-be/target/sparky-be-1.0-SNAPSHOT.jar
+ asserts_file_exist $aai_src_folder/sparky-fe/target/sparky-fe-1.0.0-SNAPSHOT.war
+ asserts_file_exist $aai_src_folder/traversal/aai-traversal/target/traversal.jar
}
# test_setup_titan() - Verify that Titan Cassandra DB is up and running