Community Articles
Find and share helpful community-sourced technical articles
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.
Labels (1)

Although as of Cloudbreak 2.8.0 there is no way to manage cluster templates in the Cloudbreak web UI, you can generate a reusable template from the UI and then reuse it for creating clusters via Cloudbreak CLI. In this blog post, I describe the steps for how to do this.

Step 1: In the web UI, provide cluster parameters and generate a cluster template

1.In the Cloudbreak web UI, navigate to Clusters and then click on Create cluster.

2.To obtain a full list of cluster options, click on Advanced.

3.Provide all the parameters for your cluster.

4.Once done, on the last page of the create cluster wizard, click on Show CLI Command.

5.Click on Copy the JSON to copy the generated CLI skeleton.

6.Paste it into a text editor and save the file onto your computer in .JSON format.

7.Open the file and review it to ensure that no parameters are missing. Save the file once you are done editing.

Step 2: Create clusters via CLI from the template

1.Download and configure Cloudbreak CLI. Refer to Install CLI and Configure the CLI.

2.To create a cluster from the template generated in the previous step, use the following command:

cb cluster create --cli-input-json <path-to-the-cluster-template>

For example:

cb cluster create --cli-input-json /Users/myuser/Documents/mytemplate.json

More options

If you would like to create multiple clusters from one template, you will have to provide a different name for each cluster. You can do this by not specifying the cluster name in the template, but passing it with each cb cluster create command. For example:

cb cluster create --name mycluster1 --cli-input-json /Users/myuser/Documents/mytemplate.json

As an alternative for generating cluster template from the UI, you can use the following command to generate a cluster template:

cb cluster generate-template 

However, when specifying many advanced options (such as custom Ambari and stack repos), I find it easier, faster, and more precise to generate a template from the UI.

481 Views
Comments
New Contributor

This is very nice, but I went even further (I would even say much further) and created an Ansible role for CloudBreak configuration and cluster deployment.
However can't share it yet as of now due to disclosure with my client.

@Jakub Igla That's great!

This article that I posted describes very basic functionality. I posted it because I realized that now everyone knew about it.

Don't have an account?
Coming from Hortonworks? Activate your account here
Version history
Revision #:
1 of 1
Last update:
‎09-14-2018 11:20 PM
Updated by:
 
Contributors
Top Kudoed Authors