Creating a Deployment
A deployment represents a single tenant on the cluster. Until the cluster administrator creates one, that tenant cannot use Capacity Private Cloud, so creating deployments is one of the first administrative tasks on a new cluster. There are two ways to do it: interactively through the Admin Portal, or programmatically through the Management API.
Admin Portal
The cluster administrator is responsible for creating tenant deployments. To create one:
- On the Deployments page, click Create Deployment. On a new cluster this page is initially empty.
- Enter a name and description that will let you identify the tenant easily — the location, or any other distinguishing attribute, works well.
- Leave the Deployment ID blank unless you are recreating or importing an existing deployment from another cluster, in which case enter its ID here. Otherwise let the system generate one automatically; an automatically generated ID more reliably ensures uniqueness and security.
- Enter the connection strings for the external services — Redis, PostgreSQL, and MongoDB. Each string includes the endpoint, a username and password, and any connection options the service requires.
- If a connection string requires SSL, upload the corresponding security certificate using Manage Certificate so it is applied automatically, without manual intervention at connection time.
- Click Save. The new deployment then appears in the Deployments list.
Password restriction. The following characters are not supported within a connection-string password: [ ] { } ( ) , ; ? * = ! @ |
The connection strings follow the standard format for each service. For example:
Redisredis://:redis1234@10.128.0.47:6379
PostgreSQLpostgres://lvuser:postgres1234@10.128.0.47:5432/capacity_single_db?sslmode=disable
MongoDBmongodb://lvuser:mongo1234@10.128.0.47:27017
Management API
To create deployments programmatically — for example, when scripting cluster provisioning — use the Management API instead of the portal.
Create a deployment by calling the /Management/Deployment/Add REST API. This call also populates the encryption tables the new deployment needs, so it is operational immediately. The full reference is in the Management API documentation.
- To reuse an existing Deployment ID, supply it in the
customDeploymentIdfield; otherwise set that field to0and an ID is generated for you. - Provide the Redis, PostgreSQL, and MongoDB connection strings as a JSON object in the request body:
{
"deploymentMetadata": {
"description": "",
"name": "Example1"
},
"deploymentId": "1b546173-7333-4d79-a6fa-111118888",
"deploymentData": {
"MongoDbConnectionString": "mongodb+srv://lvuser-stg:examplePassword@mongoexample.com/?retryWrites=true&w=majority&appName=stg-example-speech-1&tls=true",
"PostgresConnectionString": "postgres://lvuser:examplePassword@postgres.example.com:5432/example_db?sslmode=disable",
"RedisConnectionString": "rediss-cluster://:examplePassword@redisexample.com:6379"
} |
The response returns the new deployment's ID.
To set the deployment's name and description, call the /Management/Deployment/Metadata/Set REST API. Pass the deployment's ID in the x-deployment-id header, and your chosen name and description in the JSON body:
| { "name": "Deployment Name", "description": "deployment description" } |
