Fast Production Pier

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Fast Production Pier

Brad Fuller
What is the fastest way to get Pier up and running for production?
(how's that for an open-ended question!)

I want just a website, not a CMS
What I have so far:
 - Running on Linux, FC4
- 3.7-7
- The default Seaside/Pier running at 9090.
- installed Pier Unix Security from SqueakMap

Running at port:80 is a requirement but just a minimal website: mostly
text with some graphics (like a header) and with links is all I need
right now.


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
_______________________________________________
Smallwiki mailing list
[hidden email]
http://impara.de/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Fast Production Pier

Lukas Renggli-2
> What is the fastest way to get Pier up and running for production?
> (how's that for an open-ended question!)

Yes, this is definitely an open-ended question.

Three possible answers from my side:

1. Of course you can just run your Squeak image on port 80, but then  
you probably need to run it as root to be able to listen on port 80:

        nohup squeak -vm-display-null pier.image &

That is probably the easiest solution to run a seaside application on  
your own linux box, but certainly not the best one.

2. The setup on my own gentoo linux looks slightly more complicated.  
First of all I use daemon-tools <http://cr.yp.to/daemontools.html> to  
make sure the image runs all the time. The startup-script looks like:

        #!/bin/sh
        exec \
                nice \
                setuidgid apache \
                squeak -vm-sound-null -vm-display-null pier.image

Inside the image I have Seaside listening on port 9002, as well as a  
vnc-server to manage, update and fix the running code. Then I have  
Apache 2 running that is responsible to do the virtual-hosting and  
the static file serving. The configuration looks like:

        <VirtualHost www.lukas-renggli.ch:80>

                DocumentRoot /home/apache/www.lukas-renggli.ch
                <Directory /home/apache/www.lukas-renggli.ch>
                        Order deny,allow
                        Allow from all
                </Directory>
 
                ProxyPreserveHost On

                RewriteEngine On
                RewriteCond /home/apache/www.lukas-renggli.ch/%{REQUEST_FILENAME} !-f
                RewriteRule ^/(.*)$ http://localhost:9002/seaside/pier/$1 [P,L]

        </VirtualHost>

The first half of this file are standard-things. Then  
"ProxyPreserveHost On" enables Seaside to get absolute paths  
correctly. The rewrite rule maps the static file-system into the same  
URL space as the one of the Squeak image. Basically it tells apache  
to serve the static file if it is available, else it will proxy the  
request to Seaside.

3. The third option is nothing I can talk about right now, but it  
will be certainly announced during this or the next week ;-)

Cheers,
Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch

_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
_______________________________________________
Smallwiki mailing list
[hidden email]
http://impara.de/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Fast Production Pier

Brad Fuller
Lukas Renggli wrote:
What is the fastest way to get Pier up and running for production?
(how's that for an open-ended question!)
    

Yes, this is definitely an open-ended question.

Three possible answers from my side:

1. Of course you can just run your Squeak image on port 80, but then  
you probably need to run it as root to be able to listen on port 80:

	nohup squeak -vm-display-null pier.image &

That is probably the easiest solution to run a seaside application on  
your own linux box, but certainly not the best one.

2. The setup on my own gentoo linux looks slightly more complicated.  
First of all I use daemon-tools <http://cr.yp.to/daemontools.html> to  
make sure the image runs all the time. The startup-script looks like:

	#!/bin/sh
	exec \
		nice \
		setuidgid apache \
		squeak -vm-sound-null -vm-display-null pier.image

Inside the image I have Seaside listening on port 9002, as well as a  
vnc-server to manage, update and fix the running code. Then I have  
Apache 2 running that is responsible to do the virtual-hosting and  
the static file serving. The configuration looks like:

	<VirtualHost www.lukas-renggli.ch:80>

		DocumentRoot /home/apache/www.lukas-renggli.ch
		<Directory /home/apache/www.lukas-renggli.ch>
			Order deny,allow
			Allow from all
		</Directory>
  		
		ProxyPreserveHost On

		RewriteEngine On
		RewriteCond /home/apache/www.lukas-renggli.ch/%{REQUEST_FILENAME} !-f
		RewriteRule ^/(.*)$ http://localhost:9002/seaside/pier/$1 [P,L]

	</VirtualHost>

The first half of this file are standard-things. Then  
"ProxyPreserveHost On" enables Seaside to get absolute paths  
correctly. The rewrite rule maps the static file-system into the same  
URL space as the one of the Squeak image. Basically it tells apache  
to serve the static file if it is available, else it will proxy the  
request to Seaside.
  
Thanks Lukas,

I'm familiar with VirtualHost a bit, so that's what I was looking into. But, I know nothing about ReWriteEngine so I'll have to check that out. Thanks for the pointers! Very helpful. (this should go into some doc somewhere... if it isn't already)
3. The third option is nothing I can talk about right now, but it  
will be certainly announced during this or the next week ;-)
  
Well.. bummer....
Can't wait!

