1. Provisioning BYOC Infrastructure

Create a Cloud Environment

Public Preview

This feature is currently in Public Preview. Exercise caution before using this for provisioning production environments. If you encounter issues creating a Cloud Connection or Cloud Environment, please submit a ticket.

Note

This document assumes that you have already created a Cloud Connection allowing StreamNative to connect to your cloud account. If you have not yet done so, please create one, and then return to this page to continue setting up your Cloud Environment.

Overview

Cloud Environments set up your AWS, GCP, or Azure account with everything it needs to create and run Pulsar Clusters. You can create a Cloud Environment either through snctl, or StreamNative's terraform provider. Once you have created a Cloud Environment, you can create an Instance and Pulsar Cluster through the StreamNative Console

Create a Cloud Environment with snctl

To create a Cloud Environment using snctl, use snctl create cloudenvironment. Usage:

  snctl create cloudenvironment CLOUD_ENVIRONMENT_NAME --cloud-connection-name CLOUD_CONNECTION_NAME --region REGION --network-id NETWORK_ID --network-cidr NETWORK_CIDR
FlagDescription
--cloud-connection-nameThe name of cloud connection name.
--regionThe region of Cloud Environment. For Azure, it's the resource group name
-h, --helpDisplay help message for cloudenvironment
--network-cidrThe network cidr of Cloud Environment. Cannot be specified if network-id is specified.
--subnet-cidrThe subnet cidr of Cloud Environment. Only required for Azure environments when cidr is specified.
--network-idThe network id of Cloud Environment. Cannot be specified if cidr is specified.

Examples

AWS:

snctl create cloudenvionment usw1-dev --cloud-connection-name share-aws -n orgname

GCP:

snctl create cloudenvironment usw1-dev --cloud-connection-name shared-gcp --region us-west1 -n orgname

Azure:

snctl create cloudenvionment usw1-dev --cloud-connection-name share-azure -n orgname

Create a Cloud Environment with terraform

To create a Cloud Environment with terraform:

  1. Prepare main.tf
  2. Run terraform init
  3. Run terraform apply

Cloud Environment Schema

FieldTypeDescription
name, requiredStringName of the cloud environment
organization, requiredStringThe organization name
cloud_connection_name, read-onlyStringName of the cloud connection
id, read-onlyStringThe ID of this resource
network, read-onlyList of Objectsee 'network schema' below for nested schema
region, read-onlyStringThe cloud region in which this environment will be created
network schema, read-onlycidr (String), id (String)

Examples

resource "streamnative_cloud_environment" "usw1_dev" {
    organization = "orgname"
    name = "usw1-dev"

    cloud_connection_name = "shared_aws"
    region = "us-west-1"
    network {
        cidr = "10.60.0.0/16"
    }
}

Monitoring the Provisioning Process

Creating a Cloud Environment through Terraform does not immediately create the Cloud Environment, but rather kicks off a process that creates it. In order to monitor that process, you can use snctl.

snctl describe -n orgname cloudenvironment name-of-your-environment

Once snctl describe returns a status of True and a type of Ready your Cloud Environment has been provisioned, and you can create a Pulsar Cluster within it. This should take approximately 40 minutes.

If this command returns an error state, please reach out to the StreamNative support team.

Recommended default CIDR Values

If you are using a StreamNative-managed VPC as described in the documentation above, we recommend the following default CIDR values.

  • AWS
    • Default VPC CIDR: 10.60.0.0/16 (must between /16 and /28), but we suggest using /16 to /18, otherwise there will not be enough IP addresses.
    • The subnet CIDR will be calculated by VPC CIDR.
  • GCP
    • Default VPC CIDR: 10.0.0.0/16
  • Azure
    • Default VPC CIDR: 10.70.0.0/16
    • Default Subnet CIDR: 10.70.0.0/24
Previous
Create a Cloud Connection