techdocs: Use googleGcs for publisher type instead of google_gcs

This commit is contained in:
Himanshu Mishra
2020-12-09 18:58:12 +01:00
parent 9d08ef8f46
commit 24bcdd0829
11 changed files with 61 additions and 49 deletions
+4 -4
View File
@@ -50,16 +50,16 @@ techdocs:
publisher:
# techdocs.publisher.type can be - 'local' or 'google_gcs' (aws_s3, azure_storage, etc. to be available as well).
# techdocs.publisher.type can be - 'local' or 'googleGcs' (awsS3, azureStorage, etc. to be available as well).
# When set to 'local', techdocs-backend will create a 'static' directory at its root to store generated documentation files.
# When set to 'google_gcs', techdocs-backend will use a Google Cloud Storage Bucket to store generated documentation files.
# When set to 'googleGcs', techdocs-backend will use a Google Cloud Storage Bucket to store generated documentation files.
type: 'local'
# Required when techdocs.publisher.type is set to 'google_gcs'. Skip otherwise.
# Required when techdocs.publisher.type is set to 'googleGcs'. Skip otherwise.
google:
googleGcs:
# An API key is required to write to a storage bucket.
pathToKey: '/path/to/google_application_credentials.json',
+10 -10
View File
@@ -22,24 +22,24 @@ for the latest instructions on the following steps involving GCP.
**1. Set `techdocs.publisher.type` config in your `app-config.yaml`**
Set `techdocs.publisher.type` to `'google_gcs'`.
Set `techdocs.publisher.type` to `'googleGcs'`.
```yaml
techdocs:
publisher:
type: 'google_gcs'
type: 'googleGcs'
```
**2. GCP (Google Cloud Platform) Project**
Create or choose a dedicated GCP project. Set
`techdocs.publisher.google.projectId` to the project ID.
`techdocs.publisher.googleGcs.projectId` to the project ID.
```yaml
techdocs:
publisher:
type: 'google_gcs'
google:
type: 'googleGcs'
googleGcs:
projectId: 'gcp-project-id
```
@@ -58,13 +58,13 @@ IAM & Admin console), and create a new key. Use JSON format for the key.
A `<GCP-PROJECT-ID-random-uid>.json` file will be downloaded. This is the secret
key TechDocs will use to make API calls. Make it available in your Backstage
server and/or your local development server and set it in the app config
`techdocs.publisher.google.pathToKey`.
`techdocs.publisher.googleGcs.pathToKey`.
```yaml
techdocs:
publisher:
type: 'google_gcs'
google:
type: 'googleGcs'
googleGcs:
projectId: 'gcp-project-id'
pathToKey: '/path/to/google_application_credentials.json'
```
@@ -80,8 +80,8 @@ Set the name of the bucket to `techdocs.publisher
```yaml
techdocs:
publisher:
type: 'google_gcs'
google:
type: 'googleGcs'
googleGcs:
projectId: 'gcp-project-id'
pathToKey: '/path/to/google_application_credentials.json'
bucketName: 'name-of-techdocs-storage-bucket'