The production whimsy.apache.org
server is managed by Puppet, and is automatically udpated whenever commits are made to the master branch of this repository. Thus code changes here are reflected in the production server within a few minutes. In the event of a major server crash, the infra team simply re-deploys the whole VM from Puppet.
Committers: please test changes to end-user critical scripts before committing to master!
To deploy a completely new whimsy VM, see Manual Steps.
Application developers may need to know where different things are configured:
rake update
to update various gem or ruby settingsThus, in less than 5 minutes from any git push, the server is running the new code!
The Whimsy VM runs Ubuntu 16.04 and is fully managed by Puppet using the normal methods Apache infra uses for managing servers. Note however that management of Whimsy code and tools is a PMC responsibility.
The puppet definition is contained in the following files currently (note: Infra plans to move Puppet details in 2020).
https://github.com/apache/infrastructure-puppet/blob/deployment/data/nodes/whimsy-vm4.apache.org.yaml (Includes modules, software, vhosts, ldap realms, and httpd.conf)
https://github.com/apache/infrastructure-puppet/blob/deployment/modules/vhosts_whimsy/lib/puppet/parser/functions/preprocess_vhosts.rb (macro functions used above)
https://github.com/apache/infrastructure-puppet/blob/deployment/modules/whimsy_server/manifests/init.pp (Defines various tools and directories used in some tools)
https://github.com/apache/infrastructure-puppet/blob/deployment/modules/whimsy_server/manifests/cronjobs.pp (Cronjobs control when /public/*.json is built and code and mail updates)
Before pushing any changes here, understand the Apache Infra puppet workflow and test:
https://cwiki.apache.org/confluence/display/INFRA/Git+workflow+for+infrastructure-puppet+repo To understand the high-level workflow for puppet changes.
https://github.com/apache/infrastructure-puppet-kitchen#readme
addition to Make modules useable step:
rm -rf zmanda_asf mkdir -p zmanda_asf/manifests echo "class zmanda_asf::client (){}" > zmanda_asf/manifests/client.pp
https://github.com/apache/infrastructure-puppet/blob/deployment/modules/vhosts_whimsy/README.md This details the changes to default puppet we use for Whimsy.
The following additional steps are required to get a new Whimsy VM up and running - these are only needed for a new deployment.
Ensure that the IP address is static, and has been added to the list of allowed mail relays
Run the following command to create an SSL cert (see tutorial for details):
/x1/srv/git/letsencrypt/letsencrypt-auto --apache -d whimsy.apache.org -d whimsy4.apache.org -d whimsy-vm4.apache.org -d whimsy-test.apache.org
The SVN settings should now be set up in whimsy-vm5 and later (Puppet 6)
Update the following cron scripts under https://svn.apache.org/repos/infra/infrastructure/apmail/trunk/bin:
Add the following mail subscriptions (see apmail/trunk/bin/whimsy_subscribe.sh):
svnupdate@whimsy-vm4.apache.org
to board-commits@apache.org
.svnupdate@whimsy-vm4.apache.org
to committers-cvs@apache.org
.svnupdate@whimsy-vm4.apache.org
to foundation-commits@apache.org
.board@whimsy-vm4.apache.org
to board@apache.org
.members@whimsy-vm4.apache.org
to members@apache.org
.secretary@whimsy-vm4.apache.org
to the secretary@apache.org
alias.Using the www-data
user, copy over the following directories from the previous whimsy-vm* server:
/srv/agenda
/srv/icla
/srv/mail/board
/srv/mail/members
/srv/mail/secretary
Verify that email can be sent to non-apache.org email addresses.
check that mail is being delivered to the /srv/mail directory tree
check that mail subscriptions are being updated under /srv/subscriptions
if pip3 show img2pdf
doesn't show version 0.3.1 or later:
pip3 install --upgrade img2pdf
Ensure that gitpubsub is working. Check that updates to whimsy git are pulled within 5 minutes or less
N.B. Just prior to switchover, ensure that the file /srv/mail/secretary/YYYYMM.yml
for the current month is copied (or merged?) across. This contains the status for mails handled by the Secretary workbench.