summaryrefslogtreecommitdiffstats
path: root/deployment/docker/src
diff options
context:
space:
mode:
authorKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2017-10-06 23:05:25 +0530
committerKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2017-11-20 12:41:57 +0530
commitdf2716420918b03320c1ecdfd722cf5a85bac280 (patch)
treebef178b6ddb9942665de518090f02ac56fdf6b0b /deployment/docker/src
parent20dc78d226aca6cb390586a9e19e522d68d0821b (diff)
Normalize all env with OPEN_CLI
Issue-Id: CLI-66 Change-Id: Iac377cf4cbd3e4d7419fcd41417e4c8bc127a03e Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Diffstat (limited to 'deployment/docker/src')
-rw-r--r--deployment/docker/src/main/docker/Dockerfile23
-rw-r--r--deployment/docker/src/main/docker/docker-compose.yaml5
2 files changed, 13 insertions, 15 deletions
diff --git a/deployment/docker/src/main/docker/Dockerfile b/deployment/docker/src/main/docker/Dockerfile
index 777e3ac8..e23a3c1b 100644
--- a/deployment/docker/src/main/docker/Dockerfile
+++ b/deployment/docker/src/main/docker/Dockerfile
@@ -10,15 +10,18 @@ RUN cd /tmp && curl -O https://storage.googleapis.com/golang/go1.9.linux-amd64.t
mv /tmp/gotty/bin/gotty /usr/sbin/
#Environments
-ENV OPEN_CLI_HOME /opt/onap/cli
+ENV OPEN_CLI_HOME /opt/oclip
ENV OPEN_CLI_DEBUG false
ENV OPEN_CLI_DEBUG_PORT 5005
ENV OPEN_CLI_MODE console
ENV OPEN_CLI_PRODUCT_IN_USE open-cli
-ENV HOST_URL http://localhost:8080
-ENV OPEN_USERNAME guest
-ENV OPEN_PASSWORD guest
+ENV OPEN_CLI_HOST_URL http://localhost:8080
+ENV OPEN_CLI_USERNAME guest
+ENV OPEN_CLI_PASSWORD guest
+
+ENV GOTTY_TITLE_FORMAT {{ .command }}
+ENV GOTTY_INDEX $OPEN_CLI_HOME/http/web/occ.html
#Copy CLI into docker
ADD ./STAGE $OPEN_CLI_HOME
@@ -27,18 +30,18 @@ WORKDIR $OPEN_CLI_HOME
#Setup the run time environment (RTE)
#RTE: CLI
RUN chmod +x ./bin/oclip.sh && \
- ln ./bin/oclip.sh /usr/sbin/onap && \
+ ln ./bin/oclip.sh /usr/sbin/oclip && \
if [ ! -d ./data ]; then mkdir ./data; fi && \
- if [ ! -d ./onap-cli-schema ]; then mkdir ./onap-cli-schema; fi
+ if [ ! -d ./open-cli-schema ]; then mkdir ./open-cli-schema; fi
#Create the readable README
RUN pandoc -t plain $OPEN_CLI_HOME/docs/README.md > $OPEN_CLI_HOME/docs/onap-readme.txt
#RTE: lighttpd
COPY ./STAGE/http/lighttpd/lighttpd.conf /etc/lighttpd/lighttpd.conf
-COPY ./STAGE/http/web /var/www-data/servers/onap-cli/
+COPY ./STAGE/http/web /var/www-data/servers/open-cli/
COPY ./STAGE/http/lighttpd/10-proxy.conf /etc/lighttpd/conf-enabled/
-COPY ./STAGE/installer/cli-*.zip /var/www-data/servers/onap-cli/onap-cli.zip
+COPY ./STAGE/installer/cli-*.zip /var/www-data/servers/open-cli/open-cli.zip
RUN if [ ! -f /var/log/lighttpd/access.log ]; then touch /var/log/lighttpd/access.log; fi
RUN cp /etc/lighttpd/conf-available/10-accesslog.conf /etc/lighttpd/conf-enabled/
@@ -49,9 +52,9 @@ EXPOSE 80
EXPOSE 8080
#Start
-ENTRYPOINT if [ "$OPEN_CLI_MODE" = "daemon" ]; then service lighttpd start; gotty --permit-write --reconnect onap; else onap -v && /bin/bash; fi
+ENTRYPOINT if [ "$OPEN_CLI_MODE" = "daemon" ]; then service lighttpd start; gotty --permit-write --reconnect oclip; else oclip -v && /bin/bash; fi
#Cleanup
RUN 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/*
-RUN echo ONAP CLI docker successfully created !!
+RUN echo Open CLI docker successfully created !!
diff --git a/deployment/docker/src/main/docker/docker-compose.yaml b/deployment/docker/src/main/docker/docker-compose.yaml
index 370ca678..dfd3bb20 100644
--- a/deployment/docker/src/main/docker/docker-compose.yaml
+++ b/deployment/docker/src/main/docker/docker-compose.yaml
@@ -5,9 +5,6 @@ services:
image: onap/cli
environment:
OPEN_CLI_MODE: 'daemon'
- expose:
- - 80
- - 8080
ports:
- 8080:80
- 9090:8080
@@ -26,7 +23,5 @@ services:
environment:
OPEN_CLI_MODE: 'console'
OPEN_CLI_DEBUG: "true"
- expose:
- - 5005
ports:
- 5005:5005