Skip to content

Commit

Permalink
FileStorage add on in the CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
Sreejit-K committed Sep 19, 2023
1 parent cf33a8a commit f8bb890
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ services:
- certificate_health_check_url=http://certificate-api:8078/health
- template_base_url=http://registry:8081/api/v1/templates/ #Looks for certificate templates for pdf copy of the signed certificate
- sunbird_keycloak_user_set_password=true
- filestorage_enabled=false
- filestorage_enabled=${FILESSTORAGE_ENABLED-false}
- filestorage_connection_url=http://file-storage:9000
- filestorage_access_key=admin
- filestorage_secret_key=12345678
Expand Down
1 change: 0 additions & 1 deletion tools/cli/src/config/config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

export interface Config {
DEFAULT_ES_PROVIDER_NAME: string
DEFAULT_NS_PROVIDER_NAME: string
Expand Down
1 change: 0 additions & 1 deletion tools/cli/src/templates/.env

This file was deleted.

1 change: 1 addition & 0 deletions tools/cli/src/templates/.env
1 change: 1 addition & 0 deletions tools/cli/src/templates/.env-cli
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ SIGNATURE_ENABLED=<%= props.signatureEnabled %>
SEARCH_PROVIDER_NAME=<%= props.searchProvideName %>
EVENT_ENABLED=<%= props.eventEnabled %>
CLAIMS_ENABLED=<%= props.enableAttestation %>
FILESSTORAGE_ENABLED=<%= props.fileStorageEnabled %>
1 change: 0 additions & 1 deletion tools/cli/src/templates/config.json

This file was deleted.

1 change: 1 addition & 0 deletions tools/cli/src/templates/config.json
1 change: 0 additions & 1 deletion tools/cli/src/templates/docker-compose.yml

This file was deleted.

1 change: 1 addition & 0 deletions tools/cli/src/templates/docker-compose.yml
4 changes: 4 additions & 0 deletions tools/cli/src/toolbox/registry/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ export default async (toolbox: Toolbox, setupOptions: RegistrySetupOptions) => {
config.docker_service_name.REGISTRY,
config.docker_service_name.KEYCLOAK,
]

setupOptions.fileStorageEnabled = false

// Enable redis for distributed systems
if (
Expand All @@ -43,6 +45,7 @@ export default async (toolbox: Toolbox, setupOptions: RegistrySetupOptions) => {
config.docker_service_name.CERTIFICATE_SIGHNER,
config.docker_service_name.FILE_STORAGE
)
setupOptions.fileStorageEnabled = true
}

// Set ManagerType
Expand All @@ -66,6 +69,7 @@ export default async (toolbox: Toolbox, setupOptions: RegistrySetupOptions) => {
config.docker_service_name.CERTIFICATE_API,
config.docker_service_name.FILE_STORAGE
)
setupOptions.fileStorageEnabled = true
}

// enable Auxiliary services
Expand Down
1 change: 0 additions & 1 deletion tools/cli/src/toolbox/registry/helpers/keycloak.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ class KeycloakWrapper {
throw new Error(
`API call failed to fetch token from keycloak after ${maxRetries} retries.`
)

}

// Get the keycloak client ID of a client
Expand Down
1 change: 1 addition & 0 deletions tools/cli/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ export interface RegistrySetupOptions {
signatureEnabled: boolean
eventEnabled: boolean
enableAttestation: boolean
fileStorageEnabled : boolean
}

export interface RegistryTearDownOptions {
Expand Down

0 comments on commit f8bb890

Please sign in to comment.