User:Aeric/Create a New Branch
From LongJump Support Wiki
< User:Aeric
Revision as of 02:35, 2 June 2011 by imported>Aeric (→Final Housekeeping)
You branch the Wiki to create a sandbox for the next generation of edits. The process is this:
- Copy the existing database to a new one (wiki___{next_version})
- Install a new version of the wiki at /lj___{next_version}
- Adjust the settings to point to the new database.
- Make a few other adjustments.
Requirements
- An ftp app like FileZilla client
- A text editor like Notepad++
- An editor you're comfortable using over an SSH connection (vi, in a pinch). Nano is installed on Rackspace, and works reasonably.
- Access to the internet to get the latest version of MediaWiki
- A merge program to incorporate edits to LocalSettings.php
- TortoiseMerge (comes with TSV, works great)
- WinMerge (free)
- 7-zip to unzip .tar.gz files to local PC
- Many free MB on your local hard drive
- A Wiki-backup and maintenance area on your hard drive. Ex: C:\wwww
- AdobeIllustrator to modify the LongJump log
- An icon-file editor to modify the LongJump icon. (See Rename the Wiki.)
Prep Images
In SVN-controlled directory Relationals/techpubs/images/logos:
- Edit LJ_Logo.ai with Adobe Illustrator.
- Change the version number.
- Export to LJ_Logo_{new_version}.png.
- Put that under version control
- Copy it to LJ_Logo.png for use in the Wiki
- Create longjump.ico
- Copy longjump{old_version}.ico to longjump{new_version}.ico
- Use IcoFX
- Font: Stencil if available, else Stencil Standard, Normal (not bold)
- Size: 34 px (font=13pt)
- Put longjump{new_version}.ico under version control
- Copy longjump{new_version}.ico to longjump.ico for use in the Wiki
- Learn more: Rename the Wiki.
Prep Database
- Go to http://ipchicken.com to verify your IP address
- Login to the server as root
- In /etc/httpd/conf.d/phpMyAdmin.conf,
In the <Directory /usr/share/phpMyAdmin> section,
Verify that the IP address is allowed. If it isn't, then add it.
Note:
Because we're using a router, each machine in the building appears to have the same (virtual) IP address. So this step should only be needed when coming from some other location. - Visit http://lj.platformatyourservice.com/phpmyadmin
- Login (see Aeric, Matt, or Uday for name and password)
- Visit the most recent database (e.g. wiki80)
- Click Operations
- Copy DB To: wiki___{new_version}
- Radio button: Structure and data
- Checkbox options:
- Create DB before copying
- Switch to Copied DB
- [Go]
A message appears at the top of the page saying that the database has been copied.
Prep the Sandbox
Note: This process parallels the Wiki upgrade process recommended at http://mediawiki.org, but it goes through the installation process to make sure that the internal "script path" settings are configured correctly.
On your local system:
- Copy the current wiki:
- C:/www/lj___{curr_version} => C:/www/lj___{next_version}
- Rename these files and folders so they're not overwritten by the install:
- /extensions --> /extensions1
- /images --> /images1
- /skins --> /skins1
- /LocalSettings.php => LocalSettings1.php
- Download the latest production version of MediaWiki.
- Visit Special:Version to find out which version is currently running.
- Get latest files from
- http://mediawiki.org
- Download > Get MediaWiki (.tar.gz)
- Pick latest production version that has a green checkmark (indicates it is stable)
- Use 7-Zip to uncompress the files
- Verify the directory structure (It probably untars to mediawiki-{version}/)
- Copy the contents to the local instance of the new wiki (ex: C:/www/lj81)
- Remove these folders:
- /extensions
- /images
- /skins
- Rename these:
- /extensions1 --> /extensions
- /images1 --> /images
- /skins1--> /skins
- Rename robots.txt_ALLOW to robots.txt, to turn away search robots.
- Copy freshly minted logo and icon files from the SVN repo at Relationals/techpubs/images/logos to skins/lj7monobook in the new wiki:
- LJ_Logo.png
- longjump.ico
- Zip up the new folder in File Explorer:
- New > Compressed (Zip) folder
- Copy the new wiki folder into it
- Use ftp/FileZilla to copy it to the hosting server.
On the server:
- Login as root
- Unzip the zip file:
- cd /usr/share/mediawiki
- unzip -a lj___{new_version}
- where -a converts line endings in text files from CR/LF to LF
- Make the config/ dir writable for the installation process, and images/ writable to enable uploads:
- chmod -R a+w config images
Install MediaWiki
- From a browser, navigate to:
http://lj.platformatyourservice.com/lj___{new_version}/index.php - Click set up the wiki.
(The installation process ensures that PHP scripts which comprise MediaWiki are set up with the correct script path. It's a necessary step, because that value is difficult to retrofit.) - Fill in configuration info:
- Site config
- Wiki name: PlatformSupport
- Contact email: eric@longjump.com --or root@localhost??
- Language: en - English
- Copyright/license: No license metadata
- Admin username/password:
__TBD: values to use__ - Object caching: No caching
(Unless and until memcached ("Memcache-D: The memory caching daemon) is installed and server addresses can be provided.)
- Email config
- Email features (global): Enabled
- User-to-user email: Disabled
- Email notification about changes: Enabled
- Email address authentication: Enabled
- Database config
- Database type: MySQL
- Database host: localhost
- Database name: wiki___{new_version} Ex: wiki81
- DB username: <same>
- DB password: <same>
- Supervisor account: None
- Database table prefix: {blank}
- Storage engine: InnoDB
- Database Char Set: MySQL 4.1/5.0 binary (efficient)
- Click [Install MediaWiki].
The install finishes and gives you a page that echoes your settings. The /config directory now has a LocalSettings.php file created by the install. - Copy \config\LocalSettings.php to parent dir:
- cp config/LocalSettings.php .
- Test access to the wiki at http://test.platformatyourservice.com/lj___{new_version}/index.php
(Undefined variables look like undefined templates, but the page can be reached.) - Nuke the config/ dir:
- rm -rf config/
Customize the Configuration
- In FileZilla, download LocalSettings.php
- Merge saved LocalSettings1.php into LocalSettings.php
- Verify:
- $wgScriptPath = "/lj___{new_version}";
- $wgDBname = "wiki___{new_version}";
- Change:
- Use the "secret key" from the newly generated file (internal DB access)
- $articlePath = "${wgScriptPath}/$1";
- $wgEnableUploads = true;
- Comment out Google analytics in the LongJump section, so they're disabled.
- Rename:
- LocalSettings.php => LocalSettings_default.php
- LocalSettings1.php => LocalSettings.php
- In FileZilla, upload LocalSettings.php
On the server:
- Log in as root
- Edit /etc/httpd/conf.d/mediawiki.conf:
- a. Copy the <Directory> section for the current version of the wiki
- b. Modify the path to point to the new wiki folder:
- <Directory /usr/share/mediawiki/lj___{new_version}>
- c. Add an Alias statement that points to that folder
- Alias /usr/share/mediawiki/lj___{new_version}
- Load the new configuration file:
- service httpd reload
Test the Sandbox
- Browse to the new wiki and check that the following operations work as expected:
- Viewing pages
- Editing pages
- Uploading a file
- Once verified that it's working, tell Matt/Uday to:
- In the main development branch, change the help pointer to http://platformatyourservice.com/lj___{new_version}
- Distribute the patch to developers, so their help links point to the right pages
Modify Wiki Content
- Change redirect-pages:
- Release Notes
- Doc Notes
- ISV Release Notes
- Installable Version Release Notes (2nd of 2 pages that point to same place)
- Change these locations, if they are changed in the server build:
- Template:JAVA_DOCHOST --+-- value used when generating javadocs in server/build/build.xml
- Template:J2EE_DOCHOST --+
- Remove the pre-release versions of these pages from the prior version of the wiki, if they exist:
- Release Notes
- Doc Notes
- ISV Release Notes pages
Final Housekeeping
- Log in to the server as root
- From the command line, in the maintenance directory:
- Remove old, deleted images that are taking up space in the archive:
- php deleteArchivedFiles.php --delete
- Remove versioned copies of images that are taking up space in the archive (Along with other revisions. C'est la vie.).
- php deleteArchivedRevisions.php --delete