Vagrant setup questions

(Del Boy Trotter) #1

Hi, just a general question about Discourses Vagrant setup:

I can see in the Vagrant script that Discourse pulls an image with Redis, Postgre, Node, Ember etc all pre-installed.

Why then is Chef also being used to add apt, build-essential etc after the point?

Is there a reason for this?

(Del Boy Trotter) #2

To add to this, how does Discourse install ember-cli into that box? I am trying to automate this and keep hitting all manner of issues. Is this part done manually before packaging and uploading the box?

(Kane York) #3

The Vagrant box definitely needs to be recreated. I’m doing my dev on my machine outside a VM.

I keep postgresql and redis-server in systemd as disabled, with a script to start both of them.

$ cat ~/projects/discourse/ 
bundle install
# nb: pkexec is graphical sudo
pkexec systemctl start postgresql redis-server
bundle exec rake db:migrate
RAILS_ENV=test bundle exec rake db:migrate

(Del Boy Trotter) #4

So ember-cli and all of it’s dependencies are installed into the Ubuntu box before packaging as a vagrant box and being uploaded so it can be used as base? = 'discourse-'
config.vm.box_url = ""

I seem to be OK getting things like postgresql installed but getting ember-cli setup through the script provisioner is causing me no end of issues