owned this note
owned this note
Published
Linked with GitHub
Dynamically changing configuration for an applications running in the cloud without having to restart the application is pretty useful. This functionality enables a seamless experience for secrets rotation, feature flags, update API endpoints, set logging verbosity, and plenty of other usecases.
You can dynamically update the Spin application's configuration on Fermyon's cloud without having to restart or redploy as of Fermyon Spin 1.3.0 using the `spin cloud variables` command.
```console
$ TODO insert example show set, list, delete?
```
Now lets explore how you can use the configuration feature in your Spin application.
## Integrating with External Services
~~Your Spin application may interface with databases, message queues, or third-party APIs. Instead of hardcoding configurations, you can inject them at runtime and then update without modifying the application code.
~~
Your Spin application may interface with external databases, message queues, or third-party APIs. Use Fermyon's configuration feature to inject information about these systems at deploy time and update as needed without modifying the application code.
## Secret Rotation
Modern security best practice dictates that everything from passwords to certificates should be changed frequently. Use Fermyon's configuration feature to externalize your application's sensitive data such as passwords, encryption keys, or API tokens away from your business logic. Through utilizing configuration in conjunction with `spin cloud variables`, you can easily manage and update your application's security configurations as needed thereby strengthening the overall security posture of your deployed application.
~~Applications often require various security measures to protect sensitive data and restrict access to authorized uses. Configuration allows you to externalize your application's sensitive data such as passwords, encryption keys, or API tokens away from your business logic. Through utilizing configuration in conjunction with `spin cloud variables`, you can easily manage and update your application's security configurations as needed thereby strengthening the overall security posture of your deploy application.
~~
## Logging Settings
~~Configuration in cloud applications is often paired with logging to control and manage the logging behavior and settings of the application.~~
~~Application's are often deployed with certain default logging settings including verbosity. As incidents arise to analyze more closely, it's often desired to increase levels of verboisty so as to gain deeper insights into behavior of your application. Use Fermyon's configuration, to dynamically update the verbosity level that your application's is currenty logging.
~~
Applications are often deployed with default logging settings such as verbosity. In the event that you're seeing unexpected errors or end users are experiencing unexpected behavior, it's useful to be able to change logging verbosity at runtime to get real time, production information to properly diagnose potential bugs. Use
but say your application is receiving errors or behaving in an unexpected way. One way to debug or get more information about potential bugs or unexpected behavior is to increase the logging verbosity level to get real time, production information to properly diagnose potential bugs. Increase logging verbosity using Fermyon's configuration tool to gain deeper insights into the behavior of the application at runtime as needed without having to re-deploy the application.
properly diagnose
insufficient
potential bugs
fix bugs
then re-deploy
real time debugging of potential bugs by capturing logs at increased verbosity.
TODO: provide snippets demonstrating flow of updating logging level
## Feature Flags
TODO
### A/B testing
TODO -- maybe inline as example of using feature flags
## Until next time
As we have seen, there are many valuable uses of Fermyon's configuration feature. We'd love to hear yours! If you want to share your ideas or ask questions drop in to the [Fermyon Discord server](https://discord.gg/AAFNfS7NGf) or say hello on Twitter [@fermyontech](https://twitter.com/fermyontech/) and [@spinframework](https://twitter.com/spinframework).
* Link to docs
*
##### Scratch
Fermyon's configuration feature allows you to dynamically update your application's configuration without having to restart or re-deploy. This enables a seamless experience to rotate secrets, toggle feature flags, update API endpoints, set logging verbosity, and plenty of other usecases.
With the `1.3.0` (or later) release of Fermyon Spin, you can now set, list, and delete your application's configuration variables using the `spin cloud variables` command.
In this article, we will explore building an example application that highlights the power of Fermyon's configuration stack exercising common practices our developers employ today.
It is common practice for cloud applications to rely on external services such as databases, messaging queues, and third-party APIs. By leveraging configuration, you can easily switch between different service providers or update their configurations without modifying the application's code, enabling flexibility and seamless integration with external systems.