Manage Fleet EnvironmentsBeta
A fleet environment is a named, shared set of hosting settings that multiple services can use at once, instead of each service configuring its own size, replicas, and idle timeout separately.
About This Task
Use fleet environments when you want several services to share the same hosting behavior, for example a "Staging" or "Production" environment that multiple teams publish to. A service connected to an environment inherits its hosting settings read-only. If you update the environment, every connected service picks up the change.
You manage fleet environments from the Environments tab in organization settings. You choose whether a given service uses an environment or its own custom hosting settings when you create a service or manage an existing one.
Prerequisites
You must be an organization admin to create, edit, or delete environments. For details, see User Roles and Permissions.
Open the Environments Tab
- In Haystack Enterprise Platform, click your profile icon and choose Settings.
- Go to Organization>Environments.
Each environment's row shows its name and hosting settings, so you can compare environments or check one before you connect a service or edit it.
Create an Environment
- On the Environments tab, click Create environment.
- Give the environment a name.
- Set its hosting settings:
- Size: The t-shirt size for the environment, for example small, medium, or large.
- Min replicas and Max replicas: The minimum and maximum number of replicas available to services in this environment. These use the same validation ranges as a custom service's hosting settings.
- Idle timeout: The period of inactivity after which the environment's services go into standby to save resources.
- Click Create.
You can now select the environment when you create a service or change an existing service's hosting settings.
Edit an Environment
- On the Environments tab, find the environment and open it for editing.
- Update its name or hosting settings.
- Click Save. If you changed the size, confirm the change. Changing the size restarts every service connected to the environment. Changing min/max replicas or idle timeout doesn't need a confirmation.
Delete an Environment
Before you delete an environment, move any services that use it to a different environment or to custom hosting.
- On the Environments tab, find the environment you want to remove.
- Delete it and confirm.
If services still use the environment, the deletion fails.
Check an Environment's Resource Usage
Check CPU, memory, and replica usage to see whether a fleet environment has enough capacity for the services that share it. The charts cover all pods in the environment, not a single service.
- Go to Settings > Organization Settings and click Environments.
- Expand the panel of the environment you want to check.
- Use the CPU, Memory, and Replicas switch to choose which chart to display, one at a time.
- Select a time range preset to change the period shown. The presets are the same as on a service's Metrics tab.
If the charts are empty, check that at least one service from the environment is in your current workspace. The charts show data only in that case.
Read the Replicas Chart
To see which replicas ran in an environment and when replicas joined or left, use the Replicas chart. The chart shows one stacked band for each replica, in the same order and colors as the CPU and Memory charts. The height of the stack is the number of replicas running at that time. Compare it with the environment's Max replicas setting to see how close the environment came to its replica limit.
- Step shape: The chart shows steps, not sloping lines, because the replica count stays the same until it changes. The y-axis shows whole numbers only.
- Tooltip: Hover over the chart to see the time, the number of replicas running at that moment, and the name of each of those replicas. Replicas that weren't running at that time aren't listed.
Assign a Service to a Fleet Environment
You can assign a fleet environment to a service when you create it, or later from its hosting settings.
- When creating a service, use the Environment list in the hosting section of the setup step. Own (isolated) is selected by default.
- For an existing service, go to its Settings, open the Hosting section, and use the Environment list. Changing the environment restarts the service, so confirm the warning banner before you save.
For more on service hosting settings, see Manage a Service.
What To Do Next
- Create a service that uses one of your environments.
- Switch an existing service between an environment and custom hosting.
Related Information
Was this page helpful?