Saturday, September 19, 2009

jct progress report

Firstly, tested the built in Pligg file and database back up system. Seemed to work fairly easily. The file back up literally zipped the current version of all of your online files so you could download them and save them locally. That might be handy every now and then, and before big code changes. The avatar back up file also seemed to construct a zipped file which I was unable to open. I’m not sure what is in this or how to restore it if necessary. Should check that at some point – I’ve added it to the bug list.

Backed up the database files as well with the Pligg built in system. It downloads an sql file, which you apparently reinstate by executing the code through MyMSQLAdmin. I did read in one of the forum articles that it was actually just as easy/easier to periodically export the database contents through MySQLAdmin. Either way, backing up seems pretty easy!



Secondly, practiced exporting to the live server from the repository, to work out what the process will look like. I started by completely clearing out the existing public_html files (by renaming the folder via the Terminal) and bringing in the new ones (putting them in a new folder called public_html), then going back and reinserting settings.php and dbconnect.php in the appropriate places. The good news is, it worked, and the code change I made also worked online which is awesome! I think by starting fresh with a clean cache, it prevents the code issues I had in the past when uploading new files to the server and old cache files hanging around.

This is the process to use going forward:
1) Clear existing public_html through the Terminal. Do this by renaming the folder public_html to bkup_html. This will keep a copy on the server to make it easy to reinstate if necessary (plus makes the settings/dbconnect files easy to find):
mv public_html bkup_html

2) Export the site files from the svn repository:
svn export http://svn.strine.net.au/strinerepos/webdocs public_html --username jto

3) Check all of the files transferred by looking on the server with FTP client e.g. Cyberduck. Reinsert the settings and dbconnect docs here.

4) CHMOD 777 the /cache and /cache/template folders

5) That’s it!

Then I looked at how RapidSVN compares changes I’d made in the header.tpl doc in the log, to see what it would look like if I had to work out a code conflict. I had to install DiffMerge and followed the instructions http://www.rapidsvn.org/index.php/OnlineHelp:Contents#Mac_OS.2FX

to help to get it working with RapidSVN.



Lastly, I practiced the entire installation process on the bf to see what process I needed to follow to get the team up and running. This is what I worked it out to be:

1) Rename the Pligg file on the MAMP server to old pligg

2) Install RapidSVN and DiffMerge
- Download the dmg files and drag the two to the application folder
- Move the diffmerge shell script using the Terminal
o Make sure the diffmerge dmg file is open in a finder window
o Run this script
cd /Volumes/DiffMerge\3.3.0.1001/CommandLine

sudo cp diffmerge.sh /usr/bin/

- Change the preferences in RapidSVN to set DiffMerge as the Diff and Merge tool

3) Open RapidSVN and add the strine repository to the bookmarks
- Bookmarks/add existing repository
- http://svn.strine.net.au/strinerepos and authenticate

4) Download the repository to the local server
- Select webdocs, then Repository/check out
- Fill in the form – the location is MAMP/htdocs – create a new folder called ‘pligg’. Leave the rest of the fields

5) Once downloaded, go and manually replace the settings and dbconnect documents (back these up somewhere to avoid the reinstall later)
6) Start MAMP servers
7) Check the new files work by loading the local site localhost:8888/pligg
8) Remove the bookmark for svn.strine.net.au from RapidSVN


So the process for users after the installation of the repository files on their local server:
1) Check out the latest version of the files: /Modify/Update
2) Make your edits on your local machine
3) When you want to submit your changes to the online server, first check for latest version of the files: /Modify/Update. If no conflicts, Commit your files and changes. Add comments re what you changed and why in case someone needs to query or to help someone resolve a conflict
4) If there’s a conflict, resolve by using the Diff/Merge function (I haven’t tested yet)

No comments:

Post a Comment