Quick jump:  What's new

 
Go to:
 
Weblog: SocialText   
in Dobrica Pavlinušić's random unstructured stuff
SocialText git upgrade

This page will describe by efforts to upgrade SocialText from version v2.19.0.2 to git version



rsync current installation

mjesec:~# lvcreate -s -L 1G -n vz-snap /dev/vg/vz
  Logical volume "vz-snap" created
mjesec:~# mount /dev/vg/vz-snap /mnt/vz-snap/

stage:/mnt/btrfs# btrfs subvolume create /mnt/btrfs/saturn
Create subvolume '/mnt/btrfs/saturn'

stage:~# /srv/sysadmin-cookbook/recepies/rsync/rsync-clone.sh 10.60.0.9::vz-snap/private/212024/ /mnt/btrfs/saturn/

stage:~# btrfs subvolume snapshot /mnt/btrfs/saturn /mnt/btrfs/saturn.0.etch
Create a snapshot of '/mnt/btrfs/saturn' in '/mnt/btrfs/saturn.0.etch'


Upgrade Debian distribution

  • first from etch -> lenny
  • then from lenny -> squeeze

Install git

Use following /etc/apt/sources.list sources.list

root@stwiki3:~# apt-get install git-core

Checkout source

dpavlin@st-dev:~$ git clone git://github.com/socialtext/socialtext.git
Cloning into socialtext...
remote: Counting objects: 159215, done.
remote: Compressing objects: 100% (34584/34584), done.
remote: Total 159215 (delta 118894), reused 157590 (delta 117564)
Receiving objects: 100% (159215/159215), 1.82 GiB | 6.74 MiB/s, done.
Resolving deltas: 100% (118894/118894), done.

Install dependencies

dpavlin@st-dev:~/socialtext$ cat nlw/build/pkg-lists/dapper | xargs -i sudo apt-get install {}

dpavlin@st-dev:~/socialtext/nlw$ ./configure --socialtext-open 1 --force-ssl-login 1 --hostname st-dev.vbz.ffzg.hr --server-admin dpavlin@rot13.org --support-address dpavlin@rot13.org
permalink
SocialText OpenVZ Dapper container

Page renamed to OpenVZ Dapper container

permalink
SocialText Open Wiki Install

Here are some quick notes about installation on clean Debian etch machine

This page is aimed towards system administrators, if you want information how to customize design of page take a look at SocialText CSS design (which is included on bottom of this page).

