Issue Details (XML | Word | Printable)

Key: MDLSITE-788
Type: Task Task
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Jordan Tomkinson
Reporter: Anthony Borrow
Votes: 1
Watchers: 5
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle Community Sites

Create test site for GSOC PaintWeb project on test.moodle.org

Created: 19/Aug/09 05:39 AM   Updated: 23/Oct/09 10:31 AM
Component/s: test.moodle.net

File Attachments: 1. GZip Archive mdl20-paintweb-full.tar.gz (537 kB)

Issue Links:
Relates
 

Participants: Anthony Borrow, Helen Foster, Jordan Tomkinson, Martin Dougiamas and Mihai Sucan
Security Level: None


 Description  « Hide
Jordan - Mihai would like to have a site created to test the PaintWeb code. I figured that test.moodle.org might be better than demo.moodle.org. I am not sure how you want to go about getting the code. Would it be possible for you to use git on the test server. I mention this because of the intention to update it and I want to make that process as painless as possible. Below are some comments I received via email from Mihai. Please do not hesitate to let me know how I can be of help or if there are any questions. I'll go ahead and add MD, ML, and Mihai as watchers in case they wish to comment. Peace - Anthony p.s. - Would it help to create a component of test.moodle.org in the tracker?


Hello Anthony!

Today I had a meeting with Martin during which I also discussed about having a Moodle 2.0 demo site where people can easily try PaintWeb. Martin gave the "go ahead", and said we are ready for a more public demo. The Moodle 2.0 integration work is now in a better shape than the Moodle 1.9 work. The code is available in my Git repository, in the mdl20-paintweb branch:

http://repo.or.cz/w/moodle/mihaisucan.git

Here's how I do it myself:

git clone git://repo.or.cz/moodle/mihaisucan.git ~/public_html/moodle-paintweb
cd ~/public_html/moodle-paintweb
git checkout -b mdl20-paintweb origin/mdl20-paintweb

The idea is you should also have it easy to update because I am going to push more updates, fixes, code polishing, etc. If you have git on the demo server, then a "git pull" command would be all you need to execute to update the code. That's about all for now. Thank you very, very much.

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Anthony Borrow added a comment - 19/Aug/09 05:43 AM
Adding MD, ML, and Mihai as watchers so they can weigh in ... the plan is to create a patch in CONTRIB for paintweb for Moodle 1.9 and for 2.0 to add it to core. Peace - Anthony

Jordan Tomkinson added a comment - 20/Aug/09 11:50 AM - edited
if the code is still under development it should go on test.moodle.org, if its stable & ready for public viewing it should probably go on demo.moodle.org
Let me know which and il do it asap

Anthony Borrow added a comment - 20/Aug/09 01:02 PM
Jordan - The code is still under development and will need an occasional update so I think it best to add it to test.moodle.org. Peace - Anthony

Jordan Tomkinson added a comment - 20/Aug/09 04:15 PM
Is the code anywhere in contrib cvs? test.moodle.org has an automated web interface for installing new sites & plugins.. the whole process can be done by any dev from a browser that way

Anthony Borrow added a comment - 20/Aug/09 09:58 PM
Jordan - No the code is not in contrib as it is hoped that the 2.0 code will go straight into core's HEAD. ML and Mihai have been using GIT and I suspect were hoping to be able to continue to do so. Unfortunately I do not know enough about GIT to be helpful here so perhaps ML or Mihai may have a few ideas about how to set this up so that it can easily be updated. I am interested in the new interface - where can it be found? Does it also allow for the removal of those sites when testing finishes? Peace - Anthony

Mihai Sucan added a comment - 20/Aug/09 10:34 PM
Well, there are definitely tools to make cvs-git migration easier, but I am also a "beginner" with git myself - which means I cannot make any recommendations myself, having no experience with such tools. I started using git only this summer at the suggestion of MartinL.

Anthony Borrow added a comment - 20/Aug/09 11:04 PM
Mihai - Perhaps it would be helpful if you could give an idea of how often you want the site updated. If you could live with something like a daily update then we should be able to fairly easily automate it with a cron job that gets the latest code from the git repository. This allows you to continue to work with GIT and would prevent any manual intervention. Does that sound reasonable? Peace - Anthony

Mihai Sucan added a comment - 20/Aug/09 11:07 PM
Anthony - yes, that's reasonable. For me it's OK even if the site is updated every two days or so. I don't want to put much strain on the server.

Anthony Borrow added a comment - 21/Aug/09 12:24 AM
Mihai - I don't think a daily update would be too much and it keeps it regular enough that if there is a major change it will be available within 24 hours. Plus I think daily stuff is easier to setup. Peace - Anthony

Helen Foster added a comment - 03/Sep/09 03:27 AM
Hi Jordan,

Just wondering how things are going with setting up a test.moodle.org site for Mihai's paintweb project? Do you have everything you need?


Martin Dougiamas added a comment - 03/Sep/09 04:35 PM
Those instructions don't seem to result in a full version of Moodle. Can you provide entire instructions for setting this up using git? (we don't use git here)

Mihai Sucan added a comment - 03/Sep/09 05:05 PM
MartinD: If you do git checkout mdl20-paintweb you will actually get the entire Moodle 2.0 codebase + PaintWeb integrated.

The full instructions to get the code from the git repo onto your disk are those provided:

