Introduce ldap container. Prepare XDebug

Add check in init.sh script for fresh setup.
This commit is contained in:
Jan Eitzinger 2021-09-06 11:07:18 +02:00
parent f5d3598661
commit f3e3757b65
5 changed files with 82 additions and 33 deletions

18
.env
View File

@ -3,8 +3,15 @@ DATADIR=./data
######################################################################## ########################################################################
# APP # APP
######################################################################## ########################################################################
APP_CLUSTERCOCKPIT_INIT=true APP_CLUSTERCOCKPIT_INIT=false
APP_ENVIRONMENT=prod APP_ENVIRONMENT=dev
########################################################################
# PHP
########################################################################
PHP_XDEBUG_MODE=develop,debug
PHP_XDEBUG_CLIENT_PORT=9003
PHP_XDEBUG_CLIENT_HOST=host.docker.internal
######################################################################## ########################################################################
# MySQL # MySQL
@ -22,6 +29,13 @@ INFLUXDB_PORT=8086
INFLUXDB_PASSWORD=2RPJpkrduLgkpfQCpcBe1jYv INFLUXDB_PASSWORD=2RPJpkrduLgkpfQCpcBe1jYv
INFLUXDB_ADMIN_TOKEN=egLfcf7fx0FESqFYU3RpAAbj INFLUXDB_ADMIN_TOKEN=egLfcf7fx0FESqFYU3RpAAbj
########################################################################
# LDAP
########################################################################
LDAP_ADMIN_PASSWORD=mashup
LDAP_ORGANISATION=NHR@FAU
LDAP_DOMAIN=rrze.uni-erlangen.de
######################################################################## ########################################################################
# PHPMyAdmin # PHPMyAdmin
######################################################################## ########################################################################

View File

