{"id":28407192,"url":"https://github.com/k8ssandra/management-api-for-apache-cassandra","last_synced_at":"2026-04-20T23:04:52.954Z","repository":{"id":37103413,"uuid":"240133006","full_name":"k8ssandra/management-api-for-apache-cassandra","owner":"k8ssandra","description":"RESTful / Secure Management Sidecar for Apache Cassandra","archived":false,"fork":false,"pushed_at":"2026-04-14T15:28:58.000Z","size":1920,"stargazers_count":81,"open_issues_count":65,"forks_count":54,"subscribers_count":28,"default_branch":"master","last_synced_at":"2026-04-14T17:23:49.834Z","etag":null,"topics":["cassandra","cloud-native","kubernetes","sidecar"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/k8ssandra.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","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":"2020-02-12T23:00:23.000Z","updated_at":"2026-04-06T20:01:27.000Z","dependencies_parsed_at":"2024-03-20T15:43:09.699Z","dependency_job_id":"6887eaba-2f96-4626-93a1-5a599ecdcb3a","html_url":"https://github.com/k8ssandra/management-api-for-apache-cassandra","commit_stats":null,"previous_names":["datastax/management-api-for-apache-cassandra"],"tags_count":116,"template":false,"template_full_name":null,"purl":"pkg:github/k8ssandra/management-api-for-apache-cassandra","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k8ssandra%2Fmanagement-api-for-apache-cassandra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k8ssandra%2Fmanagement-api-for-apache-cassandra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k8ssandra%2Fmanagement-api-for-apache-cassandra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k8ssandra%2Fmanagement-api-for-apache-cassandra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/k8ssandra","download_url":"https://codeload.github.com/k8ssandra/management-api-for-apache-cassandra/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k8ssandra%2Fmanagement-api-for-apache-cassandra/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32069442,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T21:26:33.338Z","status":"ssl_error","status_checked_at":"2026-04-20T21:26:22.081Z","response_time":94,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["cassandra","cloud-native","kubernetes","sidecar"],"created_at":"2025-06-02T00:31:07.381Z","updated_at":"2026-04-20T23:04:52.946Z","avatar_url":"https://github.com/k8ssandra.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Management API for Apache Cassandra\u0026reg;\n\n![Java CI](https://github.com/k8ssandra/management-api-for-apache-cassandra/workflows/Java%20CI/badge.svg)\n![Docker Release](https://github.com/k8ssandra/management-api-for-apache-cassandra/workflows/Docker%20Release/badge.svg)\n## Introduction\n\n   Cassandra operations have historically been command line driven.\n   The management of operational tools for Apache Cassandra have been mostly\n   outsourced to teams who manage their specific environments.\n\n   The result is a fragmented and tribal set of best practices, workarounds,\n   and edge cases.\n\n   The Management API is a sidecar service layer that attempts to build a well supported\n   set of operational actions on Cassandra nodes that can be administered centrally.\n   It currently works with official [Apache Cassandra](https://cassandra.apache.org) 3.11.x and 4.0\n   via a drop in java agent.\n\n   * Lifecycle Management\n       * Start Node\n       * Stop Node\n   * Configuration Management (alpha)\n       * Change YAML\n       * Change jvm-opts\n   * Health Checks\n       * Kubernetes liveness/readiness checks\n       * Consistency level checks\n   * Per node actions\n       * All nodetool commands\n\n## Design Principles\n  * Secure by default\n  * Simple to use and extend\n  * CQL Only for all C* interactions\n    * Operations: Use `CALL` method for invoking via CQL\n    * Observations: Rely on System Views\n\n  The Management API has no configuration file.  Rather, it can only be configured from a\n  small list of command line flags.  Communication by default can only be via **unix socket**\n  or via a **http(s) endpoint** with optional TLS client auth.\n\n  In a containerized setting the Management API represents **PID 1** and will be\n  responsible for the lifecycle of Cassandra via the API.\n\n  Communication between the Management API and Cassandra is via a local **unix socket** using\n  CQL as it's only protocol.  This means, out of the box Cassandra can be started\n  securely with no open ports!  Also, using CQL only means operators can\n  execute operations via CQL directly if they wish.\n\n  Each Management API is responsible for the local node only.  Coordination across nodes\n  is up to the caller.  That being said, complex health checks can be added via CQL.\n\n## Supported Image Matrix\n\nThe following versions of Cassandra and DSE are published to Docker and supported:\n\n| Cassandra 4.0.x | Cassandra 4.1.x | Cassandra 5.0.x | DSE 6.8.x | DSE 6.9.x | HCD 1.1.x | HCD 1.2.x |\n|-----------------|-----------------|-----------------|---------- |-----------| --------- | --------- |\n| 4.0.0           | 4.1.0           | 5.0.1           | 6.8.25    | 6.9.0     | 1.1.0     | 1.2.0     |\n| 4.0.1           | 4.1.1           | 5.0.2           | 6.8.26    | 6.9.1     |           |           |\n| 4.0.3           | 4.1.2           | 5.0.3           | 6.8.28    | 6.9.2     |           |           |\n| 4.0.4           | 4.1.3           | 5.0.4           | 6.8.29    | 6.9.3     |           |           |\n| 4.0.5           | 4.1.4           | 5.0.5           | 6.8.30    | 6.9.4     |           |           |\n| 4.0.6           | 4.1.5           | 5.0.6           | 6.8.31    | 6.9.5     |           |           |\n| 4.0.7           | 4.1.6           | 5.0.7           | 6.8.32    | 6.9.6     |           |           |\n| 4.0.8           | 4.1.7           | 5.0.8           | 6.8.33    | 6.9.7     |           |           |\n| 4.0.9           | 4.1.8           |                 | 6.8.34    | 6.9.8     |           |           |\n| 4.0.10          | 4.1.9           |                 | 6.8.35    | 6.9.9     |           |           |\n| 4.0.11          | 4.1.10          |                 | 6.8.36    | 6.9.10    |           |           |\n| 4.0.12          | 4.1.11          |                 | 6.8.37    | 6.9.11    |           |           |\n| 4.0.13          |                 |                 | 6.8.38    | 6.9.12    |           |           |\n| 4.0.14          |                 |                 | 6.8.39    | 6.9.13    |           |           |\n| 4.0.15          |                 |                 | 6.8.40    | 6.9.14    |           |           |\n| 4.0.17          |                 |                 | 6.8.41    | 6.9.15    |           |           |\n| 4.0.18          |                 |                 | 6.8.42    | 6.9.16    |           |           |\n| 4.0.19          |                 |                 | 6.8.43    | 6.9.17    |           |           |\n| 4.0.20          |                 |                 | 6.8.44    | 6.9.18    |           |           |\n|                 |                 |                 | 6.8.46    | 6.9.20    |           |           |\n|                 |                 |                 | 6.8.47    | 6.9.21    |           |           |\n|                 |                 |                 | 6.8.48    |           |           |           |\n|                 |                 |                 | 6.8.49    |           |           |           |\n|                 |                 |                 | 6.8.50    |           |           |           |\n|                 |                 |                 | 6.8.51    |           |           |           |\n|                 |                 |                 | 6.8.52    |           |           |           |\n|                 |                 |                 | 6.8.53    |           |           |           |\n|                 |                 |                 | 6.8.54    |           |           |           |\n|                 |                 |                 | 6.8.55    |           |           |           |\n|                 |                 |                 | 6.8.56    |           |           |           |\n|                 |                 |                 | 6.8.57    |           |           |           |\n|                 |                 |                 | 6.8.58    |           |           |           |\n|                 |                 |                 | 6.8.59    |           |           |           |\n|                 |                 |                 | 6.8.60    |           |           |           |\n|                 |                 |                 | 6.8.61    |           |           |           |\n|                 |                 |                 | 6.8.62    |           |           |           |\n|                 |                 |                 | 6.8.63    |           |           |           |\n\n- Apache Cassandra images are available in `linux/amd64` or `linux/arm64` formats. The DSE images are available only in the `linux/amd64` format.\n- All images (with the exception of Cassandra 5.0) are available as an Ubuntu based image or a RedHat UBI 8 based image.\nCassandra 5.0 images are only RedHat UBI8 based.\n- All Cassandra 4.0.x and 4.1.x images come with JDK 11\n- All Cassandra 5.0.x images come with JDK17\n- All DSE 6.8.x Ubuntu based images are available with either JDK 8 or JDK 11 (you have to pick, only  one JDK is installed in an image)\n- All DSE 6.8.x RedHat UBI 8 based images come with JDK 8\n- All DSE 6.9.x Ubuntu based images come with only JDK 11\n- All DSE 6.9.x RedHat UBI 8 based images come with only JDK 11\n- HCD images are not built within this repo. Only the Agent for HCD is maintained within this repo\n\n### OSS Cassandra 4.0.X/4.1.X Ubuntu images\n\nAs of January 14, 2026, upstream Cassandra images have switched from Ubuntu to Debian for their base\nimage. The upstream project has also rebuilt and published the latest Cassandra releases, as of\nJanuary 14, which are 4.1.10 and 4.0.19. Starting with v0.1.112 of this project, all OSS Cassandra\nUbuntu images for versions 4.1.10 and newer in the 4.1.x stream, and 4.0.19 and newer in the 4.0.x stream\nwill actually be Debian based. There is no change to the RedHat UBI based images at this time, nor are\nthere any changes to Ubuntu based DSE images produced (they are still based on Ubuntu) by this repository.\n\n### Java versions in Docker images\n\nAs of v0.1.88, all images produced from this repo will have Java 11 or newer installed as the \nManagement API server code must now run with Java 11. For images where the Cassandra/DSE\nversion runs with Java 8 (see above), Both Java 8 and Java 11 will be available, with\nJava 8 being the default and Java 8 used to run the Cassandra/DSE process.\n\n### Cassandra 3.11.x support is now deprecated\n\nCassandra 3.11.x is no longer supported as of version v0.1.88. Images with Cassandra 3.11 are still available in DockerHub.\nNo new Management API functionality will be released for any Cassandra 3.11 versions going forward and no new Cassandra 3.11.x\npatch version images will be published going forward. The table below shows the last published Cassandra 3.11.x versions:\n\n| Cassandra 3.11.x |\n| ---------------- |\n| 3.11.7           |\n| 3.11.8           |\n| 3.11.11          |\n| 3.11.12          |\n| 3.11.13          |\n| 3.11.14          |\n| 3.11.15          |\n| 3.11.16          |\n| 3.11.17          |\n\n### Docker coordinates for Cassandra OSS images\n\n#### Ubuntu based images (OSS)\n\nFor all Ubuntu based OSS Cassandra images, the Docker coordinates are as follows:\n\n      k8ssandra/cass-management-api:\u003cversion\u003e\n\nExample for Cassandra 4.0.10\n\n      k8ssandra/cass-management-api:4.0.10\n\n#### RedHat UBI based images (OSS)\n\nFor all RedHat UBI based OSS Cassandra images, the Docker coordinates are as follows:\n\n      k8ssandra/cass-management-api:\u003cversion\u003e-ubi\n\nExample for Cassandra 4.0.10\n\n      k8ssandra/cass-management-api:4.0.10-ubi\n\n### Docker coordinates for DSE 6.8.x images\n\n#### Ubuntu based images (DSE 6.8)\n\nFor all JDK 8 Ubuntu based DSE 6.8.x images, the Docker coordinates are as follows:\n\n      datastax/dse-mgmtapi-6_8:\u003cversion\u003e\n\nExample for DSE 6.8.31\n\n      datastax/dse-mgmtapi-6_8:6.8.31\n\nFor all JDK 11 Ubuntu based DSE 6.8.x images, the Docker coordinates are as follows:\n\n      datastax/dse-mgmtapi-6_8:\u003cversion\u003e-jdk11\n\nExample for DSE 6.8.31\n\n      datastax/dse-mgmtapi-6_8:6.8.31-jdk11\n\n#### RedHat UBI based images (DSE 6.8)\n\nFor all RedHat UBI based DSE 6.8.x images, the Docker coordinates are as follows:\n\n      datastax/dse-mgmtapi-6_8:\u003cversion\u003e-ubi\n\nFor legacy tagging conventions, the image is also tagged as:\n\n      datastax/dse-mgmtapi-6_8:\u003cversion\u003e-ubi8\n\nExample for DSE 6.8.31\n\n      datastax/dse-mgmtapi-6_8:6.8.31-ubi\n\n### Docker coordinates for DSE 6.9.x images\n\n#### Ubuntu based images (DSE 6.9)\n\nFor all JDK 11 Ubuntu based DSE 6.8.x images, the Docker coordinates are as follows:\n\n      datastax/dse-mgmtapi-6_8:\u003cversion\u003e-jdk11\n\nExample for DSE 6.9.0\n\n      datastax/dse-mgmtapi-6_8:6.9.0-jdk11\n\n#### RedHat UBI based images (DSE 6.9)\n\nFor all RedHat UBI based DSE 6.9.x images, the Docker coordinates are as follows:\n\n      datastax/dse-mgmtapi-6_8:\u003cversion\u003e-ubi\n\nFor legacy tagging conventions, the image is also tagged as:\n\n      datastax/dse-mgmtapi-6_8:\u003cversion\u003e-ubi8\n\nExample for DSE 6.9.0\n\n      datastax/dse-mgmtapi-6_8:6.9.0-ubi\n\n** NOTE 1: The docker repo is not a typo, it really is `datastax/dse-mgmtapi-6_8` for 6.9 images\n** NOTE 2: While the Legacy tagging uses `ubi8`, the image as of v0.1.108 is actually UBI 9 based\n\n### Docker coordinates for HCD 1.1.x/1.2.x images\n\n#### Ubuntu based images (HCD 1.1/1.2)\n\nFor all JDK 11 Ubuntu based HCD 1.1.x/1.2.x images, the Docker coordinates are as follows:\n\n      datastax/hcd:\u003cversion\u003e\n\nExample for HCD 1.1.0\n\n      datastax/hcd:1.1.0\n\nExample for HCD 1.2.0\n\n      datastax/hcd:1.2.0\n\n#### RedHat UBI images (HCD 1.1/1.2)\n\nFor all RedHat UBI based HCD 1.1.x/1.2.x images, the Docker coordinates are as follows:\n\n      datastax/hcd:\u003cversion\u003e-ubi\n\nExample for HCD 1.1.0\n\n      datastax/hcd:1.0.0-ubi\n\nExample for HCD 1.2.0\n\n      datastax/hcd:1.2.0-ubi\n\n## Building\n\n### Minimum Java Version\n\nThe project has been updated to now require JDK11 or newer to build. The jarfile artifacts\nare still compiled to Java8 as Java8 is still what some Cassandra versions ship with.\n\n### Containers\n\nFirst, you will need to have the [Docker buildx plugin](https://docs.docker.com/build/buildx/install/) installed.\n\nTo build an image based on the desired Cassandra version see the examples below:\n\n    #Create a docker image with management api and C* 4.0 (version 4.0.0 and newer are supported)\n    docker buildx build --load --build-arg CASSANDRA_VERSION=4.0.6 --tag mgmtapi-4_0 --file cassandra/Dockerfile-4.0 --target cassandra --platform linux/amd64 .\n\n    #Create a docker image with management api and C* 4.1 (version 4.1.0 and newer are supported)\n    docker buildx build --load --build-arg CASSANDRA_VERSION=4.1.4 --tag mgmtapi-4_1 --file cassandra/Dockerfile-4.1 --target cassandra --platform linux/amd64 .\n\n    # Cassandra 5.0 and newer images are based on RedHat Universal Base Images (see below)\n\nTo build a RedHat Universal Base Image (UBI) based Cassandra image, use the `ubi` Dockerfile. Examples:\n\n    #Create a UBI based image with management api and C* 4.0 (version 4.0.0 and newer are supported)\n    docker buildx build --load --build-arg CASSANDRA_VERSION=4.0.6 --tag mgmtapi-4_0_ubi --file cassandra/Dockerfile-4.0.ubi --target cassandra --platform linux/amd64 .\n\n    #Create a UBI based image with management api and C* 4.1 (version 4.1.0 and newer are supported)\n    docker buildx build --load --build-arg CASSANDRA_VERSION=4.1.4 --tag mgmtapi-4_1_ubi --file cassandra/Dockerfile-4.1.ubi --target cassandra --platform linux/amd64 .\n\n    #Create a UBI based image with management api and C* 5.0 (version 5.0.1 and newer are supported)\n    docker buildx build --load --build-arg CASSANDRA_VERSION=5.0.2 --tag mgmtapi-5_0_ubi --file cassandra/Dockerfile-5.0.ubi --target cassandra --platform linux/amd64 .\n\nYou can also build OSS Cassandra images for `linux/arm64` based platforms. Both Ubuntu and UBI8 based images support this. Simply change the `--platform` argument above to `--platform linux/arm64`. Examples:\n\n    #Create an ARM64 UBI based image with management api and C* 4.0 (version 4.0.0 and newer are supported)\n    docker buildx build --load --build-arg CASSANDRA_VERSION=4.0.6 --tag mgmtapi-4_0_ubi-arm --file cassandra/Dockerfile-4.0.ubi --target cassandra --platform linux/arm64 .\n\nTo build an image based on DSE, see the [DSE README](management-api-agent-dse-6.8/README.md).\n\n### Standalone\n\n    mvn -DskipTests package\n    mvn test\n    mvn integration-test -Drun3.11tests=true -Drun4.0tests=true\n\n**NOTE 1:** Running ````integration-test````s will also run unit tests.\n\n**NOTE 2:** Running ````integration-test````s requires at least one of ````-Drun3.11tests````, ````-Drun3.11testsUBI````, ````-Drun4.0tests````, ````-Drun4.0testsUBI````, ````-Drun4.1tests````, ````-Drun4.1testsUBI````, ````-Drun5.0testsUBI````, ````-DrunDSE6.8tests````, ````-DrunDSE6.8testsUBI````, ````-DrunDSE6.9tests````, or ````-DrunDSE6.9testsUBI```` to be set to ````true```` (you can set any combination of them to ````true````).\n\n**NOTE 3:** In order to run DSE integration tests, you must also enable the ````dse```` profile:\n\n    mvn integration-test -P dse -DrunDSE6.8tests=true\n\n### Cassandra trunk\n\nFor building an image based on the latest from Cassandra trunk, see this [README](management-api-agent-6.0.x/README.md).\n\n### DSE 6.8.x/6.9.x\n\nFor building an image based on DSE 6.8, see the [DSE 6.8 README](management-api-agent-dse-6.8/README.md).\n\nFor building an image based on DSE 6.9, see the [DSE 6.9 README](management-api-agent-dse-6.9/README.md).\n\n## REST API\n   [The current Swagger/OpenAPI documentation](https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/k8ssandra/management-api-for-apache-cassandra/master/management-api-server/doc/openapi.json\u0026nocors)\n\n   Also readable from url root: ````/openapi.json````\n\n## Usage\n\n  As of v0.1.24, Management API Docker images for Apache Cassandra are consolidated into a single image repository here:\n\n  - [Management API for Apache Cassandra](https://hub.docker.com/repository/docker/k8ssandra/cass-management-api)\n\n  For different Cassandra versions, you will need to specify the Cassandra version as an image tag. See the [supported image matrix](#supported-image-matrix) above.\n\n  Each of the above examples will always point to the **latest** Management API version for the associated Cassandra version. If you want a specific\n  Management API version, you can append the desired version to the Cassandra version tag. For example, if you want v0.1.24 of Management API for Cassandra version 3.11.9:\n\n     docker pull k8ssandra/cass-management-api:3.11.9-v0.1.24\n\n  For Management API versions v0.1.23 and lower, you will need to use the old Docker repositories, which are Cassandra version specific:\n\n  - [Management API for Apache Cassandra 3.11.7](https://hub.docker.com/repository/docker/datastax/cassandra-mgmtapi-3_11_7)\n  - [Management API for Apache Cassandra 3.11.8](https://hub.docker.com/repository/docker/datastax/cassandra-mgmtapi-3_11_8)\n  - [Management API for Apache Cassandra 3.11.9](https://hub.docker.com/repository/docker/datastax/cassandra-mgmtapi-3_11_9)\n  - [Management API for Apache Cassandra 3.11.10](https://hub.docker.com/repository/docker/datastax/cassandra-mgmtapi-3_11_10)\n  - [Management API for Apache Cassandra 4.0-beta4](https://hub.docker.com/repository/docker/datastax/cassandra-mgmtapi-4_0_0).\n\n  For DSE Docker images, see the [DSE 6.8 README](management-api-agent-dse-6.8/README.md) or\n  the [DSE 6.9 README](management-api-agent-dse-6.9/README.md).\n\n  For running standalone the jars can be downloaded from the github release:\n     [Management API Releases Zip](https://github.com/k8ssandra/management-api-for-apache-cassandra/releases)\n\n  The Management API can be run as a standalone service or along with the Kubernetes\n  [cass-operator](https://github.com/datastax/cass-operator).\n\n  The Management API is configured from the CLI. To start the service with a C* version built above, run:\n\n     \u003e docker run -e USE_MGMT_API=true -p 8080:8080 -it --rm mgmtapi-4_0\n\n     \u003e curl http://localhost:8080/api/v0/probes/liveness\n     OK\n\n     # Check service and C* are running\n     \u003e curl http://localhost:8080/api/v0/probes/readiness\n     OK\n\n### Specifying an alternate listen port\n\nBy default, all images will listen on port 8080 for Management API connections. This can be overridden by specifying\nthe environment variable `MGMT_API_LISTEN_TCP_PORT` and setting it to your desired port. For example:\n\n    \u003e docker run -e USE_MGMT_API=true -e MGMT_API_LISTEN_TCP_PORT=9090 -p 9090:9090 k8ssandra/cass-management-api:4.0.15\n\nThe above would run a Cassandra 4.0.15 image with Management API listening on port 9090 (instead of 8080).\n\n## Usage with DSE\n\nPlease see the [DSE 6.8 README](management-api-agent-dse-6.8/README.md) or the\n[DSE 6.9 README](management-api-agent-dse-6.9/README.md) for details.\n\n## Using the Service with a locally installed C* or DSE instance\n\n\n  To start the service with a locally installed C* or DSE instance, you would run the below commands. The Management API will figure out\n  through `--db-home` whether it points to a C* or DSE folder\n\n    # REQUIRED: Add management api agent to C*/DSE startup\n    \u003e export JVM_EXTRA_OPTS=\"-javaagent:$PWD/management-api-agent/target/datastax-mgmtapi-agent-0.1.0-SNAPSHOT.jar\"\n\n    \u003e alias mgmtapi=\"java -jar management-api-server/target/datastax-mgmtapi-server-0.1.0-SNAPSHOT.jar\"\n\n    # Start the service with a local unix socket only, you could also pass -H http://localhost:8080 to expose a port\n    \u003e mgmtapi --db-socket=/tmp/db.sock --host=unix:///tmp/mgmtapi.sock --db-home=\u003cpathToCassandraOrDseHome\u003e\n\n    # Cassandra/DSE will be started by the service by default unless you pass --explicit-start flag\n\n    # Check the service is up\n    \u003e curl --unix-socket /tmp/mgmtapi.sock http://localhost/api/v0/probes/liveness\n    OK\n\n    # Check C*/DSE is up\n    \u003e curl --unix-socket /tmp/mgmtapi.sock http://localhost/api/v0/probes/readiness\n    OK\n\n    # Stop C*/DSE\n    curl -XPOST --unix-socket /tmp/mgmtapi.sock http://localhost/api/v0/lifecycle/stop\n    OK\n\n# Making changes\n\n## Code Formatting\n\n### Google Java Style\n\nThe project uses [google-java-format](https://github.com/google/google-java-format) and enforces the\n[Google Java Style](https://google.github.io/styleguide/javaguide.html) for all Java source files. The\nMaven plugin is configured to check the style during compile and it will fail the compile if it finds\na file that does not adhere to the coding standard.\n\n#### Checking the format\n\nIf you want to check the formatting from the command line after making changes, you can simply run:\n\n    mvn fmt:check\n\nNOTE: If you are making changes in the DSE agent, you need to enable the `dse` profile:\n\n    mvn -Pdse fmt:check\n\n#### Formatting the code\n\nIf you want have the plugin format the code for you, you can simply run:\n\n    mvn fmt:format\n\nNOTE: If you are making changes in the DSE agent, you need to enable the `dse` profile:\n\n    mvn -Pdse fmt:format\n\n#### Using Checkstyle in an IDE\n\nYou can also install a checkstyle file in some popular IDEs to automatically format your code. The\nGoogle checkstyle file can be found here: [google_checks.xml](checkstyle/google_checks.xml)\n\nRefer to your IDE's documentation for installing and setting up checkstyle.\n\n### Source code headers\n\nIn addition to Java style formatting, the project also enforces that source files have the correct\nheader. Source files include `.java`, `.xml` and `.properties` files. The Header should be:\n\n    /*\n     * Copyright DataStax, Inc.\n     *\n     * Please see the included license file for details.\n     */\n\nfor Java files. For XML and Properties files, the same header should exist, with the appropriate\ncomment characters replacing the Java comment characters above.\n\nJust like the Coding style, the Headers are checked at compile time and will fail the compile if\nthey aren't correct.\n\n#### Checking the headers\n\nIf you want to check the headers from the command line after making changes, you can simply run:\n\n    mvn license:check\n\nNOTE: If you are making changes in the DSE agent, you need to enable the `dse` profile:\n\n    mvn -Pdse license:check\n\n#### Formatting the code\n\nIf you want have the plugin format the headers for you, you can simply run:\n\n    mvn license:format\n\nNOTE: If you are making changes in the DSE agent, you need to enable the `dse` profile:\n\n    mvn -Pdse license:format\n\n### XML formatting\n\nThe project also enforces a standard XML format. Again, it is checked at compile time and will fail\nthe compile if XML files are not formatted correctly. See the plugin documentation for formatting\ndetails here: https://acegi.github.io/xml-format-maven-plugin/?utm_source=mavenlibs.com\n\n#### Checking XML file formatting\n\nIf you want to check XML files from the command line after making changes, you can simply run:\n\n    mvn xml-format:xml-check\n\nNOTE: If you are making changes in the DSE agent, you need to enable the `dse` profile:\n\n    mvn -Pdse xml-format:xml-check\n\n#### Formatting XML files\n\nIf you want have the plugin format XML files for you, you can simply run:\n\n    mvn xml-format:xml-format\n\nNOTE: If you are making changes in the DSE agent, you need to enable the `dse` profile:\n\n    mvn -Pdse xml-format:xml-format\n\n## Design Summary\n\nThe architecture of this repository is laid as follows, front-to-back:\n\n1. The `management-api-server/doc/openapi.json` documents the API.\n2. The server implements the HTTP verbs/endpoints under the `management-api-server/src/main/java/com/datastax/mgmtapi/resources` folder (e.g. `NodeOpsresources.java`).\n3. The server methods communicate back to the agents using `cqlService.executePreparedStatement()` calls which are routed as plaintext through a local socket. These calls return `ResultSet` objects, and to access scalar values within these you are best to call `.one()` before checking for nulls and `.getObject(0)`. This java object can then be serialized into JSON for return to the client.\n4. The server communicates only with the `management-api-agent-common` sub-project, which holds the un-versioned `CassandraAPI` interface.\n5. The `management-api-agent-common/src/main/java/com/datastax/mgmtapi/NodeOpsProvider.java` routes commands through to specific versioned instances of `CassandraAPI` which is implemented in the version 3x/4x subprojects as `CassandraAPI4x`/`CassandraAPI3x`.\n\nAny change to add endpoints or features will need to make modifications in each of the above components to ensure that they propagate through.\n\n## Changes to API endpoints\n\nIf you are adding a new endpoint, removing an endpoint, or otherwise changing the public API of an endpoint, you will need to re-generate the OpenAPI/Swagger document. The document lives at [management-api-server/doc/openapi.json](management-api-server/doc/openapi.json) and is regenerated during the build's `compile` phase. If your changes to code cause the API to change, you will need to perform a local `mvn compile` to regenerate the document and then add the change to your git commit.\n\n```sh\nmvn clean compile\ngit add management-api-server/doc/openapi.json\ngit commit\n```\n\n## API Client Generation\n\nIn addition to automatic OpenAPI document generation, a Golang client or a Java client can be generated during the build (unfortunately, only \none of them can be generated at a time, but you can run the `process-classes` goal back-to-back to generate them both). The Java client generation\nis enabled by default (or can be explicitly enabled with the `java-clientgen` Maven profile). The Go client generation is disabled by default\nand can be enabled with the `go-clientgen` Maven profile. The clients are built using the\n[OpenAPI Tools generator Maven plugin](https://github.com/OpenAPITools/openapi-generator/tree/master/modules/openapi-generator-maven-plugin)\nand can be used by projects to interact with the Management API. The client generation happens during the `process-classes`\nphase of the Maven build so that changes to the API implementation can be compiled into an OpenAPI document spec file\n[during the compile phase](#changes-to-api-endpoints) of the build. The client code is generated in the `target` directory under\nthe [management-api-server](management-api-server) sub-module and should be located at\n\n```sh\nmanagement-api-server/target/generated-sources/openapi\n```\n\nTo generate the Go client, run the following from the root of the project:\n\n```sh\nmvn process-classes -P go-clientgen\n```\n\nThe Go client code will be generated in `management-api-server/target/generated-sources/openapi/go-client`\n\nTo generate the Java client, run the following from the root of the project:\n\n```sh\nmvn process-classes -P java-clientgen\n```\n\nor simply:\n\n```sh\nmvn process-classes\n```\n\nThe Java client code will be generated in `management-api-server/target/generated-sources/openapi/java-client`\n\n### Maven coordinates for the Java generated client\n\nThis project also has a workflow_dispatch job that will publish the current `master` branch version of the Java\ngenerated client to the Datastax public Maven repository. To pull in this artifact in a Maven project, you will\nneed to add the Datastax Artifactory repository to your Maven settings:\n\n```xml\n  \u003cprofiles\u003e\n    \u003cprofile\u003e\n      \u003cid\u003edatastax\u003c/id\u003e\n      \u003cactivation\u003e\n        \u003cactiveByDefault\u003etrue\u003c/activeByDefault\u003e\n      \u003c/activation\u003e\n      \u003crepositories\u003e\n        \u003crepository\u003e\n          \u003cid\u003edatastax-artifactory\u003c/id\u003e\n          \u003cname\u003eDataStax Artifactory\u003c/name\u003e\n          \u003creleases\u003e\n            \u003cenabled\u003etrue\u003c/enabled\u003e\n            \u003cupdatePolicy\u003enever\u003c/updatePolicy\u003e\n            \u003cchecksumPolicy\u003ewarn\u003c/checksumPolicy\u003e\n          \u003c/releases\u003e\n          \u003curl\u003ehttps://repo.datastax.com\u003c/url\u003e\n          \u003clayout\u003edefault\u003c/layout\u003e\n        \u003c/repository\u003e\n      \u003c/repositories\u003e\n    \u003c/profile\u003e\n  \u003c/profiles\u003e\n```\n\nAt the current time, the artifact for the Java client will have a version that contains the Git Hash of the commit it\nwas built from. To add the artifact to your Maven project as a dependency, you will need something like this in your pom.xml:\n\n```xml\n\u003cproject\u003e\n  \u003cdependencies\u003e\n    \u003cdependency\u003e\n      \u003cgroupId\u003eio.k8ssandra\u003c/groupId\u003e\n      \u003cartifactId\u003edatastax-mgmtapi-client-openapi\u003c/artifactId\u003e\n      \u003cversion\u003e0.1.0-9d71b60\u003c/version\u003e\n    \u003c/dependency\u003e\n  \u003c/dependnecies\u003e\n\u003c/project\u003e\n```\n\nwhere `9d71b60` is the hash of the release you want.\n\nEventually, this artifact will be published into Maven Central and have a regular release version (i.e. 0.1.0).\n\n## Published Docker images\n\nWhen PRs are merged into the `master` branch, if all of the integration tests pass, the CI process will build and publish all supported Docker images with GitHub commit SHA tags. These images are not intended to be used in production. They are meant for facilitating testing with dependent projects.\n\nThe format of the Docker image tag for OSS Cassandra based images will be `\u003cCassandra version\u003e-\u003cgit commit sha\u003e`. For example, if the SHA for the commit to master is `3e99e87`, then the Cassandra 3.11.11 image tag would be `3.11.11-3e99e87`. The full docker coordinates would be `k8ssandra/cass-management-api:3.11.11-3e99e87`. Once published, these images can be used for testing in dependent projects (such as [cass-operator](https://github.com/k8ssandra/cass-operator)). Testing in dependent projects is a manual process at this time and is not automated.\n\n## Official Release process\n\nWhen the `master` branch is ready for release, all that needs to be done is to create a git `tag` and push the tag. When a git tag is pushed, a GitHub Action will kick off that builds the release versions of the Docker images and publish the to DockerHub. The release tag should be formatted as:\n\n    v0.1.X\n\nwhere `X` is incremental for each release. If the most recent release version is `v0.1.32`, then to cut the next (v0.1.33) release, do the following:\n\n    git checkout master\n    git pull\n    git tag v0.1.33\n    git push origin refs/tags/v0.1.33\n\nOnce the tag is pushed, the release process will start and build the Docker images as well as the Maven artifacts. The images are automatically pushed to DockerHub and the Maven artifacts are published and attached to the GitHub release.\n\n# CLI Help\n  The CLI help covers the different options:\n\n    mgmtapi --help\n\n    NAME\n            cassandra-management-api - REST service for managing an Apache\n            Cassandra or DSE node\n\n    SYNOPSIS\n            cassandra-management-api\n                    [ {-C | --cassandra-home | --db-home} \u003cdb_home\u003e ]\n                    [ --explicit-start \u003cexplicit_start\u003e ] [ {-h | --help} ]\n                    {-H | --host} \u003clisten_address\u003e...\n                    [ {-K | --no-keep-alive} \u003cno_keep_alive\u003e ]\n                    [ {-p | --pidfile} \u003cpidfile\u003e ]\n                    {-S | --cassandra-socket | --db-socket} \u003cdb_unix_socket_file\u003e\n                    [ --tlscacert \u003ctls_ca_cert_file\u003e ]\n                    [ --tlscert \u003ctls_cert_file\u003e ] [ --tlskey \u003ctls_key_file\u003e ]\n\n    OPTIONS\n            -C \u003cdb_home\u003e, --cassandra-home \u003cdb_home\u003e, --db-home \u003cdb_home\u003e\n                Path to the Cassandra or DSE root directory, if missing will use\n                $CASSANDRA_HOME/$DSE_HOME respectively\n\n                This options value must be a path on the file system that must be\n                readable, writable and executable.\n\n\n            --explicit-start \u003cexplicit_start\u003e\n                When using keep-alive, setting this flag will make the management\n                api wait to start Cassandra/DSE until /start is called via REST\n\n            -h, --help\n                Display help information\n\n            -H \u003clisten_address\u003e, --host \u003clisten_address\u003e\n                Daemon socket(s) to listen on. (required)\n\n            -K \u003cno_keep_alive\u003e, --no-keep-alive \u003cno_keep_alive\u003e\n                Setting this flag will stop the management api from starting or\n                keeping Cassandra/DSE up automatically\n\n            -p \u003cpidfile\u003e, --pidfile \u003cpidfile\u003e\n                Create a PID file at this file path.\n\n                This options value must be a path on the file system that must be\n                readable and writable.\n\n\n            -S \u003cdb_unix_socket_file\u003e, --cassandra-socket \u003cdb_unix_socket_file\u003e,\n            --db-socket \u003cdb_unix_socket_file\u003e\n                Path to Cassandra/DSE unix socket file (required)\n\n                This options value must be a path on the file system that must be\n                readable and writable.\n\n\n            --tlscacert \u003ctls_ca_cert_file\u003e\n                Path to trust certs signed only by this CA\n\n                This options value must be a path on the file system that must be\n                readable.\n\n\n            --tlscert \u003ctls_cert_file\u003e\n                Path to TLS certificate file\n\n                This options value must be a path on the file system that must be\n                readable.\n\n\n            --tlskey \u003ctls_key_file\u003e\n                Path to TLS key file\n\n                This options value must be a path on the file system that must be\n                readable.\n\n\n    COPYRIGHT\n            Copyright (c) DataStax 2020\n\n    LICENSE\n            Please see https://www.apache.org/licenses/LICENSE-2.0 for more\n            information\n\n\n## Roadmap\n  * CQL based configuration changes\n  * Configuration as system table\n\n## License\n\nCopyright DataStax, Inc.\n\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\n\n## Dependencies\n\nFor information on the packaged dependencies of the Management API for Apache Cassandra\u0026reg; and their licenses, check out our [open source report](https://app.fossa.com/reports/cec8824e-b23c-455e-b40d-8117b346affc).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fk8ssandra%2Fmanagement-api-for-apache-cassandra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fk8ssandra%2Fmanagement-api-for-apache-cassandra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fk8ssandra%2Fmanagement-api-for-apache-cassandra/lists"}