| title | Environments | |
|---|---|---|
| description | Environments are how you organize your deployment targets (whether on-premises servers or cloud services) into resource groups. | |
| categories |
|
|
| aliases |
|
Environments are how you organize your deployment targets (whether on-premises servers or cloud services) into groups that represent the different stages of your deployment pipeline, for instance, development, test, and production. Environments allow you to logically group related Connections and their associated Credentials. Environments make it easier for you to manage, share, and work with a collection of resources as a group, instead of dealing with all your Connections and Credentials on an individual basis.
Assign any number of Connections to an environment whether that Connection is managed or unmanaged (see MeshSync to learn more about managed and unmanaged Connections). In-turn, assign any number of Environments to one or more [Workspaces]({{< ref "cloud/concepts/spaces/workspaces.md" >}}). Connections (and any associated Credentials) that are assigned to an Environment become immediately available for use in any associated Workspace.
Environments can share resources. For example, you might create an environment named "production" and assign three connections: a GitHub connection, a Kubernetes connection, and a Prometheus connection. Subsequently, you also define a an environment named "dev/test "and assign three connections: a different Kubernetes connection, a different Prometheus connection, and the same GitHub connection that is also assigned to the "production" environment.
Deleting an environment does not delete any resources (e.g. connections) currently contained with the environment. Resources that belong to others environments will continue to belong to those other environments. Learn more about the behavior of lifecycle of connections.
Environments represent a collection of resources in the form of Connections - both of managed and unmanaged Connections. Environment resources are comprised of Connections (and implicitly any Credentials used by those assigned Connections). Create and use environments to organize your connections and credentials into groups, and then make these resources available to you and your teams by assigning environments to Workspaces.
-
Logical Grouping Environments allow you to logically group related connections and their associated credentials. This makes it easier to manage, share, and work with a subset of resources instead of dealing with all your connections individually.
-
Resource Sharing Environments can be seamlessly assigned to [Workspaces]({{< ref "cloud/concepts/spaces/workspaces.md" >}}), another essential concept in Meshery. When you assign an Environment to a Workspace, you enable resource sharing among team members. This collaborative approach simplifies the sharing of connections and resources, making it easier to work together in cloud native environments.
Connections are an integral part of Environment. These are cloud native resources that can be both managed and unmanaged, and they're registered by the Meshery Server. Examples of connections include Kubernetes clusters, Prometheus instances, Jaeger tracers, and Nginx web servers.
See "Connections" in Meshery Docs for more information.
Credentials in an Environment are the keys to securely authenticate and access managed connections. For example, valid Prometheus secrets or Kubernetes API tokens are essential credentials for securely interacting with these managed resources.
See "Credentials" in Meshery Docs for more information.
Access to a Connection and therefore its associated Credentials is allowed if any of the following is true:
-
Direct ownership: The Connection Owner (UserID) matches the current user's ID.
-
Indirect access: The Connection is assigned to an Environment that is linked to a Workspace, and the current user is a member of a Team that has access to that Workspace. In other words, if a user is a member of a team that has access to a workspace that is linked to an environment containing the connection, then the user automatically inherits access control and authorization over the linked Environments, Connections, Credentials, Designs, and Views.
The following illustrates how Five and Zara set up multi-cloud environments at Orbital Labs, spanning AWS, GCP, and Azure. See [Meet Five and the Cast]({{< ref "cloud/getting-started/meet-five/_index.md" >}}) for the full seed inventory.
| Environment | Workspace | Cloud Provider | Connections |
|---|---|---|---|
prod-aws |
orbital-production | AWS | EKS cluster, RDS (PostgreSQL), S3, CloudFront, SQS |
prod-gcp |
orbital-production | GCP | GKE cluster, Cloud SQL, Cloud Storage, Pub/Sub |
staging-aws |
orbital-staging | AWS | EKS cluster, S3, ElastiCache |
staging-azure |
orbital-staging | Azure | AKS cluster, Azure Blob Storage, Azure Service Bus |
dev-local |
orbital-dev | Local | kind (local Kubernetes), LocalStack (AWS emulation) |
stellar-enterprise |
stellar-main | Azure | AKS, Azure SQL, Azure API Management, Azure AD |
Five connects Orbital Labs' primary AWS production environment to Layer5 Cloud:
- Navigate to Environments and click Create Environment
- Name it
prod-awsand save - Add connections one at a time — each connection is a discrete cloud resource:
- EKS cluster — the compute layer for deployed workloads
- RDS (PostgreSQL) — the managed database instance
- S3 bucket — object storage for design artifacts and state
- CloudFront distribution — CDN layer for the frontend
- SQS queue — async messaging between services
- Zara assigns
prod-awsto theorbital-productionworkspace, making all five connections available to Infrastructure team members
Five repeats the process for GCP to give Orbital Labs multi-cloud flexibility:
- Create environment
prod-gcp - Add connections:
- GKE cluster — Google Kubernetes Engine compute
- Cloud SQL — managed relational database on GCP
- Cloud Storage bucket — GCP object storage
- Pub/Sub topic — async messaging on GCP
- Zara assigns
prod-gcptoorbital-productionalongsideprod-aws
Both environments are now available to any design deployed within the orbital-production workspace.
{{< alert type="info" title="dev-local for Getting Started" >}}
The dev-local environment uses a local Kubernetes cluster (kind) and LocalStack to emulate AWS services — no cloud credentials required. If you are following along with these docs for the first time, start with dev-local in the orbital-dev workspace.
{{< /alert >}}