Guo Ruijing | 5891e10 | 2017-07-12 03:19:14 +0800 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | |
| 3 | set -ex |
| 4 | |
| 5 | sudo apt-get update -y |
| 6 | sudo apt-get install -y maven openjdk-8-jdk npm python-pip docker.io |
| 7 | sudo pip install docker-compose |
| 8 | |
Guo Ruijing | 0f54805 | 2017-08-03 12:02:57 +0000 | [diff] [blame] | 9 | git clone http://gerrit.onap.org/r/oparent |
Guo Ruijing | 72a296a | 2017-08-16 12:30:00 -0700 | [diff] [blame] | 10 | mkdir $HOME/.m2 |
Guo Ruijing | 0f54805 | 2017-08-03 12:02:57 +0000 | [diff] [blame] | 11 | cp oparent/settings.xml $HOME/.m2 |
| 12 | |
Guo Ruijing | 5891e10 | 2017-07-12 03:19:14 +0800 | [diff] [blame] | 13 | for comp in common drools-pdp drools-applications engine |
| 14 | do |
| 15 | cd $HOME |
| 16 | git clone http://gerrit.onap.org/r/policy/$comp |
| 17 | cd $comp |
| 18 | mvn clean install |
| 19 | done |
| 20 | |
mmis | 0d85691 | 2018-03-05 18:23:39 +0000 | [diff] [blame] | 21 | for comp in policy-pe policy-drools |
| 22 | do |
| 23 | cd $HOME/$comp |
mmis | 6dc5a24 | 2018-03-14 12:35:35 +0000 | [diff] [blame] | 24 | sudo docker build -t onap/$comp packages/docker/target/$comp |
mmis | 0d85691 | 2018-03-05 18:23:39 +0000 | [diff] [blame] | 25 | done |
| 26 | |
Guo Ruijing | 5891e10 | 2017-07-12 03:19:14 +0800 | [diff] [blame] | 27 | cd $HOME |
| 28 | git clone http://gerrit.onap.org/r/policy/docker |
| 29 | cd docker |
Guo Ruijing | 5891e10 | 2017-07-12 03:19:14 +0800 | [diff] [blame] | 30 | |
mmis | 6dc5a24 | 2018-03-14 12:35:35 +0000 | [diff] [blame] | 31 | sudo docker build -t onap/policy-nexus policy-nexus |
Guo Ruijing | 5891e10 | 2017-07-12 03:19:14 +0800 | [diff] [blame] | 32 | |
| 33 | cd $HOME/docker |
| 34 | chmod +x config/drools/drools-tweaks.sh |
| 35 | echo 192.168.0.10 > config/pe/ip_addr.txt |
| 36 | export MTU=1500 |
| 37 | sudo -E docker-compose up -d |