Vagrant installation update & testing

532 views
Skip to first unread message

Xavier Antoviaque

unread,
Jul 11, 2013, 6:37:04 AM7/11/13
to edx-...@googlegroups.com
Hi,

If you use the "Simplified install with vagrant" or are currently trying
to install it, know that an update has been pushed yesterday, and is now
on the official repository. It fixes many bugs, especially on Windows,
and needs further testing!

https://github.com/edx/edx-platform#installation---the-first-time

And don't forget to look at the troubleshooting section if you have any
issue:

https://github.com/edx/edx-platform/wiki/Simplified-install-with-vagrant#troubleshooting

Let me know how it works for you in this thread, and if you ran into any
trouble. Thanks!

If you had tried the install before, since it was previously from my
repository, the best is to start from scratch, following the
instructions on
https://github.com/edx/edx-platform#installation---the-first-time .
Alternatively, you can fetch the official repository from the clone of
my repository, but I would only recommend this if you have a working
knowledge of git: `git://github.com/edx/edx-platform.git`.

--
Xavier.

Andrés Meza Escallón

unread,
Jul 11, 2013, 10:26:42 AM7/11/13
to edx-...@googlegroups.com
Hi Xavier.
   I cloned a fresh copy from the official repository, fixed the symlinks in Windows and proceeded to create a new box with "vagrant up". It seems to work just fine until line 359 of "scripts/create-dev-env.sh":

    output "Installing Ruby $RUBY_VER"
    rbenv install $RUBY_VER
    rbenv global $RUBY_VER

The process seems to have got stuck there. The last output at the terminal is:

