Last updated at 12:13 am UTC on 12 June 2017
An easy one-time configuration to get Monticello history available for ones own private code in all images.
The primary goal of Personal SqueakSource was invisibility.
- Zero code footprint. It works from the base trunk image with the base Monticello code.
- Automatic server start and stop. I don't want to have to start a server manually, just boot up my laptop, launch my dev image(s), and code history is just there and available.
- Zero change to my workflow. I'm used to just saving code packages to my classic file directories. I don't want to have to remember to save them to some local HTTP repository. This is solved.
- Headless. I even want don't even want to see the window, I want to forget about it.
Basically, code history that "just works" without having to change anything.
In 2003, a web-site for storing and sharing the code of Squeak projects was developed and deployed as http://www.squeaksource.com. Later, a separate instance of this same application (also known as "SqueakSource") was deployed as http://source.squeak.org, to manage the base image code itself.
This page describes a quick and easy way to run set up a personal SqueakSource repository running on your laptop, enabling the full Monticello history of one's own proprietary code to be made seamlessly available in all images.
The system generates the scripts needed for a Linux installation only. The automated server start/stop is achieved via the daemontools Linux utility. For other platforms, a similar utility such as a .bat file startup script, etc., could possibly be used, or a Linux virutal box, or otherwise start the server manually.
Terse Setup Description
- Save a trunk image as 'ss.image'.
- Install Personal SqueakSource from SqueakMap.
- tar xf cogspurlinuxht-16.18.3692.tgz (or your VM version) in the same directory as ss.image.
SSRepository deploy. "do it, webserver.zip is created"
- Copy webserver.zip to run location, unzip and cd into.
- Soft-link your mc directory in as ss.
- run ./configsys
- run ./configsvc
Detailed Setup Description
Note this will be interactive Installation – Seaside wants to know the admin credentials.
- Start up a base 5.1 / trunk image. Save it as ss.image. This is the name the scripts refer to.
- Install Personal SqueakSource from SqueakMap.
A file called webserver.zip is created in the current directory.
- Save the image. This is your master image. It will never be necessary to save it again unless there's a code update. We will not be using image persistence.
- Make sure to have the latest vm untar'd in the current directory as cogspurlinuxht.
- Now execute the following in a workspace:
New user squeaksource is created, daemontools is installed, and the Spur-HT vm enabled. The webserver directory we're working in has been moved to /home/squeaksource.
- Create a work directory (no spaces) from which to run the webserver. Copy webserver.zip to it. Unzip it:
- cd into webserver. The setup scripts must be run from here.
- From the Linux command-line, run:
To verify the server is running, after a few seconds, you should be able to point your browser to http://localhost:[webPort] and see the title screen.
- If daemontools wasn't already installed, then it may be necessary to reboot or run
- Before proceeding, its important to cd to the new run directory:
- Now its time to copy or, preferably, soft-link your primary Monticello directory in this current directory (webserver) as ss. When we create the repository, a SqueakSource Project will be created for each subdirectory in this directory.
ln -s /your/development/directory/mc ./ss
- The last step will install the server as a daemon and keep it running even across reboots.
Personal SqueakSource performs its background "recovery" process on startup, which ensures any new files are in the Magma database. Upon the first start, they're all new. Depending on how many .mcz files there are, full history will not be indexed until a few hours, but its a background process that takes care of itself, so its okay to shutdown the computer even if its still running – it'll pick up where it left off next time.
Note:If Versions are saved only to the ss directory (linked dev directory), then the history for those saved versions will not be available until after the next recovery, which happens on restart / reboot.
Versions saved to the localhost:8079/ProjectName will also be saved to your development directory (e.g., ss), and be indexed immediately.
Making History available in images
To make the history available in images, the HTTP repository pointing to the http://localhost:8079/DirectoryName must be added to each MC Package.
For power users: It is recommended to make your own subclass of Installer, add the 'package-definitions' method category and definitions like in Installer. That way, among other configuration conveniences, you can simply execute the following to add the correct locally running Personal-SS repository to all relevant packages: