Blog

Deploying Pier on Ubuntu with Plesk at the german provider 1blu

This tutorial describes how to deploy Pier on an Ubuntu Linux distribution with Plesk at the german provider 1blu. It assumes that you want to install a pier image on an Ubuntu Linux with Apache 2 under a domain called www.YOURDOMAIN.tld.

Start up

VM

      squeakvm
      so.vm-display-null
      so.vm-sound-null

Pier

  • Download the Pier one click image 2.0 (not 3.0!)
  • Copy to the /srv/site folder the followings:
      pier.image,
      pier.changes,
      files/ folder, and
      Pharo10.sources.

Run

  • You can run the image headless by using the following bash script:

#!/bin/bash
### BEGIN INIT INFO
# Provides:          Startet piercms
# Required-Start:    
# Required-Stop:     
# Default-Start:     2 3 4 5 S
# Default-Stop:      
# Short-Description: 
# Description:       
### END INIT INFO
# Author: Przemyslaw Niescior <pubpn@objectspace.net>
# Aktionen

case "$1" in
  start)

    #settings

	USER="www-data"
	VM="/usr/bin/squeakvm"
	VM_PARAMS="-mmap 200m -nodisplay -nosound"
	IMAGE="/srv/site/Pier.image"

	#start the vm

	"$VM" $VM_PARAMS "$IMAGE" &
	exit 0
	;;
 restart|reload|force-reload)

	# No-op

	;;
  stop|\"\")

	# No-op

	;;
  \*)

	# No-op

	;;
esac
:

  • Save this script in /etc/init.d/startpier.sh
  • Create links with the command: update-rc.d startpier.sh defaults 99

Setting up Apache2

  • Go to Plesk Panel and enable Apache modules rewrite, proxy and proxy_http
  • Create the following configuration file .htaccess in your web-directory:

RewriteEngine On
RewriteRule ^/pier(.\*)$ http://www.YOURDOMAIN.tld$1 [redirect,last]
RewriteRule ^/files/(.\*)$ http://localhost:8080/files/$1 [proxy,last]
RewriteCond /srv/site/files/%{REQUEST_FILENAME} !-f
RewriteRule ^(.\*)$ http://localhost:8080/$1 [proxy,last]

Configuring Seaside

  • Go to http://www.YOURDOMAIN.tld/pier/system/management and set the base directory in the section "File Settings" to /srv/site/files.
  • Execute the following code in your pier.image:
       WAAdmin disableDevelopmentTools
  • Save your image and copy it back to /srv/site.
  • Go to the Seaside-Configuration by clicking on "Config" at the bottom of your site.
  • Find "Root Class" and click the button "revert".
  • Accept with OK.

Password protection

If you want to limit access to configuration of your deployed applications make sure that you password protect them. To password protect an application do the following:

  • Go to http://www.YOURDOMAIN.tld/config
  • In Possible Parents select WAAuthConfiguration and click Add (default user is admin and password is seaside).
  • Set your own login and password in the Configuration section below.
  • Click on Save.

Seaside_pass.jpg

Finish

  • Go to http://www.YOURDOMAIN.tld/pier/system/management, set the persistency to "Image Persistency" and click the button "snapshot".
Posted by Przemysław Nieściór at 28 February 2013, 12:21 pm with tags pier, deployment, plesk, 1blu, vServer link