aboutsummaryrefslogtreecommitdiffstats
path: root/deployment
diff options
context:
space:
mode:
Diffstat (limited to 'deployment')
-rw-r--r--deployment/docker/src/main/docker/Dockerfile45
-rw-r--r--deployment/docker/src/main/docker/docker-compose.yaml21
-rw-r--r--deployment/http/lighttpd/10-proxy.conf8
-rw-r--r--deployment/http/lighttpd/lighttpd.conf1
4 files changed, 58 insertions, 17 deletions
diff --git a/deployment/docker/src/main/docker/Dockerfile b/deployment/docker/src/main/docker/Dockerfile
index 4a519341..8717fb3d 100644
--- a/deployment/docker/src/main/docker/Dockerfile
+++ b/deployment/docker/src/main/docker/Dockerfile
@@ -1,35 +1,46 @@
FROM ubuntu:14.04
+#installation
RUN apt-get update
RUN apt-get update && apt-get install -y software-properties-common
-RUN sudo -E add-apt-repository ppa:openjdk-r/ppa && apt-get update && apt-get install -y openjdk-8-jdk && apt-get install -y lighttpd
-ENV JAVA_HOME usr/lib/jvm/java-8-openjdk-amd64
+RUN sudo -E add-apt-repository ppa:openjdk-r/ppa && apt-get update && apt-get install -y openjdk-8-jdk && apt-get install -y lighttpd && apt-get install -y git curl
+RUN cd /tmp && curl -O https://storage.googleapis.com/golang/go1.9.linux-amd64.tar.gz && tar -xvf go1.9.linux-amd64.tar.gz
+RUN mkdir -p /tmp/gotty && \
+ GOPATH=/tmp/gotty /tmp/go/bin/go get github.com/yudai/gotty && \
+ mv /tmp/gotty/bin/gotty /usr/sbin/ && rm /tmp/go1.9.linux-amd64.tar.gz && rm -rf /tmp/go /tmp/gotty && cd -
+ENV JAVA_HOME usr/lib/jvm/java-8-openjdk-amd64
ENV ONAP_CLI_HOME /opt/onap/cli
-ADD ./STAGE $ONAP_CLI_HOME
-COPY ./STAGE/http/lighttpd/lighttpd.conf /etc/lighttpd/lighttpd.conf
-COPY ./STAGE/http/web /var/www-data/servers/onap-cli/
-COPY ./STAGE/installer/*.zip /var/www-data/servers/onap-cli/
+ENV ONAP_CLI_DEBUG false
+ENV ONAP_CLI_DEBUG_PORT 5005
+ENV CLI_MODE console
+ENV CLI_PRODUCT_VERSION cli-1.0
+ENV ONAP_HOST_URL http://localhost:8080
+ENV ONAP_USERNAME guest
+ENV ONAP_PASSWORD guest
+
+ADD ./STAGE $ONAP_CLI_HOME
WORKDIR $ONAP_CLI_HOME
+
RUN chmod +x ./bin/onap.sh
+RUN ln ./bin/onap.sh /usr/sbin/onap
RUN if [ ! -d ./data ]; then mkdir ./data; fi
RUN if [ ! -d ./onap-cli-schema ]; then mkdir ./onap-cli-schema; fi
+
+COPY ./STAGE/http/lighttpd/lighttpd.conf /etc/lighttpd/lighttpd.conf
+COPY ./STAGE/http/web /var/www-data/servers/onap-cli/
+COPY ./STAGE/installer/*.zip /var/www-data/servers/onap-cli/
RUN if [ ! -f /var/log/lighttpd/access.log ]; then touch /var/log/lighttpd/access.log; fi
-RUN ln ./bin/onap.sh /usr/sbin/onap
+COPY ./STAGE/http/lighttpd/10-proxy.conf /etc/lighttpd/conf-enabled/
+RUN cp /etc/lighttpd/conf-available/10-accesslog.conf /etc/lighttpd/conf-enabled/
+#Lighttpd
EXPOSE 80
-ENV ONAP_HOST_URL http://localhost:8080
-ENV ONAP_USERNAME guest
-ENV ONAP_PASSWORD guest
-ENV ONAP_CLI_DEBUG false
-ENV ONAP_CLI_DEBUG_PORT 5005
-ENV CLI_MODE console
-ENV CLI_PRODUCT_VERSION cli-1.0
+#gotty
+EXPOSE 8080
-ENTRYPOINT cp /etc/lighttpd/conf-available/10-accesslog.conf /etc/lighttpd/conf-enabled/ && \
- service lighttpd start && \
- if [ "$CLI_MODE" = "daemon" ]; then tailf /var/log/lighttpd/access.log;else /bin/bash; fi
+ENTRYPOINT if [ "$CLI_MODE" = "daemon" ]; then service lighttpd start; gotty --permit-write --reconnect onap; else onap -v && /bin/bash; fi
RUN echo ONAP CLI docker successfully created !! \ No newline at end of file
diff --git a/deployment/docker/src/main/docker/docker-compose.yaml b/deployment/docker/src/main/docker/docker-compose.yaml
new file mode 100644
index 00000000..c486fe9c
--- /dev/null
+++ b/deployment/docker/src/main/docker/docker-compose.yaml
@@ -0,0 +1,21 @@
+version: '2.0'
+
+services:
+
+ occ:
+ image: onap/cli
+ environment:
+ CLI_MODE: 'daemon'
+ expose:
+ - 80
+ - 8080
+ ports:
+ - 8080:80
+ - 9090:8080
+
+ cli:
+ stdin_open: true
+ tty: true
+ image: onap/cli
+ environment:
+ CLI_MODE: 'console'
diff --git a/deployment/http/lighttpd/10-proxy.conf b/deployment/http/lighttpd/10-proxy.conf
new file mode 100644
index 00000000..71a008ed
--- /dev/null
+++ b/deployment/http/lighttpd/10-proxy.conf
@@ -0,0 +1,8 @@
+proxy.server = ( "/onap" =>
+ (
+ ( "host" => "127.0.0.1",
+ "port" => 8080
+ )
+ )
+ )
+
diff --git a/deployment/http/lighttpd/lighttpd.conf b/deployment/http/lighttpd/lighttpd.conf
index c915d9d1..8f88a912 100644
--- a/deployment/http/lighttpd/lighttpd.conf
+++ b/deployment/http/lighttpd/lighttpd.conf
@@ -16,6 +16,7 @@ dir-listing.activate = "disable"
server.modules = (
"mod_access",
+ "mod_proxy",
"mod_alias",
"mod_compress",
"mod_redirect",