aboutsummaryrefslogtreecommitdiffstats
path: root/bootstrap/vagrant-onap
diff options
context:
space:
mode:
authorVictor Morales <victor.morales@intel.com>2017-08-08 16:24:05 -0500
committerVictor Morales <victor.morales@intel.com>2017-08-08 16:27:06 -0500
commit165f3e3b5322d0ff8e8e799f6d8c85568034f915 (patch)
tree5082fe5fd93ea93cba7f6d7120a97236d6990092 /bootstrap/vagrant-onap
parent2909e2e278b37a752c4f3501276166d6f2c18785 (diff)
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 <victor.morales@intel.com>
Diffstat (limited to 'bootstrap/vagrant-onap')
-rwxr-xr-xbootstrap/vagrant-onap/lib/policy28
1 files changed, 14 insertions, 14 deletions
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
}