Skip to content

Commit ddff23c

Browse files
committed
Updated Vagrantfile to support Vagrant 1.1.2 - you will probably need to download
Vagrant again! http://downloads.vagrantup.com/
1 parent 73b2d6f commit ddff23c

13 files changed

Lines changed: 13654 additions & 184 deletions

File tree

Vagrantfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
# See https://github.com/discourse/discourse/blob/master/docs/VAGRANT.md
44
#
55
Vagrant.configure("2") do |config|
6-
config.vm.box = 'discourse-pre'
7-
config.vm.box_url = 'http://www.discourse.org/vms/discourse-pre.box'
6+
config.vm.box = 'discourse-0.8.4'
7+
config.vm.box_url = 'http://www.discourse.org/vms/discourse-0.8.4.box'
88

99
# Make this VM reachable on the host network as well, so that other
1010
# VM's running other browsers can access our dev server.
@@ -49,7 +49,6 @@ Vagrant.configure("2") do |config|
4949
chef.cookbooks_path = chef_cookbooks_path
5050
chef.add_recipe "recipe[apt]"
5151
chef.add_recipe "recipe[build-essential]"
52-
chef.add_recipe "recipe[phantomjs]"
5352
chef.add_recipe "recipe[vim]"
5453
end
5554
end

chef/Cheffile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,5 @@ site 'http://community.opscode.com/api/v1'
55

66
cookbook 'apt'
77
cookbook 'vim'
8-
cookbook 'phantomjs'
98
cookbook 'build-essential'
109
cookbook 'omnibus_updater'

chef/Cheffile.lock

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,11 @@ SITE
44
apt (1.8.4)
55
build-essential (1.3.4)
66
omnibus_updater (0.1.2)
7-
phantomjs (0.0.10)
87
vim (1.0.2)
98

109
DEPENDENCIES
1110
apt (>= 0)
1211
build-essential (>= 0)
1312
omnibus_updater (>= 0)
14-
phantomjs (>= 0)
1513
vim (>= 0)
1614

chef/cookbooks/phantomjs/CHANGELOG.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

chef/cookbooks/phantomjs/README.md

Lines changed: 0 additions & 27 deletions
This file was deleted.

chef/cookbooks/phantomjs/attributes/default.rb

Lines changed: 0 additions & 3 deletions
This file was deleted.

chef/cookbooks/phantomjs/metadata.json

Lines changed: 0 additions & 52 deletions
This file was deleted.

chef/cookbooks/phantomjs/metadata.rb

Lines changed: 0 additions & 18 deletions
This file was deleted.

chef/cookbooks/phantomjs/recipes/default.rb

Lines changed: 0 additions & 52 deletions
This file was deleted.

docs/DEVELOPER-ADVANCED.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,17 @@ to rails, you are likely much better off with our **[Discourse Vagrant Developer
1111
3. Clone the project.
1212
4. Create development and test databases in postgres.
1313
5. Copy `config/database.yml.sample` and `config/redis.yml.sample` to `config/database.yml` and `config/redis.yml` and input the correct values to point to your postgres and redis instances.
14-
6. We recommend starting with seed data to play around in your development environment. [Download Seed SQL Data](http://www.discourse.org/vms/dev-discourse-seed.sql). Install it into postgres using a command like this: `psql -d discourse_development < dev-discourse-seed.sql`.
14+
6. Install the seed data to set up an admin account and meta topic: `psql DATABASE_NAME < pg_dumps/production-image.sql`
1515

1616

1717
## Before you start Rails
1818

1919
1. `bundle install`
20-
2. `rake db:create`
21-
3. `rake db:migrate`
22-
4. `rake db:test:prepare`
23-
5. `rake db:seed_fu`
24-
6. Try running the specs: `bundle exec rspec`
25-
7. `bundle exec rails server`
20+
2. `rake db:migrate`
21+
3. `rake db:test:prepare`
22+
4. `rake db:seed_fu`
23+
5. Try running the specs: `bundle exec rspec`
24+
6. `bundle exec rails server`
2625

2726
You should now be able to connect to rails on http://localhost:3000 - try it out! The seed data includes a pinned topic that explains how to get an admin account, so start there! Happy hacking!
2827

@@ -34,7 +33,7 @@ Here are the steps we used to create the **[Vagrant Virtual Machine](https://git
3433

3534
## Base box
3635

37-
Vagrant version 1.0.5. With this Vagrantfile:
36+
Vagrant version 1.1.2. With this Vagrantfile:
3837

3938
Vagrant::Config.run do |config|
4039
config.vm.box = 'precise32'
@@ -77,8 +76,8 @@ Vagrant version 1.0.5. With this Vagrantfile:
7776
adduser vagrant rvm
7877
source /etc/profile.d/rvm.sh
7978
su - vagrant -c "rvm pkg install libyaml"
80-
su - vagrant -c "rvm install 1.9.3-p374"
81-
su - vagrant -c "rvm use 1.9.3-p374 --default"
79+
su - vagrant -c "rvm install 2.0.0-turbo"
80+
su - vagrant -c "rvm use 2.0.0-turbo --default"
8281

8382
echo "gem: --no-rdoc --no-ri" >> /etc/gemrc
8483
su - vagrant -c "echo 'gem: --no-rdoc --no-ri' >> ~/.gemrc"
@@ -93,6 +92,7 @@ Configure so that the vagrant user doesn't need to provide username and password
9392
psql -c "ALTER USER vagrant WITH PASSWORD 'password';"
9493
createdb vagrant
9594
psql -c "CREATE EXTENSION hstore;"
95+
psql -c "CREATE EXTENSION pg_trgm;"
9696
psql -c "ALTER USER vagrant CREATEDB"
9797
psql -c "create database discourse_development owner vagrant encoding 'UTF8' TEMPLATE template0;"
9898
psql -c "create database discourse_test owner vagrant encoding 'UTF8' TEMPLATE template0;"
@@ -109,11 +109,11 @@ Edit /etc/postgresql/9.1/main/pg_hba.conf to have this:
109109
host all all ::1/128 trust
110110
host all all 0.0.0.0/0 trust # wide-open
111111

112-
Download a database image from [http://discourse.org/vms/dev-discourse-seed.sql][seed_download].
112+
Load the seed data (as vagrant user):
113113

114-
Load it (as vagrant user):
114+
psql -d discourse_development < pg_dump/development-image.sql
115115

116-
psql -d discourse_development < dev-discourse-seed.sql
116+
(You may wish to try the `production-image.sql` file for a good seed for a production database.)
117117

118118
## Redis
119119

@@ -129,4 +129,3 @@ Load it (as vagrant user):
129129
# Press enter to accept all the defaults
130130
/etc/init.d/redis_6379 start
131131

132-
[seed_download]: (http://discourse.org/vms/dev-discourse-seed.sql)

0 commit comments

Comments
 (0)