Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration service to detect partial loads so that the properties are reload in the case #129

Open
tianliang0038 opened this issue Jun 6, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@tianliang0038
Copy link
Contributor

tianliang0038 commented Jun 6, 2024

Context:
we’ve already written the ConfigLoader tool of the config service which reads in the project’s properties and stores them in Vault. We now need to detect on start up the properties were partially loaded and reload in this case.

DOD

  • Ensure secure handling of sensitive configurations
  • Add new scenario for continue reloading
  • Unit tests will be added to foundation-configuration-store
  • Update documentation
    • reflect the configuration changes needed for the deployment in the antora docs
    • relevant baseline READMEs with any potential nuances with testing implementations

BDD test scenarios

  Scenario: The Configuration Service deal with partial load on start up
     Given a base URI indicating a directory housing valid base configurations 
        And an environment-specific URI indicating a directory housing valid environment-specific configurations
     When the configuration service starts
       Then the configurations are partially loaded into the configuration store
         And the configuration service checks the that the given configurations were partially loaded 
         And the configuration tries reloading until status is fully-loaded. (max 3 tries)

Test Steps:

  1. Create a downstream project
mvn archetype:generate -U -DarchetypeGroupId=com.boozallen.aissemble \
                      -DarchetypeArtifactId=foundation-archetype \
                      -DarchetypeVersion=1.7.0-SNAPSHOT \
                      -DgroupId=com.boozallen.aissemble.test \
                      -DartifactId=test-issue-129 \
                      -DprojectGitUrl=git.example.com/test-issue-129 \
                      -DprojectName="Issue#129 Test"
  1. Unzip the to_be_added file.
  2. Copy the SparkPipeline.json file -pipeline-models/src/main/resources/pipelines directory
  3. Repeatedly execute mvn clean install, following the manual actions after each build until no more remain.
  4. Unzip and copy the test-issues-129-configuration-store-docker folder to the -docker directory and include the module to the -docker/pom.xml file
    <modules>
       ...
        <module>test-issue-129-configuration-store-docker</module> 
        <!-- TODO: Add docker modules here -->
    </modules>
  1. Run mvn clean install
  2. Unzip and copy the configuration-store-service folder to be under the -deploy/src/main/resources/app
  3. Include below content to the Tilt file
yaml = helm(
   'test-issue-129-deploy/src/main/resources/apps/config-store-service',
   name='config-store-service',
   values=['test-issue-129-deploy/src/main/resources/apps/config-store-service/values.yaml',
       'test-issue-129-deploy/src/main/resources/apps/config-store-service/values-dev.yaml']
)
k8s_yaml(yaml)

# configuration-store
docker_build(
    ref='boozallen/test-issue-129-configuration-store-docker',
    context='test-issue-129-docker/test-issue-129-configuration-store-docker',
    build_args=build_args,
    dockerfile='test-issue-129-docker/test-issue-129-configuration-store-docker/src/main/resources/docker/Dockerfile'
)
  1.  Tilt up; wait for the vault service is ready, scroll up to find the root key, unseal keys (see below example),
  • in the -docker/test-issue-129-configuration-store-docker/src/main/resources/krausening/base/encrypt.properties file, replace the secrets.root.key with the ROOT KEY content

  • in the -docker/test-issue-129-configuration-store-docker/src/main/resources/krausening/base/encrypt.properties file, replace the secrets.unseal.keys with the UNSEAL KEYS content (make sure to remove the [], ", and any space)

@tianliang0038 tianliang0038 added the enhancement New feature or request label Jun 6, 2024
@tianliang0038 tianliang0038 changed the title Configuration service to detect partial loads so that the properties aren't restarted on deployment started up. Configuration service to detect partial loads so that the properties are reload in the case Jun 7, 2024
@Cho-William Cho-William modified the milestones: 1.7.0, 1.8.0 Jun 7, 2024
@csun-cpointe csun-cpointe modified the milestones: 1.8.0, 1.9.0 Aug 5, 2024
@ewilkins-csi ewilkins-csi modified the milestones: 1.9.0, 1.10.0 Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants