Install Apache Zepplin via REST & Ambari

The Ambari server offers a comprehensive REST API to install a complete HDP cluster or manage all parts of it. In this post we are going to explore the possibilities of installing a new service. With Ambari it is fairly easy to define custom services for management. With YARN being a general purpose execution engine Ambari can be seen as the general purpose management service. For this example we are using the Apache Zeppelin service provided here. A more general documentation of how to install a new service to an existing cluster can be found here.

Setup Zeppelin Service

In order to make use of the management hooks defined in the description provided by Ali we have to place it under our current HDP stack definition in Ambari server. In this case we use the HDP stack definition 2.3 of an Ambari 2.1 installation:

Installing Zeppelin to Existing Cluster

# Add a Service to the Cluster

The metainfo.xml describes the components of a service to be added to Ambari. Looking at the Zeppelin metainfo we see that it is named ZEPPELIN and consists of one host component ZEPPELIN_MASTER. First we have to add the ZEPPELIN service to the cluster:

 

Additionally the component of the services as to be added as well

With the above steps we’ve successfully setup a new service with it’s components in Ambari server. Finally we have to create necessary configurations for it and assign these configs to the cluster. Also the host component needs to be assigned to a host.

# Create Configuration

Zeppelin needs one configurations as again described in its metainfo.xmlzeppelin-config. Important is to define a type and tag for the configuration to reference later. The type is name of the configuration, while the tag is it version/reference. In Ambari every configuration is immutable! Changes are reflected by new tags.

What is in the zeppelin.conf file:

# Apply Configuration to the Cluster

Applying this to the cluster, means to choose the create config type and it’s tag as the current configuration for the service.

# Create Host Components

Now that we have the configuration and components in place we can assign them to hosts part of the cluster:

# Install & Start the Service

Last but not least we install the configured service:

Further Readings

 

1 thought on “Install Apache Zepplin via REST & Ambari”

Leave a Reply