{"id":21915609,"url":"https://github.com/clustercockpit/cc-docker","last_synced_at":"2026-05-03T17:32:50.291Z","repository":{"id":283803707,"uuid":"368757961","full_name":"ClusterCockpit/cc-docker","owner":"ClusterCockpit","description":"A configurable docker compose setup for development and testing of ClusterCockpit","archived":false,"fork":false,"pushed_at":"2026-02-16T12:01:16.000Z","size":1030,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-04-05T00:57:38.943Z","etag":null,"topics":["docker","docker-compose"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ClusterCockpit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-05-19T05:49:23.000Z","updated_at":"2025-04-08T07:37:03.000Z","dependencies_parsed_at":"2025-06-20T06:07:02.425Z","dependency_job_id":"cbcb062f-9204-4483-b5c6-b6e6a179851a","html_url":"https://github.com/ClusterCockpit/cc-docker","commit_stats":null,"previous_names":["clustercockpit/cc-docker"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ClusterCockpit/cc-docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClusterCockpit%2Fcc-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClusterCockpit%2Fcc-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClusterCockpit%2Fcc-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClusterCockpit%2Fcc-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ClusterCockpit","download_url":"https://codeload.github.com/ClusterCockpit/cc-docker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClusterCockpit%2Fcc-docker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32578578,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-compose"],"created_at":"2024-11-28T19:13:05.248Z","updated_at":"2026-05-03T17:32:50.286Z","avatar_url":"https://github.com/ClusterCockpit.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cc-docker\n\nThis is a `docker-compose` setup which provides a quickly started environment\nfor ClusterCockpit development and testing, using `cc-backend`. A number of\nservices is readily available as docker container (nats, cc-metric-store,\nInfluxDB, LDAP, SLURM), or easily added by manual configuration (MariaDB).\n\nIt includes the following containers:\n\n|Service full name|docker service name|port|\n| --- | --- | --- |\n|Slurm Controller service|slurmctld|6818|\n|Slurm Database service|slurmdbd|6817|\n|Slurm Rest service with JWT authentication|slurmrestd|6820|\n|Slurm Worker|node01|6818|\n|MariaDB service|mariadb|3306|\n|InfluxDB serice|influxdb|8086|\n|NATS service|nats|4222, 6222, 8222|\n|cc-metric-store service|cc-metric-store|8084|\n|OpenLDAP|openldap|389, 636|\n\nThe setup comes with fixture data for a Job archive, cc-metric-store\ncheckpoints, InfluxDB, MariaDB, and a LDAP user directory.\n\n## Prerequisites\n\nFor all the docker services to work correctly, you will need the following tools\ninstalled:\n\n1. `docker` and `docker-compose`\n2. `golang` (for compiling cc-metric-store)\n3. `perl` (for migrateTimestamp.pl) with Cpanel::JSON::XS, Data::Dumper, Time::Piece, Sort::Versions and File::Slurp perl modules.\n4. `npm` (for cc-backend)\n5. `make` (for building slurm base image)\n\nIt is also recommended to add docker service to sudo user group since the\nsetupDev.sh script assumes sudo permissions for docker and docker-compose\nservices.\n\nYou can use:\n\n```\nsudo groupadd docker\nsudo usermod -aG docker $USER \n\n# restart after adding your docker with your user to sudo group\nsudo shutdown -r -t 0\n```\n\nNote: You can install all these dependencies via predefined installation steps\nin `prerequisite_installation_script.sh`.\n\nIf you are using different linux flavors, you will have to adapt\n`prerequisite_installation_script.sh` as well as `setupDev.sh`.\n\n## Setup\n\n1. Clone `cc-backend` repository in chosen base folder: `$\u003e git clone https://github.com/ClusterCockpit/cc-backend.git`\n\n2. Run `$ ./setupDev.sh`:  **NOTICE** The script will download files of a total\n   size of 338MB (mostly for the cc-metric-store data).\n\n3. The setup-script launches the supporting container stack in the background\n   automatically if everything went well. Run\n\n``` bash\n./cc-backend/cc-backend -server -dev\n```\n\nto start `cc-backend`.\n\n4. By default, you can access `cc-backend` in your browser at\n   `http://localhost:8080`. You can shut down the cc-backend server by pressing\n`CTRL-C`, remember to also shut down all containers via `$\u003e docker-compose down`\nafterwards.\n\n5. You can restart the containers with: `$\u003e docker-compose up -d`.\n\n## Credentials for logging into clustercockpit\n\nCredentials for the preconfigured demo user are:\n\n* User: `demo`\n* Password: `demo`\n\nCredentials for the preconfigured LDAP user are:\n\n* User: `ldapuser`\n* Password: `ldapuser`\n\nYou can also login as regular user using any credential in the LDAP user\ndirectory at `./data/ldap/users.ldif`.\n\n## Preconfigured setup between docker services and ClusterCockpit components\n\nWhen you are done cloning the cc-backend repo and once you execute `setupDev.sh`\nfile, it will copy a preconfigured `config.json` from `misc/config.json` and\nreplace the `cc-backend/config.json`, which will be used by cc-backend, once you\nstart the server. The preconfigured config.json attaches to:\n\n### 1. MariaDB docker service on port 3306 (database: ccbackend)\n\n### 2. OpenLDAP docker service on port 389\n\n### 3. cc-metric-store docker service on port 8084\n\ncc-metric-store also has a preconfigured `config.json` in\n`cc-metric-store/config.json` which attaches to NATS docker service on port 4222\nand subscribes to topic 'hpc-nats'.\n\nBasically, all the ClusterCockpit components and the docker services attach to\neach other like lego pieces.\n\n## Docker commands to access the services\n\n\u003e Note: You need to be in cc-docker directory in order to execute any docker command\n\nYou can view all docker processes running on either of the VM instance by using\nthis command:\n\n```\ndocker ps\n```\n\nNow that you can see the docker services, and if you want to manually access the\ndocker services, you have to run **`bash`** command in those running services.\n\n\u003e **`Example`**: You want to run slurm commands like `sinfo` or `squeue` or\n\u003e `scontrol` on slurm controller, you cannot directly access it.\n\nYou need to **`bash`** into the running service by using the following command:\n\n```\n$ docker exec -it \u003cdocker service name\u003e bash\n\n#example\n$ docker exec -it slurmctld bash\n\n#or\n$ docker exec -it mariadb bash\n```\n\nOnce you start a **`bash`** on any docker service, then you may execute any\nservice related commands in that **`bash`**.\n\nBut for Cluster Cockpit development, you only need ports to access these docker\nservices. You have to use `localhost:\u003cport\u003e` when trying to access any docker\nservice. You may need to configure the `cc-backend/config.json` based on these\ndocker services and ports.\n\n## Slurm setup in cc-docker\n\n### 1. Slurm controller\n\nCurrently slurm controller is aware of the 1 node that we have setup in our mini\ncluster i.e. node01.\n\nIn order to execute slurm commands, you may need to **`bash`** into the\n**`slurmctld`** docker service.\n\n``` bash\ndocker exec -it slurmctld bash\n```\n\nThen you may be able to run slurm controller commands. A few examples without\noutput are:\n\n``` bash\nsinfo\n```\n\nor\n\n``` bash\nsqueue\n```\n\nor\n\n``` bash\nscontrol show nodes\n```\n\n### 2. Slurm rest service\n\nYou do not need to **`bash`** into the slurmrestd service but can directly\naccess the rest API via localhost:6820. A simple example on how to CURL to the\nslurm rest API is given in the `curl_slurmrestd.sh`.\n\nYou can directly use `curl_slurmrestd.sh` with a never expiring JWT token ( can\nbe found in /data/slurm/secret/jwt_token.txt )\n\nYou may also use the never expiring token directly from the file for any of your\ncustom CURL commands.\n\n## Known Issues\n\n* `docker-compose` installed on Ubuntu (18.04, 20.04) via `apt-get` can not\ncorrectly parse `docker-compose.yml` due to version differences. Install latest\nversion of `docker-compose` from \u003chttps://docs.docker.com/compose/install/\u003e\ninstead.\n* You need to ensure that no other web server is running on ports 8080\n(cc-backend), 8082 (cc-metric-store), 8086 (InfluxDB), 4222 and 8222 (Nats), or\n3306 (MariaDB). If one or more ports are already in use, you have to adapt the\nrelated config accordingly.\n* Existing VPN connections sometimes cause problems with docker. If\n`docker-compose` does not start up correctly, try disabling any active VPN\nconnection. Refer to\n\u003chttps://stackoverflow.com/questions/45692255/how-make-openvpn-work-with-docker\u003e\nfor further information.\n\n## Docker services and restarting the services\n\nYou can find all the docker services in `docker-compose.yml`. Feel free to\nmodify it.\n\nWhenever you modify it, please use\n\n``` bash\ndocker compose down\n```\n\nin order to shut down all the services in all the VM’s (maininstance,\nnodeinstance, nodeinstance2) and then start all the services by using\n\n``` bash\ndocker compose up\n```\n\nTODO: Update job archive and all other metric data.\nThe job archive with 1867 jobs originates from the second half of 2020.\nRoughly 2700 jobs from the first week of 2021 are loaded with data from InfluxDB.\nSome views of ClusterCockpit (e.g. the Users view) show the last week or month.\nTo show some data there you have to set the filter to time periods with jobs\n(August 2020 to January 2021).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclustercockpit%2Fcc-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclustercockpit%2Fcc-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclustercockpit%2Fcc-docker/lists"}