Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created on 05-15-2016 11:50 PM - edited 09-16-2022 03:19 AM
Hello,
I'm using cm_api in python to install cloudera cdh5.7. I have an apiException while configuring sentry server.
All parameters for sentry database like "sentry_server_database_port" or "sentry_server_database_password" are unknown.
Somebody can tell me how to solve the problem?
Do i need a particular cm_api version?
Thanks!
Created 05-16-2016 02:55 AM
You don't need a particular version, only need to update the Sentry configuration example
from cm_api.api_client import ApiResource
api = ApiResource("cm-server-host")
cluster = api.get_cluster("_CLUSTER_NAME_")
service = cluster.create_service("sentry","SENTRY")
# Service-Wide
# sentry_server_database_host: Assuming embedded DB is running from where embedded-db is located.
service_config = {"sentry_server_database_host": "sentry-db.host.here",
"sentry_server_database_user": "sentry",
"sentry_server_database_name": "sentry",
"sentry_server_database_password": "cloudera",
"sentry_server_database_port": "7432",
"sentry_server_database_type": "postgresql"}
service.update_config(service_config)
# eg: fetch all hosts>hostId
# print [host.hostId for host in api.get_all_hosts()]
host = [host for host in api.get_all_hosts()][0]
service.create_role("sentry", "SENTRY_SERVER", host.hostId) Ref: https://github.com/gdgt/cmapi
Created 05-16-2016 02:55 AM
You don't need a particular version, only need to update the Sentry configuration example
from cm_api.api_client import ApiResource
api = ApiResource("cm-server-host")
cluster = api.get_cluster("_CLUSTER_NAME_")
service = cluster.create_service("sentry","SENTRY")
# Service-Wide
# sentry_server_database_host: Assuming embedded DB is running from where embedded-db is located.
service_config = {"sentry_server_database_host": "sentry-db.host.here",
"sentry_server_database_user": "sentry",
"sentry_server_database_name": "sentry",
"sentry_server_database_password": "cloudera",
"sentry_server_database_port": "7432",
"sentry_server_database_type": "postgresql"}
service.update_config(service_config)
# eg: fetch all hosts>hostId
# print [host.hostId for host in api.get_all_hosts()]
host = [host for host in api.get_all_hosts()][0]
service.create_role("sentry", "SENTRY_SERVER", host.hostId) Ref: https://github.com/gdgt/cmapi
Created 05-16-2016 07:30 AM
Thanks
I used an external postgresql databases. Everything worked fine!
Created on 07-17-2017 08:42 AM - edited 07-17-2017 08:44 AM
Is there any step by step guide
Created 05-20-2019 09:22 PM