- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
CLI tool to manage cluster
- Labels:
-
Apache Kafka
-
Cloudera Manager
Created on
‎02-17-2020
01:16 AM
- last edited on
‎02-17-2020
03:11 AM
by
VidyaSargur
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm planning to bring the Kafka as a Service. I would need any client or command-line tools to add a cluster. Right now, I'm able to add from Cloudera Manager, but I would want to do it from the CLI. Do we have any API or any leads to get this done?
Created ‎02-17-2020 03:24 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Cloudera Manager comes with an API. Here is a link to the Cloudera Manager API guide:
http://cloudera.github.io/cm_api/docs/quick-start/
Does that help?
Steve
Created ‎02-17-2020 03:24 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Cloudera Manager comes with an API. Here is a link to the Cloudera Manager API guide:
http://cloudera.github.io/cm_api/docs/quick-start/
Does that help?
Steve
Created ‎03-01-2020 09:44 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank You. This helped a lot. I wrote the scripts for the basic functionalities.
Created on ‎02-17-2020 04:02 AM - edited ‎02-17-2020 04:06 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can use the Cloudera Manager API call something like following to start/stop Kafka Service (or any desired service)
In order to stop "kafka" service:
# curl -iLv -u admin:admin -X POST --header 'Accept: application/json' 'ttp://dc-1.example.com:7180/api/v40/clusters/TestCluster/services/kafka/commands/stop'
In order to start "kafka" Service
# curl -iLv -u admin:admin -X POST --header 'Accept: application/json' 'ttp://dc-1.example.com:7180/api/v40/clusters/TestCluster/services/kafka/commands/start'
.
Please also take a look at the Cloudera Manager Swagger APIs.
Cloudera Manager(CM) 6.0 introduces new Python API client cm_client based on Swagger. This new API client supports all CM API versions.
https://cloudera.github.io/cm_api/docs/python-client-swagger/
.
Here please replace the CM credentials and cluster name in CM host port in the above mentioned API calls.
Created ‎03-01-2020 09:43 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you. This help me a lot.
