Best practice for managing and deploying environment config

Not applicable

Hi,

I want to version control enviroment settings such as products and key values, and to be able to promote the settings to different environements when I see fit.

I can store the JSON retrieved from the management API for each item like products, that's fine. But, I am not sure what the best practice is for promoting the, say, product information to an environment using a tool like Jenkins.

I can see there is a apigee-config-maven-plugin, is this widely used and the recomended way to promote environment settings? Or, do people genarlly setup Jenkins to "curl" the settings directly?

Thanks in advance.

Solved Solved
0 7 858
1 ACCEPTED SOLUTION

HI @Simon Pink

I would encourage using the plugin. I believe it has the requirements you are asking for. There are some more enhancements we are planning to add on which is in the roadmap. But feel free to use it and open an issue so that we can prioritize and get them out. Feel free to do a PR too

The other reason why I recommend this is - if there are any changes to the Mgmt API or anything else around it, we can incorporate that within the plugin and by just changing your pom to use the latest version, you can continue your process otherwise all your scripts on all your jobs needs to be revisited.This plugin will surely be helpful in your CI pipeline.

Please reach out to us if you have any questions regarding the plugin, its documentation, features, etc

View solution in original post

7 REPLIES 7

Hi @Simon Pink,

The apigee-config-maven-plugin is an ideal choice that is not currently functionally complete. There is a number of edge env objects that are not supported yet. Usually, you have a bash script that implements your configuration by calling curl that Jenkins can run against your org and that you put under SCM control.

Of course, it is dangerous to recommend a bash script that would be good to everyone's taste, but here is one as an example and just to get you started, createenvconf.txt (the .txt needs to be removed, it's here only because upload file process needs a well-known extension.

Regards

Thanks @ylesyuk1

I have decided to go the plugin route. It fits our immediate needs and hopefully the plugin will grow more feature rich. One thing which would be nice, would be able to split up by say product.json files, instead of one global edge.json file.

HI @Simon Pink

I would encourage using the plugin. I believe it has the requirements you are asking for. There are some more enhancements we are planning to add on which is in the roadmap. But feel free to use it and open an issue so that we can prioritize and get them out. Feel free to do a PR too

The other reason why I recommend this is - if there are any changes to the Mgmt API or anything else around it, we can incorporate that within the plugin and by just changing your pom to use the latest version, you can continue your process otherwise all your scripts on all your jobs needs to be revisited.This plugin will surely be helpful in your CI pipeline.

Please reach out to us if you have any questions regarding the plugin, its documentation, features, etc

Thanks Sai Saran Vaidyanathan.

I have decided to go the plugin route. It fits our immediate needs and hopefully the plugin will grow more feature rich. One thing which would be nice, would be able to split up by say product.json files, instead of one global edge.json file.

Cool.. Feel free to open a issue here

The config plugin now supports an ability to split your configuration to separate json file.

https://github.com/apigee/apigee-config-maven-plugin

<code>-Dapigee.config.dir=<dir>
     dir containing individual json files.

Credit for this goes @Madhan Sadasivam!


Not applicable

This config plugin seems great, but I wonder which privilege level is required to have it run correctly.

Since Management API does not allow to grant creation privilege to custom role for some resources like TargetServers or KVM, I guess this plugin requires Org Admin privileges.

Am I right ?