Ok, let me state that I have gone through the seaside docs and the tutorials.
What I would like to find (and maybe it's out there, but I can't find it) is how to create a totally new "website". And, make it only readable by the general public (e.g when starting Pier, it just starts up and exposes everything.) Note that I'm not very familiar with web technology.

The information to create a totally new website seems to be lacking in the documentation - or I just haven't found it or completely by-passed it. Or I'm just a confused (which is totally possible)

What is a typical way of creating a website from existing seaside or pier classes? What the heck do I subclass? Or do I subclass?
There are a lot of Pier classes, and I'm a bit confused. Maybe the best thing for me to do is create a Seaside app and not subclass Pier?

brad

--

Brad Fuller
+1 (408) 799-6124
Sonaural Audio Studio
See Us At GDC 2006
Hear us online: www.Sonaural.com
See me on O'Reilly



_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
_______________________________________________
Smallwiki mailing list
[hidden email]
http://impara.de/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Fast Production Pier

Lukas Renggli-2
> What I would like to find (and maybe it's out there, but I can't  
> find it) is how to create a totally new "website". And, make it  
> only readable by the general public (e.g when starting Pier, it  
> just starts up and exposes everything.) Note that I'm not very  
> familiar with web technology.

If you load 'Pier-Security' from Squeak map you can easily make your  
web-site read only for public. With the 'Unix Permission' package you  
need to remove all the permission except the one for the view from  
the root directory of 'others' and assign the admin as 'owner' and  
'group'.

> The information to create a totally new website seems to be lacking  
> in the documentation - or I just haven't found it or completely by-
> passed it. Or I'm just a confused (which is totally possible)

Yes, there is a lack of documentation :-/

> What is a typical way of creating a website from existing seaside  
> or pier classes? What the heck do I subclass? Or do I subclass?
> There are a lot of Pier classes, and I'm a bit confused. Maybe the  
> best thing for me to do is create a Seaside app and not subclass Pier?

What I did for my website was just to change the style sheet, to edit  
the page 'environment' and to write some content. For most users  
there is probably no need to write any code.

I will try and see if we can come up with something ready for Seaside-
Hosting, so that people can only press a button and then they get a  
ready made and nicely hosted Pier system running. For now this is  
just an idea, but if I find some time I will try to prepare  
something ...

Cheers,
Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch



_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
_______________________________________________
Smallwiki mailing list
[hidden email]
http://impara.de/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Fast Production Pier

Brad Fuller
Lukas Renggli wrote:
the page 'environment' and to write some content. For most users  
there is probably no need to write any code.

I will try and see if we can come up with something ready for Seaside- 
Hosting, so that people can only press a button and then they get a  
ready made and nicely hosted Pier system running. For now this is  
just an idea, but if I find some time I will try to prepare  
something ...
  
What I did for my website was just to change the style sheet, to edit
very nice of you.
Right now, I am backing up to start learning about the Canvas API,, as it was mentioned by Ramon that it's better than HtmlRendering.
Luckily, I'm not that far along...

brad

_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
_______________________________________________
Smallwiki mailing list
[hidden email]
http://impara.de/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Fast Production Pier

Frank Urbach
In reply to this post by Brad Fuller
Hi Lukas!
What about some docu of css using in pier. I've browsed some code of pier searching for binding css from local file-system. There was nothing that can change the width of edit-field of some contents. So I was playing around with the css itself and saw changing the css works for my wishes.
I think for newbies of pier like me the docu of css used in pier is the best thing getting the own look and feel with some usefull content.

Cheers,
Frank
-----Original Message-----
From: [hidden email]
Date: Wed, 22 Feb 2006 21:01:19
To:"[hidden email], [hidden email], [hidden email]"@mx04.bwc.eu.BlackBerry.COM
Subject: Re: Fast Production Pier

> What I would like to find (and maybe it's out there, but I can't
> find it) is how to create a totally new "website". And, make it
> only readable by the general public (e.g when starting Pier, it
> just starts up and exposes everything.) Note that I'm not very
> familiar with web technology.

If you load 'Pier-Security' from Squeak map you can easily make your
web-site read only for public. With the 'Unix Permission' package you
need to remove all the permission except the one for the view from
the root directory of 'others' and assign the admin as 'owner' and
'group'.

> The information to create a totally new website seems to be lacking
> in the documentation - or I just haven't found it or completely by-
> passed it. Or I'm just a confused (which is totally possible)

Yes, there is a lack of documentation :-/

> What is a typical way of creating a website from existing seaside
> or pier classes? What the heck do I subclass? Or do I subclass?
> There are a lot of Pier classes, and I'm a bit confused. Maybe the
> best thing for me to do is create a Seaside app and not subclass Pier?

What I did for my website was just to change the style sheet, to edit
the page 'environment' and to write some content. For most users
there is probably no need to write any code.

I will try and see if we can come up with something ready for Seaside-
Hosting, so that people can only press a button and then they get a
ready made and nicely hosted Pier system running. For now this is
just an idea, but if I find some time I will try to prepare
something ...

Cheers,
Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch



_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki





_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
_______________________________________________
Smallwiki mailing list
[hidden email]
http://impara.de/mailman/listinfo/smallwiki