From Fedora Project Wiki

(Update with F13 instructions.)
(updated SOP with my notes)
Line 10: Line 10:
to <code>/keys</code> and <code>/verify</code>.
to <code>/keys</code> and <code>/verify</code>.


=== Branch master for stable release in fedora-web git repository ===
=== Update LINGUAS and languages.conf file ===


{{admon/note |  Perhaps this should be done right after release?}}
# lets clean our directories and update the po files
$ make clean all


<pre>git branch f12 master && git push origin f12</pre>
# checks file listing vs what's in LINGUAS (left side is the correct one)
# the ones that only have a " <" on the right side are the ones that are needed
$ diff --side-by-side -B <(ls -1 *.po | sed -n "s/.po//p" | sort) <(cat LINGUAS)


=== Unfreeze website ===
# double check everything matches
$ ls *.po | wc -l ; wc -l LINGUAS


Comment out the git checkout line in
$ make httpd/conf/languages.conf
<code>modules/fedora-web/files/syncStatic.sh</code> on <code>puppet1</code>.
$ sed -i "s:@DOCUMENTROOT@:/srv/web/start.fedoraproject.org:g" languages.conf.in


=== Prepare puppet commits ===
# commit changes
$ git commit -a


Prior to release day, prepare puppet commits to move the fedora-web branch to
# in /data/content/get-prerelease.html, from Alpha -> Beta (s/-Alpha-/-Beta/)
the release (alpha, beta, final, whatever) and, edit
<code>redirects.conf</code> (in <code>modules/fedora-web/files</code> on
<code>puppet1</code>) to do the right thing with <code>/get-prerelease</code>
requests.


=== Fire in the hole ===
== Update website ==
=== For Alpha ===
# add Alpha banner
# add "Someone say Alpha" note
# update links alpha links in get-prerelease.html
# modify:
## data/content/get-fedora.html (add alpha note)
## data/content/get-prerelease.html
## static/js/banner.js (alpha banner)
 
=== For Beta ===
# add countdown banner
# modify:
## data/content/counter.html (add languages)
## data/templates/js.html (add release counter and hide banner.js
## static/js/release-counter* (update dates/times, languages)
## data/templates/sidebar (add non-js version of countdown)
 
=== For GA ===
# merge beta -> master
$ git checkout master
$ git merge f13-beta
 
# manually edit the .pot files that are listed as conflicts
# then manually go to each site and 'make all test'
 
# on GA release day, tag repo Fx.
# update banner.js (/static/js/banners.js) to reflect new banner
 
# change /data/content/get-fedora.html from Alpha -> Beta
# note: if you're looking for paths, you should be able to find the paths in /pub on bapp01 (sudo su - mirrormanager first)
# add alpha/beta banner (see design team)
 
== Prepare puppet commits ==
 
Prior to release day, prepare puppet commits to move the fedora-web branch to the release (alpha, beta, final, whatever)
 
# update branch
edit modules/fedora-web/files/syncStatic.sh
 
# redirect /get-prerelease
edit modules/fedora-web/files/redirects.conf
 
== Fire in the hole ==


