-
Notifications
You must be signed in to change notification settings - Fork 312
Vagrant upgrade with a little bit of email noise #211
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
a90504c
Updated New Relic t-shirt image
just3ws 9803ed6
Updated the Vagrant bootstrap to be entirely self-contained. The new …
just3ws 3d8f5b6
Update README.md
mdeiters 8a1bf9e
Script to generate a new box
just3ws dd6708d
Added helpers to make starting the app in one command easier
just3ws File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
vagrant ssh -c ". /home/vagrant/web/vagrant/run" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
vagrant ssh -c ". /home/vagrant/web/vagrant/run" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,13 @@ | ||
#!/bin/bash -x | ||
export DEBIAN_FRONTEND=noninteractive | ||
cd /home/vagrant | ||
echo Who am I? You are `whoami`. | ||
echo Where am I? You are in `pwd` | ||
echo I think my home is $HOME | ||
echo export EDITOR=vim >> $HOME/.bashrc | ||
# Enable accessing Postgres from the host machine | ||
apt-get -y install libcurl3 libcurl3-dev libcurl3-gnutls libcurl4-openssl-dev | ||
apt-get -y install libpq-dev | ||
apt-get -y install libxml2 libxml2-dev libxslt1-dev | ||
echo "listen_addresses = '*'" | tee -a /var/pgsql/data/postgresql.conf | ||
echo host all all 0.0.0.0/0 trust | tee -a /var/pgsql/data/pg_hba.conf | ||
sudo su postgres -c 'pg_ctl stop -D /var/pgsql/data 2>&1' | ||
sudo su postgres -c 'pg_ctl start -D /var/pgsql/data 2>&1 &' | ||
su -c "ln -s /vagrant /home/vagrant/web" vagrant | ||
su -c "source /home/vagrant/web/vagrant/user-config.sh" vagrant | ||
|
||
# Ensure the database is started | ||
su -c '/usr/bin/pg_ctl start -l /var/pgsql/data/log/logfile -D /var/pgsql/data' postgres | ||
|
||
sudo su - vagrant <<-'EOF' | ||
cd ~/web | ||
bundle check || bundle install | ||
# Force the app to use the internal Postgres port number and ignore .env | ||
DEV_POSTGRES_PORT=5432 bundle exec rake db:migrate | ||
DEV_POSTGRES_PORT=5432 bundle exec rake db:test:prepare | ||
EOF |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
cd ~/assemblymade/coderwall | ||
vagrant halt | ||
vagrant destroy -f | ||
vagrant box remove coderwall | ||
cd vagrant/coderwall-box | ||
rm -rf output-virtualbox-iso | ||
rm -rf packer_virtualbox-iso_virtualbox.box | ||
rm -rf packer_cache | ||
packer validate template.json | ||
packer build template.json | ||
vagrant box add coderwall ./packer_virtualbox-iso_virtualbox.box |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
sudo su - vagrant <<-'EOF' | ||
cd ~/web | ||
rvm requirements | ||
bundle check && bundle install | ||
cd | ||
rm -rf ~/bootstrap | ||
EOF |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this madness ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That madness is to make sure it's done. It's only run when creating the new box because I have to manually paste in all my ENV variables
export ENV_KEY=foobarbaz
to run the app during box creation but it takes a LONG time to get to the point where they're needed or will be missed.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, I was a little tired when I smashed that in there.
It was at least pasted in using a Vim repeating command. ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other reason for it being pasted versus automated is so I see it loud and clear the next time I have to look at the script.