incubator-ambari-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Siddharth Wagle <swa...@hortonworks.com>
Subject Re: Re: Re: How to monitor added service in Ambari stack?
Date Mon, 08 Jul 2013 18:09:47 GMT
Hi Ying,

Following are the curl calls for configurations that should work for you,

curl -u admin:admin -i -X POST -d '{"type": "test-site", "tag": "version1",
"properties" : { "test" : "test" }}'
http://localhost:8080/api/v1/clusters/c1/configurations

curl -u admin:admin -i -X PUT -d '{ "Clusters" : {"desired_configs":
{"type": "test-site", "tag" : "version1" }}}'
http://localhost:8080/api/v1/clusters/c1

One more suggestion, the cluster creation and service creation can be
replicated by looking at the web browser console and filtering out the PUT
and POST calls that the Ambari web UI makes to the Ambari backend. The web
UI uses the same REST calls that can be used from "curl" - like web client.
If you can deploy a cluster on a VM and capture these calls, the same calls
can be modified and replayed to add new service, etc.

For the exception regarding the service installation, could you check if
the host components in Step 5 were actually created. Following API call
will give you plenty of info,
http:://localhost:8080/api/v1/clusters/c1/services/HDFS/components?fields=*

Here is the doc link to help understand the API design,
https://github.com/apache/ambari/blob/trunk/ambari-server/docs/api/v1/index.md

Best Regards,
Sid



On Sun, Jul 7, 2013 at 10:21 PM, YingZhu <guyanlizhu@126.com> wrote:

> Hello Siddharth,
> I have changed "config" to "desired_configs" but get the same error:
> status: 400 message: UnsupportedException: The properties
> [desired_configs/mdss] specified in the request or predicate are not
> supported for the resource type Cluster.
>
>
> Thanks,
> Ying Zhu
>
> At 2013-07-05 23:40:46,"Siddharth Wagle" <swagle@hortonworks.com> wrote:
>
> Hello Ying,
>
> Could you please provide the API call made for Step 4?
> You might have to change "config" to "desired_configs"
>
> Example:
> curl -u admin:admin -i -X PUT -d '{"desired_configs": {"core-site":
> "version1363902625" }}' http://<cluster-name>:8080/api/v1/clusters/c1
>
> Feel free to leave comments or update the wiki page.
>
> On Step 6, the exception suggests that the API call is trying to Create a
> service that is already installed. You can call this API to get the current
> state of the service,
>
> http://
> <ambari-server-host>:8080/api/v1/clusters/<cluster-name>/services/<service-name>
>
> Best Regards,
> Sid
>
>
> On Fri, Jul 5, 2013 at 3:35 AM, YingZhu <guyanlizhu@126.com> wrote:
>
>>
>> Hello Satish,
>>       Actually I broke down the work of adding service to ambari into two
>> pieces, the client side(writing the essential puppet ant python scripts)
>> was handled to another guy in the team and I'm trying to implement the
>> server side, the previous mail was posted for him. However after I finished
>> the following steps I still can not add service to the server side, the
>> ambari version I'm using is 1.2.3.7-1, os is CentOS 6.3.
>> 1. Add a new Role to Role.java, e.g. MDSS, and recompile the server
>> side's jar package.
>> 2. Create the new service's metainfo.xml and configuration files in
>> /var/lib/ambari-server/resources/stacks.
>> 3. Restart ambari server using the jar package in step 1, and follow
>> exactly the instructions in this page:
>>
>> https://cwiki.apache.org/confluence/display/AMBARI/Adding+a+New+Service+to+an+Existing+Cluster
>> Here was the problem:
>> I successfully passed step 1,2,3 but failed on step 4, the error message
>> was:
>> status: 400 message: UnsupportedException: The properties [config/mdss]
>> specified in the request or predicate are not supported for the resource
>> type Cluster.
>> Then I chose to skip step 4 but on step 6 I failed again, the error
>> message was:
>> status: 400 message: Invalid desired state only INIT state allowed during
>> creation, providedDesiredState = INSTALLED.
>> I'm wondering if anyone on this list has successfully add service to
>> ambari, if so please show me some tips on it?
>>
>> Thanks,
>>           Ying Zhu
>>
>> At 2013-07-04 02:24:40,"Satish Abburi" <satish.abburi@gmail.com> wrote:
>>
>> Hi Ying, are you able to successfully add a custom service to Ambari
>> stack and install/configure this? We also have the similar requirement and
>> seeing some null pointers…any tips are appreciated.
>>
>> Thanks,
>> Satish
>>
>>
>> On Tue, Jul 2, 2013 at 11:08 PM, Mahadev Konar <mahadev@hortonworks.com>wrote:
>>
>>> Hi Ying,
>>>  Thanks for looking into Ambari. On the monitoring side the doc is a
>>> little incomplete. You can take a look at how hadoop works and you can
>>> replicate it with the service you are adding for now unless Sid/Tom have
>>> sometime to update the doc.
>>>
>>> thanks
>>> mahadev
>>>
>>> On Tue, Jul 2, 2013 at 5:38 AM, YingZhu <guyanlizhu@126.com> wrote:
>>>
>>>> Hello list,
>>>>       I'm working on adding new services to Ambari stack according to
>>>> this guide
>>>>
>>>> https://cwiki.apache.org/confluence/display/AMBARI/Adding+a+New+Service+as+part+of+the+Stack+Definition
>>>> But unfortunately it lacks the steps about how to enable monitoring
>>>> capabilities for the newly added services using
>>>> ganglia. Is there any clue on how can I do this? Thanks in advance.
>>>>
>>>> Ying Zhu
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>
>>
>>
>
>
>

Mime
View raw message