summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJorge Hernandez <jh1730@att.com>2017-06-20 17:32:25 -0500
committerJorge Hernandez <jh1730@att.com>2017-06-20 17:32:25 -0500
commit0eab4f25786569df17e49006492b5737e27f689c (patch)
tree7967fcebd4d361062dfd16b6f2dd9c8909f0ad90
parentdc8bdd52bb796ae08b8a24d95632e95ccb325a2d (diff)
[POLICY-26] relocating pip install
pip needs to be installed as root. In addition, additional verbosity added to push_policies.sh without sideeffects. Change-Id: I7c86b851e440261aaf94833dd4d30ba8d633e9ee Signed-off-by: Jorge Hernandez <jh1730@att.com>
-rw-r--r--config/pe/push-policies.sh11
-rw-r--r--policy-drools/Dockerfile1
-rw-r--r--policy-drools/do-start.sh2
3 files changed, 12 insertions, 2 deletions
diff --git a/config/pe/push-policies.sh b/config/pe/push-policies.sh
index 11e27896..35bce2ba 100644
--- a/config/pe/push-policies.sh
+++ b/config/pe/push-policies.sh
@@ -7,6 +7,7 @@ echo "Pushing default policies"
# so for the BRMS policies we will do a push, then delete from the pdp group, then push again.
# Second push should be successful.
+echo "pushPolicy : PUT : com.vFirewall"
curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
"pdpGroup": "default",
"policyName": "com.vFirewall",
@@ -15,6 +16,7 @@ curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Acce
sleep 2
+echo "pushPolicy : PUT : com.vLoadBalancer"
curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
"pdpGroup": "default",
"policyName": "com.vLoadBalancer",
@@ -22,6 +24,8 @@ curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Acce
}' 'http://pdp:8081/pdp/api/pushPolicy'
sleep 2
+
+echo "pushPolicy : PUT : com.BRMSParamvLBDemoPolicy"
curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
"pdpGroup": "default",
"policyName": "com.BRMSParamvLBDemoPolicy",
@@ -30,6 +34,7 @@ curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Acce
sleep 2
+echo "pushPolicy : PUT : com.BRMSParamvFWDemoPolicy"
curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
"pdpGroup": "default",
"policyName": "com.BRMSParamvFWDemoPolicy",
@@ -38,6 +43,7 @@ curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Acce
sleep 2
+echo "pushPolicy : DELETE : com.BRMSParamvFWDemoPolicy.1.xml"
curl -v --silent -X DELETE --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
"pdpGroup": "default",
"policyComponent": "PDP",
@@ -45,7 +51,9 @@ curl -v --silent -X DELETE --header 'Content-Type: application/json' --header 'A
}' 'http://pdp:8081/pdp/api/deletePolicy'
+sleep 2
+echo "pushPolicy : DELETE : com.BRMSParamvLBDemoPolicy.1.xml"
curl -v --silent -X DELETE --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
"pdpGroup": "default",
"policyComponent": "PDP",
@@ -53,6 +61,8 @@ curl -v --silent -X DELETE --header 'Content-Type: application/json' --header 'A
}' 'http://pdp:8081/pdp/api/deletePolicy'
sleep 2
+
+echo "pushPolicy : PUT : com.BRMSParamvLBDemoPolicy"
curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
"pdpGroup": "default",
"policyName": "com.BRMSParamvLBDemoPolicy",
@@ -61,6 +71,7 @@ curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Acce
sleep 2
+echo "pushPolicy : PUT : com.BRMSParamvFWDemoPolicy"
curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
"pdpGroup": "default",
"policyName": "com.BRMSParamvFWDemoPolicy",
diff --git a/policy-drools/Dockerfile b/policy-drools/Dockerfile
index 5a5c0ad9..9ee0f488 100644
--- a/policy-drools/Dockerfile
+++ b/policy-drools/Dockerfile
@@ -1,5 +1,6 @@
FROM onap/policy/policy-base
+RUN pip install http-prompt
RUN mkdir -p /opt/app/policy /tmp/policy-install && chown policy /opt/app/policy /tmp/policy-install
WORKDIR /tmp/policy-install
diff --git a/policy-drools/do-start.sh b/policy-drools/do-start.sh
index bc20e4e1..7fead2f6 100644
--- a/policy-drools/do-start.sh
+++ b/policy-drools/do-start.sh
@@ -37,8 +37,6 @@ else
./wait-for-port.sh mariadb 3306
# now that DB is up, invoke database upgrade:
# sql provisioning scripts should be invoked here.
-
- pip install http-prompt
fi
echo "Starting processes"