canmove, Confirmed users, Bureaucrats and Sysops emeriti
3,698
edits
(added repository layout content) |
(first draft of first-time deployment steps) |
||
Line 56: | Line 56: | ||
All changes should be made via a local checkout of a personal fork of https://github.com/mozilla/wiki.mozilla.org. Once these changes have been submitted as a pull request and accepted, they are ready for deployment. | All changes should be made via a local checkout of a personal fork of https://github.com/mozilla/wiki.mozilla.org. Once these changes have been submitted as a pull request and accepted, they are ready for deployment. | ||
=== Pre-requisites === | |||
In order to install the wiki, you need: | |||
=== Deploying for the first time === | === Deploying for the first time === | ||
==== 1. Clone the repository ==== | |||
You should clone the repository to a location: a) that you can configure apache to serve from, b) that you can write to without using sudo. You can use your home directory, or Ubuntu's default of /var/www. If you use /var/www we recommend making yourself user of this directory (<code>sudo chown <username> /var/www</code>). | |||
<pre> | |||
git clone git@github.com:mozilla/wiki.mozilla.org.git | |||
</pre> | |||
This will clone the contents of the repository into a directory named wiki.mozilla.org. | |||
==== 2. Run install.sh script ==== | |||
<pre> | |||
cd wiki.mozilla.org | |||
tools/install.sh | |||
</pre> | |||
The install script: | |||
* initializes and updates the git submodules | |||
* installs extensions as specified by composer | |||
* create a symlink from where mediawiki expects it in core/LocalSettings.php to LocalSettings.php | |||
* create a symlink from inside core to assets directory | |||
* create symlinks for static assets | |||
* changes group of entire directory to www-data (user that apache runs as on Ubuntu) | |||
The last step is required for some extensions. | |||
Notes: a) you should not need to run the install.sh as root or with sudo, b) the install script needs to be run from the top-level directory. | |||
==== 3. Create secrets.php ==== | |||
Now you need to create secrets.php using secrets.php-dist as a template. | |||
<pre>cp secrets.php-dist secrets.php</pre> | |||
Open this file in the editor of your choice. | |||
<pre> | |||
<?php | |||
$SECRETS_wgServer = 'http://server.dom'; | |||
$SECRETS_wgLogo = 'logo.png'; | |||
$SECRETS_wgDBserver = 'my_db_server'; | |||
$SECRETS_wgDBname = 'db_name'; | |||
$SECRETS_wgDBuser = 'db_user'; | |||
$SECRETS_wgDBpassword = 'XXXX'; | |||
$SECRETS_wgSecretKey = 'XXXXXX'; | |||
$SECRETS_wgUpgradeKey = 'XXXX'; | |||
$SECRETS_wgReCaptchaPublicKey = ''; | |||
$SECRETS_wgReCaptchaPrivateKey = ''; | |||
$SECRETS_wgGoogleAnalyticsAccount = ''; | |||
$SECRETS_wgSquidServers = array('192.168.1.1', '192.168.1.2'); | |||
$SECRETS_wgMemCachedServers = array(); | |||
</pre> | |||
=== Deploying changes to super project only === | === Deploying changes to super project only === |