Skip to main content

Run BaGetter on AWS

warning

This page is a work in progress!

Use Amazon Web Services to scale BaGetter. You can store metadata on Amazon Relational Database Service (RDS) and upload packages to Amazon S3 or any other S3-compatible service.

Configure BaGetter

You can modify BaGetter's configurations by editing the appsettings.json file. For the full list of configurations, please refer to BaGetter's configuration guide.

Amazon S3

Create a bucket, a service account with access to the bucket, and an access key for the service account.
Update the appsettings.json file with those:

{
...

"Storage": {
"Type": "AwsS3",
"Region": "us-west-1",
"Bucket": "foo",
"AccessKey": "",
"SecretKey": ""
},

...
}

S3-compatible object storage

You can use any other S3-compatible storage service, as long as it's compatible with Amazon AWS S3. Since the URL for services other than Amazon AWS will change, you need to provide this Service URL instead of the Region. For example:

{
...

"Storage": {
"Type": "AwsS3",
"Endpoint": "https://eu-central-1.linodeobjects.com",
"Bucket": "nuget-packages",
"AccessKey": "",
"SecretKey": ""
},

...
}

Note: to avoid errors, only one of Region or Endpoint setting can be set at the same time.

Known compatible services

So far, it has been tested in Linode’s Object Storage. If you succeed in using other storage service, let us know so we can state it here.

Amazon RDS

To use PostgreSQL, update the appsettings.json file:

{
...

"Database": {
"Type": "PostgreSql",
"ConnectionString": "..."
},

...
}

Publish packages

Publish your first package with:

dotnet nuget push -s http://localhost:5000/v3/index.json package.1.0.0.nupkg

Publish your first symbol package with:

dotnet nuget push -s http://localhost:5000/v3/index.json symbol.package.1.0.0.snupkg
warning

You should secure your server by requiring an API Key to publish packages. For more information, please refer to the Require an API Key guide.

Restore packages

You can restore packages by using the following package source:

http://localhost:5000/v3/index.json

Some helpful guides:

Symbol server

You can load symbols by using the following symbol location:

http://localhost:5000/api/download/symbols

For Visual Studio, please refer to the Configure Debugging guide.