Cloud Config server:
Its a way by which we can externalize the property values by moving out of the project. Primarily kept for properties that you normally override or keep secret values out of the project src.
Motivation:
- Externalize config data from the applications across all environments.
- Store crucial information such as password for DB in a centralized place.
- Share data between different services.
- See who changed which property and when and why.
What should you do to use Spring cloud config
- Application configuration:
- Manage app configuration in a git hub or a local file system.
- Config server
- Point the location of GIT or local file system where the app config is located (i.e., GIT URI)
- @EnableConfigServer
- Config client
- Use it normally as how you would read from the properties file
- @Value or
Features
- Many storage options including Git, Subversion.
- Pull model
- Traceability
- @RefreshScope for allowing properties to refresh. Calls the constructor of the beans and reinitializes it.
- @ConfigurationProperties alternate for @RefreshScope which does reinitialize the Bean that is annotated with @ConfigurationProperties.
- Encrypt and decrypt property values.
Usecases for Cloud config:
- Change log level in the properties.
- Environment config - containing passwords.
- Toggle a feature on or off.
- Using @RefreshScope
- @ConfigurationProperties.
Order in which the Cloud config looks into the properties files.
- Config server.
- Command line parameters
- System properties.
- Classpath: application.yml file
- Classpath: bootstrap.yml
Things that you can try:
- Simple example to demonstrate properties in Git and reading from config server and client
- Using maven profiles specific properties in Config server in Github.
- Managing log levels in the Config server
- Using @RefreshScope and @CofigurationProperties.
Best practices:
- Config server communication with the Git hub, pull every time when client requests for properties file. Use a Jenkins job which will push the properties to a Config server properties (clone).
- Single repository for all teams, subdirectories for different environments.
- Source code maintenance, having branch per release vs always using the master.
- Managing encrypted values for secure data, using JWT with Config server.
- Use Spring cloud bus to refresh all the services which listens to the rabbitmq.
Note:
- Store only things that need to be externalized, I.e., Resource bundles for internationalization should be at the project level.
It's interesting that many of the bloggers to helped clarify a few things for me as well as giving.Most of ideas can be nice content.The people to give them a good shake to get your point and across the command
ReplyDeleteautomation anywhere training in chennai
automation anywhere training in bangalore
automation anywhere training in pune
automation anywhere online training
blueprism online training
rpa Training in sholinganallur
rpa Training in annanagar
iot-training-in-chennai
blueprism-training-in-pune
automation-anywhere-training-in-pune
Well Said, you have furnished the right information that will be useful to anyone at all time. Thanks for sharing your Ideas.
ReplyDeleteData Science Training in Chennai
Data science training in bangalore
Data science online training
Data science training in pune
Data science training in kalyan nagar
selenium training in chennai
Very good brief and this post helped me alot. Say thank you I searching for your facts. Thanks for sharing with us!
ReplyDeletejava training in tambaram | java training in velachery
java training in omr | oracle training in chennai
java training in annanagar | java training in chennai
Wonderful bloggers like yourself who would positively reply encouraged me to be more open and engaging in commenting.So know it's helpful.
ReplyDeletepython training in pune
python online training
python training in OMR
Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging.
ReplyDeleteDevops training in sholinganallur
Devops training in tambaram
DevOps online Training
I am definitely enjoying your website. You definitely have some great insight and great stories.
ReplyDeleteBlue Prism Training Course in Pune
Blue Prism Training Institute in Bangalore
Well somehow I got to read lots of articles on your blog. It’s amazing how interesting it is for me to visit you very often.
ReplyDeleteangularjs Training in bangalore
angularjs Training in bangalore
angularjs Training in btm
angularjs Training in electronic-city
angularjs online Training
angularjs Training in marathahalli
Thanks for sharing such an amazing information its very beneficial for our company. our company name is innomatics research labs we offering data science,big data and many more courses to make student career success full and we are giving online, classroom and corporate training our website .Automation Anywhere Training in Bangalore
ReplyDeleteMastech InfoTrellis - Data and Analytics Consulting Company extending premier services in Master Data Management, Big Data and Data Integration. good luck.
ReplyDeleteAi & Artificial Intelligence Course in Chennai
PHP Training in Chennai
Ethical Hacking Course in Chennai Blue Prism Training in Chennai
UiPath Training in Chennai