Add an Application to Catalog (CLI)


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


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


Adding to the catalog

To add an application to the AMP catalog we start by defining a blueprint in YAML. Here we’ll make use of the following blueprint containing a Compute and a SoftwareComponent node.

tosca_definitions_version: tosca_simple_yaml_1_3

  template_name: tosca-demo-0
  template_version: 1.0.0-SNAPSHOT

      type: tosca.nodes.Compute
      type: tosca.nodes.SoftwareComponent
        - host: a_server

To add this to the catalog, save the file in a suitable directory, navigate to the directory, and run:

br catalog add .

The CLI will automatically ZIP the directory to create the TOSCA CSAR archive which is sent and installed at the server.

You can of course also install a CSAR ZIP directly, either one you have built or one you have access to, by supplying the path or URL to the ZIP as the argument to add, instead of the . (which means to use the current working directory):

br catalog add https://your.url/

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.

  version: 0.2.1-SNAPSHOT
    description: Entities to deploy and manage Apache Spark nodes and clusters using Cloudsoft AMP
    license_code: Apache-2.0
    reference: catalog/reference.json
    - id: machine-entity
      name: Machine Entity
      description: A simple entity for deploying and managing a VM
      itemType: template
          - 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 ./

or use a URL directly:

br catalog add

You can also install a ZIP file or directory (including .) provided that the ZIP or directory contain a descriptor.

Viewing the catalog

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


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.