paulirwin commented on issue #225:
URL: https://github.com/apache/whimsy/issues/225#issuecomment-2692796007

   After some trial-and-error, I was able to get Whimsy up and running this 
way. I was alternating between trying to get the non-Docker version working and 
the Docker version, so some of this might be mixed up. Either way, this is an 
assortment of things to try:
   
   - Start from a clean repo (if you've had failures previously; something got 
in a corrupted state for me and had to remove `/private/var/whimsy` and start 
over)
   - (Might only be needed for non-Docker) Downgrade Ruby to 3.1 (via `brew 
install ruby@3.1` and having `/opt/homebrew/opt/ruby@3.1/bin` on the PATH) and 
ensure that's what is on the path with `ruby -v`
   - `echo "ruby-ldap3" > asfldap.gemname` to use ruby-ldap3 instead of 
ruby-ldap, which does not build successfully
   - Ensure `bundle install` works in the repo root
   - Run `./config/setupmymac --docker`, at this point it should succeed (?)
   - Create a `/private/var/whimsy/.whimsy` (aka `../.whimsy` from the repo 
root) file with what normally would be in `~/.whimsy` (see contents below). The 
Docker version looks for the file here, so it doesn't work from `~`
   - (Can't remember if needed for Docker) Make sure `uri 
ldaps://ldap-us.apache.org:636` line is in `/etc/openldap/ldap.conf` and that 
`sudo ruby -I lib -r whimsy/asf -e "ASF::LDAP.configure"` works
   - `mkdir /srv/svn`, `cd /srv/svn`, and clone some repos (there are likely 
others I haven't encountered yet):
     - `svn co --depth=files https://svn.apache.org/repos/private/foundation`
     - `svn co --depth=files https://svn.apache.org/repos/private/committers`
     - `svn co --depth=files 
https://svn.apache.org/repos/private/committers/board`
     - `svn co --depth=files 
https://svn.apache.org/repos/private/foundation/board foundation_board`
   - Comment-out the `ln_s` line here (it fails when starting the Docker image 
because the file already exists):
   ```ruby
       unless File.exist? '/root/.bash_aliases'
       #  ln_s '/srv/.bash_aliases', '/root/.bash_aliases'
       end
   ```
   ... I think that was everything? My apologies if not, if anyone encounters 
any errors I can let you know if I remember something.
   
   After that, `rake docker:up` worked and Whimsy was running at 
http://localhost:1999/. The home page and some other pages like 
`/roster/committee` and `/board/agenda` work, but any requests to any cgi files 
in `/members/` that I tried redirected to the homepage, and nothing was printed 
to the docker logs. I had to twiddle the whimsy_dn line a few times and 
eventually that worked, even though I'm 99% sure I had set it back to what it 
was when it didn't work. Make sure to stop and restart Docker when you do this.
   
   `.whimsy` example contents (IMPORTANT: the leading space on each line seems 
necessary):
   ```
    :whimsy_dn: uid=<apache_id_here>,ou=people,dc=apache,dc=org
    :ldap:
    - ldaps://ldap-us.apache.org:636
   ```
   
   There are several opportunities to improve reproducibility here, but I don't 
fully understand them all yet enough to propose fixes. In particular, the 
`.bash_aliases` change seems like it could be easy to fix (maybe cat/append if 
already exists), and getting the ruby-ldap3 branch merged would allow this to 
work from a clean repo.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@whimsical.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to