Cloud configurations

28 views
Skip to first unread message

Andrus Adamchik

unread,
Dec 24, 2020, 6:17:59 AM12/24/20
to Bootique User Group
A heads up on a set of new important features in Bootique that streamline cloud app deployments. Traditionally Bootique would allow to load configuration from YAML, JSON, CLI switches and shell vars. But in cloud environments some sort of secret manager is often in use, and you'd like your app to grab values from it directly. So we did a couple of things in Bootique to make it happen:

1. A pluggable configuration loading pipeline [1] with an API to chain multiple sources of configuration so that data from a preceding source can be fed to subsequent sources that can load their own configuration and merge it to a common in-memory JSON tree.

2. An implementation of a config loader that gets its data from AWS Secrets Manager [2]:

// enable AWS config loading
AwsSecretsModule.extend(b).loadConfigurationFromSecrets();

// specify which secrets you want to load and where you want
// to merge them on the main config tree
awssecrets:
secrets:
- awsName: mySecret
mergePath: jdbc.mydb

This code is available as part of "io.bootique.aws:bootique-aws-secrets" module (version 2.0.B1-SNAPSHOT). Appreciate feedback and suggestions.

Merry Christmas!
Andrus

[1] https://github.com/bootique/bootique/issues/300
[2] https://github.com/bootique/bootique-aws/issues/5

Andrus Adamchik

unread,
Dec 30, 2020, 6:44:33 AM12/30/20
to Bootique User Group
Just tried this approach in a real system, resulting in a bunch of refactoring and simplification (e.g. there's now an out-of-the-box conversion of RDS secrets into usable DataSource configs). Also added some shortcuts for writing AWS Lambdas. Really happy with the resulting integration. I just committed the initial docs showing how to use the final product:


Andrus

Marc Lherbette

unread,
Jun 22, 2022, 4:27:56 AM6/22/22
to Bootique User Group
Hi ! It would be very nice if we could initate the same work for Azure Cloud Services (especially a support for azure-security-keyvault-secrets  and azure-storage-blob libraries). How the minimal stucture of a new bootique module could be made to be open for contribution ?

Marc

Andrus Adamchik

unread,
Jun 22, 2022, 5:44:22 AM6/22/22
to Bootique User Group
Hi Marc,

Yeah, mirroring for Azure what we've done for AWS would be great. I will create a GitHub project with the basic structure. Stay tuned. 

Appreciate your offer to contribute to this effort. Since this may be a significant piece of code, would you be willing to sign our CLA at https://bootique.io/cla/ ?

On a technical side, looks like we won't have the luxury of Testcontainers/Localstack for testing our Azure code, and also won't be able to provide test utilities to the end users. Trying to research this now. Only came up with this so far - https://www.testcontainers.org/modules/azure/ , which is kind of thin.

Andrus


--
You received this message because you are subscribed to the Google Groups "Bootique User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bootique-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bootique-user/fab8856c-df7f-450a-a634-41b4370cae90n%40googlegroups.com.

Andrus Adamchik

unread,
Jun 23, 2022, 4:52:51 AM6/23/22
to Bootique User Group
The repo is created:


It is a multi-module project, with only one child module initially. A few notes:

1. Appreciate if you could sign and send us the CLA, so we can accept bigger contributions from you
2. Please submit the code in smaller PRs, 1 feature per PR
3. Architecturally, let's try to follow the AWS structure where possible. E.g. the main module should be about authentication to Azure, there will be separate modules per Azure service. We can discuss the details here or on GitHub per task.

Andrus
Reply all
Reply to author
Forward
0 new messages