diff --git a/examples/acs/Dockerfile b/examples/acs/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..86225f7e7dcb199328b2a315f47f0060eabb4577 --- /dev/null +++ b/examples/acs/Dockerfile @@ -0,0 +1,53 @@ +FROM ubuntu:20.04 + +LABEL maintainer="vivek.dutta@iopsys.eu" +LABEL build="docker build -t acs ." + +# docker build -t acs . +# docker images + + +RUN \ + apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y \ + # General tools + apt-utils \ + apt-transport-https \ + git \ + libssl-dev \ + build-essential \ + curl \ + iputils-ping \ + net-tools \ + pkg-config \ + sudo \ + supervisor \ + wget \ + mongodb + +# install node +ARG NODEJS_VERSION_MAJOR=16 +RUN curl -fsSL "https://deb.nodesource.com/setup_${NODEJS_VERSION_MAJOR}.x" | bash - && \ + apt-get install -y nodejs && \ + npm install --global typescript yarn && \ + rm -rf /var/lib/apt/lists/* + +# install yarn +RUN npm install --global "yarn" + +# install tap-junit +ARG GENIE_VERSION=1.2.9 +RUN npm install --global "genieacs@${GENIE_VERSION}" + +# Prepare supervisor +RUN mkdir -p /var/log/supervisor && \ + mkdir -p /etc/supervisor/conf.d/ && \ + mkdir -p /data/db +COPY supervisord.conf /etc/supervisor/ +COPY acs.conf /etc/supervisor/conf.d/ + +EXPOSE 3000 +EXPOSE 7547 + +# Start entrypoint +ENTRYPOINT ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisor/supervisord.conf"] diff --git a/examples/acs/acs.conf b/examples/acs/acs.conf new file mode 100644 index 0000000000000000000000000000000000000000..8e46d584d6f9314e94eeeba35d4e5242a941679d --- /dev/null +++ b/examples/acs/acs.conf @@ -0,0 +1,14 @@ +[program:mongod] +command=/bin/bash -c "/usr/bin/mongod" + +[program:genieacs_cwmp] +command=/bin/bash -c "/usr/bin/genieacs-cwmp" + +[program:genieacs_fs] +command=/bin/bash -c "/usr/bin/genieacs-fs" + +[program:genieacs_nbi] +command=/bin/bash -c "/usr/bin/genieacs-nbi" + +[program:genieacs_ui] +command=/bin/bash -c "/usr/bin/genieacs-ui --ui-jwt-secret secret" diff --git a/examples/acs/supervisord.conf b/examples/acs/supervisord.conf new file mode 100644 index 0000000000000000000000000000000000000000..aeb984962c8c9d2e44e6e390367bb6a628df57cf --- /dev/null +++ b/examples/acs/supervisord.conf @@ -0,0 +1,19 @@ +[supervisord] +logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log) +pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid) +childlogdir=/var/log/supervisor ; ('AUTO' child log dir, default $TEMP) +nodaemon=false ; true to run in foreground + +[unix_http_server] +file=/var/run/supervisor.sock ; (the path to the socket file) +chmod=0700 ; sockef file mode (default 0700) + +[rpcinterface:supervisor] +supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface + +[supervisorctl] +serverurl=unix:///var/run/supervisor.sock ; use a unix:// URL for a unix socket + +; enables us to add additional applications in a convenient way +[include] +files = /etc/supervisor/conf.d/*.conf