Closed lcreid closed 5 years ago
I currently have different branches of this project for Postgres and MS SQL Server. That is not a convenient solution, as it's too easy for the scripts to diverge.
Differences between the MS-SQL Server and Postgres versions:
preseed.cfg
it's the host name.Vagrantfile
it's the box name. There is currently also a difference in memory allocation, but the memory is set in template.json
anywaytemplate.json
we have most of the differences:
Perhaps we can pull host name out and set it in the final build scripts, since those are different anyway.
Could we set the host name based on the directory name of the shared directory? Have to make sure it works on Windows. Otherwise, it might make more sense to set it in template.json
, since that's the file that has to change anyway. Unless we're taking an approach where we pre-build the underlying VM, and then build the different boxes on top of the common box.
So we can use Packer to build an OVF/OVA file from an ISO, then use that OVF/OVA file as the starting point to provision a box you can put on Vagrant Cloud.
I didn't get building a separate OVF and VMDK files first and then building the box to work. The second build started with the hosts local time (Pacific) being interpreted on the guest as UTC, which meant we couldn't apt
anything.
I think this is mostly handled now.
We have a variety of environments to support:
One of the challenges with other providers is that the Ubuntu
preseed.cfg
script we use for Vagrant sets up the default user to bevagrant
, which while not unusable, might seem a bit strange in other environments (AWS or other cloud images, or other local virtualization solutions). We also install some things that we don't really need to, because they have to be set up in the script for the production environments.Another part of this is the organization and naming of the project/repository.
In some cases we need a Bash script that we run on an existing image. In other cases we want to build an image with Packer and run the same scripts and others on that image.