Skip to content

README for WorkerApplication#130

Open
CarlG2001 wants to merge 1 commit intomasterfrom
new-readme-workerapplication
Open

README for WorkerApplication#130
CarlG2001 wants to merge 1 commit intomasterfrom
new-readme-workerapplication

Conversation

@CarlG2001
Copy link

Created a README file for WorkerApplication to explain all the configs and HK2 bindings. Also with some options on how to convert over to Quarkus.

@simonsoft-buildbot
Copy link
Collaborator

Can one of the admins verify this patch?

Copy link
Member

@takesson takesson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good, address some commends in the readme directly.

Some comments are require more research while doing the refactoring. I suggest we keep this PR open and keep the discussion in these comment threads.

- Quarkus suggestion: Map to `@ConfigProperty` in `application.properties`.

2. cloudId
- Type and name: Context: cloudId. ENV: CLOUDID
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Current logic:
context parameter overrides environment variable, enables multiple workers.

The context parameter should be refactored to @ConfigProperty. Let's drop the ENV support.

- What it does: Identifies the AWS worker instance. If not set, AWS worker will not start.
- Quarkus suggestion: Map to `@ConfigProperty`.

3. aws.accessKeyId
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drop both accessKeyId and secretKey. We will rely entirely on DefaultAwsRegionProviderChain.

This is possible because in CMS 5.3 cloud setup we no longer need separate API keys for multi-worker installations.

5. AWS Region
- Type and name: ENV (AWS default region configuration)
- What it does: Determines which AWS region is used. And default fallback is eu-west-1.
- Quarkus suggestion: Use `quarkus.amazon.region` or `@ConfigProperty`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, will see which is needed depending on how the S3 / SFN clients are injected. We can remove the default if it simplifies the implementation.

Important:
When running on EC2 it MUST detect automatically, typically via regionProvider.getRegion()

- What is does: Defines local filesystem export path. If set, export uses local file system instead of S3.
- Quarkus suggestion: Map to `@ConfigProperty`.

8. APTAPPLICATION
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

APTAPPLICATION must remain an ENV because it is used by Arbortext as well.

- What it does: Enables S3 transfer acceleration.
- Quarkus suggestion: Map to `@ConfigProperty`.

7. PUBLISH_FS_PATH
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should remain an ENV (same name)

- What it does: Determines which AWS region is used. And default fallback is eu-west-1.
- Quarkus suggestion: Use `quarkus.amazon.region` or `@ConfigProperty`.

6. PUBLISH_S3_ACCELERATED
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should remain an ENV (same name)

2. region
- Class / Type: Region.
- Purpose: Represents the AWS region used by AWS clients.
- Quarkus suggestion: Inject via `@ConfigProperty` or `@Singleton`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure, depends on how clients are injected. Might be better with @produces

5. SfnClient
- Class / Type: SfnClient.
- Purpose: AWS Step Functions client
- Quarkus suggestion: Replace with `@Singleton` or Quarkus AWS SDK client injection.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be more consistent to use @produces since S3Client / exportProviders and other stuff needs @produces.

- Purpose: Contains multiple export provider implementations.
- "fs" --> CmsExportProviderFsSingle (local file export).
- "s3" --> CmsExportProviderAwsSingle (S3 export).
- Quarkus suggestion: Inject as a singleton bean with `@Produces`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, produce the whole Map which means we (hopefully) don't have to modify the code using this Map.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants