cloudsoft.io

Add an Application to Catalog (CLI)

Objectives

In this tutorial we will show you how to use the br command line utility to add an entry to the AMP catalog.

Pre-requisites

This tutorial assumes you have installed Cloudsoft AMP, and the AMP CLI (see the Tour of AMP CLI).

Instructions

Adding a MachineEntity

To add an application to the AMP catalog we start by defining a blueprint in YAML. Here we’ll make use of the MachineEntity entity which is used to provision and manage a machine.

brooklyn.catalog:
  version: 0.2.1-SNAPSHOT
  publish:
    description: Entities to deploy and manage Apache Spark nodes and clusters using Cloudsoft AMP
    license_code: Apache-2.0
    overview: README.md
    reference: catalog/reference.json
  items:
  - id: machine-entity
    name: Machine Entity
    description: A simple entity for deploying and managing a VM
    iconUrl: http://brooklyn.apache.org/style/img/bridge.png
    itemType: template
    item:
      services:
      - type: org.apache.brooklyn.entity.machine.MachineEntity

To add this to the catalog, save the file somewhere suitable and add it using the following command:

br catalog add ./machine-entity.bom

Use the Blueprint Repository

It is also possible to add entities directly from the Blueprint Repository using the following command:

br catalog add https://raw.githubusercontent.com/brooklyncentral/brooklyn-spark/master/catalog.bom

To view the applications that have been added to the catalog, simply go to the Catalog module, Applications tab within the AMP web console, or using the CLI:

br catalog list application

Note: To view entities rather than applications, change the type (location and policy are also available):

br catalog list entity

Summary

This add-catalog command is just one example of how an operation that can be carried out via the GUI can also be accomplished from the command line. Most AMP operations have command line support, see the usage guide and reference for more information.

Next