Groups let you split your services along boundaries that make sense for your team.
Groups are collections of services in your workspace. Groups can be used to split services by team, workload (public or private) or by hardware.
Each service in a PowerTools workspace declares a group that it belongs to:
# service.yml group: main
.powertools/workspace.yml schema is how you configure groups:
# .powertools/workspace.yml groups: - name: main instance_type: c3.large disk_size: 500gb instances: 1 - 10
Each group exists in each environment. You can think of environments as a way to control what stage a service is in (from test to released), while groups describe what type of service it is.
You can use groups to create boundaries between services.
You can split services by team, by creating a new group for each team. The
users block for a group let's you control
who has access to develop, deploy and operate the services in that group.
Splitting services by workload such as "public", "private" or "priority" can be useful. Depending on what type of systems your team builds, PowerTools groups can be used to split and isolate workloads.
A common best practice is to run all public services in their own group.
Groups can be used to run services on custom hardware. For instance, if you would like to run your container workloads on GPU enabled instances, you can add the following to your group config:
--- groups: - name: gpu_enabled gpu_enabled: true instance_type: p3.large
Groups can be used to run on "temporary" or spot instances which are often cheaper:
--- groups: - name: spot spot_enabled: true instance_type: m3.medium
You can choose whether groups share the same nodepool in an environment by setting the
create_node_group_pools flag in each environment config.
To add a new group, simply add a group block to your
groups: - name: main default: true users: - email@example.com machine_type: c3.xlarge gpu_enabled: false spot_enabled: false disk_size: 500 nodes: 1 -> 6
By default, most templates using
pt new --kind=workspace will add a single group.
Groups exist in each environment. By default, each environment in your workspace will provision a node pool for each group.
This often makes sense in production or release environments, but can be expensive in test environments. To use a single
node group for all of your groups in a test environment, simply add the following config in your
environments: - name: testing create_group_node_pools: false