Initial Setup

Setting up the Streamlio Cloud for consumption by the users in the enterprise

Getting Admin tokens

Once the Streamlio Cloud instance is ready, you will receive the AWS secrets location of where the initial set of admin tokens are safely stored. The secrets location will be specified by Amazon Resource Name (ARN) as follows:

arn:aws:secretsmanager:REGION:ACCOUNT-ID:secret:streamlio/INSTANCE-admin-tokens
  • ACCOUNT_ID - Amazon AWS account where the Streamlio Cloud instance was created

  • REGION - AWS region of the ARN

  • INSTANCE - Name of the Streamlio Cloud instance

For example, if the company name is acompanyand the environment is staging, the account id is 01234567890, and the region is us-east-1 your ARN will be

arn:aws:secretsmanager:us-east-1:01234567890:secret:streamlio/staging-acompany-admin-tokens

You can retrieve the secret using the following command:

aws secretsmanager get-secret-value \
--secret-id arn:aws:secretsmanager:REGION:ACCOUNT-ID:secret:streamlio/INSTANCE-admin-tokens \
--region us-east-1 \
--output json

The secret will contain several admin tokens. These tokens have "super-user" access to the Streamlio Cloud, with permission to do all the operations. Once you have the admin tokens, setup and configure the streamlio CLI with one of these tokens, as described in the section, Getting Started.

Administrator can create new additional tokens for users using the streamlio token command, as described in Authentication section. For example,

streamlio token create --role=my-role

As the next step, you need to create tenants and namespaces and assign administrators for them.

Create a tenant

A Streamlio Cloud instance can be shared across multiple tenants or teams within an enterprise. For each tenant, you can assign one or more administrators that will be allowed to do any operation for it. For example, you can create a tenant named tenant-a and assign any user with the token for my-role act as administrators using the following command:

pulsar-admin tenants create tenant-a --admin-roles my-role

Create a namespace

Each tenant can have several namespaces. You need to create a namespace within a tenant for publishing and consuming data. Either a super-user or tenant administrator can create a namespace in a tenant. For example, to create a namespace namespace-a in tenant-a you need to issue the following command:

pulsar-admin namespaces create tenant-a/namespace-a

Once the namespace is created, the tenant administrator or super-user can grant permission to use it:

pulsar-admin namespaces grant-permission tenant-a/namespace-a \
--actions produce,consume,functions \
--role some-user-role

At this point, any user with some-user-role will be able to connect to Streamlio Cloud and produce/consume messages on the tenant-a/namespace-a namespace.

Testing with CLI tools

You can test publishing on a topic from the CLI using the pulsar-perf tool.

pulsar-perf produce persistent://tenant-a/namespace-a/my-topic --rate 100

The tool will keep publishing messages at the set rate until stopped and it will print throughput and latency stats every 10 seconds.

Similarly you can receive messages from CLI:

pulsar-perf consume persistent://tenant-a/namespace-a/my-topic -s my-subscription

Using Pulsar client library

See the "Programming Examples" sections for instructions on how to configure clients to talk with the Streamlio Cloud cluster.

_____ Copyright 2019 Streamlio, Inc. Apache, Apache BookKeeper, Apache Pulsar and associated open source project names are trademarks of the Apache Software Foundation.