Fast Production Pier

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

Fast Production Pier

Brad Fuller
I sent this email to the SmallWiki ML, but it's probably more
appropriate to send it here.

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

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Fast Production Pier

Lukas Renggli
> I sent this email to the SmallWiki ML, but it's probably more
> appropriate to send it here.

I answered your mail in the Pier Mailing-List, to avoid double posting
you can check my answer here:

http://www.iam.unibe.ch/pipermail/smallwiki/2006-February/001710.html

Cheers,
Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Fast Production Pier

Brad Fuller
Lukas Renggli wrote:

> 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
>  
Lukas & All,

where do you usually place your squeak image in the directory tree? Is
it under /var/www/ ?

And, who is running your bash script above? /etc/rc.local?

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Fast Production Pier

Lukas Renggli
> > 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
> >
> Lukas & All,
>
> where do you usually place your squeak image in the directory tree? Is
> it under /var/www/ ?
>
> And, who is running your bash script above? /etc/rc.local?

I am using the daemon-tools, a powerful replacement to rc.local,
inittab, init.d, and friends. It is like a super-daemon that controls
a set of daemons and ensures that they run all the time.

So for the setup I followed the directory structure suggested as by
the daemon-tools:

/service -- all daemon-tools daemons should be in here
/service/app  -- my application directory
/service/app/pier.image -- the image of question (could be also put
anywhere else)
/service/app/run -- the run-script as shown above

That's it, all the rest happens automatically: your image will be
immediately started after creating the run-script, it will be executed
upon system-startup, and if your image crashes it will be immediately
re-started, etc.

I like that setup, because it is much easier than to fiddle around
with init-scripts, broken pid-files, images that have been started
1000 times, ...

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Fast Production Pier

Brad Fuller
Lukas Renggli wrote:

>>> 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
>>>
>>>      
>> Lukas & All,
>>
>> where do you usually place your squeak image in the directory tree? Is
>> it under /var/www/ ?
>>
>> And, who is running your bash script above? /etc/rc.local?
>>    
>
> I am using the daemon-tools, a powerful replacement to rc.local,
> inittab, init.d, and friends. It is like a super-daemon that controls
> a set of daemons and ensures that they run all the time.
>
> So for the setup I followed the directory structure suggested as by
> the daemon-tools:
>
> /service -- all daemon-tools daemons should be in here
> /service/app  -- my application directory
> /service/app/pier.image -- the image of question (could be also put
> anywhere else)
> /service/app/run -- the run-script as shown above
>
> That's it, all the rest happens automatically: your image will be
> immediately started after creating the run-script, it will be executed
> upon system-startup, and if your image crashes it will be immediately
> re-started, etc.
>
> I like that setup, because it is much easier than to fiddle around
> with init-scripts, broken pid-files, images that have been started
> 1000 times, ...
>  
sounds great. But, I can't get it to work.


_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Fast Production Pier

Brad Fuller
In reply to this post by Lukas Renggli
Lukas Renggli wrote:

>>> 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
>>>
>>>      
>> Lukas & All,
>>
>> where do you usually place your squeak image in the directory tree? Is
>> it under /var/www/ ?
>>
>> And, who is running your bash script above? /etc/rc.local?
>>    
>
> I am using the daemon-tools, a powerful replacement to rc.local,
> inittab, init.d, and friends. It is like a super-daemon that controls
> a set of daemons and ensures that they run all the time.
>
> So for the setup I followed the directory structure suggested as by
> the daemon-tools:
>
> /service -- all daemon-tools daemons should be in here
>  
what do you mean by "all daemon-tools daemons"?
I have nothing in the directory but the subdir that contains the "run"
file and squeak image/changes/sources files.

I can see "service" apps running in ps ax, but no squeak running. I
basically copied your script and placed it in a file called "run" the
subdir as you state below:

> /service/app  -- my application directory
> /service/app/pier.image -- the image of question (could be also put
> anywhere else)
> /service/app/run -- the run-script as shown above
>
> That's it, all the rest happens automatically: your image will be
> immediately started after creating the run-script, it will be executed
> upon system-startup, and if your image crashes it will be immediately
> re-started, etc.
>
>  
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Fast Production Pier

Lukas Renggli
> what do you mean by "all daemon-tools daemons"?

/service/*/run

> I have nothing in the directory but the subdir that contains the "run"
> file and squeak image/changes/sources files.

That's a bit off topic, but did you mark your script as executable?
Are the permissions ok? Does your script run if you execute it from
the command line? Does readproctitle tell any error messages?

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

{OT} Re: Fast Production Pier

Brad Fuller
apologies for the OT...
Lukas Renggli wrote:
>> what do you mean by "all daemon-tools daemons"?
>>    
> /service/*/run
>  
ah.. all the services the user places... ok.
>> I have nothing in the directory but the subdir that contains the "run"
>> file and squeak image/changes/sources files.
>>    
> That's a bit off topic, but did you mark your script as executable?
> Are the permissions ok? Does your script run if you execute it from
> the command line? Does readproctitle tell any error messages?
>  
yes to all. It was an installation error... so I started over.
Ok.. I've got it running but their seems to be no connection to port
9090 (I just kept it at 9090 and not going thru apache nor changing the
uid --- just like it was running before.)
So.. I'll just keep fooling with it.

again.. Sorry for the OT... and thanks for your help...
[ok, everyone... move it along.... nothing to see here.... (joke is
probably lost on non-US people :-) )]

brad

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside