From 165f3e3b5322d0ff8e8e799f6d8c85568034f915 Mon Sep 17 00:00:00 2001 From: Victor Morales Date: Tue, 8 Aug 2017 16:24:05 -0500 Subject: Implement policy image creation It was included the instructions required for building Docker images of the Policy Docker project. * https://git.onap.org/policy/docker/tree/vagrant/setup_policy.sh Change-Id: Ic6f9888c6dfe9f1a97652ade774c5cbb08239a99 Signed-off-by: Victor Morales --- bootstrap/vagrant-onap/lib/policy | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'bootstrap/vagrant-onap/lib/policy') diff --git a/bootstrap/vagrant-onap/lib/policy b/bootstrap/vagrant-onap/lib/policy index 71854048e..b987c4c96 100755 --- a/bootstrap/vagrant-onap/lib/policy +++ b/bootstrap/vagrant-onap/lib/policy @@ -3,39 +3,34 @@ set -o xtrace source /var/onap/functions -source /var/onap/asserts + +src_folder=$git_src_folder/policy +policy_repos=("api" "common" "docker" "drools-applications" "drools-pdp" "engine" "gui" "pap" "pdp") # clone_all_policy_repos() - Function that clones Policy source repo. function clone_all_policy_repos { - local src_folder=/opt/policy - - for dirc in api common docker drools-applications drools-pdp engine gui pap pdp; do + for dirc in ${aai_repos[@]}; do clone_repo policy/$dirc $src_folder/$dirc done } # # compile_all_policy_repos() - Function that compiles Policy source repo. function compile_all_policy_repos { - local src_folder=/opt/policy - - for dirc in api common docker drools-applications drools-pdp engine gui pap pdp; do + for dirc in ${aai_repos[@]}; do compile_src $src_folder/$dirc done } # install_policy() - Function that clones and installs the Policy services from source code function install_policy { - local src_folder=/opt/policy - - clone_all_policy_repos - if [[ "$compile_repo" == "True" ]]; then - compile_all_policy_repos - fi - if [[ "$build_image" == "True" ]]; then compile_src $src_folder/docker install_docker pushd $src_folder/docker + install_maven + mvn prepare-package + cp -r target/policy-pe/* policy-pe/ + cp -r target/policy-drools/* policy-drools bash docker_verify.sh for image in os nexus db base drools pe; do asserts_image onap/policy/policy-$image @@ -58,5 +53,10 @@ function install_policy { # init_policy() - Function that initialize Policy services function init_policy { + clone_all_policy_repos + if [[ "$compile_repo" == "True" ]]; then + compile_all_policy_repos + fi + install_policy } -- cgit 1.2.3-korg