Skip to content

Commit

Permalink
GH-1799 S3 documentation (Resolve #1799)
Browse files Browse the repository at this point in the history
  • Loading branch information
dzikoysk committed Nov 12, 2023
1 parent 27a746f commit 813c6f6
Show file tree
Hide file tree
Showing 15 changed files with 110 additions and 20 deletions.
2 changes: 1 addition & 1 deletion reposilite-site/components/MDX.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export default {
ul: (props) => <UnorderedList paddingY={1} {...props} />,
ol: (props) => <OrderedList paddingY={2} {...props} />,
li: (props) => <ListItem paddingY={0.5} {...props} />,
img: (props) => <Image display={'inline-block'} {...props} marginBottom={-1} />,
img: (props) => <Image display={'inline-block'} rounded={'md'} {...props} marginBottom={-1} />,
Spoiler: (props) => <Spoiler {...props} />,
CodeVariants: (props) => <CodeVariants {...props} />,
CodeVariant: (props) => <CodeVariant {...props} />,
Expand Down
34 changes: 27 additions & 7 deletions reposilite-site/data/guides/features/repositories.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,21 @@ title: Repositories

By default, Reposilite generates three standard repositories:

* releases - the most popular repository type where we can push our artifacts
* snapshots - dedicated repository for snapshot artifacts
* private - dedicated repository for private artifacts
* `releases` - the most popular repository type where we can push our artifacts
* `snapshots` - dedicated repository for snapshot artifacts (with `-SNAPSHOT` suffix)
* `private` - dedicated repository for private artifacts

## Custom repository
You can also define a new one by just adding it in the configuration:
You don't have to use them,
but it's a common practice to follow standardized `releases` - `snapshots` naming convention for public repositories.

![Configuration](/images/guides/settings-repositories.png)
### Repository configuration
Each repository has individual configuration, so you can define different rules for each of them:

#### Redeployment
By default, Reposilite does not allow to redeploy artifacts to the same repository.
If you try to deploy the same artifact twice,
you'll get [409 Conflict](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/409) response.
You can enable redeployment in the repository configuration.

#### Hidden repositories
If the visibility of a repository is set to `HIDDEN`, it will not be shown in the dashboard,
Expand All @@ -21,4 +28,17 @@ Only if you are using a proper [access token](authorization#access-token), it wi

#### Private repositories
If the visibility of a repository is set to `PRIVATE`,
you can only interact (download, index, deploy) with the repository using a proper [access token](authorization#access-token).
you can only interact (download, index, deploy) with the repository using a proper [access token](authorization#access-token).

#### Storage providers
Each repository has individual storage provider configuration,
so some of them can use [S3-compatible object storage](/guide/s3) and others can use local filesystem.

#### Mirrors
Reposilite can mirror (proxy) other repositories:
- [Guide / Mirrors](/guide/mirrors) - how to configure mirrors

### Custom repository
You can also define a new one by just adding it in the configuration:

![Configuration](/images/guides/settings-repositories.png)
69 changes: 69 additions & 0 deletions reposilite-site/data/guides/features/s3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
---
id: s3
title: S3
---

Reposilite supports S3-compatible storages as a backend for Maven repository.

Known S3-compatible storages used by our community:

| Name | Description | Compatibility |
|:------------------------------------------------|:--------------------------------------|:--------------|
| [AWS S3](https://aws.amazon.com/s3/) | Amazon Simple Storage Service | ✔️ |
| [MinIO](https://min.io/) | Popular self-hosted object storage | ✔️ |
| [Cloudflare R2](https://www.cloudflare.com/r2/) | Cloudflare's distributed edge storage | ✔️* |
| [Ceph](https://ceph.io/) | Used by cloud provides like Contabo | ⚠️** |

\* - Small user base, so it may has some quirks <br/>
\** - Ceph is not fully compatible with S3 API, but it can be used with Reposilite with some limitations

Each repository has individual storage provider configuration,
so some of them can use object storage and others can use local filesystem.
There's important implication of this:

`Note` - **Each S3 configuration has to use dedicated bucket.**

S3 configuration can be defined in the `Dashboard -> Settings -> Maven -> <Repository>` section:

![S3 Configuration](/images/guides/s3-config.png)

These values depend on your S3 provider & its configuration,
so you have to check their documentation to find out how to configure them.

### MinIO

MinIO is a popular self-hosted object storage compatible with S3 API.
A lot of Reposilite users are using this solution, so here are some tips:

Reposilite uses official AWS SDK that uses the latest version of S3 API.
Unfortunately, MinIO supports only path-style access,
so you have to add a special JVM flag (`JAVA_OPTS` env variable for Docker users) to enable it:

```bash
-Dreposilite.s3.pathStyleAccessEnabled=true
```

Properties:

```yaml
bucket: your-bucket
endpoint: http://minio:9000 # your minio endpoint
access-key: your-access-key
secret-key: your-secret-key
region: doesn't matter, e.g. us-east-1
```
### Cloudflare R2
R2 has limited permission system,
so you may want to disable automated bucket creation in Reposilite to grant more adequate permissions.
It can be done by another system property:
```bash
-Dreposilite.s3.skip-bucket-creation=true
```

### Ceph

Ceph is not fully compatible with S3 API. Known issues:
* Object listing is not supported - Reposilite won't be able to e.g. list all versions of the artifact or display directory content in the UI
15 changes: 8 additions & 7 deletions reposilite-site/data/guides/guides.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,23 @@ const categories = [
name: 'Installation',
directory: 'installation',
content: [
'settings',
'standalone',
'general',
'jar',
'docker',
'kubernetes',
]
},
{
name: 'Integrations',
directory: 'integrations',
name: 'Infrastructure',
directory: 'infrastructure',
content: [
'nginx',
'apache',
'caddy',
'apache',
'systemd',
'archlinux',
'nixos',
'cloudflare',
'github',
]
},
{
Expand All @@ -47,7 +46,8 @@ const categories = [
content: [
'gradle',
'maven',
'sbt'
'sbt',
'github',
]
},
{
Expand All @@ -56,6 +56,7 @@ const categories = [
content: [
'dashboard',
'repositories',
's3',
'mirrors',
'javadocs',
'static-files',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
id: settings
title: Settings
id: general
title: General
---

Reposilite supports multiple use cases and environments. By default we support 3 of them:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
id: standalone
title: Standalone
id: jar
title: JAR
---

You can download standalone (JAR) version of Reposilite from GitHub releases page:
Expand Down Expand Up @@ -73,4 +73,4 @@ user@host ~/workspace: java -jar reposilite.jar
+--reposilite.db Data file containing stats and tokens (only if embedded database enabled)
```
To separate data files and configuration from application, use [parameters](settings#parameters).
To separate data files and configuration from application, use [parameters](general#parameters).
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 813c6f6

Please sign in to comment.