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
Package Registry
Model registry
Operate
Environments
Terraform modules
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
Vincent Sellier
swh-docs
Commits
b441a54f
Commit
b441a54f
authored
11 months ago
by
David Douard
Browse files
Options
Downloads
Patches
Plain Diff
devel/getting-started: use code-block:: console for cli snippets
parent
ee51a133
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/devel/getting-started.rst
+30
-10
30 additions, 10 deletions
docs/devel/getting-started.rst
with
30 additions
and
10 deletions
docs/devel/getting-started.rst
+
30
−
10
View file @
b441a54f
...
...
@@ -29,7 +29,9 @@ Quick start
-----------
First, retrieve Software Heritage development environment to get the
Docker configuration::
Docker configuration:
.. code-block:: console
~$ git clone https://gitlab.softwareheritage.org/swh/devel/docker.git swh-docker
~$ cd swh-docker
...
...
@@ -40,7 +42,9 @@ Docker configuration::
you should rather follow the instructions in section :ref:`checkout-source-code` to
install the full Software Heritage development environment that includes Docker configuration.
Then, start containers::
Then, start containers:
.. code-block:: console
~/swh-docker$ docker compose up -d
[...]
...
...
@@ -52,7 +56,9 @@ Then, start containers::
[...]
This will build Docker images and run them. Check everything is running
fine with::
fine with:
.. code-block:: console
~/swh-docker$ docker compose ps
Name Command State Ports
...
...
@@ -69,7 +75,9 @@ dependency-related problems. If some containers failed to start, just
run the ``docker compose up -d`` command again.
If a container really refuses to start properly, you can check why using
the ``docker compose logs`` command. For example::
the ``docker compose logs`` command. For example:
.. code-block:: console
~/swh-docker$ docker compose logs swh-lister
Attaching to docker_swh-lister_1
...
...
@@ -93,7 +101,9 @@ content. The simplest way to start loading software is to use the
http://localhost:5080/browse/origin/save/
You can also use the command line interface to inject code. For
example to retrieve projects hossted on the https://0xacab.org GitLab forge::
example to retrieve projects hossted on the https://0xacab.org GitLab forge:
.. code-block:: console
~/swh-docker$ docker compose exec swh-scheduler \
swh scheduler task add list-gitlab-full \
...
...
@@ -114,7 +124,9 @@ This task will scrape the forge’s project list and register origins to the sch
This takes at most a couple of minutes.
Then, you must tell the scheduler to create loading tasks for these origins.
For example, to create tasks for 100 of these origins::
For example, to create tasks for 100 of these origins:
.. code-block:: console
~/swh-docker$ docker compose exec swh-scheduler \
swh scheduler origin schedule-next git 100
...
...
@@ -122,7 +134,9 @@ For example, to create tasks for 100 of these origins::
This will take a bit of time to complete.
To increase the speed at which git repositories are imported, you can
spawn more ``swh-loader-git`` workers::
spawn more ``swh-loader-git`` workers:
.. code-block:: console
~/swh-docker$ docker compose exec swh-scheduler \
celery status
...
...
@@ -141,7 +155,9 @@ spawn more ``swh-loader-git`` workers::
"prefetch_count": 4
Now there are 4 workers ingesting git repositories. You can also
increase the number of ``swh-loader-git`` containers::
increase the number of ``swh-loader-git`` containers:
.. code-block:: console
~/swh-docker$ docker compose up -d --scale swh-loader=4
[...]
...
...
@@ -159,7 +175,9 @@ Heritage. When new versions of these components are released, the docker
image will not be automatically updated. In order to update all Software
Heritage components to their latest version, the docker image needs to
be explicitly rebuilt by issuing the following command from within the
``docker`` directory::
``docker`` directory:
.. code-block:: console
~/swh-docker$ docker build --no-cache -t swh/stack .
...
...
@@ -174,7 +192,9 @@ You can monitor your local installation by looking at:
Shut down your local installation
---------------------------------
To shut down your SoftWare Heritage, just run::
To shut down your SoftWare Heritage, just run:
.. code-block:: console
~/swh-docker$ docker compose down
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment