Onboarding yourself as an engineer at incident.io

Here at incident.io, we believe in using infrastructure as code to configure everything, including our own product. We don’t see any reason to exclude incident.io from this practice. In addition to setting up services like Google Cloud Platform, Sentry, and Spacelift through our infrastructure repo, we also configure incident.io.

As a new engineer joining our team, your first task is to create a PR in our infrastructure repo. This PR will show you where we manage our infrastructure, demonstrate how it works, and ensure you have the necessary access. The changes you make will add you as a user:

+ user('pip', tags=['engineer', 'production']),

Then, you will be added to your team:

{
external_id: 'catalog',
name: 'Catalog',
description: 'Responsible for the Catalog and Workflows',
members: [
'benji',
'laura',
'lisa',
'louis',
+ 'pip',
],
...
}

Lastly, a Spacelift stack will be set up for you:

+   "dev-pip" = {
+ project = "incident-io-dev-pip"
+ autodeploy = true
}

Once your PR is reviewed and merged, Terraform will automatically set up a variety of configurations.

We also create a Spacelift stack for your development environment, granting access to resources in Google Cloud Platform based on your user tags. Additionally, you will be added to the appropriate Google Groups for your team and role. This process is facilitated by pulling team data from the jsonnet config file:

locals {
# Load all group configuration from the config file ($.groups)
groups = jsondecode(data.jsonnet_file.config.rendered).groups

# Flatten memberships for an easier for_each
group_memberships = flatten([
for group in local.groups : [
for member in group.members : {
group = group.id
member = member
}
]
])
}

resource "google_cloud_identity_group_membership" "groups" {
for_each = {
for ms in local.group_memberships : "${ms.group}:${ms.member}" => ms
}

group = google_cloud_identity_group.groups[each.value.group].id

preferred_member_key {
id = each.value.member
}

roles {
name = "MEMBER"
}
}

When it comes to incident.io, we focus on how we synchronize teams in our Catalog product. We also support Terraform for managing on-call schedules and workflows, allowing you to configure incident.io through code.

If you need to update the catalog and add yourself to a new team, you don’t need to make additional changes. Our Catalog Importer tool stores Team catalog data as code. Any changes to this code trigger the importer to update the catalog in incident.io automatically:

An updated catalog entry with me as a team member

The mapping from the Jsonnet config file to the Team catalog type is structured as follows:

{
outputs: [
{
name: 'Team',
description: 'Teams in Product Development.',
type_name: 'Custom["Team"]',
source: {
name: '$.name',
external_id: '$.external_id',
},
attributes: [
{
id: 'description',
name: 'Description',
type: 'Text',
},
{
id: 'members',
name: 'Members',
type: 'User',
array: true,
},
...
],
},
],
sources: [
{
inline: {
entries: catalog.teams,
},
},
],
}

Consistently configuring our products, whether it’s Google Cloud Platform, Spacelift, Sentry, or incident.io, in our infrastructure repo simplifies onboarding for new engineers. It’s essential for us to treat our own product with the same level of attention as we do with others.

Stay in the loop

Looking for more insightful content like this? We publish new articles every week. Enter your email to stay updated on our latest posts.