2

I would like to run a local Monticello HTTP repository at work, so that we can share code easily among colleagues.

Is there a way to run something similar to SmalltalkHub privately?

EDIT:

I have tried all the options here and neither of them seems to work smoothly. Let me recap the options:

1) WebDAV on Apache, following Stuart. I have tried it, following some online guides. My current dav.conf looks like this:

DavLockDB /tmp/DavLock
Alias /pharo /opt/data/pharo
<Location /pharo>
  Order Allow,Deny
  Allow from all
  Options Indexes MultiViews
  Dav On
  AuthType None
</Location>

I worked for a few days. Then suddenly I am not able to read new versions of a certain package. Whenever I write a version in an image and read it in another one, I get an exception ZnInvalidUTF8. I am not sure why, it may be that WebDAV has issues listing too many files?

2) Setting up my FTP. It seems to work, but when I try to set this repository as a remote in the versionner I get MCFtpRepository doesNotUnderstnd: #koRemote

3) SqueakSource3, following Tobias. I have tried running the two Gofer commands in both Pharo2 and Pharo3. In Pharo2 it does not load at all. In Pharo3, more or less everything works. I had to fix a few errors due to deprecated or removed messages, but in the end I am able to create projects and write to them.

The problem arises when I read. Apparently SS3 keeps some kind of internal cache. The result is that the list of packages I see on the project page is different from the list of packages that the client gets. The difference seems to be that the client requires a short version of the page, like http://localhost:8080/ss/MyProject/?C=M;O%3DD, and the results there are consistently less than in the full page http://localhost:8080/ss/MyProject.

Moreover, even on the project page, the list of versions remains cached until I navigate on a different project.

4) SmallTalkHub, following Sean. I have tried both using images from the INRIA server and images suggested from the Pharo-VM-loader (they may be the same).

I had to install Seaside again, since there was no ZnZincAdaptor in the downloaded image. I am now able to start SmallTalkHub, but as soon as I try to register a user, I get an error MessageNotUnderstood: receiver of "new" is nil. I am not able to track where this error comes from (is there a way to open a server-side debugger instead of returing 500 in Seaside?).

After this error, I can see a user both in mongodb and in the interface, but I am not able to login.

5) Git using filetree, as suggested by Kylon. This would prevent me from using MetaCello to handle dependencies and looks even more compelx than the other options.