git clone git://repo.or.cz/moodle/mihaisucan.git ~/public_html/moodle-paintweb
cd ~/public_html/moodle-paintweb
git checkout -b mdl20-paintweb origin/mdl20-paintweb

execute that on a Linux/Mac/Windows where you have git installed.

You will end up with the moodle-paintweb folder containing the entire Moodle 2.0 codebase (the snapshot I based my work on) + PaintWeb integrated and fully functional. I should note that at times I rebase my patches on the latest Moodle 2.0 codebase.

When you want to update the folder from the online git repo you only do:
cd ~/public_html/moodle-paintweb
git pull

Done.


Jordan Tomkinson added a comment - 03/Sep/09 05:23 PM
OK I have checked it out but I get the following error when trying a 'git pull'

fatal: 'origin': unable to chdir or not a git archive
fatal: The remote end hung up unexpectedly
Cannot get the repository state from origin


Mihai Sucan added a comment - 03/Sep/09 05:45 PM
Hey Jordan, thanks for trying this.

Git pull works for me. I use git version 1.6.0.4, the default git package on Ubuntu 9.04.

Here's what I executed, and my results:

robod@athlon:~% git clone git://repo.or.cz/moodle/mihaisucan.git ~/testgit
Initialized empty Git repository in /home/robod/testgit/.git/
remote: Counting objects: 352495, done.
remote: Compressing objects: 100% (88628/88628), done.
remote: Total 352495 (delta 259629), reused 351567 (delta 258701)
Receiving objects: 100% (352495/352495), 133.26 MiB | 636 KiB/s, done.
Resolving deltas: 100% (259629/259629), done.
warning: remote HEAD refers to nonexistent ref, unable to checkout.

robod@athlon:~% cd ~/testgit
robod@athlon:testgit% ls
robod@athlon:testgit% git branch
robod@athlon:testgit% git branch -r
origin/mdl19-paintweb
origin/mdl19-tinymce3
origin/mdl20-paintweb
robod@athlon:testgit% git checkout -b mdl20-paintweb origin/mdl20-paintweb
warning: You appear to be on a branch yet to be born.
warning: Forcing checkout of origin/mdl20-paintweb.
Checking out files: 100% (6433/6433), done.
Branch mdl20-paintweb set up to track remote branch refs/remotes/origin/mdl20-paintweb.
Switched to a new branch "mdl20-paintweb"
robod@athlon:testgit% ls
... all the moodle files and folders ...
robod@athlon:testgit% git branch

  • mdl20-paintweb
    robod@athlon:testgit% git pull
    Already up-to-date.

From the above you can see that git clone warns there's no HEAD branch, thus when I go into the folder ls shows nothing. The "git branch" command shows the branches I did checkout locally. "git branch -r" shows me the remote branches. Checkout for the mdl20-paintweb branch worked fine for me - doing a "ls" shows me all the correct files. Next, I ran "git branch" just to make sure the branch shows up. Lastly, I ran "git pull" to check for updates - which worked for me.

I am unsure what could be affecting your git pull. Network connection issues?


Jordan Tomkinson added a comment - 03/Sep/09 05:51 PM
[root@server8 paintweb]# git branch
  • mdl20-paintweb
    [root@server8 paintweb]# git branch -r
    origin/mdl19-paintweb
    origin/mdl19-tinymce3
    origin/mdl20-paintweb
    [root@server8 paintweb]# git pull
    fatal: 'origin': unable to chdir or not a git archive
    fatal: The remote end hung up unexpectedly
    Cannot get the repository state from origin

Mihai Sucan added a comment - 03/Sep/09 06:01 PM
I searched on Google for the error message and I saw it might be related to the folder being a symlink. Is the "paintweb" folder a symlink?

Jordan Tomkinson added a comment - 04/Sep/09 01:30 AM
No the folder is not a symlink

Mihai Sucan added a comment - 04/Sep/09 08:30 PM
I am attaching a patch file which can be applied to the Moodle 2.0 development branch (cvshead). The patch includes binary content as well. To apply the patch please use:

git apply --binary mdl20-paintweb-full.patch

Jordan: what Git version do you use? What OS? Are you trying to checkout the code on a network-mounted folder? Please provide more details. I never got that error. Does anyone else get this error?


Anthony Borrow added a comment - 04/Sep/09 10:22 PM
Just to add that I tried steps mentioned by Mihai in the 03/Sep/09 05:45 PM post without incident. It seems to have worked just fine for me with git 1.6.0.4. Peace - Anthony

Jordan Tomkinson added a comment - 07/Sep/09 10:43 AM
this is Red Hat Enterprise Linux 5.3 with git 1.5.2.1
There is nothing special about the directory, its not network and its not symlink

Mihai, I think it would be faster if we communicated via the jabber dev chat - please drop in at your convenience


Mihai Sucan added a comment - 07/Sep/09 06:58 PM
Thanks Jordan for your time. I believe your git version is too old. I don't know git for too long, so I don't know any workaround.

Anyhow, Jordan has been really kind and had the test site installed and configured for me. The test site is now available at:

http://test.moodle.org/paintweb/

User is: user. Password is: demo. Enjoy!


Helen Foster added a comment - 10/Sep/09 09:16 PM
Thanks Mihai, I'm just making a few small improvements to your Paintweb test site, including creating a test user with username and password 'test', so that it's the same as our other test sites.

Jordan Tomkinson added a comment - 23/Oct/09 10:31 AM
closing for now, re-open if required.