Skip to content

S3 Storage Integration


S3 (Simple Storage Service) is a service for storing large volumes of digital data using the S3 protocol. Learn more about S3 at cloud.yandex.ru here.

S3 Configuration

Using cloud.yandex.ru S3 as an example

Required configuration parameters:

Parameter Description cloud.yandex.ru Value application.properties Parameter
S3 Endpoint Object Storage host https://storage.yandexcloud.net/ gitflic.object-storage.connection.endpoint
Region S3 bucket region ru-central1 gitflic.object-storage.connection.region
Bucket File storage container name Unique name of created bucket gitflic.object-storage.default-bucket
Access Key ID Used with secret key for Object Storage authentication Obtain after creation for service account gitflic.object-storage.connection.awsAccessKeyId
Secret Access Key Authentication key component for Object Storage Obtain after creation for service account gitflic.object-storage.connection.awsSecretAccessKey

Configuring application.properties

Add these parameters to your GitFlic application.properties file to enable S3 storage:

# Enable S3 storage
gitflic.object-storage.enabled=true

# S3 connection settings
gitflic.object-storage.connection.region=ru-central1
gitflic.object-storage.default-bucket=YourBucketName
gitflic.object-storage.connection.endpoint=https://storage.yandexcloud.net
gitflic.object-storage.connection.awsAccessKeyId=YorAccessKeyId
gitflic.object-storage.connection.awsSecretAccessKey=YorSecretAccessKeyKey

# Data to store in S3 (existing local storage data remains unchanged)

# Package storage
gitflic.object-storage.objects.packages.enabled=true
gitflic.object-storage.objects.packages.provider=s3
#gitflic.object-storage.objects.packages.bucket=kos-name-packages-bucket

# Release and image storage
gitflic.object-storage.objects.uploads.enabled=true
gitflic.object-storage.objects.uploads.provider=s3
#gitflic.object-storage.objects.uploads.bucket=name-uploads-bucket

# CI/CD artifacts storage
gitflic.object-storage.objects.artifacts.enabled=true
gitflic.object-storage.objects.artifacts.provider=s3
#gitflic.object-storage.objects.artifacts.bucket=name-artifacts-bucket

# LFS file storage
gitflic.object-storage.objects.lfs.enabled=true
gitflic.object-storage.objects.lfs.provider=s3
#gitflic.object-storage.objects.lfs.bucket=name-lfs-bucket

Migrating Data from Filesystem to S3

Starting with version 3.0.0, GitFlic includes cli.jar and gitflic-cli.sh for data migration.

Prerequisites

Before migration:

  1. Ensure required parameters are added to application.properties
  2. The CLI user has read access to static directories (/var/gitflic/)

Launching GitFlic CLI

1. Extract GitFlic archive:

unzip gitflic_4.0.0_free_onpremise.zip

2. Navigate to the CLI directory:

cd /path/to/archive/cli

3. Make the script executable:

chmod +x ./gitflic-cli.sh

4. Launch CLI with your configuration file:

./gitflic-cli.sh /path/to/application.properties

Data Migration

1. Migrate registry packages:

s3 migrate-to packages

2. Migrate releases:

s3 migrate-to releases

3. Migrate LFS files:

s3 migrate-to lfs

4. Migrate images (team/company avatars, OAuth app icons, user avatars/banners):

Image Storage Format

Image migration is only available for images stored using the new logic. Starting with version 4.3.0, all new images use the new format. To update storage logic:

Update image storage format:

fix images

Migrate images to S3:

s3 migrate-to images

Automatic translation!

This page has been automatically translated. The text may contain inaccuracies.