Environment Creation

In this page we will explain how to utilise CLI for environment creation.

Prerequisites:

  • Running HQ;

  • Enough permissions to create a new Service Account;

  • Running Docker daemon.

1

  1. Go to IAM section.

    Main screen
  2. Click the "Service Account" Tab;

    IAM page
  3. Click on "New Service Account";

    Create new Service Account
  4. Fill in the mandatory fields. Make sure you assign a group with enough permissions to create new environments to the service account.

  5. Copy the service account key, which will be used later;

    More about service accounts.

2

Create a new environment

terminal
docker run -it lensting/lenses-cli:6-preview \
 environments create \
 --name dev-env --tier development \ 
 --address [HQ_URL] \
 --token sa_key_*

Output:

terminal
{
  "name": "dev-env",
  "display_name": "dev-env",
  "lrn": "environments:environment:dev-env",
  "id": "env_s9UdVL2uHr7btloc",
  "created_at": "2024-11-27T09:55:23.263588Z",
  "tier": "development",
  "status": {
    "agent_connected": false
  },
  "agent_key": "agent_key_*"
}

Last updated

Was this helpful?