Guo Ruijing | 5891e10 | 2017-07-12 03:19:14 +0800 | [diff] [blame] | 1 | #!/usr/bin/env bash |
Pamela Dragosh | bed17e5 | 2018-04-16 14:15:46 -0400 | [diff] [blame] | 2 | # Copyright 2018 AT&T Intellectual Property. All rights reserved |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
Guo Ruijing | 5891e10 | 2017-07-12 03:19:14 +0800 | [diff] [blame] | 15 | |
| 16 | set -ex |
| 17 | |
| 18 | sudo apt-get update -y |
| 19 | sudo apt-get install -y maven openjdk-8-jdk npm python-pip docker.io |
| 20 | sudo pip install docker-compose |
| 21 | |
Guo Ruijing | 0f54805 | 2017-08-03 12:02:57 +0000 | [diff] [blame] | 22 | git clone http://gerrit.onap.org/r/oparent |
Guo Ruijing | 72a296a | 2017-08-16 12:30:00 -0700 | [diff] [blame] | 23 | mkdir $HOME/.m2 |
Guo Ruijing | 0f54805 | 2017-08-03 12:02:57 +0000 | [diff] [blame] | 24 | cp oparent/settings.xml $HOME/.m2 |
| 25 | |
Guo Ruijing | 5891e10 | 2017-07-12 03:19:14 +0800 | [diff] [blame] | 26 | for comp in common drools-pdp drools-applications engine |
| 27 | do |
| 28 | cd $HOME |
| 29 | git clone http://gerrit.onap.org/r/policy/$comp |
| 30 | cd $comp |
| 31 | mvn clean install |
| 32 | done |
| 33 | |
mmis | 0d85691 | 2018-03-05 18:23:39 +0000 | [diff] [blame] | 34 | for comp in policy-pe policy-drools |
| 35 | do |
| 36 | cd $HOME/$comp |
mmis | 6dc5a24 | 2018-03-14 12:35:35 +0000 | [diff] [blame] | 37 | sudo docker build -t onap/$comp packages/docker/target/$comp |
mmis | 0d85691 | 2018-03-05 18:23:39 +0000 | [diff] [blame] | 38 | done |
| 39 | |
Guo Ruijing | 5891e10 | 2017-07-12 03:19:14 +0800 | [diff] [blame] | 40 | cd $HOME |
| 41 | git clone http://gerrit.onap.org/r/policy/docker |
| 42 | cd docker |
Guo Ruijing | 5891e10 | 2017-07-12 03:19:14 +0800 | [diff] [blame] | 43 | |
Guo Ruijing | 5891e10 | 2017-07-12 03:19:14 +0800 | [diff] [blame] | 44 | cd $HOME/docker |
| 45 | chmod +x config/drools/drools-tweaks.sh |
| 46 | echo 192.168.0.10 > config/pe/ip_addr.txt |
| 47 | export MTU=1500 |
| 48 | sudo -E docker-compose up -d |