Installation

Reluctant IT Department - Dreamhost?

Reluctant IT Department - Dreamhost?

by Mark Riggs -
Number of replies: 9
Has anyone installed WebWork on a Dreamhost VPS account? Their shared hosting does not allow mod_perl, but a VPS would. I am looking for options that would allow me to start using WebWork for the classes I teach.
In reply to Mark Riggs

Re: Reluctant IT Department - Dreamhost?

by Jason Aubrey -
Hi Mark,

I'm not sure if anyone has done exactly this, but here are some other options for getting up and running with webwork if you IT people are reluctant.

1) MAA hosting. The MAA offers a free one-year trial of webwork for up to one-hundred students per institution. If you should decide to sign up with the MAA after that, the cost is $200 per course for faculty in departments which are institutional members of the MAA. You can be up and running with the free trial in 2-3 days:

http://webwork.maa.org/getwebwork.html

2) Another institution or colleague which uses webwork in your area may be willing to host courses for you.

3) Maybe you could set up a server on something like Amazon's EC2 service. It seems pretty cheap and you have complete control over your ec2 instance (e.g. pretty much any linux/unix os, you're root and you can install anything you want.)

4) Red Hat's OpenShift might be another option for deploying webwork.
https://openshift.redhat.com/app/

I'd say option (1) will give you the best experience. And, if you can impress your department and chair with how useful webwork can be for your faculty and students, you can either sign-up for paid hosting or if you want to install it locally, then I'm sure you'll have an easier time with your IT folks with the support of your chair.

Hope this helps,
Jason

Hope this helps,
Jason
In reply to Jason Aubrey

Re: Reluctant IT Department - Dreamhost?

by Mark Riggs -
Jason,


Last week I found the instructions for WeBWorK on the Amazon Cloud, http://webwork.maa.org/wiki/Amazon_Cloud#.UV9b5DcXkxk, and decided to give it a try. Everything seemed to work fine until the the last step:

12. Wait for the Instance to be loaded. Next click on select. Note the URL at the bottom of the page and go to this URL. You will need to append "/webwork2" to the address. The URL should look like: ec2-xx-xx-xxx-xxx.compute-1/webwork2


My EC2 management Console shows:

instance-sm.gifEC2 Instance: i-de7267bd status_green._V226749701_.gif

ec2-54-242-51-211.compute-1.amazonaws.com

but when I try either

Connect from your browser using the Java SSH Client (Java Required)

or

ssh -i mriggskey.pem root@ec2-54-242-51-211.compute-1.amazonaws.com

I get 'Connection timed out'

and

ssh -i mriggskey.pem root@ec2-54-242-51-211.compute1.amazonaws.com/webwork2

gives 'Could not resolve hostname'.

Is there something that I am missing?


Mark Riggs



In reply to Mark Riggs

Re: Reluctant IT Department - Dreamhost?

by Michael Gage -
Don't you want to paste

http://ec2-54-242-51-211.compute-1.amazonaws.com/webwork2

into your web browser to connect to the server over the web?

I just tried it and couldn't connect, but it is likely that you have turned your server off.

Let us know if this works.

