@hashicorp
An open platform for building developer portals
- Community
- Pack
Updated 8 months ago
- GitHub(opens in new tab)
Backstage
This pack contains a service job that runs Backstage in a single Nomad client. It currently supports being run by the Docker driver.
It has 2 tasks:
- Backstage: (reference) the open platform for building developer portals;
- PostgreSQL: (reference) the persistent database used by Backstage.
Setup:
- Service-to-service communication is handled by Nomad;
- PostgreSQL's state is persisted with Nomad Host Volumes.
Requirements
Clients that expect to run this job require:
- Nomad >= 1.4.0 (because the pack use Nomad Variables)
- Docker volumes to be enabled within their Docker plugin stanza, due to the usage of Nomad's host volume:
- Host volume to be enabled in the client configuration (the host volume directory - /var/lib/postgres - must be created in advance):
Customizing the Docker images
The 2 docker images can be replaced by using their variable names:
- postgresql_task_image
- backstage_task_image
Example:
Pack Usage
Prerequisite
Create an variable specification file:
The default docker image for Backstage is configured to use GitHub in order to locate entities (see GitHub integration), so you will need to define a variable to store your GitHub token.
If you use an other integration in your custom image, Azure DevOps for instance, you will need to define a variable for it (e.g. azure_token = "your_ado_token"
).
To set your variables in your Nomad instance, execute the following command:
Variables
job_name
(string) - The name to use as the job name which overrides using the pack namedatacenters
(list of strings) - A list of datacenters in the region which are eligible for task placementregion
(string) - The region where jobs will be deployedpostgresql_group_nomad_service_name
(string) - The nomad service name for the PostgreSQL applicationpostgresql_task_image
(string) - PostgreSQL's Docker image (must include the tag)postgresql_task_volume_path
(string) - The volume's absolute path in the host to be used by PostgreSQLpostgresql_task_resources
(object, number number) - The resources to assign to the PostgreSQL servicebackstage_group_nomad_service_name
(string) - The nomad service name for the Backstage applicationbackstage_task_image
(string) - Backstage's Docker image (must include the tag)backstage_task_nomad_vars
(map of string) - Backstage's nomad variables (see below for the details)backstage_task_resources
(object, number number) - The resources to assign to the Backstage service
Custom Nomad Variables
If you need to use other Nomad variables than postgres_user
and postgres_password
with this pack, you will need to pass them to backstage_task_nomad_vars
.