blob: 270022d94790d9cecb366238882f7ed88aeb2a94 [file] [log] [blame]
Victor Morales89ce3212017-06-16 18:32:48 -05001#!/bin/bash
2
3set -o xtrace
4
5# install_policy() - Function that clones and installs the Policy services from source code
6function install_policy {
7 local src_folder=/opt/policy
8 clone_repo policy/docker $src_folder
9 pushd $src_folder
10 chmod +x config/drools/drools-tweaks.sh
11 IP_ADDRESS=$(ifconfig eth0 | grep "inet addr" | tr -s ' ' | cut -d' ' -f3 | cut -d':' -f2)
12 echo $IP_ADDRESS > config/pe/ip_addr.txt
13 install_docker_compose
14 /opt/docker/docker-compose up -d
15 popd
16}
17
18# init_policy() - Function that initialize Policy services
19function init_policy {
20 pull_onap_image policy/policy-db onap/policy/policy-db:latest
21 pull_onap_image policy/policy-pe onap/policy/policy-pe:latest
22 pull_onap_image policy/policy-drools onap/policy/policy-drools:latest
23 pull_onap_image policy/policy-nexus onap/policy/policy-nexus:latest
24 install_policy
25}