Difference between revisions of "User:Aeric/Configuration"

From AgileApps Support Wiki
imported>Aeric
imported>Aeric
Line 27: Line 27:


===How Links to the Wiki Work===
===How Links to the Wiki Work===
The mapping of URLs to Wiki's is set up in the <tt>mediawiki.conf</tt> file, which will be discussed momentarily.
;Current Version Links:
;Current Version Links:
:These URLS always point to the latest released version of the Support Wiki:
:These URLS always point to the latest released version of the Support Wiki:
Line 42: Line 44:


;Pre-Release Links:
;Pre-Release Links:
:Reviewers of AAL content who need to look at pre-release information use a link like this:
:To review a pre-release version of AAL content, use this link:
:: http://{subdomain}.agileappslive.info/mw_dev
:: http://{subdomain}.agileappslive.info/mw_dev



Revision as of 19:44, 4 September 2013

How the Wiki Works

  • Mediawiki consists of a database and a bunch of PHP scripts and supporting files in the Wiki directory.
  • The actual Wiki content is contained in a database.
  • Together, the file set and the database make up the Wiki that user sees.
The main configuration script:
  • LocalSettings.php
  • $wgDBname - The variable that names the database in the MySQL space,
accompanied by the login information and the mysql "secret key" for the space
  • $wgScriptPath - This variable is used to generate Wiki links. E.g. "/wiki".
The wiki will start if it's wrong, but all of the links it generates will point to this location. Much internal processing will look there for scripts, as well.
Standard directories:
  • extensions/
    MediaWiki plug-ins that have been downloaded and "installed" by referencing them in LocalSettings.php. (Since pages are loaded dynamically, once the extension is present, it is automatically part of the Wiki. No restart needed.)
  • images/
    A directory hierarchy that contains the image files after they have been uploaded. The Wiki stores them there when you upload an image, and keeps a pointer to them in the database.
  • skins/
    The images and CSS files that create the "wrapper context" (headers, nav pane, etc.) for the wiki content. (The lj7monobook skin was customized to make the nav pane wider.)
Added directories:
_v16_skins/
A copy of the skins that came with MW 1.16.5, before the nav pane was widened. Saved so that a diff tool can be used to identify those changes and any others.
custom_images/
Header images and favicons used by the browser for bookmarks and tabs.
download/
A directory we added to hold files we want to reference in the wiki. (Only image files can be uploaded to the Wiki. But that's ok. Image loads are done painfully, one at a time. Files in the download/ folder can be easily updated en mass. (Image files need to be uploaded so that "links" to them coded in the wiki cause the image to be displayed.)

How Links to the Wiki Work

The mapping of URLs to Wiki's is set up in the mediawiki.conf file, which will be discussed momentarily.

Current Version Links
These URLS always point to the latest released version of the Support Wiki:
http://{subdomain}.agileappslive.info/wiki - AgileApps Live support wiki
http://{subdomain}.platformatyourservice.com/wiki - Legacy LongJump wiki
Those are the best links to send to current customers, as they’ll always point to the latest pages. And they will always stay at the top of the Google search rankings, by virtue of being the most heavily accessed Wiki pages.
Versioned links
Customers with an on-premise installation need to refer to a version of the wiki that matches their installation:
http://{subdomain}.agileappslive.info/aa90
http://{subdomain}.platformatyourservice.com/lj82
Use scripts/versionProductionWiki to create an versioned copy of the production wiki when an installable version is released.
Pre-Release Links
To review a pre-release version of AAL content, use this link:
http://{subdomain}.agileappslive.info/mw_dev
That link points to the "development" (pre-release) version of the wiki.
(Since updates happen every three or four weeks, customers will rarely need it.)

Wiki/Server Configuration Notes

  • The wiki is hosted at Racksace. The site name is "platformatyourservice.com".
  • Location is /usr/share/mediawiki/{wiki_name}
  • Multiple subdomains are set up using Apache, the DNS server, and LocalSettings.php.
  • The DNS server forwards platformatyourservice.com -> isv.platformatyourservice
  • The Wiki examines the server name (which includes the subdomain) to determine which logos to show and which platform name to use:
    • In {wiki_name}/LocalSettings.php, $wgSitename declares the name of the Wiki site.
    • That value is set conditionally, based on the subsomain used to access the PHP page.
    • So the same verison of the Wiki is launched in all three cases, but LocalSettings.php changes $wgSitename depending on the subdomain used to access it.
    • When that variable's value is "ISV Support Wiki", the unbranded, ISV version of the wiki pages are shown. Otherwise, a logo and platform name appears.

Accessing the Server

The server can be accessed with a VPN connection, using either FTP or SSH. FTP gives access to all of the Wiki files, which is generally sufficient. (Details in emails.)

Apache Modifications

  • The Apache configuration file is /etc/httpd/conf.d/mediawiki.conf.
  • Always preserve the original and edit a copy in /usr/share/mediawiki/apache_config
  • To edit, either:
  1. SSH to the server using PuTTY or the SSH shell, and use a line-oriented editor like nano.
  2. Use FTP to bring the file back to your workstation, and use a terrific editor like NotePad++

Maintenance scripts in /usr/share/mediawiki/apache_config:

  • ./get_conf
Gets a copy of the three main configuration files, primarily for backup:
httpd.conf
phpMyAdmin.conf
mediawiki.conf
  • ./try_setup
Copies the current config file as mediawiki.conf_sav.
If no else is editing mediawiki.conf, then mediawiki.conf_new has the same content, and is ready to be edited. Otherwise, copy _sav to _new before you begin.
  • ./try
Put mediawiki.conf_new in place and restart the server.
For a quick test, refresh the page for each of the main wikis:
If you can see the page and the generated links are correct, the wiki is usable.
If you've done any work on the skins, then test the changes, as well
  • ./revert
Put mediawiki.conf_sav back in place, in case the _new version didn't work.

Apache References

Backup Notes

  • A MediaWiki site contains a number of wiki files and a database.
  • The PHP files and wiki content files are in the {wikiName}/ directory.
  • Each Wiki has its own database.
    The database contains page contents and edit history. Data is exported to a .sql file using mysqldump, and imported using mysql.
  • scripts/backupDevWiki makes a dated zip file that contains the .sql file and the mw_dev/ directory folder.
  • The archive of database backups maintained on the server is at /usr/share/mediawiki/archive.