X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=input%2Fhowto%2Fstatic-mirroring.creole;h=b2c9dc0eb09a6d1fe297a11e526ca7d2a2e0aafc;hb=247201bba87cd96b68df4311314a1b857450b547;hp=fab6f54ddd5873cfb8c7d7712641005e45769067;hpb=f9e643397029364001def42ad353a86589e17b56;p=mirror%2Fdsa-wiki.git diff --git a/input/howto/static-mirroring.creole b/input/howto/static-mirroring.creole index fab6f54..b2c9dc0 100644 --- a/input/howto/static-mirroring.creole +++ b/input/howto/static-mirroring.creole @@ -13,15 +13,16 @@ 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}}}: +* Pick/Learn source host, pick a master, and add to {{{dsa-puppet/modules/roles/misc/static-components.yaml}}}: {{{ - # - dillon.debian.org debaday.debian.net dillon.debian.org /srv/debaday.debian.net/htdocs + debaday.debian.net: + master: static-master-manda-01.debian.org + source: 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 + /usr/sbin/visudo -f dsa-puppet/modules/sudo/files/sudoers }}} and add something like {{{ @@ -29,8 +30,33 @@ and add something like }}} * Add the vhost config on mirrors: +** vi {{{dsa-puppet/modules/roles/templates/static-mirroring/vhost/static-vhosts-simple.erb}}} +and add +
+  vhost(lines, "debaday.debian.net"            , :ssl => true
+
+and +
+  onion::service { 'debaday.debian.net'            : ensure => 'ifstatic', port => 80, target_port => 80, target_address => $onion_addr }
+
+** In {{{dsa-puppet/modules/roles/manifests/static_mirror_web.pp}}}, add: {{{ - vi dsa-puppet/modules/roles/templates/static-mirroring/vhost/static-vhosts-simple.erb + ssl::service { 'debaday.debian.net' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true, } }}} -* run puppet on the master, the source, and all the mirrors. Check {{{dsa-puppet/hieradata/common.yaml}}}. +* run puppet on the master, the source, and all the mirrors. Check {{{dsa-puppet/data/nodes/*.yaml}}}. + +== Adding a mirror + +Note: This might temporarily break apache on the new mirror host. + +* Add {{{roles::static_mirror}}} and {{{roles::static_mirror_nopush}}} to the {{{classes}}} stanza in {{{data/nodes/$HOSTNAME.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.