From 20b30dc00b7e54b2a17c0f6382a3db42724f6ace Mon Sep 17 00:00:00 2001 From: Christoph Kluge Date: Tue, 20 Sep 2022 13:14:21 +0200 Subject: [PATCH] Update README and fix inversed --no-server option for cc-backend --- .gitignore | 4 ++++ README.md | 20 +++++++++++--------- setupDev.sh | 3 +-- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 612a019..c15cb21 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,8 @@ data/job-archive/** data/influxdb data/sqldata data/cc-metric-store +cc-backend +cc-backend/** .vscode +docker-compose.yml +.env diff --git a/README.md b/README.md index 658159f..13bcc1d 100644 --- a/README.md +++ b/README.md @@ -24,20 +24,22 @@ The setup comes with fixture data for a Job archive, cc-metric-store checkpoints ## Configuration Templates Located in `./templates` -* `docker-compose.yml.default`: Docker-Compose file to setup cc-metric-store, InfluxDB, and LDAP containers (Default). Used in `setupDev.sh`. -* `docker-compose.yml.mysql`: Docker-Compose configuration template if additional MySQL and phpmyadmin containers are desired. -* `docker-compose.yml.mariadb`: Docker-Compose configuration template if additional MariaDB and phpmyadmin containers are desired. -* `env.default`: Environment variables for setup with cc-metric-store, InfluxDB, and LDAP containers (Default). Used in `setupDev.sh`. -* `env.mysql`: Additional environment variables required if additional MySQL and phpmyadmin containers are desired. -* `env.mariadb`: Additional environment variables required if additional MariaDB and phpmyadmin containers are desired. +* `docker-compose.yml.default`: Docker-Compose file to setup cc-metric-store, InfluxDB, MariaDB, PhpMyadmin, and LDAP containers (Default). Used in `setupDev.sh`. +* `docker-compose.yml.mysql`: Docker-Compose configuration template if MySQL is desired instead of MariaDB. +* `env.default`: Environment variables for setup with cc-metric-store, InfluxDB, MariaDB, PhpMyadmin, and LDAP containers (Default). Used in `setupDev.sh`. +* `env.mysql`: Additional environment variables required if MySQL is desired instead of MariaDB. ## Setup -1. `$ ./setupDev.sh`: **NOTICE** The script will download files of a total size of 338MB (mostly for the InfluxDB data). +1. Clone `cc-backend` repository in chosen base folder: `$> git clone https://github.com/ClusterCockpit/cc-backend.git` -2. After that from the root of the cc-docker sandbox you can start up the containers and launch cc-backend with: `$ ./startDev.sh` +2. Run `$ ./setupDev.sh`: **NOTICE** The script will download files of a total size of 338MB (mostly for the InfluxDB data). -3. By default, you can access cc-backend in your browser at `http://localhost:8080`. You can shut down the cc-backend server by pressing `CTRL-C`, remember to also shut down all containers via `docker-compose down` afterwards. +3. The setup-script launches the supporting container stack in the background automatically if everything went well. Run `$> ./cc-backend/cc-backend` to start `cc-backend.` + +4. By default, you can access `cc-backend` in your browser at `http://localhost:8080`. You can shut down the cc-backend server by pressing `CTRL-C`, remember to also shut down all containers via `$> docker-compose down` afterwards. + +5. You can restart the containers with: `$> docker-compose up -d`. ## Post-Setup Adjustment for using `influxdb` diff --git a/setupDev.sh b/setupDev.sh index 5c8b0cf..e4816c6 100755 --- a/setupDev.sh +++ b/setupDev.sh @@ -63,7 +63,6 @@ else fi # Check dotenv-file and docker-compose-yml, copy accordingly if not present and build docker services -# !! By default, this decides which metric database is used based on the selected argument !! if [ ! -d .env ]; then cp templates/env.default ./.env fi @@ -73,7 +72,7 @@ if [ ! -d docker-compose.yml ]; then fi docker-compose build -./cc-backend/cc-backend --init-db --add-user demo:admin:AdminDev --no-server +./cc-backend/cc-backend --init-db --add-user demo:admin:AdminDev docker-compose up -d echo ""