i am a full stack developer for the web. as a part of my job sometimes i need to manage development and production servers.
i want to keep production and development servers as exactly same as possible in packages and configuration.
so basically, i want to have exact copy of old server whenever i need.
i don't want to use disk images because i can't transfer disk images between cloud providers. (sometimes i need it)
to achieve me needs, i'm using a shell script that installs specific versions of the packages. example:
aptitude install -y apache2=2.4.18-2ubuntu3.1
aptitude install -y libapache2-mod-ruid2=0.9.8-3
... and so on
So i wonder...
- is this a good approach?
- is there any better solution?
- how long a specific version of a package hosted in repositories?