←[36m
Installing Ruby 1.9.3-p374
←[0m
Downloading yaml-0.1.4.tar.gz...
Installing yaml-0.1.4...
Installed yaml-0.1.4 to /home/vagrant/.rbenv/versions/1.9.3-p374

Downloading ruby-1.9.3-p374.tar.gz...
Installing ruby-1.9.3-p374...

Any ideas? Thanks in advance,

Andrés


Andrés Meza Escallón

unread,
Jul 11, 2013, 10:59:24 AM7/11/13
to edx-...@googlegroups.com
Xavier.
Nevermind... after about 40 minutes the process resumed and now is installing python's packages. I shall let you know if there is some problem at the end of the process.

Andrés

On Thursday, 11 July 2013 05:37:04 UTC-5, Xavier Antoviaque wrote:

Andrés Meza Escallón

unread,
Jul 11, 2013, 4:32:50 PM7/11/13
to edx-...@googlegroups.com
Hi Xavier. 
   After three hours finally the installation process ended with success. I saw a lot of warnings but no aborting errors, so this is indeed progress.
   However when I try to run the lms, rake command is aborted:

(edx-platform)vagrant@precise32:/opt/edx/edx-platform$ cd /opt/edx/edx-platform/
(edx-platform)vagrant@precise32:/opt/edx/edx-platform$ rake lms[cms.dev,0.0.0.0:8080]
phantomjs not found on path. Set $PHANTOMJS_PATH. Using browser for jasmine tests
Node requirements unchanged, nothing to install
Ruby requirements unchanged, nothing to install
Python requirements unchanged, nothing to install
xmodule_assets common/static/xmodule
django-admin.py preprocess_assets --traceback --settings=lms.envs.cms.dev --pythonpath=.
node_modules/.bin/coffee --compile  .
sass --debug-info --load-path ./common/static/sass --update -E utf-8 */static
  overwrite lms/static/sass/application.css
  overwrite lms/static/sass/course.css
rake aborted!
Command failed with status (127): [node_modules/.bin/coffee --compile  ....]
/opt/edx/edx-platform/rakelib/assets.rake:95:in `block (4 levels) in <top (required)>'
Tasks: TOP => runserver => assets:_watch => assets:coffee:_watch => assets:coffee:debug
(See full trace by running task with --trace)
Ending process and children
Interrupting process group 1620
Waiting on process group 1620
Done waiting on process group 1620
Ending process and children
Interrupting process group 1616
/home/vagrant/.rbenv/versions/1.9.3-p374/lib/ruby/1.9.1/rubygems.rb:250:in `unresolved_deps': Interrupt
        from /home/vagrant/.rbenv/versions/1.9.3-p374/lib/ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
        from /home/vagrant/.rbenv/versions/1.9.3-p374/lib/ruby/gems/1.9.1/gems/sass-3.2.9/lib/sass/engine.rb:1:in `<top (required)>'
        from /home/vagrant/.rbenv/versions/1.9.3-p374/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/vagrant/.rbenv/versions/1.9.3-p374/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/vagrant/.rbenv/versions/1.9.3-p374/lib/ruby/gems/1.9.1/gems/sass-3.2.9/lib/sass.rb:93:in `<top (required)>'
        from /home/vagrant/.rbenv/versions/1.9.3-p374/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/vagrant/.rbenv/versions/1.9.3-p374/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/vagrant/.rbenv/versions/1.9.3-p374/lib/ruby/gems/1.9.1/gems/sass-3.2.9/bin/sass:5:in `<top (required)>'
        from /home/vagrant/.rbenv/versions/1.9.3-p374/bin/sass:23:in `load'
        from /home/vagrant/.rbenv/versions/1.9.3-p374/bin/sass:23:in `<main>'
Waiting on process group 1616
Done waiting on process group 1616

It seems like the server is missing some ruby packages which I guess should have been installed during the provisioning. What checks can I do to help in the diagnosis? 
Kind regards,
Andrés


On Thursday, 11 July 2013 05:37:04 UTC-5, Xavier Antoviaque wrote:

Xavier Antoviaque

unread,
Jul 11, 2013, 4:48:29 PM7/11/13
to Andrés Meza Escallón, edx-...@googlegroups.com
Hi Andrés,
 
On Thu, Jul 11, 2013, at 13:32, Andrés Meza Escallón wrote:
Hi Xavier. 
   After three hours finally the installation process ended with success. I saw a lot of warnings but no aborting errors, so this is indeed progress.
 
Cool, glad to hear the install worked - you're one of the first to manage to complete under Windows, it's good to know : )
 
   However when I try to run the lms, rake command is aborted:
 
This seem to be the issue:
 
node_modules/.bin/coffee --compile  .
rake aborted!
Command failed with status (127): [node_modules/.bin/coffee --compile  ....]
 
Status 127 is command not found (http://stackoverflow.com/questions/1763156/127-return-code-from) so it seem to be missing node_modules/.bin/coffee.
 
To try to understand why, connect to the VM and run:
 
$ ls /opt/edx/edx-platform/node_modules
$ ls /opt/edx/node_modules
$ ls /opt/edx/edx-platform/node_modules/.bin/coffee
$ mount
 
Then post the output of the four commands.
 
Also try to restart the VM afterwards with `vagrant reload` from the Windows shell, and post the output too - /opt/edx/edx-platform/node_modules requires to support symlinks, which node modules support, so it should be bound to /opt/edx/node_modules via mount (/opt/edx/edx-platform is shared from a NTFS partition under Windows).
 
Xavier.

Andrés Meza Escallón

unread,
Jul 11, 2013, 5:10:29 PM7/11/13
to edx-...@googlegroups.com, Andrés Meza Escallón
Hi Xavier.
    Here is the output:

$ ls /opt/edx/edx-platform/node_modules

$ ls /opt/edx/node_modules
coffee-script  jasmine-reporters  phantom-jasmine

$ ls /opt/edx/edx-platform/node_modules/.bin/coffee
ls: cannot access /opt/edx/edx-platform/node_modules/.bin/coffee: No such file or directory

$ ls /opt/edx/node_modules/.bin/coffee
/opt/edx/node_modules/.bin/coffee

$ mount
/dev/mapper/precise32-root on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
/dev/sda1 on /boot type ext2 (rw)
rpc_pipefs on /run/rpc_pipefs type rpc_pipefs (rw)
/vagrant on /vagrant type vboxsf (uid=1000,gid=1000,rw)
/opt/edx/edx-platform on /opt/edx/edx-platform type vboxsf (uid=1000,gid=1000,rw
)

I hope this helps.
  Kind regards,
Andrés

Xavier Antoviaque

unread,
Jul 11, 2013, 5:21:39 PM7/11/13
to Andrés Meza Escallón, edx-...@googlegroups.com
The node modules eem to have been installed, but for some reason the mount isn't active. Can you try the last part of what I was asking for?
 
====
Also try to restart the VM afterwards with `vagrant reload` from the Windows shell, and post the output too - /opt/edx/edx-platform/node_modules requires to support symlinks, which node modules support, so it should be bound to /opt/edx/node_modules via mount (/opt/edx/edx-platform is shared from a NTFS partition under Windows).
====
 
I'm especially interested in the output of https://github.com/edx/edx-platform/blob/master/scripts/vagrant-provisioning.sh#L62 - btw if it still doesn't work after the reload, try to run the command manually, from inside the
 
$ sudo mount -o bind /opt/edx/node_modules /opt/edx/edx-platform/node_modules
 
--
Xavier.
 

Andrés Meza Escallón

unread,
Jul 11, 2013, 5:27:06 PM7/11/13
to edx-...@googlegroups.com, Andrés Meza Escallón
Hi Xavier.
   I forgot to include the output from vagrant up:

$ vagrant up --no-provision
Bringing machine 'default' up with 'virtualbox' provider...
[default] Setting the name of the VM...
[default] Clearing any previously set forwarded ports...
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Preparing network interfaces based on configuration...
[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] -- 8000 => 9000 (adapter 1)
[default] -- 8001 => 9001 (adapter 1)
[default] Running any VM customizations...
[default] Booting VM...
[default] Waiting for VM to boot. This can take a few minutes.
[default] VM booted and ready for use!
[default] Configuring and enabling network interfaces...
[default] Mounting shared folders...
[default] -- /vagrant
[default] -- /opt/edx/edx-platform

 Kind regards,
Andrés

On Thursday, 11 July 2013 15:48:29 UTC-5, Xavier Antoviaque wrote:

Xavier Antoviaque

unread,
Jul 12, 2013, 10:25:05 AM7/12/13
to Andrés Meza Escallón, edx-...@googlegroups.com
Thanks for this Andrés, you've found a bug : )
 
 
Can you comment on the pull request afterwards to let me know if it worked? Note that you will need to do a `vagrant reload` or `vagrant up` (without the "--no-provision" option) after applying the patch, to take into account the changes in your VM environment.
 
--
Xavier.
 

Andrés Meza Escallón

unread,
Jul 12, 2013, 10:25:34 AM7/12/13
to edx-...@googlegroups.com, Andrés Meza Escallón
Hi Xavier.
   After "vagrant reload" (everything apparently went just fine) I tried again to start the lms server:

.
.
.
13:23:43 - compiled common/lib/xmodule/xmodule/js/spec/video/display/video_caption_spec.coffee
13:23:43 - compiled common/lib/xmodule/xmodule/js/spec/videoalpha/display/video_speed_control_spec.coffee
[Listen warning]:
  Missing dependency 'rb-inotify' (version '~> 0.9')!
  Please run the following to satisfy the dependency:
    gem install --version '~> 0.9' rb-inotify

  For a better performance, it's recommended that you satisfy the missing dependency.
  Listen will be polling changes. Learn more at https://github.com/guard/listen#polling-fallback.

django-admin.py runserver --traceback --settings=lms.envs.cms.dev --pythonpath=. 0.0.0.0:8000
Validating models...

0 errors found
Django version 1.4.5, using settings 'lms.envs.cms.dev'
Development server is running at http://0.0.0.0:8000/
Quit the server with CONTROL-C.


So I opened another terminal and installed the missing dependency:

$ gem install --version '~> 0.9' rb-inotify
Fetching: ffi-1.9.0.gem (100%)
Building native extensions.  This could take a while...
Fetching: rb-inotify-0.9.0.gem (100%)
Successfully installed ffi-1.9.0
Successfully installed rb-inotify-0.9.0
2 gems installed
Installing ri documentation for ffi-1.9.0...
Enclosing class/module 'moduleFFI' for class Function not known
Enclosing class/module 'moduleFFI' for module DataConverter not known
.
.
.
Enclosing class/module "rbffi_StructLayoutCharArrayClass" for alias to_str to_s
not known
Enclosing class/module 'rbffi_TypeClass' for class Mapped not known
Installing RDoc documentation for rb-inotify-0.9.0...

Once the installation ended I restarted the lms server and I was finally able to see the home page at http://127.0.0.1:9000 from my Windows host machine.

If you manage to include the missing dependency (rb-inotify) in the provisioning or in the LMS's start script, please let me know and I will retry the whole process.

Thank you very much!

Kind regards,
Andrés 
Reply all
Reply to author
Forward
0 new messages