Skip to content
This repository was archived by the owner on Sep 13, 2018. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions install-unix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ fi
echo installling event_name=$1

vm_cmd="cd ~/uber/ && ./run-simple-deploy.sh $1 && rm -f ./run-simple-deploy.sh"
git clone https://github.com/magfest/ubersystem-deploy
test -d ubersystem-deploy || git clone https://github.com/magfest/ubersystem-deploy
cd ubersystem-deploy

@binary1230 binary1230 May 13, 2016

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only issue here: I'd prefer the behavior to be that if ubersystem-deploy already exists, we halt the install. the reason is if we run run-simple-deploy.sh on an existing install, I'm not... 100% sure what's going to happen. at the very least for now I'd call it undefined behavior, though it's more likely to crash because it also clones a bunch of git repos later in the process inside the VM.

the current behavior is that if ubersystem-deploy exists, git will error out with 'can't clone because ubersystem-deploy directory exists' which causes the entire thing to stop.

So, I'd say if we want to test if that dir exists, that's fine, but instead of continuing, we should still error out and say something like

ERROR: Detected an install has already been completed/attempted, to re-install please: 
1) kill any vagrant instances in ubersystem-deploy with 'cd ubersystem-deploy && vagrant destroy'
2) remove ubersystem-deploy directory
3) run this install script again

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or, we could just kill that for now too, the default error message is cryptic but does the right thing. it would be cool to have the more detailed description. if you didn't feel like modifying it right now, you could create an issue like 'display better error message + instructions when ubersystem-deploy already exists'

vagrant up
cp ../installfiles/run-simple-deploy.sh .
vagrant ssh -c \'$vm_cmd\'
vagrant ssh -c "$vm_cmd"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, this makes a ton of sense, it was actually separating out $vm_cmd recently that made it lose the correct quotes, this fix is great, thanks. I don't know how it was working correctly on my local box (Cygwin on windows) actually... weird. +1 on this

# not sure how / if we should do this on *nix
# start http://localhost:8000/uber/accounts/insert_test_admin
Expand Down