Name: ambari-shell
Owner: Hortonworks Inc
Description: CLI for Apache Ambari
Created: 2014-04-09 19:37:50.0
Updated: 2017-12-05 02:54:48.0
Pushed: 2016-12-11 07:52:03.0
Size: 2607
Language: Java
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Ambari is aimed to help provision/manage/monitor Hadoop clusters. Although it has a REST API right now the only way to use ambari is by usingh the web-application.
Ambari Shell's aim is to provide an interactive command line tool which supports:
To implement ambari-shell the following options were evaluated:
Spring-Shell is also battle tested in various Spring projects including:
Ambari-Shell is distributed as a single-file executable jar. So no ClassNotFound
should happen. The uber jar
is generated with the help of spring-boot-maven-plugin available at: Spring-Boot.
Spring-Boot also provides a helper to launch those jars: JarLauncher.
After compiling the project, the shell is ready to use (make sure you use Java 7 or above).
-jar ambari-shell/target/ambari-shell-1.3.0-SNAPSHOT.jar --ambari.server=localhost --ambari.port=8080 --ambari.user=admin --ambari.password=admin
The --ambari
options can be omitted if they are the default values otherwise you only need to specify the difference, e.g just the port is different
-jar ambari-shell/target/ambari-shell-1.3.0-SNAPSHOT.jar --ambari.port=49178
_ _ _ ____ _ _ _
\ _ __ ___ | |__ __ _ _ __ (_)/ ___| | |__ ___ | || |
_ \ | '_ ` _ \ | '_ \ / _` || '__|| |\___ \ | '_ \ / _ \| || |
__ \ | | | | | || |_) || (_| || | | | ___) || | | || __/| || |
\_\|_| |_| |_||_.__/ \__,_||_| |_||____/ |_| |_| \___||_||_|
ome to Ambari Shell. For assistance press tab or use the `hint` command.
Please note that all commands are context aware - and are available only when it makes sense.
For example the cluster create
command is not available until a blueprint
has not been added or selected.
A good approach is to use the hint
command - as the Ambari UI, this will give you hints about the available commands and the flow of creating or configuring a cluster.
You can always use TAB for completion or available parameters.
Example:
Once you logged in you can say hello
.
.-.._
__ /` '.
.-' `/ ( a \
/ ( \,_ \
/| '---` |\ =|
` \ /__.-/ / | |
| / / \ \ \ \_\
|__|_| |_|__\
Initially there are no blueprints available - you cn add blueprints from file or URL. For your convenience we have added 2 blueprints as defaults.
You can get these blueprints by using the blueprint defaults
command. The result is the following:
UEPRINT STACK
------------------- -------
lti-node-hdfs-yarn HDP:2.0
ngle-node-hdfs-yarn HDP:2.0
Once the blueprints are available you can use them to create a cluster. You can use the following command: cluster build --blueprint single-node-hdfs-yarn
.
Now that the blueprint is selected you have to assign the hosts to the available host groups.
Use cluster assign --hostGroup host_group_1 --host server.ambari.com
.
You can always cluster reset
or cluster preview
to modify or check the configuration.
GROUP HOST
---------- -----------------
st_group_1 server.ambari.com
Once you are happy with you can choose cluster create
to start building the cluster. Progress can be checked either at Amabri UI or using the tasks
command.
SK STATUS
------------------------ -------
STORYSERVER INSTALL QUEUED
OKEEPER_SERVER START PENDING
OKEEPER_CLIENT INSTALL PENDING
FS_CLIENT INSTALL PENDING
STORYSERVER START PENDING
DEMANAGER INSTALL QUEUED
DEMANAGER START PENDING
OKEEPER_SERVER INSTALL QUEUED
RN_CLIENT INSTALL PENDING
MENODE INSTALL QUEUED
SOURCEMANAGER INSTALL QUEUED
MENODE START PENDING
SOURCEMANAGER START PENDING
TANODE START PENDING
CONDARY_NAMENODE START PENDING
TANODE INSTALL QUEUED
PREDUCE2_CLIENT INSTALL PENDING
CONDARY_NAMENODE INSTALL QUEUED
To sum it up in less than two minutes watch this video: