Skip to content

Commit 39eae05

Browse files
committed
Add getting started tutorial
Signed-off-by: Keshav Priyadarshi <git@keshav.space>
1 parent 954bbfa commit 39eae05

8 files changed

Lines changed: 83 additions & 0 deletions
32.5 KB
Loading
70.2 KB
Loading
119 KB
Loading
114 KB
Loading
109 KB
Loading
98.1 KB
Loading

docs/source/index.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ you will find information on:
2020
contributing
2121
changelog
2222

23+
.. toctree::
24+
:maxdepth: 2
25+
:caption: Tutorial
26+
27+
tutorial_getting_started
28+
2329
.. toctree::
2430
:maxdepth: 2
2531
:caption: Reference Documentation
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
.. _tutorial_getting_started:
2+
3+
Getting Started
4+
===============
5+
6+
In this tutorial, we will guide you through the step-by-step process of getting started with syncing
7+
and federating package metadata.
8+
9+
.. note::
10+
This tutorial assumes that you have a working installation of FederatedCode.
11+
If you don't, please refer to the :ref:`installation` page.
12+
13+
Create Admin User
14+
-----------------
15+
16+
.. code-block:: bash
17+
18+
python manage.py createsuperuser
19+
20+
Log in to FederatedCode Admin
21+
------------------------------
22+
23+
Navigate to http://127.0.0.1:8000/admin/ and log in using the credentials created in the previous step.
24+
25+
.. image:: img/tutorial_getting_started_admin.jpg
26+
27+
Create Service User
28+
-------------------
29+
30+
Go to http://127.0.0.1:8000/admin/fedcode/service/add/ and create a service. Select the newly created superuser as the user, and leave the "remote-actor" field empty.
31+
32+
.. image:: img/tutorial_getting_started_service_creation.jpg
33+
34+
Clone the FederatedCode Data Repository
35+
---------------------------------------
36+
37+
Visit https://github.com/aboutcode-org/aboutcode-packages-npm-385 and clone the repository.
38+
39+
Add Data Repository in FederatedCode
40+
-------------------------------------
41+
42+
Go to http://127.0.0.1:8000/create-repo and add the repository URL: https://github.com/<YOUR-USER-NAME>/aboutcode-packages-npm-385
43+
44+
.. image:: img/tutorial_getting_started_repo_add.jpg
45+
46+
Sync Package Scan
47+
-----------------
48+
49+
Run the following command to sync the scan metadata from the FederatedCode Git repository
50+
51+
.. code-block:: bash
52+
53+
python manage.py sync sync_scancode_scans
54+
55+
Federate Package Activity
56+
-------------------------
57+
58+
Run the following command to send activity updates to existing subscribers of the package
59+
60+
.. code-block:: bash
61+
62+
python manage.py federate
63+
64+
Click on `Packages` link
65+
--------------------------
66+
67+
.. image:: img/tutorial_getting_started_step_packages.jpg
68+
69+
Click on any PURL link
70+
----------------------
71+
72+
.. image:: img/tutorial_getting_started_step_package_list.jpg
73+
74+
Package Activity
75+
----------------
76+
77+
.. image:: img/tutorial_getting_started_step_package_activity.jpg

0 commit comments

Comments
 (0)