blob: 18bb3284c9cbcb3c3b1bab40077bdd72b3e19547 [file] [log] [blame]
Guo Ruijing5891e102017-07-12 03:19:14 +08001#!/usr/bin/env bash
Pamela Dragoshbed17e52018-04-16 14:15:46 -04002# 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 Ruijing5891e102017-07-12 03:19:14 +080015
16set -ex
17
18sudo apt-get update -y
19sudo apt-get install -y maven openjdk-8-jdk npm python-pip docker.io
20sudo pip install docker-compose
21
Guo Ruijing0f548052017-08-03 12:02:57 +000022git clone http://gerrit.onap.org/r/oparent
Guo Ruijing72a296a2017-08-16 12:30:00 -070023mkdir $HOME/.m2
Guo Ruijing0f548052017-08-03 12:02:57 +000024cp oparent/settings.xml $HOME/.m2
25
Guo Ruijing5891e102017-07-12 03:19:14 +080026for comp in common drools-pdp drools-applications engine
27do
28 cd $HOME
29 git clone http://gerrit.onap.org/r/policy/$comp
30 cd $comp
31 mvn clean install
32done
33
mmis0d856912018-03-05 18:23:39 +000034for comp in policy-pe policy-drools
35do
36 cd $HOME/$comp
mmis6dc5a242018-03-14 12:35:35 +000037 sudo docker build -t onap/$comp packages/docker/target/$comp
mmis0d856912018-03-05 18:23:39 +000038done
39
Guo Ruijing5891e102017-07-12 03:19:14 +080040cd $HOME
41git clone http://gerrit.onap.org/r/policy/docker
42cd docker
Guo Ruijing5891e102017-07-12 03:19:14 +080043
Guo Ruijing5891e102017-07-12 03:19:14 +080044cd $HOME/docker
45chmod +x config/drools/drools-tweaks.sh
46echo 192.168.0.10 > config/pe/ip_addr.txt
47export MTU=1500
48sudo -E docker-compose up -d