IBM Cloud Docs
Getting started with the Event Streams CLI

Getting started with the Event Streams CLI

To install and set up the Event Streams CLI on the Lite, Standard, and Enterprise plans, complete the following steps:

Step 1. Install the IBM Cloud CLI

For more information about how to install the CLI, see Getting started with the IBM Cloud CLI.

Step 2. Log in to IBM Cloud

Run the following command to log in to IBM Cloud:

ibmcloud login -a cloud.ibm.com

Step 3. Create an Event Streams instance

Create an Event Streams instance on IBM Cloud by using the Lite, Standard, or Enterprise plans.

Select one of the following methods:

  • To create an instance from the IBM Cloud console, go to the Event Streams entry in the catalog.

  • To create an instance from the CLI on the Enterprise plan, run the following command:

    ibmcloud resource service-instance-create <INSTANCE_NAME> messagehub enterprise-3nodes-2tb <REGION>
    

    Because Enterprise has its own dedicated resources for each cluster, it requires more time for provisioning so a new Enterprise instance might take up to 3 hours.

  • To create an instance from the CLI on the Standard plan, run the following command:

    ibmcloud resource service-instance-create <INSTANCE_NAME> messagehub standard <REGION>
    

    Provisioning a new Standard instance is instantaneous because the underlying resources are already set up.

Step 4. Optional: Create a service API key for this instance

Optionally, you can create a service API key. Valid values for ROLE_NAME are Manager, Writer, and Reader. Their permissions are described in Managing access to your Event Streams resources.

  • To create an API key from the IBM Cloud console, enter the Service credentials from the instance page, and click New Credentials.

  • To create an API key from the CLI, run this command:

    ibmcloud resource service-key-create <KEY_NAME> <ROLE_NAME> --instance-name <INSTANCE_NAME>
    

Step 5. Install the Event Streams CLI plug-in

Run the following command:

ibmcloud plugin install event-streams

Step 6. Initialize the Event Streams plug-in

Before you can run any of the Event Streams CLI commands, you must first initialize the plug-in. Run the following command then select your Event Streams instance:

ibmcloud es init

For more information about the Event Streams CLI commands, see CLI reference.