Contents: [Dobrica Pavlinušić's random unstructured stuff]


Helper packages

sudo apt-get install wv xpdf-utils unrtf unzip links
sudo cpan MP3::Tag

Install source

svn co https://repo.socialtext.net:8999/svn/socialtext/trunk socialtext
cd socialtext/nlw

# checkout lastest Socialtext::Resting client
svn export --force https://repo.socialtext.net:8999/svn/socialtext-clients/trunk/rest/perl/Socialtext-Resting/lib/Socialtext/ lib/Socialtext/

./configure --socialtext-open 1 --apache-proxy 0 --force-ssl-login 1
make
sudo bash
make install
update-rc.d -f apache-perl remove
update-rc.d st-apache defaults
update-rc.d ceqlotron defaults
/etc/init.d/st-apache start
/etc/init.d/ceqlotron start

Update existing checkout

cd socaialtext
svn update
cd nlw
./configure --socialtext-open 1 --apache-proxy 0 --force-ssl-login 1
make
make test
sudo make install
sudo /etc/init.d/st-apache stop
sudo /etc/init.d/ceqlotron restart
sudo /etc/init.d/st-apache start

Add new admin user

sudo -u www-data st-admin create-user --email dpavlin@rot13.org --password wikidream \
  --first-name Dobrica --last-name Pavlinusic
sudo -u www-data st-admin add-workspace-admin --email dpavlin@rot13.org

Configuring mailer

postfix

Install and configure postfix for mail delivery

apt-get install postfix
vi /etc/postfix/main

Important lines are following:

alias_maps = hash:/etc/aliases, hash:/etc/aliases.deliver
alias_database = hash:/etc/aliases, hash:/etc/aliases.deliver

They add /etc/aliases.deliver (which SocialText generates with names of wiki workspaces) to configuration.

Next, we need to create /etc/aliases.deliver.db which is binary version of database needed for postfix. It's extremly important that aliases.deliver file is owned by www-data because postfix picks user which will do e-mail delivery based on owner of aliases file. If your owner of /var/www/socialtext is some other user than www-data you will have to modify following command appropriately:

# make www-data owner of file
chown www-data:root /etc/aliases.deliver
# allow root group to write in /etc/
chmod g+w /etc/
# create /etc/aliases.deliver.db
sudo postalias /etc/aliases.deliver

Now restart postfix as root user

/etc/init.d/postfix restart

crontab

Add following to /etc/crontab to refresh aliases database for postfix regularly:

*/10 *  * * *   root    postalias /etc/aliases.deliver

Handling e-mail errors

sudo tail /var/log/mail.log | grep st-admin

dsn=5.3.0, status=bounced (Command died with status 13: "/usr/local/bin/st-admin deliver-email --workspace bio". Command output: open nlw-stats.log: Permission denied at /usr/local/share/perl/5.8.8/Socialtext/Statistics.pm line 103. END failed--call queue aborted. )

This problem is reported on socialtext-devel list, but no response so far.

# sudo vi +24 /usr/local/share/perl/5.8.8/Socialtext/Statistics.pm
Readonly my $LOG_NAME => 'nlw-stats.log';
Readonly my $LOG_PATH => $ENV{APACHE_LOG_DIR}
    ? "$ENV{APACHE_LOG_DIR}/$LOG_NAME"       
    : "/tmp/$LOG_NAME";

Customize template

Remove "Did you know?" box from dashboard

sudo vi /usr/share/nlw/template/view/homepage

Or from your socialtext/nlw checkout (so that make install will install correct one):

vi share/template/view/homepage

Fix RSS feed errors

If you are using {fetchrss http://blog.rot13.org/index.xml} and having problems with RSS feeds, try to re-installing two perl modules:

sudo cpan XML::RSS XML::Atom

Change e-mail address of workspace

This configuration change will feed responses to e-mails generated by wiki back into wiki. You might not want to do that! :-)

st-admin set-workspace-config --workspace rot13 \
  email_notification_from_address '"random unstructured stuff" <rot13@wiki.rot13.org>'

Access simple version of page

Every SocialText wiki has a lite version available at http://wiki.example.com/lite/page/:workspace/

For this wiki it's http://saturn.ffzg.hr/lite/page/rot13

Configure sane resource usage

Since SocialText wiki is designed to run on dedicated box, it's resource requiements are not for faint-hearted users. However, if you are installing it on machine with constraint hardware (or virtual machine) you might want to decrease number of apache-perl server which are created on startup and kept running. Each apache child takes about 80Mb of RAM, so lowering number of children will have beneficial effect on your memory usage.

If you open /etc/apache-perl/st-httpd.conf you will see comment that describes command used for generating this configuration. So, let's edit command limits, re-create config and restart apache:

vi +485 dev-bin/gen-config
dev-bin/gen-config --sitewide --apache-proxy=0 --hostname=saturn.ffzg.hr
/etc/init.d/st-apache reload

Convert RSS feed URLs to absolute

If you need to fetch RSS feeds from remote URLs and those providers create only relative URLs in feeds (like svnweb does) that this patch might help you: FetchRSSPlugin.pm.diff

It does dirty magic to prepend hostname before URL in feeds making them work from Socialtext wiki which is on different host.

Problems with 8-bit UTF-8 encoded characters in URLs

It seems that trunk of socialtext

Repository Root: https://repo.socialtext.net:8999/svn/socialtext
Repository UUID: 593ce9bc-2028-0410-bb98-c566b643a948
Revision: 6127
Node Kind: directory
Schedule: normal
Last Changed Author: jjp
Last Changed Rev: 6028
Last Changed Date: 2007-12-10 19:38:21 +0100 (Mon, 10 Dec 2007)

has problems with CGI.pm 3.31. As a temporary work-around use backpan.sh to download CGI.pm 3.29 which is known to work.

Enable html wafl in workspace

This enables .html markup which enables embedded html into wiki page

st-admin set-workspace-config --workspace razmjenavjestina allows_html_wafl 1

Upgrade to 2.2

There are various problems with this upgrade.

Socialtext::Resting

For a start, you will have to install Socialtext::Resting clinet in the middle of make install because import of help workspace will fail.

You can get it from https://repo.socialtext.net:8999/svn/socialtext-clients/trunk/rest/perl/Socialtext-Resting

Missing directory

mkdir /etc/apache-perl/socialtext-conf.d

Missing skins

http://code.google.com/p/socialtext-skins/wiki/SkinningIssues



Problem not yet solved.


This page collect various parts which used to be in Socialtext Open Wiki Install, but since they are more oriented towards wiki admins and designers, it's here as separate page.



New skin (CSS design) creation

cd /usr/share/nlw/css/
cp -r st rot13
st-admin set-workspace-config --workspace rot13 skin_name rot13
vi rot13/screen.css

See also CSS kit at SocialText Open Wiki

Keep local changes in SVN

It's important to save local modifications, because next make install will overwrite your changes in /usr/share/nlw. One possibility is to do overlay svn checout over /usr/share/nlw and than svn add and svn commit every change:

cd /usr/share
svn co file:///data/st-custom/share nlw.svn
cd nlw.svn
find . | cpio -pdu ../nlw/
cd - && rm -Rf nlw.svn
cd nlw
svn info

permalink
Migracija TamTam wikija razmjene vještina na SocialText

 Our local Skill sharing group just moved old TamTam wiki to SocialText. Since TamTam is mostly used in Croatian's NGO organisations, rest of this post is in Croatian.

However, source code for migration tools might come useful.

Nakon prošlog vikenda u Moravicama na poznatom događaju Ništa se neće dogoditi nešto se ipak dogodilo: migrirali smo wiki na SocialText. Iako je to samo jedan dio velikog i grandioznog plana za novi site već ovako (sa ružnim izgledom) dobili smo mogućnost pretraživanja i generiranja ili korištenja RSS feedova na najzanimljivije načine.

Za one sa programerskom dušom, perl skripta koja radi migraciju je dostupna (prije nego što je pokrenete, morate promjeniti server/login/password -- ovaj u skripti ne funkcionira!).

permalink
SocialText CSS design

This page collect various parts which used to be in Socialtext Open Wiki Install, but since they are more oriented towards wiki admins and designers, it's here as separate page.



New skin (CSS design) creation

cd /usr/share/nlw/css/
cp -r st rot13
st-admin set-workspace-config --workspace rot13 skin_name rot13
vi rot13/screen.css

See also CSS kit at SocialText Open Wiki

Keep local changes in SVN

It's important to save local modifications, because next make install will overwrite your changes in /usr/share/nlw. One possibility is to do overlay svn checout over /usr/share/nlw and than svn add and svn commit every change:

cd /usr/share
svn co file:///data/st-custom/share nlw.svn
cd nlw.svn
find . | cpio -pdu ../nlw/
cd - && rm -Rf nlw.svn
cd nlw
svn info
permalink
Weblog Navigation
Loading...
Weblog Archives
  • Loading...