:dizzy: New! For a simpler way to setup a macOS machine, please check out the setupmymac script, which automates configuring and keeping updated a local whimsy instance with Docker.
This is experimental at this point, and may not work if you have already used it to set up a local macOS installation.
Do NOT proceed unless you are comfortable with the notion of containers, images, Dockerfiles, Volumes, Port Forwarding, and likely Docker Compose.
If, however, this describes you, it is hoped that these steps will enable you to run a full Whimsy system inside a container on your development machine. You can edit files inside your favorite IDE on your host machine.
You will need Docker, git, and subversion. And approximately 3 GB of disk space
Direct link to docker for macOS (this avoids the need to login to Docker Hub), or install via:
$ brew cask install docker $ open /Applications/Docker.app # this starts Docker
A development class machine and a high speed internet connection would be in order. Some things appear to perform well, other things perform noticeably slower than a native (non-container) installation of whimsy.
You will also need to ensure the subversion file system format used by the host machine matches the format used by the container. Currently macOS Catalina/Xcode provides svn 1.10.4 and the Dockerfile downloads the latest 1.10 version (currently 1.10.6).
Finally, a note on password stores. Inside ~/.subversion/config, you will see a list of available stores, which currently is gnome-keyring
, kwallet
, gpg-agent
, keychain
, and windows-cryptoapi
. The only ones that are available to an Ubuntu container are ones marked as for “Unix-like systems”. If you chose another (e.g., keychain) then you will either need to do all of your svn checkouts and updates from the host or you will be prompted for your password if you attempt to do these operations from within the container.
/srv
directories defined by the macOS instructions), be aware of the following:svn
and git
sub-directories cannot be links to another part of host file system outside of your home directory as those files will not be visible to the container.cd
into that directorygit clone git@github.com:apache/whimsy.git
ORgit clone https://github.com/apache/whimsy.git
(whichever works best for you)cp whimsy/config/whimsy.template .whimsy
.whimsy
file as per its comments.bash_aliases
if required - this will be picked up by the root user There is a sample template whimsy/config/bash_aliases.template
to get you startedmkdir apache2_logs
if required - this will be used for the server logs (makes it easier to review them)cd whimsy
$ open [~]/Applications/Docker.app
rake docker:update
# this runs docker:build and updates any Gemsrake svn:update
from a shellrake svn:update
externallyrake docker:up
# This prompts for LDAP Bind passwordhttp://localhost:1999/
in your favorite browserTo get a shell on the container, open a terminal console in the work directory and run rake docker:exec
. The container must already be running.
Note: the initial run of the rake docker:update
step will take a long time as it will need to download and install all of the Ubuntu packages, build and install Passenger, as well as update all the Ruby Gems. The good news is that this can be entirely unattended as there will be no prompts required during this process. The command does not need to be repeated each time you want to start the container, but should be repeated from time to time to fetch updated sources.
If you wish to create the Ubuntu image separately, run rake docker:build
(this is invoked as part of docker:update) This should be re-run if you update any of the resources used for the build, e.g. files in docker-config and the Dockerfile
The rake svn:update
step updates the SVN repos used by Whimsy. The container does not automatically update these (unlike the live installation), so the step should be performed as necessary before starting the container to ensure the data is sufficiently up-to-date. This requires karma to fetch some of the files. If using a local copy of the SVN repos, rake svn:update
must be run from the container. It does not need any special karma.
This should be enough to get most of Whimsy working. It is not known yet what functions work and what functions do not.
The docker-compose.yml
has the following mounts:
container path host path /srv directory chosen in step 1
You can edit the files in these directories using your host tools. If any of the configuration files under .subversion etc contain absolute references to files (such as CA certificates), these will need to be fixed somehow (e.g. create links on the container)
If you don't want to check out all of the repositories, omit the rake docker:update svn:update
, and only checkout/clone the repositories that you need. You can find the complete list in repository.yml.
If you haven't checked out a repository that you need to run a specific tool, you will generally see an exception like the following in your logs:
Unable to find svn checkout for https://svn.apache.org/repos/private/foundation/board (foundation_board) (Exception)
To correct this, do the following:
cd /srv/svn svn co https://svn.apache.org/repos/private/foundation/board foundation_board
Adjust as necessary if using local (private) SVN repos
There is no support for using a whimsysvn proxy. If a developer needs such access, they should use a local SVN repository.
Create a directory called REPO (must agree with docker-config/whimsy.conf) under the whimsy parent directory (i.e. alongside the gems/ directory) Set up 3 local SVN repositories under the REPO directory using svnadmin create
with the names: asf, private, infra Under each of these, create the directories and files you need.
Add the following entry to the .whimsy file: :svn_base: http://localhost/repos/
The repositories can then be found at the following locations in Docker:
Note: these will be checked out under /srv/svn in Docker.
The following command can be used to run a dummy smtp server on port 1025: python3 -u -m smtpd -n -c DebuggingServer localhost:1025
It can be tested with: tools/testmail.rb <userid>
apachectl restart
.docker image rm whimsy-web
docker image prune -f
docker container prune -f