Rollback Use case in API Proxy Deployment

Not applicable

We have just one env -prod . Suppose i deploy upgrade of API Proxy as next revision number-2 . This will lead to previous revision as undeployed ,but they still exist .How do i delete these previous revision 1

Secondly ,if i have to rollback to revision 1 due to some issue with latest deployment ,how do i do that using management API .

0 5 827
5 REPLIES 5

Hi @Arpit Sharma, to answer your first question ... I think it is a fail safe to have revisions so you can easily switch and deploy from edge UI or using management API(seamlessly) when required.

It would also be interesting to know how are you deploying? is your code in repository and deploying via scripts? In such cases, your changes are maintained in repos (with your branching model) in that cases you obvious wouldn't want unnecessary previous deployed revision on your proxy. For deleting you can use edge UI or management API -http://docs.apigee.com/management/apis/delete/organizations/%7Borg_name%7D/apis/%7Bapi_name%7D/revisions/%7Brevision_number%7D

For your second question, you can use this management API to deploy a certain revision;

http://docs.apigee.com/management/apis/post/organizations/%7Borg_name%7D/environments/%7Benv_name%7D...;

Also for rolling back, good practice to start with new revision, so your changes are always stored in new working revision and changes to your previous working/deployed revision stays intact, so as said always start with a new revision even if there's a small change, just to avoid issue, also important considering as you have only one prod environment.

Great answer @Kuldeep Bhati , +1

thanks @Anil Sagar 🙂

@Kuldeep Bhati Thanks for the clarification . Just a quick follow up question :

We hope to keep previous revisions for a proxy ,if proxy exists in prev revisions upto say 3-5 revisions . In our organisation ,we have 600+ api proxy published . This means that on each successfull upgrade , 600 or so api proxy of previous revisions get undeployed .

Question is - Where are undeployed revisions stored . And are they loaded in to jvm memory at runtime ? or only the delpoyed ones are loaded at runtime into router jvm runtime .

regards

arpit

Any revision that exists on org will remain there. When you deploy new revision this do not overwrite existing one as long as the review number is different.