diff options
author | Victor Morales <victor.morales@intel.com> | 2017-12-01 17:52:07 -0800 |
---|---|---|
committer | Victor Morales <victor.morales@intel.com> | 2017-12-01 17:52:07 -0800 |
commit | 9d205bc0a4ec67b6b97cd5f6de07eba8eb835fd9 (patch) | |
tree | ccd7a56a9bbf6e0f80d1e360d977ef022f181886 /bootstrap/vagrant-onap/lib/msb | |
parent | e62aae6b5d079c5175441686d49364b71741f6d9 (diff) |
Add MSB support
The Microservices Bus project has been supported by this change
Change-Id: Id86a0a300b2622ee4b0d362c798c9656cb41fa33
Signed-off-by: Victor Morales <victor.morales@intel.com>
Issue-ID: INT-358
Diffstat (limited to 'bootstrap/vagrant-onap/lib/msb')
-rwxr-xr-x | bootstrap/vagrant-onap/lib/msb | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/bootstrap/vagrant-onap/lib/msb b/bootstrap/vagrant-onap/lib/msb new file mode 100755 index 000000000..262b29c0e --- /dev/null +++ b/bootstrap/vagrant-onap/lib/msb @@ -0,0 +1,53 @@ +#!/bin/bash + +source /var/onap/functions + +msb_src_folder=$git_src_folder/msb +msb_repos=("msb/apigateway" "msb/discovery" "msb/java-sdk" "msb/swagger-sdk") + +# _build_msb_images() - Function that creates Microservices Docker images from source code +function _build_msb_images { + if [[ "$compile_repo" != "True" ]]; then + compile_repos "msb" + fi + + build_docker_image $msb_src_folder/apigateway/distributions/msb-apigateway/src/main/basedocker onap/msb/msb_base + build_docker_image $msb_src_folder/apigateway/distributions/msb-apigateway/src/main/docker onap/msb/msb_apigateway + build_docker_image $msb_src_folder/discovery/distributions/msb-discovery/src/main/docker onap/msb/msb_discovery +} + +# get_msb_images() - Function that retrieves the Microservices Bus images +function get_msb_images { + pull_docker_image "consul:0.9.3" + if [[ "$build_image" == "True" ]]; then + _build_msb_images + else + unset docker_version + pull_onap_image msb/msb_base + pull_onap_image msb/msb_apigateway + pull_onap_image msb/msb_discovery + fi +} + +# install_msb() - Downloads and configure Microservices Bus source code +function install_msb { + run_docker_image -d --net=host --name msb_consul consul:0.9.3 + run_docker_image -d --net=host --name msb_discovery nexus3.onap.org:10001/onap/msb/msb_discovery + run_docker_image -d --net=host -e "ROUTE_LABELS=visualRange:1" --name msb_internal_apigateway nexus3.onap.org:10001/onap/msb/msb_apigateway +} + +# init_msb() - Function that initialize Message Router services +function init_msb { + if [[ "$clone_repo" == "True" ]]; then + clone_repos "msb" + if [[ "$compile_repo" == "True" ]]; then + compile_repos "msb" + fi + fi + if [[ "$skip_get_images" == "False" ]]; then + get_msb_images + if [[ "$skip_install" == "False" ]]; then + install_msb + fi + fi +} |