Islandora-Labs / islandora_vagrant_base_box

This is a base box for Islandora Vagrant
https://app.vagrantup.com/islandora/boxes/islandora-base
GNU General Public License v3.0
3 stars 13 forks source link

Seperate out the more OS-specific parts of the scripts to make porting easier #2

Open ruebot opened 8 years ago

ruebot commented 8 years ago

From @lo5an on March 19, 2015 18:4

If there's interest in eventually supporting additional Linux distributions like CentOS, then it might make sense to put the more OS-specific parts of the scripts into their own files.

_Copied from original issue: Islandora-Labs/islandoravagrant#23

ruebot commented 8 years ago

This is definitely a good topic for the next DevOps IG call.

I have some thoughts around how we could implement this, and wanted to run it by the group. tl;dr wrap all OS-specifc parts in if statements, add if statements to Vagrantfile, and tie that all to a build environment variable. So, vagrant up OS=Ubuntu would get you Ubuntu.

All that said, if anybody wants to claim this work, they should :smile:

ruebot commented 8 years ago

From @AndrewGearhart on May 20, 2015 21:6

Seems the best way to support this (as vagrant doesn't support other command line arguments) is to use environment variables. so, it would be something along the lines of

os=ubuntu vagrant up

and in the vagrantfile

 if ENV['os'].nil?
      stuff for if there's no OS selected
    else
      stuff for if there is an OS identified (would need to check for whether the selected OS is supported or not)
    end

I think this is a cool option, but my head is swimming with the number of variances for the different OS options (and their package managers).