Skip to content

Files

Latest commit

464fd41 · Oct 12, 2021

History

History
85 lines (72 loc) · 1.92 KB

pelican-import.md

File metadata and controls

85 lines (72 loc) · 1.92 KB

PFB Import

The pelican-import job is only used to restore a PFB into a clean database.

Launching the job

In this section, we assume the job is already configured (if not, see Setup section).

Start the Sower job by hitting the POST <base URL>/job/dispatch endpoint with the body below.

{
  "action": "import",
  <TODO>
}

Setup

Note: There are no prerequisites for the pelican-import job.

  1. Update the manifest to include the configuration for the pelican-import job:
Manifest configuration
  • Environment variables:
    • DICTIONARY_URL
    • GEN3_HOSTNAME
  • Mounts:
    • sheepdog-creds-volume - the secret with write access to the sheepdog database.
{
  "name": "pelican-import",
  "action": "import",
  "container": {
    "name": "job-task",
    "image": "quay.io/cdis/pelican-import:master",
    "pull_policy": "Always",
    "env": [
      {
        "name": "DICTIONARY_URL",
        "valueFrom": {
          "configMapKeyRef": {
            "name": "manifest-global",
            "key": "dictionary_url"
          }
        }
      },
      {
        "name": "GEN3_HOSTNAME",
        "valueFrom": {
          "configMapKeyRef": {
            "name": "manifest-global",
            "key": "hostname"
          }
        }
      }
    ],
    "volumeMounts": [
      {
        "name": "sheepdog-creds-volume",
        "readOnly": true,
        "mountPath": "/sheepdog-creds.json",
        "subPath": "creds.json"
      }
    ],
    "cpu-limit": "1",
    "memory-limit": "4Gi"
  },
  "volumes": [
    {
      "name": "sheepdog-creds-volume",
      "secret": {
        "secretName": "sheepdog-creds"
      }
    }
  ],
  "restart_policy": "Never"
}

Architecture