aboutsummaryrefslogtreecommitdiffstats
path: root/deployment/docker/src/main
diff options
context:
space:
mode:
authorKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2018-09-05 15:16:17 +0530
committerKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2018-09-05 15:16:17 +0530
commitc897521cac0582291b090a8867d239d438224df6 (patch)
treedc5e98e71ba1707f4fefd08c30f99f7ebddda767 /deployment/docker/src/main
parent3b1b25f8f65044086c030a49c287e3ebe6f95ab5 (diff)
OCLIP: Update docker to support grpc
Issue-ID: VNFSDK-304 Change-Id: I5d67885d2235d98c1e31fb7c52624d68fde88166 Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Diffstat (limited to 'deployment/docker/src/main')
-rw-r--r--deployment/docker/src/main/docker/Dockerfile17
1 files changed, 13 insertions, 4 deletions
diff --git a/deployment/docker/src/main/docker/Dockerfile b/deployment/docker/src/main/docker/Dockerfile
index 0c08bc54..54f296bc 100644
--- a/deployment/docker/src/main/docker/Dockerfile
+++ b/deployment/docker/src/main/docker/Dockerfile
@@ -17,9 +17,10 @@ FROM openjdk:8-jre-slim
ENV OPEN_CLI_HOME=/opt/oclip \
OPEN_CLI_DEBUG=false \
OPEN_CLI_DEBUG_PORT=5005 \
- OPEN_CLI_MODE=console \
+ OPEN_CLI_MODE=shell \
OPEN_CLI_PRODUCT_IN_USE=onap-beijing \
- GOTTY_TITLE_FORMAT="{{ .command }}"
+ GOTTY_TITLE_FORMAT="{{ .command }}" \
+ OCLIP_GRPC_SERVER="http://oclip_grpc:50051"
ADD ./STAGE $OPEN_CLI_HOME
WORKDIR $OPEN_CLI_HOME
@@ -32,8 +33,12 @@ RUN apt-get update && apt-get install -y lighttpd git curl pandoc vim && \
pandoc -t plain $OPEN_CLI_HOME/docs/README.md > $OPEN_CLI_HOME/docs/oclip-readme.txt && \
apt-get purge -y pandoc && apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/go /tmp/gotty /tmp/* /var/tmp/* && \
chmod +x $OPEN_CLI_HOME/bin/oclip.sh && \
+ chmod +x $OPEN_CLI_HOME/bin/oclip-rcli.sh && \
+ chmod +x $OPEN_CLI_HOME/bin/oclip-cmdflow-server.sh && \
ln $OPEN_CLI_HOME/bin/oclip.sh /usr/sbin/oclip && \
ln $OPEN_CLI_HOME/bin/oclip.sh /usr/sbin/onap && \
+ ln $OPEN_CLI_HOME/bin/oclip-cmdflow-server.sh /usr/sbin/oclip-grpc && \
+ ln $OPEN_CLI_HOME/bin/oclip-rcli.sh /usr/sbin/oclipr && \
if [ ! -d $OPEN_CLI_HOME/data ]; then mkdir $OPEN_CLI_HOME/data; fi && \
if [ ! -d $OPEN_CLI_HOME/open-cli-schema ]; then mkdir $OPEN_CLI_HOME/open-cli-schema; fi && \
if [ ! -f /var/log/lighttpd/access.log ]; then touch /var/log/lighttpd/access.log; fi && \
@@ -45,5 +50,9 @@ RUN apt-get update && apt-get install -y lighttpd git curl pandoc vim && \
cp $OPEN_CLI_HOME/installer/cli-*.zip /var/www-data/servers/open-cli/oclip.zip
EXPOSE 80
EXPOSE 8080
-
-ENTRYPOINT if [ "$OPEN_CLI_MODE" = "daemon" ]; then service lighttpd start; gotty --permit-write --reconnect oclip; else oclip -v && /bin/bash; fi
+EXPOSE 50051
+ENTRYPOINT if [ "$OPEN_CLI_MODE" = "daemon" ]; then service lighttpd start; gotty --permit-write --reconnect oclip; \
+ elif [ "$OPEN_CLI_MODE" = "ocs-web" ]; then echo "****** OCLIP Web Command Server ******"; service lighttpd start; \
+ elif [ "$OPEN_CLI_MODE" = "ocs-grpc" ]; then echo "****** OCLIP gRPC Command Server ******"; oclip-grpc; \
+ elif [ "$OPEN_CLI_MODE" = "occ" ]; then echo "****** OCLIP Web Command Console (OCC) ******"; gotty --permit-write --reconnect oclip; \
+ else echo "****** OCLIP Command Shell******"; oclip -v && /bin/bash; fi