@ -1,5 +1,21 @@
#!/usr/bin/env bash #!/usr/bin/env bash
if [ -d symfony ]; then
echo "Data already initialized!"
echo -n "Perform a fresh initialisation? Answer yes to proceed and no to exit. "
read -r answer
if [ "$answer" == "yes" ]; then
echo "Cleaning directories ..."
rm -rf symfony
sudo rm -rf job-archive
rm -rf influxdb/data/*
echo "done."
else
echo "Aborting ..."
exit
fi
fi
mkdir symfony mkdir symfony
wget https://hpc-mover.rrze.uni-erlangen.de/HPC-Data/0x7b58aefb/eig7ahyo6fo2bais0ephuf2aitohv1ai/job-archive.tar.xz wget https://hpc-mover.rrze.uni-erlangen.de/HPC-Data/0x7b58aefb/eig7ahyo6fo2bais0ephuf2aitohv1ai/job-archive.tar.xz
tar xJf job-archive.tar.xz tar xJf job-archive.tar.xz

View File

@ -41,7 +41,7 @@ CREATE TABLE `configuration` (
LOCK TABLES `configuration` WRITE; LOCK TABLES `configuration` WRITE;
/*!40000 ALTER TABLE `configuration` DISABLE KEYS */; /*!40000 ALTER TABLE `configuration` DISABLE KEYS */;
INSERT INTO `configuration` VALUES (1,'plot_view_showRoofline','true','default','Show roofline plot','true|false',NULL,'Enter true or false'),(2,'plot_view_showPolarplot','true','default','Show polar plot','true|false',NULL,'Enter true or false'),(3,'plot_view_showStatTable','true','default','Show stat table','true|false',NULL,'Enter true or false'),(4,'plot_view_plotsPerRow','3','default','Plots per row in job view','[0-9]+',NULL,'Enter a positive integer'),(8,'plot_general_colorscheme','Accent','default','Plot color scheme','',NULL,''),(9,'plot_general_interactive','false','default','Interactive plots in job view','true|false',NULL,'Enter true or false'),(10,'plot_general_lineWidth','1','default','Line width for plots','[0-9]+',NULL,'Enter a positive integer'),(11,'plot_general_colorBackground','true','default','Color plot background','true|false',NULL,'Enter true or false'),(21,'general_user_scramble','false','default','Anonymize user names','',NULL,''),(22,'general_user_emailbase','@mail.de','default','Email base adress used in user imports','',NULL,''),(23,'plot_list_selectedMetrics','[\"cpu_load\",\"flops_any\",\"mem_bw\",\"mem_used\"]','default','Metrics to show in job list','',NULL,'Enter a JSON list'),(24,'plot_list_selectedMetrics','[\"cpu_load\",\"flops_any\",\"mem_bw\",\"mem_used\"]','admin','Metrics to show in job list','',NULL,'Enter a JSON list'),(25,'analysis_view_histogramMetrics','[\"cpu_load\",\"mem_used\",\"flops_any\",\"mem_bw\",\"cpi\",\"clock\"]','admin','Metrics to show in histograms in analysis view','',NULL,'Enter a JSON list'),(30,'job_view_nodestats_selectedMetrics','[\"flops_any\",\"mem_bw\",\"mem_used\",\"cpu_load\",\"clock\"]','admin','Metrics to show in stats table in job view','',NULL,'Enter a JSON list'),(31,'job_view_selectedMetrics','[\"flops_any\",\"mem_bw\",\"mem_used\",\"cpu_load\",\"cpi\",\"clock\",\"rapl_power\"]','admin','Metrics to show as plots in job view','',NULL,'Enter a JSON list'),(32,'analysis_view_scatterPlotMetrics','[[\"flops_any\",\"mem_bw\"],[\"flops_any\",\"cpu_load\"],[\"mem_bw\",\"cpu_load\"]]','admin','Metrics to show in scatter plots in analysis view','',NULL,'Enter a JSON list of metric pairs'); INSERT INTO `configuration` VALUES (1,'plot_view_showRoofline','true','default','Show roofline plot','true|false',NULL,'Enter true or false'),(2,'plot_view_showPolarplot','true','default','Show polar plot','true|false',NULL,'Enter true or false'),(3,'plot_view_showStatTable','true','default','Show stat table','true|false',NULL,'Enter true or false'),(4,'plot_view_plotsPerRow','4','default','Plots per row in job view','[0-9]+',NULL,'Enter a positive integer'),(8,'plot_general_colorscheme','Accent','default','Plot color scheme','',NULL,''),(9,'plot_general_interactive','false','default','Interactive plots in job view','true|false',NULL,'Enter true or false'),(10,'plot_general_lineWidth','1','default','Line width for plots','[0-9]+',NULL,'Enter a positive integer'),(11,'plot_general_colorBackground','true','default','Color plot background','true|false',NULL,'Enter true or false'),(21,'general_user_scramble','false','default','Anonymize user names','',NULL,''),(22,'general_user_emailbase','@mail.de','default','Email base adress used in user imports','',NULL,''),(23,'plot_list_selectedMetrics','[\"cpu_load\",\"flops_any\",\"mem_bw\",\"mem_used\"]','default','Metrics to show in job list','',NULL,'Enter a JSON list'),(24,'plot_list_selectedMetrics','[\"cpu_load\",\"flops_any\",\"mem_bw\",\"mem_used\"]','admin','Metrics to show in job list','',NULL,'Enter a JSON list'),(25,'analysis_view_histogramMetrics','[\"cpu_load\",\"mem_used\",\"flops_any\",\"mem_bw\",\"cpi\",\"clock\"]','admin','Metrics to show in histograms in analysis view','',NULL,'Enter a JSON list'),(30,'job_view_nodestats_selectedMetrics','[\"flops_any\",\"mem_bw\",\"mem_used\",\"cpu_load\",\"clock\"]','admin','Metrics to show in stats table in job view','',NULL,'Enter a JSON list'),(31,'job_view_selectedMetrics','[\"flops_any\",\"mem_bw\",\"mem_used\",\"cpu_load\",\"cpi\",\"clock\",\"rapl_power\"]','admin','Metrics to show as plots in job view','',NULL,'Enter a JSON list'),(32,'analysis_view_scatterPlotMetrics','[[\"flops_any\",\"mem_bw\"],[\"flops_any\",\"cpu_load\"],[\"mem_bw\",\"cpu_load\"]]','admin','Metrics to show in scatter plots in analysis view','',NULL,'Enter a JSON list of metric pairs'),(34,'plot_list_jobsPerPage','25','default','Jobs per page in job list','',NULL,'Enter a positive integer');
/*!40000 ALTER TABLE `configuration` ENABLE KEYS */; /*!40000 ALTER TABLE `configuration` ENABLE KEYS */;
UNLOCK TABLES; UNLOCK TABLES;

View File