After 9:15 AM EDT release day, push the puppet changes (e.g.: <code>cd ~/puppet
After 9:15 AM EDT release day, push the puppet changes (e.g.: <code>cd ~/puppet
Line 59: Line 103:
</pre>
</pre>


== Fedora 12 Notes ==
Push commit to redirect get-prerelease to get-fedora.  If you have sudo on puppet1, run:
(Still needs to be wikified)


$ sudo func proxy\* call command run "/usr/bin/rsync -a --no-owner --no-group bapp1.vpn.fedoraproject.org::fedoraproject.org/* /srv/web/fedoraproject.org/"


<pre>
Otherwise, manually run this on each proxy server:


The times below are based on the timing of the website build and sync cronjobs.
$ sudo /usr/bin/rsync -a --no-owner --no-group bapp1.vpn.fedoraproject.org::fedoraproject.org/* /srv/web/fedoraproject.org/
It'd be a good idea to double check those in advance.


Unfreeze website (modules/fedora-web/files/syncStatic.sh), push after 9:05 AM EDT.
If necessary, clear proxy caches using


Run sudo /usr/local/bin/syncStatic on bapp1 after 9:45 AM EDT, make sure this
$ rm -rf /srv/cache/mod_cache/*
succeeds by checking /srv/web/fedoraproject.org.
 
Update the static banner on start.fedoraproject.org. The procedure is the same as with fedoraproject.org, except that the command to run on the proxies is


Release:
$ sudo /usr/bin/rsync -a --no-owner --no-group bapp1.vpn.fedoraproject.org::start.fedoraproject.org/* /srv/web/start.fedoraproject.org/


Push commit to redirect get-prerelease to get-fedora.  If you have sudo on puppet1, run:


$ sudo func proxy\* call command run "/usr/bin/rsync -a --no-owner --no-group bapp1.vpn.fedoraproject.org::fedoraproject.org/* /srv/web/fedoraproject.org/"
== Tips ==
=== create branch ===
# alpha
$ git checkout -b f13-alpha master
$ git push origin HEAD


Otherwise, manually run this on each proxy server:
# beta
$ git checkout -b f13-beta f13-alpha
$ git push origin HEAD


$ sudo /usr/bin/rsync -a --no-owner --no-group bapp1.vpn.fedoraproject.org::fedoraproject.org/* /srv/web/fedoraproject.org/
=== checkout branch ===
$ git checkout -t -b f13-beta origin/f13-beta
# revise
# git branch --track f13-beta origin/f13-beta
# git checkout f13-beta


If necessary, clear proxy caches using


$ rm -rf /srv/cache/mod_cache/*
=== merging branching ideas (suggested by Ricky) ===
git merge f13-beta
git checkout --theirs f13-beta [list of conflicting po files]
git commit


After the site is out, do link checking and push any last-minute fixes/changes
=== non-js counter ===
by committing to the git repo, running syncStatic, and syncing to the proxies
<pre>
as above.
  <?python
  from datetime import datetime


Update the static banner on start.fedoraproject.org.  The procedure is the
  today = datetime.utcnow()
same as with fedoraproject.org, except that the command to run on the
  release = datetime(2010, 5, 18, 14)
proxies is


$ sudo /usr/bin/rsync -a --no-owner --no-group bapp1.vpn.fedoraproject.org::start.fedoraproject.org/* /srv/web/start.fedoraproject.org/
  difference = release - today
  days = difference.days
  if difference.seconds > 0 or difference.minutes > 0 or difference.hours > 0: days += 1
  if days < 0: days = 0
  days = str(days)


Unfinished notes
  image_lang = 'en'
  available_languages = ('ar', 'bn_IN', 'cs', 'da', 'de', 'el', 'en', 'es', 'fi', 'fr', 'gu', 'he', 'hi', 'hr', 'hu', 'id', 'is', 'it', 'ja', 'kn', 'ko', 'ks', 'ml', 'nl', 'pa', 'pl', 'pt', 'pt_BR', 'ro', 'ru', 'si', 'sr', 'sv', 'th', 'tr', 'uk', 'zh_CN', 'zh_TW')
  if lang in available_languages:
      image_lang = lang
  image = image_lang + '/fedora13-countdown-banner-' + days + '.' + image_lang + '.png'
  ?>
<div id="banner">
<a href="http://fedoraproject.org/wiki/Releases/13/Schedule"><img src="${Markup(_('%s/static/images/counter/%s') % (path, image))}" alt="${Markup(_('Fedora 13 Goddard released in %s days!') % days)}" /></a>
<a style="text-decoration: none; font-size: 1.6ex; color: #99AABB;" href="${path}/${lang}/counter">${Markup(_('Add a counter to your own site!'))}</a>
</div>
</pre>


* add release banner countdown
=== alpha/beta banners (static/js/banner.js) ===
* add new release checksum files
<pre>
* add gpg keys
  [
    "https://fedoraproject.org/static/images/banners/f13alpha.png",
    "Fedora 13 Alpha",
    "https://fedoraproject.org/get-prerelease",
    5
  ],
</pre>


Watch the webmaster@ moderator queue for reports of website issues.
=== commit message example ===
<pre>
adding f13 countdown banner
- added languages to counter.html
- remove banner.js / add release counter to js.html
- add non-js banner to sidebar.html
- updated release dates in release-count-ext.js and release-counter.js
- removed older counter images
- added new counter images


update start.fp.o banner image
adding new language for fp.o
- Persian (fa)
- Portuguese (Brazilian) (pt_BR)
- Russian (ru)
</pre>
</pre>


[[Category:Websites]]
[[Category:Websites]]
[[Category:Infrastructure SOPs]]
[[Category:Infrastructure SOPs]]

Revision as of 04:36, 23 June 2010

Preparing the website for a release

Update gpg key

As the release approaches, watch the fedora-release package for a new key to be added. Use the update-gpg-keys script in the fedora-web git repository to add it to static/. Manually add it to /keys and /verify.

Update LINGUAS and languages.conf file

  1. lets clean our directories and update the po files

$ make clean all

  1. checks file listing vs what's in LINGUAS (left side is the correct one)
  2. the ones that only have a " <" on the right side are the ones that are needed

$ diff --side-by-side -B <(ls -1 *.po | sed -n "s/.po//p" | sort) <(cat LINGUAS)

  1. double check everything matches

$ ls *.po | wc -l ; wc -l LINGUAS

$ make httpd/conf/languages.conf $ sed -i "s:@DOCUMENTROOT@:/srv/web/start.fedoraproject.org:g" languages.conf.in

  1. commit changes

$ git commit -a

  1. in /data/content/get-prerelease.html, from Alpha -> Beta (s/-Alpha-/-Beta/)

Update website

For Alpha

  1. add Alpha banner
  2. add "Someone say Alpha" note
  3. update links alpha links in get-prerelease.html
  4. modify:
    1. data/content/get-fedora.html (add alpha note)
    2. data/content/get-prerelease.html
    3. static/js/banner.js (alpha banner)

For Beta

  1. add countdown banner
  2. modify:
    1. data/content/counter.html (add languages)
    2. data/templates/js.html (add release counter and hide banner.js
    3. static/js/release-counter* (update dates/times, languages)
    4. data/templates/sidebar (add non-js version of countdown)

For GA

  1. merge beta -> master

$ git checkout master $ git merge f13-beta

  1. manually edit the .pot files that are listed as conflicts
  2. then manually go to each site and 'make all test'
  1. on GA release day, tag repo Fx.
  2. update banner.js (/static/js/banners.js) to reflect new banner
  1. change /data/content/get-fedora.html from Alpha -> Beta
  2. note: if you're looking for paths, you should be able to find the paths in /pub on bapp01 (sudo su - mirrormanager first)
  3. add alpha/beta banner (see design team)

Prepare puppet commits

Prior to release day, prepare puppet commits to move the fedora-web branch to the release (alpha, beta, final, whatever)

  1. update branch

edit modules/fedora-web/files/syncStatic.sh

  1. redirect /get-prerelease

edit modules/fedora-web/files/redirects.conf

Fire in the hole

After 9:15 AM EDT release day, push the puppet changes (e.g.: cd ~/puppet && git push). This timing ensures that the cron jobs will not automatically push the new website before 10:00 AM. Then, on puppet1 run:

# Ensure you have the puppet repo checked out to ~/puppet and up to date
cd ~/puppet && make HOSTS="bapp1 proxy1 proxy2 proxy3 proxy4 proxy5 proxy6 proxy7" push

On bapp1, run:

# Once /usr/local/bin/syncStatic on bapp1 is updated with your changes, run
sudo -u apache /usr/local/bin/syncStatic

This takes about 15 minutes, so try to do this well before you need to push the final site out.

Finally, when releng gives the OK, run the following on the proxies to make the site live:

# To sync the changes out, you can use func from puppet1 if you have sudo on puppet1.
# Otherwise, SSH to the proxies and call the below command.
sudo /usr/bin/rsync -a --no-owner --no-group bapp01::fedoraproject.org/* /srv/web/fedoraproject.org/

Push commit to redirect get-prerelease to get-fedora. If you have sudo on puppet1, run:

$ sudo func proxy\* call command run "/usr/bin/rsync -a --no-owner --no-group bapp1.vpn.fedoraproject.org::fedoraproject.org/* /srv/web/fedoraproject.org/"

Otherwise, manually run this on each proxy server:

$ sudo /usr/bin/rsync -a --no-owner --no-group bapp1.vpn.fedoraproject.org::fedoraproject.org/* /srv/web/fedoraproject.org/

If necessary, clear proxy caches using

$ rm -rf /srv/cache/mod_cache/*

Update the static banner on start.fedoraproject.org. The procedure is the same as with fedoraproject.org, except that the command to run on the proxies is

$ sudo /usr/bin/rsync -a --no-owner --no-group bapp1.vpn.fedoraproject.org::start.fedoraproject.org/* /srv/web/start.fedoraproject.org/


Tips

create branch

  1. alpha

$ git checkout -b f13-alpha master $ git push origin HEAD

  1. beta

$ git checkout -b f13-beta f13-alpha $ git push origin HEAD

checkout branch

$ git checkout -t -b f13-beta origin/f13-beta

  1. revise
  2. git branch --track f13-beta origin/f13-beta
  3. git checkout f13-beta


merging branching ideas (suggested by Ricky)

git merge f13-beta git checkout --theirs f13-beta [list of conflicting po files] git commit

non-js counter

  <?python
  from datetime import datetime

  today = datetime.utcnow()
  release = datetime(2010, 5, 18, 14)

  difference = release - today
  days = difference.days
  if difference.seconds > 0 or difference.minutes > 0 or difference.hours > 0: days += 1
  if days < 0: days = 0
  days = str(days)

  image_lang = 'en'
  available_languages = ('ar', 'bn_IN', 'cs', 'da', 'de', 'el', 'en', 'es', 'fi', 'fr', 'gu', 'he', 'hi', 'hr', 'hu', 'id', 'is', 'it', 'ja', 'kn', 'ko', 'ks', 'ml', 'nl', 'pa', 'pl', 'pt', 'pt_BR', 'ro', 'ru', 'si', 'sr', 'sv', 'th', 'tr', 'uk', 'zh_CN', 'zh_TW')
  if lang in available_languages:
      image_lang = lang
  image = image_lang + '/fedora13-countdown-banner-' + days + '.' + image_lang + '.png'
  ?>
	<div id="banner">
		<a href="http://fedoraproject.org/wiki/Releases/13/Schedule"><img src="${Markup(_('%s/static/images/counter/%s') % (path, image))}" alt="${Markup(_('Fedora 13 Goddard released in %s days!') % days)}" /></a>
		<a style="text-decoration: none; font-size: 1.6ex; color: #99AABB;" href="${path}/${lang}/counter">${Markup(_('Add a counter to your own site!'))}</a>
	</div>

alpha/beta banners (static/js/banner.js)

   [
    "https://fedoraproject.org/static/images/banners/f13alpha.png",
    "Fedora 13 Alpha",
    "https://fedoraproject.org/get-prerelease",
    5
  ],

commit message example

adding f13 countdown banner
- added languages to counter.html
- remove banner.js / add release counter to js.html
- add non-js banner to sidebar.html
- updated release dates in release-count-ext.js and release-counter.js
- removed older counter images
- added new counter images

adding new language for fp.o
- Persian (fa)
- Portuguese (Brazilian) (pt_BR)
- Russian (ru)