= static mirroring The static mirroring system mirrors //components//, i.e. directory trees from their individual //source// hosts via //static-master// hosts to the //static-mirrors//. The static-master can be configured per source. The mirrors are the same set for all components. == Adding a new static component Using already configured source and master hosts. * Pick a component name, e.g., {{{debaday.debian.net}}} * Pick/Learn source host, pick a master, and add to {{{dsa-puppet/modules/roles/files/static-mirroring/static-components.conf}}}: {{{ # dillon.debian.org debaday.debian.net dillon.debian.org /srv/debaday.debian.net/htdocs }}} * Give sudo to run the right {{{static-update-component}}} to the appropriate group: {{{ /usr/sbin/visudo -f dsa-puppet/modules/sudo/files/sudoer }}} and add something like {{{ lucas dillon=(staticsync) NOPASSWD: /usr/local/bin/static-update-component debaday.debian.net }}} * Add the vhost config on mirrors: {{{ vi dsa-puppet/modules/roles/templates/static-mirroring/vhost/static-vhosts-simple.erb }}} * run puppet on the master, the source, and all the mirrors. Check {{{dsa-puppet/hieradata/common.yaml}}}. == Adding a mirror Note: This might temporarily break apache on the new mirror host. * Add host to {{{static_mirror}}} and {{{static_mirror_nopush}}} in {{{hieradata/common.yaml}}}. * Add {{{staticsync}}} group to host's {{{allowedGroups}}} attribute in ldap. * Run puppet twice on new static mirror once staticsync exists. * Run puppet on static masters. * On the static mirror: {{{install -d -o staticsync -g staticsync -m 02755 /srv/static.debian.org}}}. * Run the command from {{{/etc/cron.d/puppet-static-mirror}}} on the mirror. * Make sure apache works on the mirror. This might require deploying SSL keys. * Remove mirror from {{{static_mirror_nopush}}}. * Run puppet on static masters. * Rotate mirror.