Skip to main content

Environments

Environments map to namespaces in Kubernetes. Kubernetes namespaces provide a mechanism for isolating groups of resources within a single cluster. You can deploy your application into an environment which uses existing infrastucture or instruct Wayfinder to create new infrastructure.

Administrators use Cluster Plans to define which types of environments are available to you or what types of new environments you can provision.

Prerequisite

You need to create an Application before you can create an environment.


CLI Quick Reference

InstructionCLI Command
Create an environmentwf create appenv --app NAME-OF-APP --env NAME-OF-ENV --cluster NAME-OF-CLUSTER --plan NAME-OF-CLUSTERPLAN --stage NAME-OF-STAGE --region REGION

View a list of existing Environments

You can view a list of existing environments:

  • With the wf get appenv CLI command
  • Using Wayfinder's web interface by selecting Workspaces, and then navigating to All Applications. Select your application's name and view the table entries under the Environments header.
wf get appenv

NAME APPLICATION CLUSTER NAMESPACE AGE
demo-dev demo aks-k2pv3 demo-dev 11d
demo-test demo aks-k2pv3 demo-mytest 5d23h
myapp-dev myapp aks-k2pv3 myapp-dev 73m

View available Cluster Plans (pre-defined infra configs)

Cluster plans enable Wayfinder's administrators to provide diverse infrastructure configurations to workspaces as environments. Each environment isolates your workloads to a specific stage, such as production or non-production. You select an environment that best suits the needs of your workloads. For instance, depending on your workload requirements and the options made available to you by your administrator, you can select between a low-cost/short-lived environment or a long-term/high-performance environment.

Refer to the deployment section for guidance on accessing the workload deployment manifests (YAML) generated by Wayfinder, and for instructions on seamlessly integrating with your CI system using access tokens, enabling automated workload deployments through your CI/CD pipelines.

You can view a list of cluster plans:

  • With the wf get clusterplans command
  • Using Wayfinder's web interface by expanding Workspaces, and then navigating to All Applications. Select your application's name and then click Step 3: Create environments.
    You have two options:
    • The Use existing option is useful if you want to share an existing cluster. This will share the same cluster plan that was used to build the cluster. Wayfinder uses the same cluster and creates a new namespace for your environment.
    • The Show new infra option is useful if you need a specific configuration that does not already exist, or you want an isolated cluster for this environment. Wayfinder creates a new cluster with an auto-generated name and then creates a namespace on that new cluster.

wf get clusterplans

NAME SUMMARY CLOUD AGE
aks-hardened Hardened AKS cluster with a default "restricted" PSS Policy, recommended for Production workloads. AKS 47d
aks-playground Low cost cluster configuration for testing purposes, default expiry TTL set to 7 days. AKS 47d
aks-standard General purpose AKS cluster. AKS 47d
eks-hardened Hardened EKS cluster with a default "restricted" PSS Policy, recommended for Production workloads. EKS 47d
eks-playground Low cost cluster configuration for testing purposes, default expiry TTL set to 7 days. EKS 47d
eks-standard General purpose EKS cluster. EKS 47d
gke-hardened Hardened GKE cluster with a default "restricted" PSS Policy, recommended for Production workloads. GKE 47d
gke-playground Low cost cluster configuration for testing purposes, default expiry TTL set to 7 days. GKE 47d
gke-standard General purpose GKE cluster. GKE 47d

Create a new Environment for your application

You can create a new environment:

  • With the wf create appenv CLI command
  • Using Wayfinder's web interface by selecting Workspaces, and then navigating to All Applications. Select your application's name and then click Step 3: Create environments. See the section above for a description of the available options.

Example 1 - Cluster Plan omitted

A cluster plan is not specified, so you must specify an existing cluster name. Wayfinder will create a new namespace on the existing cluster.

Use the following command:

wf create appenv --app NAME-OF-APP --env NAME-OF-ENV --cluster NAME-OF-CLUSTER --stage NAME-OF-STAGE

wf create appenv --app myapp --env dev --cluster aks-k2pv3 --stage nonprod

✔ Successfully provisioned the resource: "myapp-dev"

If you omitted both the cluster plan as well as the cluster name, then you will receive an error as follow:

wf create appenv --app myapp --env dev4 --stage nonprod

Error: specify either --cluster (-c) or --plan (-p)

You can view the manifest of the environment you created with the wf get appenv NAME-OF-APP -o yaml command.

wf get appenv myapp-dev -o yaml

spec:
application: myapp
cloud: azure
clusterRef:
group: compute.appvia.io
kind: Cluster
name: aks-k2pv3
namespace: ws-dmo
version: v2beta1
key: dev
name: dev
namespace: myapp-dev
stage: nonprod



Example 2 - Cluster Name omitted

Wayfinder will create a new cluster using the configuration specified in the cluster plan. The cluster's name will be auto-generated.

Use the following command:

wf create appenv --app NAME-OF-APP --env NAME-OF-ENV --plan NAME-OF-CLUSTERPLAN --stage NAME-OF-STAGE

wf create appenv --app myapp --env dev2 --plan aks-playground --stage nonprod

spec:
application: myapp
cloud: azure
clusterRef:
group: compute.appvia.io
kind: Cluster
name: aks-etolz <-- This is an auto-generated cluster name
namespace: ws-dmo
version: v2beta1
key: dev2
name: dev2
namespace: myapp-dev2
plan: aks-playground
stage: nonprod

This is similar to the Use existing option in Wayfinder's web interface.

New Environments


Example 3 - Specify Cluster Name and Cluster Plan

One of two things will happen:

  • If the cluster exists, Wayfinder will create a new namespace on the existing cluster. The cluster plan is ignored as the cluster already exists.
  • If the cluster does not exist, Wayfinder will create a new cluster according to the configuration specified in the cluster plan. If you did not specify a cluster name, then Wayfinder will auto-generate a cluster name.

Use the following command:

wf create appenv --app NAME-OF-APP --env NAME-OF-ENV --cluster NAME-OF-CLUSTER --plan NAME-OF-CLUSTERPLAN --stage NAME-OF-STAGE --region REGION

wf create appenv --app myapp --env dev3 --cluster devhost --plan aks-playground --stage nonprod --region uksouth

spec:
application: myapp
cloud: azure
clusterRef:
group: compute.appvia.io
kind: Cluster
name: devhost
namespace: ws-dmo
version: v2beta1
key: dev3
name: dev3
namespace: myapp-dev3
plan: aks-playground
region: uksouth
stage: nonprod


This is similar to the Show new infra option in Wayfinder's web interface.


New Environments