Victor Morales | 89ce321 | 2017-06-16 18:32:48 -0500 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | set -o xtrace |
| 4 | |
| 5 | # install_policy() - Function that clones and installs the Policy services from source code |
| 6 | function 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 |
| 19 | function 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 | } |