At this point I am at a loss. :-( If I want to use Pharo, I will need to be able to collaborate with my colleagues. Using open source repositories is not an option, at least right now.

Is there a simple, tried and tested way to set up such a repository?

SqueakSource3 or SmallTalkHub would be even better, thanks to their user interfaces, but I really need at least basic collboration. Having an option that can run on a headless server would also be a big plus, as if this becomes a tool we use, it will not be doable to host the repository on my laptop.

Community
  • 1
  • 1
Andrea
  • 20,253
  • 23
  • 114
  • 183

5 Answers5

2

Per this thread on the Pharo Dev mailing list:

Setting up the Server:

  1. Download a SmalltalkHub image (https://ci.inria.fr/pharo-contribution/job/SmalltalkHub/)
  2. Install mongodb on your computer (for Debian: apt-get install mongodb)
  3. Launch the SmalltalkHub image
  4. Evaluate: ZnZincServerAdaptor startOn: 8080
  5. Visit http://localhost:8080/tools/hub, create an account and a project
Sean DeNigris
  • 6,306
  • 1
  • 31
  • 37
  • I am having a problem making this work. In the first place, I cannot find `ZnZincServerAdaptor`. I have tried `ZnServer startOn: 8080` but it just starts a server with a default blank page. Did you try to do this? Maybe it is just something silly, I am a newbie with Smalltalk – Andrea Sep 03 '14 at 12:40
  • I have made some progress, as I explain in the question. Do you have some more detailed instructions that can help me? – Andrea Sep 11 '14 at 12:57
  • The ZnZincServerAdaptor is in Zinc-Seaside. The configuration of Smalltalkhub needs fixing – Stephan Eggermont Sep 13 '14 at 21:41
1

In addition to Sean's answer - if you just want a Metacello repository, and don't necessarily need the full SmalltalkHub stuff, then you just need a WebDav server. Apache will work fine, and I've even used Confluence's WebDAV support (with some tweaking) successfully in the past.

Stuart Herring
  • 899
  • 6
  • 9
  • actually I incurred in a small issue that looks indebuggable to me. I have been able to use this repo to share code among images for a while. Then, all of a sudden, I am not able to share new versions of a specific package. Every time I load a new version of this package (anything above 8) I get an exception ZnInvalidUTF8. Do you have some suggestions how I can start looking into this? – Andrea Sep 09 '14 at 10:57
  • Did you set the character set in Apache? Do you have widestrings in your mczs (umlauts in the source?) – Stephan Eggermont Sep 13 '14 at 21:23
1

In addition to the other answers:

  • Just storing your versions in DropBox work very well!
  • You can also install SqueakSource3 (like SmalltalkHub, doesn't need MongoDB):

    Gofer new
       url:'http://www.smalltalkhub.com/mc/Seaside/MetacelloConfigurations/main';
       package: 'ConfigurationOfSeaside3';
       load.
    ((Smalltalk at: #ConfigurationOfSeaside3) project version: #stable) load.
    Gofer new
       url:'http://www.squeaksource.com/MetacelloRepository';
       package: 'ConfigurationOfSqueakSource';
       load.
    ((Smalltalk at: #ConfigurationOfSqueakSource) project version: #bleedingEdge) load: #('All').
    

    Then start your Adaptor (eg ZnZincServerAdaptor startOn: 8080) and goto http://localhost:8080/instalSS

Tobias
  • 3,026
  • 20
  • 34
  • 1
    Can you suggest me an image to start with? I tried to do this in a clean Pharo3 image, and it more or less works, but whenever I try to actually do anything I get exceptions, method missing and deprecation warnings. – Andrea Sep 09 '14 at 12:46
  • I have not used this with a Pharo3 image. You can probably start with a [Seaside All-In-One](http://www.seaside.st/distributions/Seaside-3.1-OneClick-Pharo2.zip) which should save you the first 5 lines of my code above. – Tobias Sep 10 '14 at 08:38
  • The one click image does not start for me (I am using the latest Ubuntu). Still I am able to select many images from the Pharo launcher, and among them there is the Seaside image for Pharo2. I tried to launch it and I get `MessageNotUnderstood: ByteString>>withBlanksTrimmed` as soon as I enter the form on `installSS`. Now, I can quickly fix this as I did in the other image, but I guess I will run into the other issues I list above – Andrea Sep 10 '14 at 11:16
  • By the way, my main issue is that the list of packages that I get on the page `http://localhost:8080/ss/MyProject/?C=M;O%3DD` (which is what the Monticello client requests) is out of sync with what I see with the web client. Do you have any suggestions where to start looking to fix this? I guess it is some kind of cache, but I cannot find anywhere how to invalidate it (and possibly disable it, the traffic here would be tiny) – Andrea Sep 10 '14 at 11:19
  • Well there is a cache, yes. There should be a process that runs cache updates periodically. And the cache should be invalidated on every commit. Would you please file a Bug at https://code.google.com/p/squeaksource3/ ? – Tobias Sep 12 '14 at 16:47
  • I have reported the bug. Hope it helps. In the meantime, I have yet to find a reliable way to share projects with my colleagues... :-( – Andrea Sep 15 '14 at 16:29
  • Thank you. As a first approach, use a local directory and share it via DropBox or ownCloud. Monticello should work like a charm with that. I try to devote some more time to SqueakSource – Tobias Sep 15 '14 at 16:42
0

Another way is go down the popular route of Git. I am using Github for my projects and it works great while Git itself works very well locally too. So if are already familiar with Git then its a very good choice

You can find more information here https://ci.inria.fr/pharo-contribution/job/PharoForTheEnterprise/lastSuccessfulBuild/artifact/GitAndPharo/GitAndPharo.pier.html

Kilon
  • 1,962
  • 3
  • 16
  • 23
0

Sorry about the bad smalltalkhub experience. I have made some fixes to the configuration, and need to check if that is enough

Stephan Eggermont
  • 15,847
  • 1
  • 38
  • 65
  • Thank you! I have loaded the latest image and the latest ConfigurationOfSmalltalkHub (StephanEggermont.16) and now Seaside is installed and I can register just fine. Still, when I try to login, I get `Oops! invalid username or password`. If this helps, I am using Ubuntu 14.04 with MongoDB 2.4.9 (although I do not think it is a MongoDB error, since all Mongo tests are green). – Andrea Sep 16 '14 at 12:51
  • I've asked on the mailing list. On my mac I have the same problem.I have updated the Seaside to #'release3.1', and I probably have missed something. You might want to check if the user is added in Mongo – Stephan Eggermont Sep 16 '14 at 13:29
  • Yes, I can see users in Mongo, and they are even listed on the homepage. It is just the login that fails. By the way, I do not know much about seaside, but it would be nice to be able to enable a dev mode where instead of returning error codes (500, 403 and so on) it would open a server side debugger where I could inspect the data and find out what is wrong. Do you know if this is possible? – Andrea Sep 16 '14 at 13:54
  • You are running in deployment mode now. In /config you can change the exception handler for /hub (in filters) from WAErrorHandler to WADebugErrorHandler to get a debugger in your image – Stephan Eggermont Sep 16 '14 at 14:29
  • I finally see what is going wrong. It was actually pretty obvious, but anyway is seems there is a path problem. The application is deployed at `/tools/hub`, but it tries to make an AJAX request at `/hub/login/`, getting a 404. Under `config` I see that an Application is deployed under `tools/hub`, while a Dispatcher is deployed under `/hub` and a ShLoginHandler under `/hub/login`. I am not sure what this means, but I cannot access `/hub` directly (403) and it looks like contacting `/tools/hub/login` should be the right thing – Andrea Sep 16 '14 at 15:03
  • Good catch. That is set in ShRootComponent register (class side) – Stephan Eggermont Sep 16 '14 at 15:09
  • Looks like setting it to /hub conflicts with the rest handler though – Stephan Eggermont Sep 16 '14 at 15:22