How do you maintain java webapps in different staging environments?

后端 未结 13 2586
傲寒
傲寒 2020-12-29 10:23

You might have a set of properties that is used on the developer machine, which varies from developer to developer, another set for a staging environment, and yet another fo

13条回答
  •  孤独总比滥情好
    2020-12-29 11:03

    One solution I have seen used is to configure the staging environment so that it is identical to the production environment. This means each environment has a VLAN with the same IP range, and machine roles on the same IP addresses (e.g. the db cluster IP is always 192.168.1.101 in each environment). The firewalls mapped external facing addresses to the web servers, so by swapping host files on your PC the same URL could be used - http://www.myapp.com/webapp/file.jsp would go to either staging or production, depending on which hosts file you had swapped in.

    I'm not sure this is an ideal solution, it's quite fiddly to maintain, but it's an interesting one to note.

提交回复
热议问题