Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull out things that can be put into variables into variables #1

Open
ruebot opened this issue Oct 1, 2015 · 5 comments
Open

Pull out things that can be put into variables into variables #1

ruebot opened this issue Oct 1, 2015 · 5 comments

Comments

@ruebot
Copy link
Contributor

ruebot commented Oct 1, 2015

From @ksclarke on May 27, 2015 5:19

Some things to variablize...

port numbers, user names, passwords, etc.

Copied from original issue: Islandora-Labs/islandora_vagrant#70

@ruebot
Copy link
Contributor Author

ruebot commented Oct 1, 2015

From @lo5an on May 27, 2015 16:20

I need to do some of this for #22 so I was thinking about this last night.

We've got two spaces where we need variables: the Ruby script in our Vagrant file, and the various bash scripts. There's going to be some overlap, especially for things like port numbers. It looks like it's pretty easy for Ruby to make use of bash environment variables, so my inclination is to put everything in configs/variables and do something like . ./configs/variables; vagrant up to build VMs, but I'm wondering if that would be problematic for Windows folks.

@ruebot
Copy link
Contributor Author

ruebot commented Oct 1, 2015

From @lo5an on May 28, 2015 22:2

An alternate method that might be more portable would be to do something like :

file='./configs/variables'
File.readlines(file).each do |line|
  key, value = line.split "="
  ENV[key] = value
end

Although that has the downside of breaking if we use anything other than var="literal" in the variables file.

Both of these feel kind of clunky, and I get the feeling that I'm missing some obviously better solution.

@ruebot
Copy link
Contributor Author

ruebot commented Oct 1, 2015

From @ksclarke on May 28, 2015 22:15

I thought I'd responded here, but I guess I never clicked submit. We could write a simple little batch script to launch vagrant for Windows users (sourcing the variables from the file), but I actually assume (perhaps falsely) that anyone who'd want to build a Vagrant box, and who is stuck on Windows, would be using Cygwin or MSYS or something (where the first option would work). Perhaps that's a bad assumption on my part (I'm not a Windows user), but I can't imagine how they could function otherwise. </snarky_opinion>

But all that said, I don't have strong opinions about the two choices above -- either seems workable to me.

@ruebot
Copy link
Contributor Author

ruebot commented Oct 1, 2015

From @lo5an on June 3, 2015 3:56

Just submitted PR #71 with two environment variables.

@ruebot
Copy link
Contributor Author

ruebot commented Oct 1, 2015

From @bradspry on September 28, 2015 21:49

Here's a link to some basic information about Vagrant and AWS; I'm wholeheartedly interested in developers having the means to generate server-class Islandora VMs for the specific purpose of load testing. I have experienced code and system failure due to high loads. Developers should be able load test their software, so they can observe how their software holds up during massive file operations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant