blob: 6ee7c38ccd08c4174c26ac17063d197a6cd789cf [file] [log] [blame]
Guo Ruijing5891e102017-07-12 03:19:14 +08001#!/usr/bin/env bash
2
3set -ex
4
5sudo apt-get update -y
6sudo apt-get install -y maven openjdk-8-jdk npm python-pip docker.io
7sudo pip install docker-compose
8
Guo Ruijing0f548052017-08-03 12:02:57 +00009git clone http://gerrit.onap.org/r/oparent
Guo Ruijing72a296a2017-08-16 12:30:00 -070010mkdir $HOME/.m2
Guo Ruijing0f548052017-08-03 12:02:57 +000011cp oparent/settings.xml $HOME/.m2
12
Guo Ruijing5891e102017-07-12 03:19:14 +080013for comp in common drools-pdp drools-applications engine
14do
15 cd $HOME
16 git clone http://gerrit.onap.org/r/policy/$comp
17 cd $comp
18 mvn clean install
19done
20
mmis0d856912018-03-05 18:23:39 +000021for comp in policy-pe policy-drools
22do
23 cd $HOME/$comp
mmis6dc5a242018-03-14 12:35:35 +000024 sudo docker build -t onap/$comp packages/docker/target/$comp
mmis0d856912018-03-05 18:23:39 +000025done
26
Guo Ruijing5891e102017-07-12 03:19:14 +080027cd $HOME
28git clone http://gerrit.onap.org/r/policy/docker
29cd docker
Guo Ruijing5891e102017-07-12 03:19:14 +080030
mmis6dc5a242018-03-14 12:35:35 +000031sudo docker build -t onap/policy-nexus policy-nexus
Guo Ruijing5891e102017-07-12 03:19:14 +080032
33cd $HOME/docker
34chmod +x config/drools/drools-tweaks.sh
35echo 192.168.0.10 > config/pe/ip_addr.txt
36export MTU=1500
37sudo -E docker-compose up -d