Maven-Config-Plugin env KVM update help needed

Not applicable

I have been trying to follow the Maven-Config-Plugin and code provided. I went through all the Readme's provided but to be frank they are preety much high level and does not provide element details on what all changes need to be done if you want to customize or create your own shared-pom.xml.
I created a sample project with the edge.json, pom.xml and shared-pom.xml similar to the one in samples/EdgeConfig. When I run this only changing the KVM names in the edge.json and
providing all the needed details in the profile inside shared-pom. Only the org is getting updated, even though I have envConfig in my edge.json , my env KVM's are not at all updated and always see "No env scoped KVM config found." message. There are no proper help or documents online to solve this issue. Kindly help.

Solved Solved
0 4 1,080
1 ACCEPTED SOLUTION

HI @SnehaNiyogi

Welcome to the community !!

In the sample edge.json, the env config is to deploy to an environment called "test", see line number 4 in the file. If your environment is something else - say "dev", then please update that line to "dev" and run the maven command

Also please note that the samples are in context to the plugin alone. Using shared-pom or single pom is open for developers to decide depending on their preference. Also this is an open sourced project, everything might not be there, so please reach out to us in community or raise an issue in Github. I am sure someone will be able to provide some info.

Hope the above helps, if not, please reach out with more info on what command you are running, your sample edge.json, error you see, etc. That will help us investigate and resolve the issue sooner

View solution in original post

4 REPLIES 4

HI @SnehaNiyogi

Welcome to the community !!

In the sample edge.json, the env config is to deploy to an environment called "test", see line number 4 in the file. If your environment is something else - say "dev", then please update that line to "dev" and run the maven command

Also please note that the samples are in context to the plugin alone. Using shared-pom or single pom is open for developers to decide depending on their preference. Also this is an open sourced project, everything might not be there, so please reach out to us in community or raise an issue in Github. I am sure someone will be able to provide some info.

Hope the above helps, if not, please reach out with more info on what command you are running, your sample edge.json, error you see, etc. That will help us investigate and resolve the issue sooner

Thanks a lot Sai Saran. This did help me solve my issue. As a first step to get familarize with the tool, I feel its better to start working with the working samples and then slowly change to your needs. This is what I am trying to acheive. But your suggestion did work.

I have another question, so now when I am trying to update the existing env KVM which was inserted with

mvn install -Ptest -Dapigee.config.options=create

and now I am running

mvn install -Ptest -Dapigee.config.options=update

I get following error, do we need to do any APIGee server configuration changes for the above command to run

[ERROR] Apigee call failed 410 Gone
{
"code" : "keyvaluemap.service.KeyValueMapUpdateOperationNotSupported",
"message" : "Update of KeyValueMap is not supported; use addEntry/updateEntry
api to add entries to a KeyValueMap",
"contexts" : [ ]
}

Hi @SnehaNiyogi - Glad you were able to make progress. Regarding the issue you mentioned, thats a known issue. The plugin currently does not support KVM update that is CPS enabled. We have them in our roadmap - See here.

We will look into this. But for now, you can run this as

mvn install -Ptest -Dapigee.config.options=delete

and then run

mvn install -Ptest -Dapigee.config.options=create

or else you can try running

mvn install -Ptest -Dapigee.config.options=sync

which should delete and then create the configurations

Thanks Sai Saran for the quick responses. This helped a lot.