@ -1,33 +1,47 @@
services: services:
db: db:
volumes: volumes:
- ${DATADIR}/sqldata:/var/lib/mysql - ${DATADIR}/sqldata:/var/lib/mysql
influxdb: influxdb:
container_name: cc-influxdb container_name: cc-influxdb
image: influxdb image: influxdb
command: ["--reporting-disabled"] command: ["--reporting-disabled"]
environment: environment:
DOCKER_INFLUXDB_INIT_MODE: setup DOCKER_INFLUXDB_INIT_MODE: setup
DOCKER_INFLUXDB_INIT_USERNAME: symfony DOCKER_INFLUXDB_INIT_USERNAME: symfony
DOCKER_INFLUXDB_INIT_PASSWORD: ${INFLUXDB_PASSWORD} DOCKER_INFLUXDB_INIT_PASSWORD: ${INFLUXDB_PASSWORD}
DOCKER_INFLUXDB_INIT_ORG: ClusterCockpit DOCKER_INFLUXDB_INIT_ORG: ClusterCockpit
DOCKER_INFLUXDB_INIT_BUCKET: ClusterCockpit DOCKER_INFLUXDB_INIT_BUCKET: ClusterCockpit
DOCKER_INFLUXDB_INIT_RETENTION: 100w DOCKER_INFLUXDB_INIT_RETENTION: 100w
DOCKER_INFLUXDB_INIT_ADMIN_TOKEN: ${INFLUXDB_ADMIN_TOKEN} DOCKER_INFLUXDB_INIT_ADMIN_TOKEN: ${INFLUXDB_ADMIN_TOKEN}
ports: ports:
- "127.0.0.1:${INFLUXDB_PORT}:8086" - "127.0.0.1:${INFLUXDB_PORT}:8086"
volumes: volumes:
- ${DATADIR}/influxdb/data:/var/lib/influxdb2 - ${DATADIR}/influxdb/data:/var/lib/influxdb2
- ${DATADIR}/influxdb/config:/etc/influxdb2 - ${DATADIR}/influxdb/config:/etc/influxdb2
phpmyadmin: openldap:
container_name: cc-phpmyadmin container_name: cc-ldap
image: phpmyadmin image: osixia/openldap:1.5.0
environment: command: --copy-service --loglevel debug
- PMA_HOST=cc-db environment:
- PMA_USER=root - LDAP_ADMIN_PASSWORD=${LDAP_ADMIN_PASSWORD}
- PMA_PASSWORD=${MYSQL_ROOT_PASSWORD} - LDAP_ORGANISATION=${LDAP_ORGANISATION}
ports: - LDAP_DOMAIN=${LDAP_DOMAIN}
- "127.0.0.1:${PHPMYADMIN_PORT}:80" volumes:
restart: always - ${DATADIR}/ldap:/container/service/slapd/assets/config/bootstrap/ldif/custom
ports:
- "127.0.0.1:389:389"
- "127.0.0.1:636:636"
phpmyadmin:
container_name: cc-phpmyadmin
image: phpmyadmin
environment:
- PMA_HOST=cc-db
- PMA_USER=root
- PMA_PASSWORD=${MYSQL_ROOT_PASSWORD}
ports:
- "127.0.0.1:${PHPMYADMIN_PORT}:80"
restart: always

View File

@ -27,10 +27,14 @@ services:
build: build:
context: ./php-fpm context: ./php-fpm
args: args:
PHP_XDEBUG_MODE: ${PHP_XDEBUG_MODE}
PHP_XDEBUG_CLIENT_PORT: ${PHP_XDEBUG_CLIENT_PORT}
PHP_XDEBUG_CLIENT_HOST: ${PHP_XDEBUG_CLIENT_HOST}
SYMFONY_CLI_VERSION: 4.23.2 SYMFONY_CLI_VERSION: 4.23.2
MYSQL_DATABASE: ${MYSQL_DATABASE} MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER} MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD} MYSQL_PASSWORD: ${MYSQL_PASSWORD}
LDAP_PASSWORD: ${LDAP_ADMIN_PASSWORD}
INFLUXDB_PASSWORD: ${INFLUXDB_PASSWORD} INFLUXDB_PASSWORD: ${INFLUXDB_PASSWORD}
INFLUXDB_PORT: ${INFLUXDB_PORT} INFLUXDB_PORT: ${INFLUXDB_PORT}
INFLUXDB_ADMIN_TOKEN: ${INFLUXDB_ADMIN_TOKEN} INFLUXDB_ADMIN_TOKEN: ${INFLUXDB_ADMIN_TOKEN}
@ -55,6 +59,7 @@ services:
APP_ENVIRONMENT: ${APP_ENVIRONMENT} APP_ENVIRONMENT: ${APP_ENVIRONMENT}
ports: ports:
- "127.0.0.1:${NGINX_PORT}:80" - "127.0.0.1:${NGINX_PORT}:80"
- "127.0.0.1:${PHP_XDEBUG_CLIENT_PORT}:${PHP_XDEBUG_CLIENT_PORT}"
depends_on: depends_on:
- php - php
environment: environment: