Skip to content
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

comments on using ww_install in vagrant (ubuntu 14) #78

Open
mgage opened this issue Jul 30, 2014 · 3 comments
Open

comments on using ww_install in vagrant (ubuntu 14) #78

mgage opened this issue Jul 30, 2014 · 3 comments

Comments

@mgage
Copy link

mgage commented Jul 30, 2014

  1. a few missing items -- mostly SOAP and apreq should be apreq2:
@@ -94,12 +94,14 @@ then
      apt-get -y update
      apt-get -y upgrade
      apt_get_install
+     mkdir /usr/include/apache2   # for Apache2::SOAP use
      CPANOPT='-j lib/cpan_config.pm'
      cpan $CPANOPT XML::Parser::EasyTree HTML::Template Iterator Iterator::Util Mail::
    #ww3
      cpan $CPANOPT Dancer Dancer::Plugin::Database Plack::Runner Plack::Handler::FCGI
      cpan $CPANOPT File::Find::Rule Path::Class FCGI File::Slurp
-     a2enmod apreq
+     cpan $CPANOPT Apache2::SOAP
+     a2enmod apreq2
      a2enmod fcgid
      apache2ctl restart
 elif [ -e "/etc/SuSE-release" ]

in order to create Apache2::SOAP you need to manually create:
/usr/include/apache2 ??

1a. include in instructions: when running install_prequisites.sh by hand use

  * sudo bash  ./bin/install_prerequisites.sh
   * this makes the relative references work.
1b. 
* is it possible to set the ServerName to avoid annoying error messages
    * setting it in /etc/apache2/sites-enabled/000-default doesn't work
    * added globally in /etc/apache2/apache2.conf it does work
                 ServerName  localhost   (for example)
  1. There should be a choice to not install webwork2, pg and webwork-open-problem-libraries over existing copies but to use existing copies instead. I'd suggest that be the result chosen by the non-interactive mode if the directories exist --- otherwise you get into an infinite loop -- as below:

Where should I install webwork? [/opt/webwork/]: /opt/webwork/
Error! You gave me a path which already exists on the filesystem.
1> Enter new location
2> Delete existing /opt/webwork and use that location
3> Quit

How would you like to proceed? [1]: Enter new location

------ in the Vagrant use case the webwork2, pg, and libraries are likely to be installed already

  1. I haven't tracked this down yet -- but in the automatic mode I can't seem to unarchive directories:
* can't seem to unarchive courses 
* Use of uninitialized value $tar_out in concatenation (.) or string at /opt/webwork/webwork2/lib/WeBWorK/Utils/CourseManagement.pm line 768.<br />
Error messages

* Failed to unarchive course directory with command '2>&1 /bin/tar -C /opt/webwork/courses -xzf /opt/webwork/courses/2014_HKUST_demo.tar.gz' (exit=72057594037927935 signal=127 core=128): 

--- I can copy that line onto the command line and it fails because of permissions. If I use sudo it works. If I change all the permissions to 777 it works from the command line but still doesn't work seem to work from the admin page. Haven't been able to track it further yet.
-- Can you duplicate this behavior? It might be a fluke of some kind.


  1. external programs should be set for ubuntu:

$externalPrograms{checkurl} = "lwp-request -d -mHEAD";
$externalPrograms{curlCommand} = "";

should be set by

vagrant@WeBWorK:/opt/webwork/webwork2/conf$ which lwp-request
/usr/bin/lwp-request
vagrant@WeBWorK:/opt/webwork/webwork2/conf$ which curl
/usr/bin/curl
  1. Findapplets is not working -- haven't tracked down details -- the files are there.
  2. findAppletCodebase Error: DerivativeDraw11.swf not found after searching......
  3. Suggestions for more additions to the users .bashrc
  4. construct some wwlog and wwtiming and wwreload aliases
    • alias wwlog ="tail -f /var/log/apache2/error_log" or something like that
    • alias wwtiming = "tail -f /opt/webwork/webwork2/logs/timing_log"
      these can be very handy for debugging. (paths are only approximate)

  1. Final message:
cp: cannot stat �webwork_install.log�: No such file or directory
webwork_install.log can be found in /home/vagrant
Cleaning up...

not sure why it's searching for log there in users home directory


worked pretty well. if we can allow for existing repos of webwork2, pg and libraries
it will probably be pretty fast as well.

@aubreyja
Copy link
Owner

Thanks Mike - what os are you using for the vagrant install?

The apreq and soap stuff has worked in the past on ubuntu and works on
Debian 7.2. Geoff commented out the log stuff because trying to tee the
output to the log and stdout/stderr messed with readline. I'm working on
fixing that.

On Wed, Jul 30, 2014 at 6:06 AM, Michael Gage [email protected]
wrote:

  1. a few missing items -- mostly SOAP and apreq should be apreq2:

@@ -94,12 +94,14 @@ then
apt-get -y update
apt-get -y upgrade
apt_get_install

  • mkdir /usr/include/apache2   # for Apache2::SOAP use
    
    CPANOPT='-j lib/cpan_config.pm'
    cpan $CPANOPT XML::Parser::EasyTree HTML::Template Iterator Iterator::Util Mail::
    #ww3
    cpan $CPANOPT Dancer Dancer::Plugin::Database Plack::Runner Plack::Handler::FCGI
    cpan $CPANOPT File::Find::Rule Path::Class FCGI File::Slurp
  • a2enmod apreq
    
  • cpan $CPANOPT Apache2::SOAP
    
  • a2enmod apreq2
    
    a2enmod fcgid
    apache2ctl restart
    elif [ -e "/etc/SuSE-release" ]

in order to create Apache2::SOAP you need to manually create:
/usr/include/apache2 ??

1a. include in instructions: when running install_prequisites.sh by hand use

  • sudo bash ./bin/install_prerequisites.sh
    • this makes the relative references work.
      1b.
    • is it possible to set the ServerName to avoid annoying error messages
    • setting it in /etc/apache2/sites-enabled/000-default doesn't work
    • added globally in /etc/apache2/apache2.conf it does work
      ServerName localhost (for example)
    1. There should be a choice to not install webwork2, pg and
      webwork-open-problem-libraries over existing copies but to use existing
      copies instead. I'd suggest that be the result chosen by the
      non-interactive mode if the directories exist --- otherwise you get into an
      infinite loop -- as below:

Where should I install webwork? [/opt/webwork/]: /opt/webwork/
Error! You gave me a path which already exists on the filesystem.
1> Enter new location
2> Delete existing /opt/webwork and use that location
3> Quit

How would you like to proceed? [1]: Enter new location

------ in the Vagrant use case the webwork2, pg, and libraries are likely
to be installed already

  1. I haven't tracked this down yet -- but in the automatic mode I
    can't seem to unarchive directories:
  • can't seem to unarchive courses
  • Use of uninitialized value $tar_out in concatenation (.) or string at /opt/webwork/webwork2/lib/WeBWorK/Utils/CourseManagement.pm line 768.

    Error messages
  • Failed to unarchive course directory with command '2>&1 /bin/tar -C /opt/webwork/courses -xzf /opt/webwork/courses/2014_HKUST_demo.tar.gz' (exit=72057594037927935 signal=127 core=128):

--- I can copy that line onto the command line and it fails because of
permissions. If I use sudo it works. If I change all the permissions to 777
it works from the command line but still doesn't work seem to work from the
admin page. Haven't been able to track it further yet.
-- Can you duplicate this behavior? It might be a fluke of some kind.

  1. external programs should be set for ubuntu:

$externalPrograms{checkurl} = "lwp-request -d -mHEAD";
$externalPrograms{curlCommand} = "";

should be set by

vagrant@WeBWorK:/opt/webwork/webwork2/conf$ which lwp-request
/usr/bin/lwp-request
vagrant@WeBWorK:/opt/webwork/webwork2/conf$ which curl
/usr/bin/curl

  1. Findapplets is not working -- haven't tracked down details -- the
    files are there.
    2.

    findAppletCodebase Error: DerivativeDraw11.swf not found after
    searching......
    3.

    Suggestions for more additions to the users .bashrc

  2. construct some wwlog and wwtiming and wwreload aliases

    • alias wwlog ="tail -f /var/log/apache2/error_log" or something
      like that
    • alias wwtiming = "tail -f /opt/webwork/webwork2/logs/timing_log"
      these can be very handy for debugging. (paths are only approximate)

  1. Final message:

cp: cannot stat ‘webwork_install.log’: No such file or directory
webwork_install.log can be found in /home/vagrant
Cleaning up...

not sure why it's searching for log there in users home directory

worked pretty well. if we can allow for existing repos of webwork2, pg and
libraries
it will probably be pretty fast as well.


Reply to this email directly or view it on GitHub
#78.

@mgage
Copy link
Author

mgage commented Jul 30, 2014

Ubuntu 14.04.

I might be wrong about the soap stuff the mk directory glitch might have been a side affect. But I notice that Davis gage also needed that in his original script

Main thing is to think throug options for installing WW pg and library files

Mike

Sent from my iPhone

On Jul 30, 2014, at 12:36 PM, "Jason Aubrey" <[email protected]mailto:[email protected]> wrote:

Thanks Mike - what os are you using for the vagrant install?

The apreq and soap stuff has worked in the past on ubuntu and works on
Debian 7.2. Geoff commented out the log stuff because trying to tee the
output to the log and stdout/stderr messed with readline. I'm working on
fixing that.

On Wed, Jul 30, 2014 at 6:06 AM, Michael Gage <[email protected]mailto:[email protected]>
wrote:

  1. a few missing items -- mostly SOAP and apreq should be apreq2:

@@ -94,12 +94,14 @@ then
apt-get -y update
apt-get -y upgrade
apt_get_install

  • mkdir /usr/include/apache2 # for Apache2::SOAP use
    CPANOPT='-j lib/cpan_config.pm'
    cpan $CPANOPT XML::Parser::EasyTree HTML::Template Iterator Iterator::Util Mail::
    #ww3
    cpan $CPANOPT Dancer Dancer::Plugin::Database Plack::Runner Plack::Handler::FCGI
    cpan $CPANOPT File::Find::Rule Path::Class FCGI File::Slurp
  • a2enmod apreq
  • cpan $CPANOPT Apache2::SOAP
  • a2enmod apreq2
    a2enmod fcgid
    apache2ctl restart
    elif [ -e "/etc/SuSE-release" ]

in order to create Apache2::SOAP you need to manually create:
/usr/include/apache2 ??

1a. include in instructions: when running install_prequisites.sh by hand use

  • sudo bash ./bin/install_prerequisites.sh
  • this makes the relative references work.
    1b.
  • is it possible to set the ServerName to avoid annoying error messages
  • setting it in /etc/apache2/sites-enabled/000-default doesn't work
  • added globally in /etc/apache2/apache2.conf it does work
    ServerName localhost (for example)
  1. There should be a choice to not install webwork2, pg and
    webwork-open-problem-libraries over existing copies but to use existing
    copies instead. I'd suggest that be the result chosen by the
    non-interactive mode if the directories exist --- otherwise you get into an
    infinite loop -- as below:

Where should I install webwork? [/opt/webwork/]: /opt/webwork/
Error! You gave me a path which already exists on the filesystem.
1> Enter new location
2> Delete existing /opt/webwork and use that location
3> Quit

How would you like to proceed? [1]: Enter new location

------ in the Vagrant use case the webwork2, pg, and libraries are likely
to be installed already

  1. I haven't tracked this down yet -- but in the automatic mode I
    can't seem to unarchive directories:
  • can't seem to unarchive courses
  • Use of uninitialized value $tar_out in concatenation (.) or string at /opt/webwork/webwork2/lib/WeBWorK/Utils/CourseManagement.pm line 768.

    Error messages
  • Failed to unarchive course directory with command '2>&1 /bin/tar -C /opt/webwork/courses -xzf /opt/webwork/courses/2014_HKUST_demo.tar.gz' (exit=72057594037927935 signal=127 core=128):

--- I can copy that line onto the command line and it fails because of
permissions. If I use sudo it works. If I change all the permissions to 777
it works from the command line but still doesn't work seem to work from the
admin page. Haven't been able to track it further yet.
-- Can you duplicate this behavior? It might be a fluke of some kind.

  1. external programs should be set for ubuntu:

$externalPrograms{checkurl} = "lwp-request -d -mHEAD";
$externalPrograms{curlCommand} = "";

should be set by

vagrant@WeBWorK:/opt/webwork/webwork2/conf$ which lwp-request
/usr/bin/lwp-request
vagrant@WeBWorK:/opt/webwork/webwork2/conf$ which curl
/usr/bin/curl

  1. Findapplets is not working -- haven't tracked down details -- the
    files are there.
    2.

findAppletCodebase Error: DerivativeDraw11.swf not found after
searching......
3.

Suggestions for more additions to the users .bashrc
4. construct some wwlog and wwtiming and wwreload aliases

  • alias wwlog ="tail -f /var/log/apache2/error_log" or something
    like that
  • alias wwtiming = "tail -f /opt/webwork/webwork2/logs/timing_log"
    these can be very handy for debugging. (paths are only approximate)

  1. Final message:

cp: cannot stat ?EUR?webwork_install.log?EUR(tm): No such file or directory
webwork_install.log can be found in /home/vagrant
Cleaning up...

not sure why it's searching for log there in users home directory

worked pretty well. if we can allow for existing repos of webwork2, pg and
libraries
it will probably be pretty fast as well.

Reply to this email directly or view it on GitHub
#78.

Reply to this email directly or view it on GitHubhttps://github.com//issues/78#issuecomment-50642262.

@aorinevo
Copy link
Contributor

Michael, I also got the same errors when using the shared folders. Using chmod -R 777 . does fix the errors but then git marks all the files in these directories as modified. Instead, change the ownership of the folders & files during mounting mount -t vboxsf -o uid=www-data,gid=wwdata sharename /where/you/would/like/the/share/mounted. For example, I use the command
mount -t vboxsf -o uid=www-data,gid=wwdata webwork2 /opt/webwork/webwork2 mount -t vboxsf -o uid=www-data,gid=wwdata pg /opt/webwork/pg
This works, but I have to manually change the config files since the install script doesn't allow the option to use existing files.

There doesn't seem to be a way to change ownership after mounting which is why I chose to set the ownerships to www-data and wwdata so that the server has permissions to do what it needs to do. All other files can be changed locally on the host machine without ownership problems.

With these changes, to set up a dev site will essentially involve the following steps:

  • install virtualbox
  • In virtualbox, setup a new virtual machine with appropriate os
  • install virtualbox guest additions in the guest os
  • run webwork install script
    • here the shared folders should be mounted during install and this should be made permanent by making the appropriate changes in /etc/rc.local

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants