lcreid / rails-5-jade

Rails 5 with Jekyll and Node on Ubuntu 18.04
MIT License
29 stars 3 forks source link

Refactor builds to cover development and production #30

Closed lcreid closed 5 years ago

lcreid commented 5 years ago

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 be vagrant, 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.

lcreid commented 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.

lcreid commented 5 years ago

Differences between the MS-SQL Server and Postgres versions:

Perhaps we can pull host name out and set it in the final build scripts, since those are different anyway.

lcreid commented 5 years ago

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.

lcreid commented 5 years ago

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.

lcreid commented 5 years ago

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.

lcreid commented 5 years ago

I think this is mostly handled now.