GRAMMY.ca (WordPress 3) was a project undertaken in 2013 to set create a Canadian website similar to grammy.com. The project was headed by project manager James Wood ( James.Wood@rci.rogers.com ).
Site Environment
Basic site environment:
- Nginx 1.2.1
- PHP 5.3.x
- MySQL 5.x
http://www.grammy.ca/ is currently served from the following load balanced front-end webservers:
- ?
Webservers running the caching proxy Squid ( http://www.squid-cache.org/ ) are utilized to serve static content (images, JavaScript, CSS):
- gc01.rcsin.sde.rogersdigitalmedia.com
- gc02.rcsin.sde.rogersdigitalmedia.com
- ... continues sequentially ...
- gc06.rcsin.sde.rogersdigitalmedia.com
In order to SSH/SFTP to the machines listed above, first SSH (or create a tunnel via) noc.sde.rogersdigitalmedia.com:22 or jump.rdmi.ca:8222 .
The production website has a root folder of:
/clients/broadcast/grammy.ca/current/webroot/
The production website connects to the MySQL database:
Host: ? (?)
Username: ?
Password: [contact Infrastructure department]
Database: ?
Memcached is utilized as an object cache, and is available in this environment at the location:
memcache01:?
In the production environment, PHP error logs can be found at this location:
/logs/php-fpm/?
Nginx server error logs can be found at the location:
/var/log/nginx/?
Finally, Nginx server access logs can be found at:
/var/log/nginx/?
http://www.grammy.ca/ is currently served from the following front-end webservers:
- stgnginx01.rcsin.sde.rogersdigitalmedia.com
Webservers running the caching proxy Squid ( http://www.squid-cache.org/ ) are utilized to serve static content (images, JavaScript, CSS):
- stggc01.rcsin.sde.rogersdigitalmedia.com
- stggc02.rcsin.sde.rogersdigitalmedia.com
- stggc03.rcsin.sde.rogersdigitalmedia.com
In order to SSH/SFTP to the machines listed above, first SSH (or create a tunnel via) noc.sde.rogersdigitalmedia.com:22 or jump.rdmi.ca:8222 .
The staging website has a root folder of:
/clients/broadcast/grammy.ca/current/webroot/
The staging website connects to the MySQL database:
Host: stgdb01.nfs.sde.rogersdigitalmedia.com (192.168.122.26)
Username: ?
Password: ?
Database: ?
Memcached is utilized as an object cache, and is available in this environment at the location:
stgmemcache01:?
In the staging environment, PHP error logs can be found at this location:
/logs/php-fpm/?
Nginx server error logs can be found at the location:
/var/log/nginx/?
Finally, Nginx server access logs can be found at:
/var/log/nginx/?
http://int-www.grammy.ca/ is currently served from the following load balanced front-end webservers:
- devnginx01.rcsin.sde.rogersdigitalmedia.com
Webservers running the caching proxy Squid ( http://www.squid-cache.org/ ) are utilized to serve static content (images, JavaScript, CSS):
- devgc01.rcsin.sde.rogersdigitalmedia.com
- devgc02.rcsin.sde.rogersdigitalmedia.com
- devgc03.rcsin.sde.rogersdigitalmedia.com
In order to SSH/SFTP to the machines listed above, first SSH (or create a tunnel via) noc.sde.rogersdigitalmedia.com:22 or jump.rdmi.ca:8222 .
The development website has a root folder of:
/clients/broadcast/grammy.ca/current/webroot/
The development website connects to the database:
Host: devdb01.nfs.sde.rogersdigitalmedia.com (192.168.120.213)
Username: ?
Password: ?
Database: ?
Memcached is utilized as an object cache, and is available in this environment at the location:
devmemcache01:?
In the development environment, PHP error logs can be found at this location:
/logs/php-fpm/?
Nginx server error logs can be found at the location:
/var/log/nginx/?
Finally, Nginx server access logs can be found at:
/var/log/nginx/?
Deployment of this website is done via the Capistrano deployment scripts found in the continuous_integration project. If the project has been set up on the jump.rdmi.ca server for your SSH user, do the following to deploy to the chosen environment:
cd nextissue
bundle exec cap [environment] deploy
Where [environment] is found, use integration, staging or production.
If you're (for instance) attempting to run a non-local copy of the website on your workstation, you may need to reset the URL the site believes it is located at by executing the query found below:
UPDATE wp_options SET option_value = 'http://localhost' WHERE option_name = 'siteurl' LIMIT 1;
UPDATE wp_options SET option_value = 'http://localhost' WHERE option_name = 'home' LIMIT 1;
Clearing memcached for the site by doing the following:
-
Look up the server IP and port for the memcached server being used in that environment in the /config/ folder:
// Enable object caching through Batcache and memcached. define('WP_CACHE', true); $memcached_servers = array( 'default' => array( '192.168.220.250:11963' ) );
-
Telnet to that memcached server:
telnet 192.168.220.250 11963
-
Once connected, type the following to flush the server:
flush_all
The server should respond with "OK". You can now disconnect from the server (press ^] ) and the issue should be resolved.