Changeset View
Changeset View
Standalone View
Standalone View
README.md
Show First 20 Lines • Show All 105 Lines • ▼ Show 20 Lines | |||||
### Sample configuration | ### Sample configuration | ||||
A typical configuration `storage.yml` file is: | A typical configuration `storage.yml` file is: | ||||
``` | ``` | ||||
storage: | storage: | ||||
cls: local | cls: local | ||||
args: | |||||
db: "dbname=softwareheritage-dev user=<user> password=<pwd>" | db: "dbname=softwareheritage-dev user=<user> password=<pwd>" | ||||
objstorage: | objstorage: | ||||
cls: pathslicing | cls: pathslicing | ||||
args: | |||||
root: /tmp/swh-storage/ | root: /tmp/swh-storage/ | ||||
slicing: 0:2/2:4/4:6 | slicing: 0:2/2:4/4:6 | ||||
``` | ``` | ||||
which means, this uses: | which means, this uses: | ||||
- a local storage instance whose db connection is to | - a local storage instance whose db connection is to | ||||
`softwareheritage-dev` local instance, | `softwareheritage-dev` local instance, | ||||
- the objstorage uses a local objstorage instance whose: | - the objstorage uses a local objstorage instance whose: | ||||
▲ Show 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | |||||
([loader-git](https://forge.softwareheritage.org/source/swh-loader-git/), | ([loader-git](https://forge.softwareheritage.org/source/swh-loader-git/), | ||||
[loader-svn](https://forge.softwareheritage.org/source/swh-loader-svn/), | [loader-svn](https://forge.softwareheritage.org/source/swh-loader-svn/), | ||||
etc...), you can define a remote storage with this snippet of yaml | etc...), you can define a remote storage with this snippet of yaml | ||||
configuration. | configuration. | ||||
``` | ``` | ||||
storage: | storage: | ||||
cls: remote | cls: remote | ||||
args: | |||||
url: http://localhost:5002/ | url: http://localhost:5002/ | ||||
``` | ``` | ||||
You could directly define a local storage with the following snippet: | You could directly define a local storage with the following snippet: | ||||
``` | ``` | ||||
storage: | storage: | ||||
cls: local | cls: local | ||||
args: | |||||
db: service=swh-dev | db: service=swh-dev | ||||
objstorage: | objstorage: | ||||
cls: pathslicing | cls: pathslicing | ||||
args: | |||||
root: /home/storage/swh-storage/ | root: /home/storage/swh-storage/ | ||||
slicing: 0:2/2:4/4:6 | slicing: 0:2/2:4/4:6 | ||||
``` | ``` |