Skip to content

oleewere/ambarictl

Repository files navigation

Ambari manager client

GoDoc Widget Build Status Go Report Card license

Install

Installation on Mac OSX

brew tap oleewere/repo
brew install ambarictl

Installation on Linux

Using wget:

wget -qO- https://github.com/oleewere/ambarictl/releases/download/v0.4.4/ambarictl_0.4.4_linux_64-bit.tar.gz | tar -C /usr/bin -zxv ambarictl

Using curl:

curl -L -s https://github.com/oleewere/ambarictl/releases/download/v0.4.4/ambarictl_0.4.4_linux_64-bit.tar.gz | tar -C /usr/bin -xzv ambarictl

Usage

Initialize Ambari registry db

ambarictl init

Create Ambari server entry

Ambari server entry contains informations about the Ambari server.

ambarictl create # it will ask inputs from the user like cluster name, Ambari server host etc.

Delete Ambari server entry

# use a Ambari server id that was created before
ambarictl delete $AMBARI_SERVER_ID

Create connection profile

Connection profile contains informations about how to ssh into Ambari agent machines.

ambarictl profiles create # it will ask inputs from the user like ssh key path, need host jump etc.

Attach connection profile to Ambari server

# use a profile id that was created before
ambarictl attach $CONNECTION_PROFILE_ID

Run example command on specific hosts

ambarictl run 'echo hello' -c INFRA_SOLR

Run example playbook

ambarictl playbook -f examples/print-configs.yml

Download logs for specific components

ambarictl logs -d /tmp/downloaded/logs -c INFRA_SOLR

Developement

Build

make build