Skip to content

Commit

Permalink
Update docs and packages (#95)
Browse files Browse the repository at this point in the history
* Update GCP Storage

Tested with a local Sqlite DB and GCP cloud storage bucket.

* Update test libs

* Update EF Core packages

* Update web application packages

* Update AWS packages

* Add json annotation to markdown
  • Loading branch information
Regenhardt authored Mar 4, 2024
1 parent 0700615 commit 3081c3d
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 17 deletions.
28 changes: 14 additions & 14 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
<PackageVersion Include="Azure.Search.Documents" Version="11.4.0" />
<PackageVersion Include="Azure.Storage.Blobs" Version="12.18.0" />
<PackageVersion Include="McMaster.Extensions.CommandLineUtils" Version="4.1.0" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="8.0.0" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="8.0.2" />
<PackageVersion Include="Microsoft.Azure.Cosmos" Version="3.36.0" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.1" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.1" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.2" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.2" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0" />
Expand All @@ -18,27 +18,27 @@
<PackageVersion Include="NuGet.Protocol" Version="6.9.1" />
<PackageVersion Include="NuGet.Versioning" Version="6.9.1" />
<PackageVersion Include="System.Reflection.Metadata" Version="8.0.0" />
<PackageVersion Include="System.Text.Json" Version="8.0.0" />
<PackageVersion Include="System.Text.Json" Version="8.0.2" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageVersion Include="Moq" Version="4.20.70" />
<PackageVersion Include="xunit" Version="2.7.0" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.7" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.0" />
<PackageVersion Include="coverlet.collector" Version="6.0.0" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.2" />
<PackageVersion Include="coverlet.collector" Version="6.0.1" />
<PackageVersion Include="Humanizer" Version="2.14.1" />
<PackageVersion Include="Markdig" Version="0.35.0" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.1" />
<PackageVersion Include="Microsoft.Data.SqlClient" Version="[5.1.3,)" />
<PackageVersion Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.0" />
<PackageVersion Include="Pomelo.EntityFrameworkCore.MySql" Version="8.0.0" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.2" />
<PackageVersion Include="Microsoft.Data.SqlClient" Version="5.2.0" />
<PackageVersion Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.2" />
<PackageVersion Include="Pomelo.EntityFrameworkCore.MySql" Version="8.0.1" />
<PackageVersion Include="Aliyun.OSS.SDK.NetCore" Version="2.13.0" />
<PackageVersion Include="AWSSDK.S3" Version="3.7.205.18" />
<PackageVersion Include="AWSSDK.SecurityToken" Version="3.7.202.13" />
<PackageVersion Include="AWSSDK.S3" Version="3.7.305.29" />
<PackageVersion Include="AWSSDK.SecurityToken" Version="3.7.300.54" />
<PackageVersion Include="Microsoft.Azure.Cosmos.Table" Version="1.0.8" />
<PackageVersion Include="Microsoft.Azure.Search" Version="10.1.0" />
<PackageVersion Include="Microsoft.Azure.Storage.Blob" Version="11.2.3" />
<PackageVersion Include="Google.Cloud.Storage.V1" Version="4.6.0" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.1" />
<PackageVersion Include="Google.Cloud.Storage.V1" Version="4.8.0" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.2" />
</ItemGroup>
</Project>
3 changes: 2 additions & 1 deletion docs/docs/Installation/aws.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ You can modify BaGetter's configurations by editing the `appsettings.json` file.

### Amazon S3

Update the `appsettings.json` file:
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:

```json
{
Expand Down
24 changes: 22 additions & 2 deletions docs/docs/Installation/gcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,25 @@ Follow the instructions in [Using Cloud Storage](https://cloud.google.com/appeng

**NOTE:** If you plan to use AppEngine, skip this part and follow the AppEngine instructions below.

Set up a service account and download credentials. Set the `GOOGLE_APPLICATION_CREDENTIALS` environment variable to the path to the JSON file you downloaded.
Set up a service account, create and download a key as JSON file. Set the [`GOOGLE_APPLICATION_CREDENTIALS`](https://cloud.google.com/docs/authentication/provide-credentials-adc#wlif-key)
environment variable to the path to the JSON file you downloaded. The file should contain something like this:

```json
{
"type": "service_account",
"project_id": "your_project",
"private_key_id": "6950mvh3690mg3h90jg3986vgm",
"private_key": "-----BEGIN PRIVATE KEY-----\hriv eohgrup4nhg8594nhvpog59p4w5...",
"client_email": "your-service-account@your_project.iam.gserviceaccount.com",
"client_id": "49826518658461496",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/your-service-account%40your_project.iam.gserviceaccount.com",
"universe_domain": "googleapis.com"
}

```

Configure BaGetter to use Google Cloud Storage by updating the `appsettings.json` file:

Expand All @@ -42,9 +60,11 @@ Configure BaGetter to use Google Cloud Storage by updating the `appsettings.json
}
```

Or set the `Storage__Type` and `Storage__BucketName` environment variables in your deployment (i.e. AppEngine project) accordingly.

## Google Cloud SQL

- Follow the instructions in [Using Cloud SQL](https://cloud.google.com/appengine/docs/flexible/dotnet/using-cloud-sql) to create a 2nd Gen MySQL 5.7 Google Cloud SQL instance. The default options should work well.
- Follow the instructions in [Using Cloud SQL](https://cloud.google.com/appengine/docs/flexible/dotnet/using-cloud-sql) to create a (for example) 2nd Gen MySQL 5.7 Google Cloud SQL instance. The default options should work well.
- Create a database named `bagetter`. This can be done through the Google Cloud Console. Use `utf8mb4` as the Character set.
- Follow [Configuring SSL/TLS](https://cloud.google.com/sql/docs/mysql/configure-ssl-instance#new-client) to create a client certificate. Download the three files it creates.
- Convert the PEM to a PFX by running `openssl pkcs12 -inkey client-key.pem -in client-cert.pem -export -out client.pfx`
Expand Down

0 comments on commit 3081c3d

Please sign in to comment.