Author: jaimin
Date: Mon Apr 15 22:12:33 2013
New Revision: 1468249
URL: http://svn.apache.org/r1468249
Log:
AMBARI-1558. Script to add host components to existing hosts. (yusaku via
jaimin)
Added:
incubator/ambari/trunk/ambari-server/src/main/resources/scripts/
incubator/ambari/trunk/ambari-server/src/main/resources/scripts/add-host-component.sh
Modified:
incubator/ambari/trunk/CHANGES.txt
Modified: incubator/ambari/trunk/CHANGES.txt
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1468249&r1=1468248&r2=1468249&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Mon Apr 15 22:12:33 2013
@@ -12,6 +12,8 @@ Trunk (unreleased changes):
NEW FEATURES
+ AMBARI-1558. Script to add host components to existing hosts. (yusaku via
jaimin)
+
AMBARI-1936. Support for installing on mixed OS versions install + mgmt.
(swagle)
AMBARI-1924. Allow for users to customize Ganglia gmetad + gmond user
Added:
incubator/ambari/trunk/ambari-server/src/main/resources/scripts/add-host-component.sh
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-server/src/main/resources/scripts/add-host-component.sh?rev=1468249&view=auto
==============================================================================
---
incubator/ambari/trunk/ambari-server/src/main/resources/scripts/add-host-component.sh
(added)
+++
incubator/ambari/trunk/ambari-server/src/main/resources/scripts/add-host-component.sh
Mon Apr 15 22:12:33 2013
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+CLUSTER_NAME=$1
+HOST_NAME=$2
+COMPONENT_NAME=$3
+
+curl -i -u admin:admin -X POST -d "{
+\"host_components\": [
+{\"HostRoles\" : { \"component_name\": \"${COMPONENT_NAME}\"} }
+]}"
http://localhost:8080/api/v1/clusters/${CLUSTER_NAME}/hosts?Hosts/host_name=${HOST_NAME}
+
+curl -i -u admin:admin -X PUT -d '{ "HostRoles": {"state": "INSTALLED"
+} }'
http://localhost:8080/api/v1/clusters/${CLUSTER_NAME}/host_components?HostRoles/host_name=${HOST_NAME}\&HostRoles/component_name=${COMPONENT_NAME}\&HostRoles/state=INIT
+