Skip to content
Snippets Groups Projects
Commit c0c4e67a authored by Mikhail Karnevskiy's avatar Mikhail Karnevskiy
Browse files

Add components to run standalone asapo service inside of build_env container....

Add components to run standalone asapo service inside of build_env container. This should help to run integration tests.
parent 04172ddb
No related branches found
No related tags found
No related merge requests found
......@@ -116,9 +116,8 @@ test-services-linux-debug:
name: $CI_REGISTRY_IMAGE/asapo-services-linux-build-env:latest
stage: test
script:
- bash /services_start.sh
# - cd $CI_PROJECT_DIR/build/tests/automatic/common_scripts
# - bash start_services.sh
- cd $CI_PROJECT_DIR
- bash /run_asapo.sh
- cd $CI_PROJECT_DIR/build
- ctest --no-compress-output -T Test -L "unit|memcheck_unit|coverage" --output-on-failure --output-junit testResult.xml
tags:
......
......@@ -8,10 +8,19 @@ RUN echo "deb [signed-by=/usr/share/keyrings/mongodb-archive-keyring.gpg] http:/
RUN echo "deb http://deb.debian.org/debian bullseye-backports main" >> /etc/apt/sources.list
RUN curl -fsSL https://repos.influxdata.com/influxdata-archive_compat.key | gpg --dearmor > /usr/share/keyrings/influxdb.gpg
RUN echo "deb [signed-by=/usr/share/keyrings/influxdb.gpg] https://repos.influxdata.com/debian bullseye stable" > /etc/apt/sources.list.d/influxdb.list
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
apt-utils
RUN set -eux; \
apt-get update; \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
cmake \
supervisor \
libicu-dev \
libfabric-dev \
librdkafka-dev \
......@@ -36,6 +45,9 @@ RUN set -eux; \
libgrpc++-dev \
libprotobuf-dev \
jq \
influxdb \
mongodb-org-shell \
--option=Dpkg::Options::=--force-confdef \
; \
pip install sphinx; \
apt-get install -y --no-install-recommends cmake/bullseye-backports; \
......@@ -126,13 +138,8 @@ nisNetgroupTriple: (localhost,-,)\n\
nisNetgroupTriple: (blabla2,-,)\n\
" > /etc/ldap/record.ldif
RUN echo "\n\
/usr/bin/nomad agent -config /etc/nomad.d &> /dev/null &\n\
/usr/bin/consul agent -config-dir=/etc/consul.d/ &> /dev/null &\n\
service slapd start\n\
service mongod start\n\
\n\
ldapadd -x -D \"ou=rgy,o=desy,c=de\" -f /etc/ldap/record.ldif -h localhost\n\
" > /services_start.sh
RUN mkdir -p /var/log/supervisord/
CMD ["bash", "/services_start.sh"]
COPY *.key /
COPY supervisord.conf /etc/
COPY run_asapo.sh /
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJjMTkyc29qaXB0MzB1dGQ3bDdhZyIsInN1YiI6ImFkbWluIiwiRXh0cmFDbGFpbXMiOnsiQWNjZXNzVHlwZXMiOlsiY3JlYXRlIl19fQ.gVEFtqaAcP9HSzttWX2GrNBaM52np5k8k-7BqDAJ3xw
\ No newline at end of file
12ljzgneasfd
\ No newline at end of file
12c2ljwewezgnea
\ No newline at end of file
cp build/authorizer/asapo-authorizer /asapo-authorizer
cp build/discovery/asapo-discovery /asapo-discovery
cp build/broker/asapo-broker /asapo-broker
cp build/file_transfer/asapo-file-transfer /asapo-file-transfer
cp build/receiver/receiver /receiver
cp build/monitoring/monitoring_server/asapo-monitoring-server /asapo-monitoring-server
cp deploy/asapo_services_light/*json /
cp build/deploy/asapo_services_light/nginx.conf /etc/nginx/nginx.conf
service slapd start
ldapadd -x -D "ou=rgy,o=desy,c=de" -f /etc/ldap/record.ldif -h localhost
cd / && supervisord --configuration /etc/supervisord.conf &
sleep 10
cd -
[supervisord]
nodaemon = true
logfile=/var/log/supervisord/supervisord.log ; supervisord log file
logfile_maxbytes=50MB ; maximum size of logfile before rotation
logfile_backups=10 ; number of backed up logfiles
loglevel=info ; info, debug, warn, trace
childlogdir=/var/log/supervisord/ ; where child log files will live
user=root
[program:mongo]
command=/usr/bin/mongod --bind_ip_all --dbpath /var/lib/mongodb/
stderr_logfile=/tmp/mongo_err.log
stderr_logfile_maxbytes = 0
stdout_logfile=/tmp/mongo_out.log
stdout_logfile_maxbytes = 0
[program:influxdb]
command = /usr/bin/influxd -config /etc/influxdb/influxdb.conf
environment=INFLUXDB_HTTP_FLUX_ENABLED="true", PRE_CREATE_DB="asapo_receivers;asapo_brokers"
stderr_logfile=/tmp/influx_err.log
stderr_logfile_maxbytes = 0
stdout_logfile=/tmp/influx_out.log
stdout_logfile_maxbytes = 0
[program:nginx]
command=/usr/sbin/nginx -g "daemon off;"
stderr_logfile=/tmp/nginx_err.log
stderr_logfile_maxbytes = 0
stdout_logfile=/tmp/nginx_out.log
stdout_logfile_maxbytes = 0
[program:discovery]
command=/asapo-discovery -config discovery.json
stderr_logfile=/tmp/discovery_err.log
stderr_logfile_maxbytes = 0
stdout_logfile=/tmp/discovery_out.log
stdout_logfile_maxbytes = 0
[program:authorizer]
command=/asapo-authorizer -config authorizer.json
stderr_logfile=/tmp/authorizer_err.log
stderr_logfile_maxbytes = 0
stdout_logfile=/tmp/authorizer_out.log
stdout_logfile_maxbytes = 0
[program:broker]
command=/asapo-broker -config broker.json
stderr_logfile=/tmp/broker_err.log
stderr_logfile_maxbytes = 0
stdout_logfile=/tmp/broker_out.log
stdout_logfile_maxbytes = 0
[program:fts]
command=/asapo-file-transfer -config file-transfer.json
stderr_logfile=/tmp/fts_err.log
stderr_logfile_maxbytes = 0
stdout_logfile=/tmp/fts_out.log
stdout_logfile_maxbytes = 0
[program:receiver]
command=/receiver receiver.json
stderr_logfile=/tmp/receiver_err.log
stderr_logfile_maxbytes = 0
stdout_logfile=/tmp/receiver_out.log
stdout_logfile_maxbytes = 0
[program:monitoring]
command=/asapo-monitoring-server -config monitoring.json
stderr_logfile=/tmp/monitoring_err.log
stderr_logfile_maxbytes = 0
stdout_logfile=/tmp/monitoring_out.log
stdout_logfile_maxbytes = 0
[program:consul]
command=/usr/bin/consul agent -config-dir=/etc/consul.d/
stderr_logfile=/tmp/consul_err.log
stderr_logfile_maxbytes = 0
stdout_logfile=/tmp/consul_out.log
stdout_logfile_maxbytes = 0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment