Create A Second App And Template Job

Nomatron is in early access. Some advanced workflows may not be covered in the public docs.

Estimated time: 5 minutes

The first part of this guide used a direct NOMAD jobspec to prove the shortest deployment path.

Now extend the example by creating a second app that uses a TEMPLATE job. This adds app environments, variables, approval rules, and promotion to the workflow.

Why Add A TEMPLATE Job

TEMPLATE jobs are useful when you want Nomatron to render deployment configuration from structured inputs such as:

  • environments;
  • variables;
  • approval rules; and
  • promotion workflows.

The template repository now becomes the source for rendered deployment configuration.

1. Create A Second App

  1. Open your organization.
  2. Go to Apps.
  3. Click New App.
  4. Fill in:
    • Application Name: template-demo
    • Repository URL: <YOUR_REPO_URL>
    • Ref: main
    • Nomad Cluster: dev-cluster
    • GitHub App Integration: choose the same integration you already created
  5. Click Create.

2. Create The TEMPLATE Job

  1. Open the new app.
  2. Go to Jobs.
  3. Click New Job.
  4. Fill in:
    • Job Name: web-template
    • Jobspec Type: TEMPLATE
    • Default Namespace: default
    • Group Priority: 10
    • Jobspec Path: <YOUR_TEMPLATE_FILE_PATH>
  5. Save the job.

3. Confirm The Wiring

Before moving on, confirm:

  • the repository is correct;
  • the ref is correct;
  • the cluster is still dev-cluster; and
  • the jobspec path points at the template file Nomatron should render.

The next steps build on this by introducing app environments, variables, and promotion.