The commands you are using above should connect to your AWS account so that you can access the server on the command line to adjust things. (Don't append webwork2 in this case.)  I'm not sure you are automatically the root user however, isn't the default user  ec2-user?

ssh -i  mriggskey.pem ec2-user@ec2-54-242-51-211.compute1.amazonaws.com 

and then 
http://ec2-54-242-51-211.compute1.amazonaws.com/webwork2
once the server is turned on.



In reply to Michael Gage

Amazon EC2 Install

by Mark Riggs -
The last step of the instructions was to append '/webwork2' to the url. When that didn't work I tried 'connect' form the 'Actions' drop down menu of the EC2 Management Console. The 'connect' brought up a popup with two choices, "Connect with a stand alone SSH client" or "Connect from your browser using the Java SSH client". In this popup the ec2 url, the username as root, and the keypath were already filled in.

Is there any documentation for the webwork AMI?
In reply to Mark Riggs

Re: Amazon EC2 Install

by Michael Gage -
You're using it from the wiki. :-)  This is brand new.  

There is additional documentation for setting up AWS systems in general all over the web. 
(For example 
http://coenraets.org/blog/2012/01/setting-up-wordpress-on-amazon-ec2-in-5-minutes/

and

http://www.youtube.com/watch?v=E78VKAPwmDM

)

I also know that my name was set to ec2-user not to root when I signed up 
for AWS.

The instructions from the Actions menu is for connecting to the server on the command line -- not for connecting to webwork using your browser over the web.  For that you will need to append /webwork2  to reach the WeBWorK software.


The instructions on the wiki don't currently seem to include command
line details on starting up your server once it is installed. 

service httpd start

service mysqld start

might do it.

Hope this helps.




In reply to Mark Riggs

Re: Amazon EC2 Install

by Hedley Pinsent -
mine is working; pretty much the instructions found at:

http://webwork.maa.org/wiki/Amazon_Cloud#.UWNA5Rx38Yw

Maybe more need to be said about the "security group" which I established before I created "the" (the current) image.

I ssh into the service as described, except it told me to log in as user: ubuntu; I then restarted APACHE but do not know if I needed to do that. The system has some "fussiness" with the key (hpinsent.pem) as, for ssh, it is your password.


ssh -i hpinsent.pem ubuntu@ec2-54-224-94-238.compute-1.amazonaws.com

ubuntu@ip-10-112-7-216:~$ sudo service apache2 restart



http://ec2-54-224-94-238.compute-1.amazonaws.com/webwork2
Attachment securitygroup.png
In reply to Hedley Pinsent

Re: Amazon EC2 Install

by Mark Riggs -
Hedley,

You are right, the security group kept me from connecting with 'ssh'. I also discovered that you need to create the security group before launching the instance. You are not permitted to add a security group after launching an instance.

I was able to ssh to my instance and run the 'service restart apache2' command.

However I am unable to connect with 'http://ec2-xx-xxx-xxx-xxx.compute-1.amazonaws.com/webwork2'

I think I am missing some steps. Is there a place in one the the installation manuals to get from 'restart apache2' to 'http://ec2-xx-xxx-xxx-xxx.compute-1.amazonaws.com/webwork2'?

Thanks for you help.

Mark Riggs
In reply to Mark Riggs

Re: Amazon EC2 Install

by Hedley Pinsent -
The difference between ssh and http could be the security rules (port 22 and port 80), or if the server is running? I suspect it could have worked even without the ssh; of course I was probably doing some miscellaneous poking around when I did it. I may yet do it all again, just to see. Meanwhile, attached is an image (a composite of screen shots). Note that I leave nothing to chance and use copy and paste for the http address.

hp
Attachment console_segments.png
In reply to Hedley Pinsent

Re: Amazon EC2 Install

by Hedley Pinsent -
FYI only

Uploaded files do not unpack in the "out of the box" version of the community-amazon-cloud (EC2) image.

The fix is to ssh into the thing and to repeat the "Setting Permissions" section found in the various standard documentations.
I put sudo in front of many of the statements [after copy and paste] to get them to work; however using sudo alone - password ????

The last thing I did was to restart apache.

I plan to use the service to backup my work. After the 6 cents a minute starts I will turn it on only when I need it.

hp

vvvvvvvvvvvvvvvvv From "Installation Manual for 2.5 on Ubuntu 12.04" vvvvvvvvvvvvvvvvvvvvvvv
Setting Permissions

The PG installation directory and files should be owned by wwadmin and not writable by other users:

$ cd /opt/webwork/pg
$ chmod -R u+rwX,go+rX .

Most WeBWorK directories and files should also be owned by wwadmin and not writable by other users:

$ cd /opt/webwork/webwork2
$ chmod -R u+rwX,go+rX .

Certain data directories need to be writable by the web server. These are DATA, courses, htdocs/tmp, logs, and tmp. It is convenient to give WeBWorK administrators access to these directories as well, so they can perform administrative tasks such as removing temporary files, creating and editing courses from the command line, managing logs, and so on. We will create a new group called wwdata, containing both the WeBWorK administrators and the web server. Run the commands

$ sudo addgroup wwdata
<wwadmin password>
$ sudo adduser wwadmin wwdata

If there are other users who will also be administering WeBWorK files, now is a good time to add them. To do this

Select System Settings, User Accounts
Click the "Unlock" icon and enter the <wwadmin password>
Click the "+" icon and create the new account
And remember to add the new account to the wwdata group as above.

Now add the Apache2 webserver (which runs as www-data) to the wwdata group:

$ sudo adduser www-data wwdata

You can check that this succeeded in a terminal window by entering

$ id wwadmin

and then you should see wwdata listed under groups. Also

$ id www-data

should show wwdata listed under groups. Now we make the WeBWorK directories that need to be writable by the web server have wwdata as their group. The following are rather long commands; you might want to copy them and paste them into your terminal window rather than typing them.

$ su
Password: <root password>
# cd /opt/webwork/webwork2/
# chgrp -R wwdata DATA ../courses htdocs/tmp logs tmp
# chmod -R g+w DATA ../courses htdocs/tmp logs tmp
# find DATA/ ../courses/ htdocs/tmp logs/ tmp/ -type d -a ! \( -name .svn -prune \) -exec chmod g+s {} \;
# exit
$

Attachment screenShot.png