Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
swh-docs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Platform
Development
swh-docs
Merge requests
!435
sysadmin: Update the bulk ingest documentation to explain the job configuration
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
sysadmin: Update the bulk ingest documentation to explain the job configuration
vsellier/swh-docs:bulk-ingest-job
into
master
Overview
14
Commits
1
Pipelines
7
Changes
1
Merged
Vincent Sellier
requested to merge
vsellier/swh-docs:bulk-ingest-job
into
master
8 months ago
Overview
12
Commits
1
Pipelines
7
Changes
1
Expand
Related to
swh/infra/sysadm-environment#5365 (closed)
0
0
Merge request reports
Compare
master
version 6
4d0ae0f3
8 months ago
version 5
2e8287c0
8 months ago
version 4
fc6c3209
8 months ago
version 3
eb6ed5dc
8 months ago
version 2
c753c1b2
8 months ago
version 1
fda9aa76
8 months ago
master (base)
and
latest version
latest version
a5e710e2
1 commit,
8 months ago
version 6
4d0ae0f3
6 commits,
8 months ago
version 5
2e8287c0
5 commits,
8 months ago
version 4
fc6c3209
4 commits,
8 months ago
version 3
eb6ed5dc
3 commits,
8 months ago
version 2
c753c1b2
2 commits,
8 months ago
version 1
fda9aa76
1 commit,
8 months ago
1 file
+
62
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
docs/sysadm/deployment/howto-bulk-ingest.rst
+
62
−
0
Options
@@ -14,6 +14,68 @@ is configured to listen to this queue, these origins will be loaded by the loade
.. warning:: Only a one-shot loading will be performed, a recurring task is not created.
The automated way
=================
`swh-charts` includes a script to automate the bulk ingestion of a list of repository based on a
file downloaded from the internet (usually, a paste on our GitLab instance).
The actions performed are exactly the same as in the `manually_bulk_ingest`_ section but embedded
in a kubernetes job.
The bulk ingest job is based on the toolbox configuration, to avoid duplicating the scheduler
configuration. The job config is added as a new subsection of the main config file.
Declare a job
-------------
In the proper environment, edit the helm values file, locate the `toolbox:` section and add the new
`bulkLoad` job:
.. code-block:: yaml
toolbox:
enabled: true
configs:
...
scheduler:
schedulerDbConfigurationRef: postgresqlSchedulerConfiguration
celeryConfigurationRef: producerCeleryConfiguration
...
bulkLoad:
schedulerConfigurationRef: scheduler
jobs:
jobName:
originListUrl: https://gitlab.softwareheritage.org/...
taskType: load-git
maxTasks: 10000
queuePrefix: oneshot
The `toolbox.configs` section must already exist.
`schedulerConfigurationRef` is referencing the `scheduler` configuration declaration in the `toolbox.configs` part.
`forgeName` is an informational name to identify the job.
The job will be named by concatenating several info: `toolbox-bulk-load--<queuePrefix>-<jobName>`
Once the job is completed, the configuration can be removed from the value file. Helm will automatically
cleaned the job when applied by ArgoCD.
In case of an error during the scheduling, the job will be flagged as failing by kubernetes and
is raised by the monitoring system. The resources (pods, etc.) of a failing job are not automatically removed
to allow easier diagnostics. An operator must manually remove the job to cleanup the resources.
An example of issue for a bulk ingestion: `MBed forge ingestion <https://gitlab.softwareheritage.org/swh/infra/sysadm-environment/-/issues/5363>`__
.. _manually_bulk_ingest:
How to do it manually
=====================
The following example explains how to launch an ingestion from a raw list of origins.
The toolbox deployed in kubernetes contains all the configuration pre-installed to simplify the
Loading