Follow

How To: Remove a service from Ambari

This guide is written under the assumption that the person reading wants to remove an installed service from Ambari, for example Storm.

In order to remove/start/stop a service through Ambari's API authentication is required. The basis of the Curl statements is similar to the following:

"curl --user name:password -H "X-Requested-By: ambari" http://{your.ambari.server}/api/v1/clusters"

*Prior to deleting a service ensure that the service has been stopped and is no longer in a active state.

1) Verify Service is installed using Ambari's Rest API

Use the following Curl statement with the appropriate values substituted to verify that the service you wish to uninstall is currently installed.

curl -u admin:password -H "X-Requested-By: ambari" -X GET  http://AMBARI_SERVER_HOST:8080/api/v1/clusters/CLUSTER_NAME/services
 
,where
  1. admin and password are your Ambari credentials
  2. AMBARI_SERVER_HOST is your Ambari server host address
  3. CLUSTER_NAME is your cluster name

2) Delete Installed Service using Ambari's Rest API

A similar format for deleting a service is used to verify its existence. The following statement will remove the service from Ambari.

curl -u admin:password -H "X-Requested-By: ambari" -X DELETE  http://AMBARI_SERVER_HOST:8080/api/v1/clusters/CLUSTER_NAME/services/SERVICE_NAME
 
,where
  1. SERVICE_NAME is the name of the service to be removed from Ambari
 

*To verify the removal of the package from Ambari run command 1)  once again:

  1. You should notice that they service is no longer listed.
  2. Ambari will now offer you the option of installing the service, under ambari-url.com:8080/#/main/admin/stack/services

 

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk