You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by vg...@apache.org on 2011/10/05 04:08:05 UTC
svn commit: r1179039 - in /incubator/ambari/trunk: CHANGES.txt
src/site/apt/cli.apt src/site/site.xml
Author: vgogate
Date: Wed Oct 5 02:08:04 2011
New Revision: 1179039
URL: http://svn.apache.org/viewvc?rev=1179039&view=rev
Log:
AMBARI-36
Added:
incubator/ambari/trunk/src/site/apt/cli.apt
Modified:
incubator/ambari/trunk/CHANGES.txt
incubator/ambari/trunk/src/site/site.xml
Modified: incubator/ambari/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1179039&r1=1179038&r2=1179039&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Wed Oct 5 02:08:04 2011
@@ -4,6 +4,8 @@ Release 0.1.0 - unreleased
AMBARI-37. Tidies up a bit the statemachine API and related classes (ddas)
+ AMBARI-36. Add CLI interface document to Ambari site (vgogate)
+
AMBARI-35. Replaces the counters for keeping track of service/role start/stop
with iterators. (ddas)
Added: incubator/ambari/trunk/src/site/apt/cli.apt
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/src/site/apt/cli.apt?rev=1179039&view=auto
==============================================================================
--- incubator/ambari/trunk/src/site/apt/cli.apt (added)
+++ incubator/ambari/trunk/src/site/apt/cli.apt Wed Oct 5 02:08:04 2011
@@ -0,0 +1,341 @@
+~~ Licensed to the Apache Software Foundation (ASF) under one or more
+~~ contributor license agreements. See the NOTICE file distributed with
+~~ this work for additional information regarding copyright ownership.
+~~ The ASF licenses this file to You under the Apache License, Version 2.0
+~~ (the "License"); you may not use this file except in compliance with
+~~ the License. You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing, software
+~~ distributed under the License is distributed on an "AS IS" BASIS,
+~~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+~~ See the License for the specific language governing permissions and
+~~ limitations under the License.
+~~
+Command Line Interface
+
+ Ambari Client implements a convenient command line interface for administrators to
+ manage the full life of Hadoop clusters. CLI is a thin client implemented using
+ Ambari REST APIs. By design, there is a close mapping between CLI and REST APIs, where
+ most of the logic is implemented in the REST API.
+
+ []
+
+ General syntax of the CLI command is as follows,
+
+ * Ambari commands are divided into multiple command categories typically named after
+ the resources them operate on e.g. cluster, node, blueprint etc.
+
+ * Each command starts with command category followed by one of the commands in that category,
+ followed by one or more options available for the command e.g.
+
+ * ambari \[command_category\] \[command_name\] \[command_options\]
+
+ * Command options can follow in any order. Options are prefixed with "--".
+
+ * Each option would have at most one value associated with it. Value is either a string e.g. --name "MyCluster"
+ or a key=value pair e.g. --role rolename="hostname1, hostname[10-20]"
+
+ * Certain command options can be repeated multiple times on the command line, they are marked accordingly
+ using tag <<[REPEATABLE]>>.
+
+ * All the required options are marked as <<[REQUIRED]>>
+
+ * Generic commands do not have any category associated with them e.g. help, version
+
+ []
+
+ Ambari Commands
+
+ * <<Cluster commands>>
+
+ * cluster \{create | update | delete | list | rename | blueprint | nodes\}
+
+ * <<Blueprint commands>>
+
+ * blueprint \{list | history | add | get\}
+
+ * <<Node commands>>
+
+ * nodes \{node | list | get\}
+
+ * <<Generic commands>>
+
+ * help
+
+ * version
+
+
+Cluster Commands
+
+ * <<cluster create>>
+
+ * It submits the cluster creation request with the Ambari. It may take some time to bring
+ the cluster to desired state and hence the state should be checked either through list command or user
+ can optionally wait for cluster to reach the desired goal state.
+
+ * <<Options:>>
+
+ * <<--name>> [ NAME ] <<[REQUIRED]>>
+
+ * <<--desc>> [ DESCRIPTION ]
+
+ * Ambari will add default description
+
+ * <<--blueprint>> [ BLUEPRINT NAME ] <<[REQUIRED]>>
+
+ * Name of the user defined blueprint defining cluster configuration
+
+ * <<--goalstate>> [ACTIVE]
+
+ * Default is INACTIVE
+
+ * <<--services>> [component-1, component-2, component-3]
+
+ * By default all the components w/ services associated with them will be activated upon cluster activation.
+ If user specifies specific ones then only they will be activated upon cluster activation
+
+ * <<--nodes>> [node_range_exp1, node_range_exp2] <<[REQUIRED]>>
+
+ * Specify range of nodes associated with the cluster. One or more node range expressions can be specified
+ separated by comma. If user has not explicitly specified role to nodes association using --role option then
+ Ambari will assign the role(s) to nodes based on node attributes. If user wants to view the role to nodes
+ association generated by Ambari, use --dry_run option
+
+ * <<--role>> rolename=[node_range_exp1, node_range_exp2, â¦] <<[REPEATABLE]>>
+
+ * One or more --role options can be used to specify the association of nodes to various roles. Any nodes not
+ explicitly associated with any role, Ambari will associate them to various roles based on node attributes.
+
+ * <<--dry_run>>
+
+ * Execute the command without actually making the changes effective.
+
+ * <<--wait>>
+
+ * Optionally wait for cluster to get to goal state
+
+ []
+
+ * <<cluster update>>
+
+ * It updates the cluster definition. All the options except name are OPTIONAL
+
+ * <<Options:>>
+
+ * <<--name>> [ NAME ] <<[REQUIRED]>>
+
+ * <<--desc>> [ DESCRIPTION ]
+
+ * <<--blueprint>> [ BLUEPRINT NAME ]
+
+ * <<--goalstate>> [ACTIVE/INACTIVE/ATTIC]
+
+ * <<--services>> [component, component, component]
+
+ * Specify the list of desired active components
+
+ * <<--nodes>> [node_range_exp1, node_range_exp2]
+
+ * Specify range of nodes associated with cluster. Ambari controller will figure out the
+ changes and accordingly allocate/deallocate the nodes.
+
+ * <<--role>> rolename=[node_exp1, node_exp2, â¦] <<[REPEATABLE]>>
+
+ * Ambari controller will figure out the changes and accordingly allocate/deallocate the nodes
+ associated with the role
+
+ * <<--dry-run>>
+
+ * This will show the details of the changes being made to cluster definition without actually
+ submitting them to Ambari controller
+
+ * <<--wait>>
+
+ * Wait for cluster to get to desired goal state
+
+ []
+
+ * <<cluster rename>>
+
+ * Renames the cluster
+
+ * <<Options:>>
+
+ * <<--name>> [NAME] <<[REQUIRED]>>
+
+ * <<--newname>> [NEW NAME] <<[REQUIRED]>>
+
+ []
+
+ * <<cluster delete>>
+
+ * Delete the cluster. It inactivates the cluster. Controller in the background would free all
+ the associated nodes and then remove the cluster definition at the end.
+
+ * <<Options:>>
+
+ * <<--name>> [NAME] <<[REQUIRED]>>
+
+ * <<--wait>>
+
+ * Optionally wait for cluster to be deleted
+
+ []
+
+ * <<cluster list>>
+
+ * List clusters. In a non-verbose mode, list cluster will return the basic metadata of the
+ cluster and the current state of the cluster e.g. [ID, NAME, STATE, DATE CREATED, ACTIVE_SERVICES]
+
+ * <<Options:>>
+
+ * <<--name>> [NAME]
+
+ * Optionally only list the cluster with specified name. If no name specified then all the clusters are listed
+
+ * <<--verbose>>
+
+ * This option will provide verbose cluster definition as used while adding or updating the cluster.
+ It is displayed as JSON document.
+
+ []
+
+ * <<cluster blueprint>>
+
+ * It displays the blueprint configuration associated with the cluster. Optionally --expand option
+ would provide derived blueprint configuration as generated by overriding the parent blueprint.
+
+ * <<Options:>>
+
+ * <<--name>> [CLUSTER_NAME] <<[REQUIRED]>>
+
+ * Cluster name
+
+ * <<--file>> [Local File Path]
+
+ * Optionally stores the configuration to local file path. If not specified it displays it on the console.
+
+ * <<--expand>>
+
+ * Optionally specify this option to get expanded blueprint by inlining the parent blueprint
+
+ []
+
+ * <<cluster nodes>>
+
+ * List the nodes associated with specified cluster
+
+ * <<Options:>>
+
+ * <<--name>> [CLUSTER_NAME] <<[REQUIRED]>>
+
+ * Cluster name
+
+ * <<--alive>> [true/false]
+
+ * Optionally specify the node state alive as true or false. Alive nodes are ones
+ regularly heart beating with Ambari controller. If this option is not specified then all nodes are returned.
+
+ * <<--role>> [ROLE_NAME] <<[REPEATABLE]>>
+
+ * Optional role name to list the nodes associated with specified role.
+
+ []
+
+Blueprint Commands
+
+ * <<blueprint list>>
+
+ * List all the blueprints.
+
+ * <<Options:>>
+
+ * <<--name>> [BLUEPRINT_NAME]
+
+ * Optionally specify the blueprint name to list the specific one.
+
+ * <<--tree>>
+
+ * Optionally list the blueprints with associated blueprints and clusters for each blueprint
+
+ []
+
+ * <<blueprint history>>
+
+ * List all the revisions of a specified blueprint
+
+ * <<Options:>>
+
+ * <<--name>> [NAME] <<[REQUIRED]>>
+
+ * Name of the blueprint.
+
+ []
+
+ * <<blueprint add>>
+
+ * Add blueprint to Ambari.
+
+ * <<Options:>>
+
+ * <<--file>> [FILE_NAME]
+
+ * Specify file name of the blueprint to be imported into Ambari
+
+ []
+
+ * <<blueprint get>>
+
+ * Get the blueprint document in JSON format
+
+ * <<Options:>>
+
+ * <<--name>> [NAME] <<[REQUIRED]>>
+
+ * <<--revision>> [NUMBER]
+
+ * Optionally specify revision number else returns latest one
+
+ []
+
+Node Commands
+
+ * <<node list>>
+
+ * List all the nodes registered with Ambari for various clusters. Host name and associated cluster name is displayed.
+
+ * <<Options:>>
+
+ * <<--verbose>>
+
+ * Optionally verbose option will display node state and attributes information. List will be displayed
+ as a JSON document
+
+ []
+
+ * <<node get>>
+
+ * Node information is displayed as a JSON document including node attributes, node state, associated cluster,
+ list of roles and servers associated with node with their current state etc.
+
+ * <<Options:>>
+
+ * <<--name>> [NAME] <<[REQUIRED]>>
+
+ * Node name
+
+ []
+
+Generic Commands
+
+ * <<help>>
+
+ * Provides the CLI help
+
+ []
+
+ * <<version>>
+
+ * Ambari CLI version
Modified: incubator/ambari/trunk/src/site/site.xml
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/src/site/site.xml?rev=1179039&r1=1179038&r2=1179039&view=diff
==============================================================================
--- incubator/ambari/trunk/src/site/site.xml (original)
+++ incubator/ambari/trunk/src/site/site.xml Wed Oct 5 02:08:04 2011
@@ -38,6 +38,7 @@
<item name="Introduction" href="index.html"/>
<item name="Download" href="download.html"/>
<item name="REST API" href="rest.html"/>
+ <item name="CLI" href="cli.html"/>
</menu>
<menu ref="reports"/>