MCPcopy Index your code
hub / github.com/arenadata/adcm

github.com/arenadata/adcm @2023.11.28.07

Chat with this repo
repository ↗ · DeepWiki ↗ · release 2023.11.28.07 ↗ · + Follow
6,887 symbols 25,947 edges 1,247 files 228 documented · 3% updated today2.12.0 · 2026-05-13★ 339 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Arenadata Cluster Manager

That is Arenadata Cluster Manager Project aka Chapelnik

Documentation

ArenaData ADCM Documentation

Develop

All standard Django commands are available.

Run dev server for the first time with these commands: 1. manage.py migrate 2. init_db.py 3. manage.py upgraderole 4. manage.py runserver --insecure

Re-run them when needed/applicable.

Sources

Dirs

  • assemble - information about the way we build product
  • python - core django modules and python functions
  • docs
  • go - golang part of application. There is a status server here now.
  • test
  • spec - specification in form of Sphinx RST
  • web - UI source

Build logic

There is a Makefile in repo. It could be used for building application.

Fast start with make

You have to have GNU Make on your host and Docker daemon accessible for a user. Also, you have to have access to ci.arenadata.io

# Clone repo
git clone https://github.com/arenadata/adcm

cd adcm

# Run build process
make build

That will be an image hub.adsw.io/adcm/adcm: as a result of the operation above.

Makefile description

Makefile has self-documented help message. Just type.

$ make
buildbaseimage                 Build base image for ADCM's container. That is alpine with all packages.
build                          Build final docker image and all depended targets except baseimage.
buildjs                        Build client side js/html/css in directory wwwroot
buildss                        Build status server
clean                          Cleanup. Just a cleanup.
describe                       Create .version file with output of describe
help                           Shows that help

And check out the description for every operation available.

Pre-commit hook

We are using black, pylint and pre-commit to care about code formatting and linting.

So you have to install pre-commit hook before you do something with code.

pip install pre-commit # Or do it with your preffered way to install pip packages
pre-commit install

After this you will see invocation of black and pylint on every commit.

Link ADWP_UI packages

If you need to debug packages from ADWP_UI, you should do:

In ADWP_UI repository:

delete dist folder
yarn run watch:widgets
cd dist/widgets
yarn link

In ADCM repository:

cd web
sudo rm -rf ./node_modules OR rmdir -force ./node_modules(WIN)
yarn link "@adwp-ui/widgets"
yarn install

Running ADCM using SQLite

  1. Start container:

    shell docker run -d --restart=always -p 8000:8000 -v /opt/adcm:/adcm/data --name adcm hub.arenadata.io/adcm/adcm:latest

    Use -v /opt/adcm:/adcm/data:Z for SELinux

Running ADCM using client PostgreSQL DB

PostgreSQL must be version 11 or newer - JSONB field used

  1. Start container: shell docker run -d --restart=always -p 8000:8000 -v /opt/adcm:/adcm/data -e DB_HOST="DATABASE_HOSTNAME_OR_IP_ADDRESS" -e DB_PORT="DATABASE_TCP_PORT" -e DB_USER="DATABASE_USERNAME" -e DB_NAME="DATABASE_NAME" -e DB_PASS="DATABASE_USER_PASSWORD" --name adcm hub.arenadata.io/adcm/adcm:latest Use -v /opt/adcm:/adcm/data:Z for SELinux Target PostgreSQL DB must not have DB with name DATABASE_NAME

Migrate SQLite -> client PostgreSQL

NOTE: adcm is the ADCM's container name. 1. Dump SQLite DB to file: shell docker exec -it adcm /adcm/python/manage.py dumpdata --natural-foreign --natural-primary -o /adcm/data/var/data.json 2. Stop container: shell docker stop adcm docker rm adcm 3. Start container in MIGRATION_MODE: shell docker run -d --restart=always -p 8000:8000 -v /opt/adcm:/adcm/data -e DB_HOST="DATABASE_HOSTNAME_OR_IP_ADDRESS" -e DB_PORT="DATABASE_TCP_PORT" -e DB_USER="DATABASE_USERNAME" -e DB_NAME="DATABASE_NAME" -e DB_PASS="DATABASE_USER_PASSWORD" -e MIGRATION_MODE=1 --name adcm hub.arenadata.io/adcm/adcm:latest Use -v /opt/adcm:/adcm/data:Z for SELinux Target PostgreSQL DB must not have DB with name DATABASE_NAME 4. Load dumped SQLite DB data to PostgreSQL shell docker exec -it adcm /adcm/python/manage.py loaddata /adcm/data/var/data.json 5. Stop container: shell docker stop adcm docker rm adcm 6. Start container: shell docker run -d --restart=always -p 8000:8000 -v /opt/adcm:/adcm/data -e DB_HOST="DATABASE_HOSTNAME_OR_IP_ADDRESS" -e DB_PORT="DATABASE_TCP_PORT" -e DB_USER="DATABASE_USERNAME" -e DB_NAME="DATABASE_NAME" -e DB_PASS="DATABASE_USER_PASSWORD" -e MIGRATION_MODE=0 --name adcm hub.arenadata.io/adcm/adcm:latest

Set log level

  1. add -e option to docker run command: shell docker run ... -e LOG_LEVEL="INFO"

valid choices are: DEBUG, INFO, WARNING, ERROR, CRITICAL

defaults to ERROR

Extension points exported contracts — how you extend this code

EventableService (Interface)
(no doc) [6 implementers]
web/src/app/models/eventable-service.ts
IConfigService (Interface)
(no doc) [5 implementers]
web/src/app/shared/configuration/services/config.service.ts
DynamicComponent (Interface)
(no doc) [3 implementers]
web/src/app/shared/directives/dynamic/dynamic.directive.ts
IListService (Interface)
(no doc) [3 implementers]
web/src/app/shared/components/list/list-service-token.ts
IAddService (Interface)
(no doc) [3 implementers]
web/src/app/shared/add-component/add-service-model.ts

Core symbols most depended-on inside this repo

get
called by 1643
web/src/app/shared/add-component/add-service-model.ts
create
called by 748
go/adcm/status/storage.go
filter
called by 629
python/rbac/models.py
post
called by 399
python/api/host/views.py
save
called by 283
python/cm/models.py
raise_adcm_ex
called by 249
python/cm/errors.py
delete
called by 224
web/src/app/shared/components/list/list-service-token.ts
append
called by 166
web/src/app/app.component.ts

Shape

Method 3,592
Class 1,905
Function 1,046
Interface 230
Route 63
Struct 28
Enum 20
TypeAlias 2
FuncType 1

Languages

Python59%
TypeScript39%
Go3%

Modules by API surface

python/cm/models.py186 symbols
python/audit/tests/test_cluster.py64 symbols
python/cm/ansible_plugin.py58 symbols
python/api/cluster/serializers.py55 symbols
python/cm/api.py53 symbols
python/api/stack/serializers.py52 symbols
python/api_v2/tests/test_config.py50 symbols
python/cm/bundle.py46 symbols
web/src/app/shared/configuration/services/field.service.ts44 symbols
python/cm/job.py44 symbols
python/api/stack/views.py42 symbols
python/cm/stack.py41 symbols

For agents

$ claude mcp add adcm \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact