aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore5
-rw-r--r--README.md1
-rw-r--r--Vagrantfile10
-rwxr-xr-xlib/config/env-vars5
-rwxr-xr-xlib/dmaap49
-rwxr-xr-xlib/functions2
-rwxr-xr-xtests/test_dmaap62
-rw-r--r--tools/Run.ps16
-rwxr-xr-xtools/run.sh4
9 files changed, 138 insertions, 6 deletions
diff --git a/.gitignore b/.gitignore
index 49ed25d..6b0319b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,8 @@
.tox/
doc/build/
.vagrant/
+*.swp
+etc/settings.yaml
+opt/*
+tests/installed-software*
+tests/remaining_projects.txt
diff --git a/README.md b/README.md
index 47fed4b..aa965f7 100644
--- a/README.md
+++ b/README.md
@@ -46,6 +46,7 @@ current options include:
| appc | Application Controller |
| ccsdk | Common Controller SDK |
| dcae | Data Collection Analytics & Events |
+| dmaap | Data Movement as a Platform |
| mr | Message Router |
| mso | Master Service Orchestrator |
| msb | Microservices Bus Project |
diff --git a/Vagrantfile b/Vagrantfile
index 4b10392..64dfb00 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -97,6 +97,16 @@ nodes = [
:args => ["dcae"],
},
{
+ :name => "dmaap",
+ :ips => ['10.252.0.22', "192.168.50.22"],
+ :macs => [],
+ :cpus => 2,
+ :cpu => "50",
+ :ram => 4 * 1024,
+ :groups => ["individual"],
+ :args => ["dmaap"],
+ },
+ {
:name => "dns",
:ips => ['10.252.0.3', "192.168.50.3"],
:macs => [],
diff --git a/lib/config/env-vars b/lib/config/env-vars
index 7712de8..65d6629 100755
--- a/lib/config/env-vars
+++ b/lib/config/env-vars
@@ -9,6 +9,7 @@ src_folders=(
["appc"]="$git_src_folder/appc"
["ccsdk"]="$git_src_folder/ccsdk"
["dcae"]="$git_src_folder/dcae"
+["dmaap"]="$git_src_folder/dmaap"
["mr"]="$git_src_folder/dcae/message-router"
["msb"]="$git_src_folder/msb"
["mso"]="$git_src_folder/mso"
@@ -46,6 +47,10 @@ dcae/demo/startup dcae/demo/startup/aaf dcae/demo/startup/controller \
dcae/demo/startup/message-router dcae/dmaapbc dcae/operation \
dcae/operation/utils dcae/orch-dispatcher dcae/pgaas dcae/utils \
dcae/utils/buildtools"
+["dmaap"]="dmaap dmaap/buscontroller dmaap/datarouter dmaap/dbcapi \
+dmaap/messagerouter dmaap/messagerouter/dmaapclient \
+dmaap/messagerouter/messageservice dmaap/messagerouter/mirroragent \
+dmaap/messagerouter/msgrtr"
["msb"]="msb/apigateway msb/discovery msb/java-sdk msb/swagger-sdk"
["mso"]="mso mso/chef-repo mso/docker-config mso/libs mso/mso-config"
["multicloud"]="multicloud multicloud/framework multicloud/openstack \
diff --git a/lib/dmaap b/lib/dmaap
new file mode 100755
index 0000000..cd2e244
--- /dev/null
+++ b/lib/dmaap
@@ -0,0 +1,49 @@
+#!/bin/bash
+
+source /var/onap/functions
+
+# _build_dmaap_images() - Build DMaaP Docker images from source code
+function _build_dmaap_images {
+ if [[ "$compile_repo" != "True" ]]; then
+ compile_repos "dmaap"
+ fi
+ for project in buscontroller datarouter/datarouter-node datarouter/datarouter-prov messagerouter/messageservice; do
+ build_docker_image ${src_folders[dmaap]}/$project
+ done
+}
+
+# get_dmaap_images() - Get DMaaP Docker images
+function get_dmaap_images {
+ if [[ "$build_image" == "True" ]]; then
+ _build_dmaap_images
+ else
+ for image in dmaap-mr datarouter-prov datarouter-node buscontroller; do
+ pull_onap_image dmaap/$image
+ done
+ fi
+}
+
+# install_dmaap() - Install DMaaP services
+function install_dmaap {
+ cp ${src_folders[dmaap]}/messagerouter//messageservice/bundleconfig-local/etc/appprops/MsgRtrApi.properties /var/tmp/
+ sed -i "s|config.zk.servers=<zookeeper_host>|config.zk.servers=172.18.0.3|g" /var/tmp/MsgRtrApi.properties
+ sed -i "s|kafka.metadata.broker.list=<kafka_host>:<kafka_port>|kafka.metadata.broker.list=172.18.0.2:9092|g" /var/tmp/MsgRtrApi.properties
+ run_docker_compose ${src_folders[dmaap]}/messagerouter/messageservice/src/main/resources/docker-compose/
+ run_docker_compose ${src_folders[dmaap]}/datarouter/datarouter-prov/src/main/resources/docker-compose/
+}
+
+# init_dmaap() - Function that initialize DMaaP service
+function init_dmaap {
+ if [[ "$clone_repo" == "True" ]]; then
+ clone_repos "dmaap"
+ if [[ "$compile_repo" == "True" ]]; then
+ compile_repos "dmaap"
+ fi
+ fi
+ if [[ "$skip_get_images" == "False" ]]; then
+ get_dmaap_images
+ fi
+ if [[ "$skip_install" == "False" ]]; then
+ install_dmaap
+ fi
+}
diff --git a/lib/functions b/lib/functions
index f40761f..08e5655 100755
--- a/lib/functions
+++ b/lib/functions
@@ -378,7 +378,7 @@ function build_docker_image {
install_maven
# Cleanup external repo
sed -i 's|${docker.push.registry}/||g' pom.xml
- local docker_build="mvn clean package docker:build -DskipTests=true -Dmaven.test.skip=true -Dmaven.javadoc.skip=true"
+ local docker_build="mvn package docker:build -DskipTests=true -Dmaven.test.skip=true -Dmaven.javadoc.skip=true"
if [ $profile ]; then
docker_build+=" -P $profile"
fi
diff --git a/tests/test_dmaap b/tests/test_dmaap
new file mode 100755
index 0000000..22cb4b7
--- /dev/null
+++ b/tests/test_dmaap
@@ -0,0 +1,62 @@
+#!/bin/bash
+
+source /var/onap_tests/_test_base
+source /var/onap/dmaap
+
+covered_functions=(
+"clone_dmaap_repos" "compile_dmaap_repos" "get_dmaap_images" "install_dmaap"
+)
+
+# test_clone_dmaap_repos() - Verify that DMaaP repositories are retrieved properly
+function test_clone_dmaap_repos {
+ clone_repos "dmaap"
+
+ asserts_file_exist ${src_folders[dmaap]}/buscontroller/pom.xml
+ asserts_file_exist ${src_folders[dmaap]}/datarouter/pom.xml
+ asserts_file_exist ${src_folders[dmaap]}/dbcapi/pom.xml
+ asserts_file_exist ${src_folders[dmaap]}/messagerouter/License.txt
+ asserts_file_exist ${src_folders[dmaap]}/messagerouter/dmaapclient/pom.xml
+ asserts_file_exist ${src_folders[dmaap]}/messagerouter/messageservice/pom.xml
+ asserts_file_exist ${src_folders[dmaap]}/messagerouter/mirroragent/pom.xml
+ asserts_file_exist ${src_folders[dmaap]}/messagerouter/msgrtr/pom.xml
+}
+
+# test_compile_dmaap_repos() - Verify the compilation of DMaaP repositories
+function test_compile_dmaap_repos {
+ clone_repos "dmaap"
+ compile_repos "dmaap"
+
+ asserts_file_exist ${src_folders[dmaap]}/buscontroller/target/buscontroller.jar
+ for project in node prov; do
+ asserts_file_exist ${src_folders[dmaap]}/datarouter/datarouter-$project/target/datarouter-$project.jar
+ done
+ asserts_file_exist ${src_folders[dmaap]}/dbcapi/target/dbcapi.jar
+ asserts_file_exist ${src_folders[dmaap]}/messagerouter/dmaapclient/target/dmaapClient-*-SNAPSHOT.jar
+ asserts_file_exist ${src_folders[dmaap]}/messagerouter/messageservice/target/dmaapMR1-*-SNAPSHOT.jar
+ asserts_file_exist ${src_folders[dmaap]}/messagerouter/mirroragent/target/dmaapMMAgent-*-SNAPSHOT.jar
+ asserts_file_exist ${src_folders[dmaap]}/messagerouter/msgrtr/target/DMaaP.jar
+}
+
+# test_get_dmaap_images() - Verify that DMaaP images are retrieved or built properly
+function test_get_dmaap_images {
+ clone_repos "dmaap"
+ get_dmaap_images
+
+ for image in dmaap-mr datarouter-prov datarouter-node buscontroller; do
+ asserts_image onap/dmaap/$image
+ done
+}
+
+# test_install_dmaap() - Verify the execution of DMaaP services
+function test_install_dmaap {
+ clone_repos "dmaap"
+ install_dmaap
+
+ asserts_image_running
+}
+
+if [ "$1" != '*' ]; then
+ unset covered_functions
+ covered_functions=$1
+fi
+main "${covered_functions[@]}"
diff --git a/tools/Run.ps1 b/tools/Run.ps1
index de57a15..66770b3 100644
--- a/tools/Run.ps1
+++ b/tools/Run.ps1
@@ -31,7 +31,7 @@ https://wiki.onap.org/display/DW/ONAP+on+Vagrant
#>
Param(
- [ValidateSet("all_in_one","dns", "mr", "sdc", "aai", "mso", "robot", "vid", "sdnc", "portal", "dcae", "policy", "appc", "vfc", "multicloud", "ccsdk", "vnfsdk", "vvp", "openstack", "msb", "oom", "testing")]
+ [ValidateSet("all_in_one","dns", "mr", "sdc", "aai", "mso", "robot", "vid", "sdnc", "portal", "dcae", "policy", "appc", "vfc", "multicloud", "ccsdk", "vnfsdk", "vvp", "openstack", "msb", "oom", "dmaap", "testing")]
[Parameter(Mandatory=$True,Position=0)]
[ValidateNotNullOrEmpty()]
@@ -86,7 +86,7 @@ $env:SKIP_INSTALL=$skip_install
switch ($Command)
{
"all_in_one" { $env:DEPLOY_MODE="all-in-one" }
- { @("dns", "mr", "sdc", "aai", "mso", "robot", "vid", "sdnc", "portal", "dcae", "policy", "appc", "vfc", "multicloud", "ccsdk", "vnfsdk", "vvp", "openstack", "msb", "oom") -contains $_ } { $env:DEPLOY_MODE="individual" }
+ { @("dns", "mr", "sdc", "aai", "mso", "robot", "vid", "sdnc", "portal", "dcae", "policy", "appc", "vfc", "multicloud", "ccsdk", "vnfsdk", "vvp", "openstack", "msb", "oom", "dmaap") -contains $_ } { $env:DEPLOY_MODE="individual" }
"testing"
{
$env:DEPLOY_MODE="testing"
@@ -111,7 +111,7 @@ switch ($Command)
}
default
{
- Write-Output $"Usage: $0 {all_in_one|dns|mr|sdc|aai|mso|robot|vid|sdnc|portal|dcae|policy|appc|vfc|multicloud|ccsdk|vnfsdk|vvp|testing}"
+ Write-Output $"Usage: $0 {all_in_one|dns|mr|sdc|aai|mso|robot|vid|sdnc|portal|dcae|policy|appc|vfc|multicloud|ccsdk|vnfsdk|vvp|dmaap|testing}"
exit 1
}
}
diff --git a/tools/run.sh b/tools/run.sh
index 27e0aa3..d931602 100755
--- a/tools/run.sh
+++ b/tools/run.sh
@@ -16,7 +16,7 @@ Optional arguments:
Test case to use in testing mode.
Commands:
all_in_one Deploy in all-in-one mode.
- dns|mr|sdc|aai|mso|robot|vid|sdnc|portal|dcae|policy|appc|vfc|vnfsdk|multicloud|ccsdk|vvp|openstack|msb|oom Deploy chosen service.
+ dns|mr|sdc|aai|mso|robot|vid|sdnc|portal|dcae|policy|appc|vfc|vnfsdk|multicloud|ccsdk|vvp|openstack|msb|oom|dmaap Deploy chosen service.
testing Deploy in testing mode.
EOF
}
@@ -65,7 +65,7 @@ case $COMMAND in
"all_in_one" )
export DEPLOY_MODE='all-in-one'
;;
- "dns" | "mr" | "sdc" | "aai" | "mso" | "robot" | "vid" | "sdnc" | "portal" | "dcae" | "policy" | "appc" | "vfc" | "vnfsdk"| "multicloud" | "ccsdk" | "vvp" | "openstack" | "msb" | "oom" )
+ "dns" | "mr" | "sdc" | "aai" | "mso" | "robot" | "vid" | "sdnc" | "portal" | "dcae" | "policy" | "appc" | "vfc" | "vnfsdk"| "multicloud" | "ccsdk" | "vvp" | "openstack" | "msb" | "oom" | "dmaap" )
export DEPLOY_MODE='individual'
;;
"testing" )