Running a headless server

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

Running a headless server

sergio_101
Hi, all..

I have started looking at the zeroconf scripts, and i think i have most of this figured out.. 

I just have a few questions, to make sure I am doing this correctly.

In order to run the current image headless, should I just do something like:

./pharo Pharo.image —no-quit &

I can load up my project, but how can i get the latest updates to the project?

./pharo Pharo.image update seems like it just updates the VM..

If i run something like this:

./pharo Pharo.image eval --save --no-quit "|server| server := PrintBotServer serveOn: 8080."
a PrintBotServer

I would expect that it would save my image..  but when i hit ^c, and restart it like so:

./pharo Pharo.image

the printbot doesn’t exist anymore. 

any idea how to get this to work correctly?

Thanks!


signature.asc (852 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Running a headless server

Pavel Krivanek-3


2017-07-04 7:26 GMT+02:00 sergio ruiz <[hidden email]>:
Hi, all..

I have started looking at the zeroconf scripts, and i think i have most of this figured out.. 

I just have a few questions, to make sure I am doing this correctly.

In order to run the current image headless, should I just do something like:

./pharo Pharo.image —no-quit &

I can load up my project, but how can i get the latest updates to the project?

./pharo Pharo.image update seems like it just updates the VM..

If i run something like this:

./pharo Pharo.image eval --save --no-quit "|server| server := PrintBotServer serveOn: 8080."
a PrintBotServer

I think that the --save is executed only on image quit so in this case it is never executed. 
In the end, you can simply in your script do: Smalltalk snapshot: true andQuit: false.

-- Pavel
 

I would expect that it would save my image..  but when i hit ^c, and restart it like so:

./pharo Pharo.image

the printbot doesn’t exist anymore. 

any idea how to get this to work correctly?

Thanks!


Reply | Threaded
Open this post in threaded view
|

Re: Running a headless server

Sven Van Caekenberghe-2
In reply to this post by sergio_101

> On 4 Jul 2017, at 07:26, sergio ruiz <[hidden email]> wrote:
>
> Hi, all..

Did you read https://ci.inria.fr/pharo-contribution/job/EnterprisePharoBook/lastSuccessfulBuild/artifact/book-result/DeploymentWeb/DeployForProduction.html ?

TL;DR

use the config handler to load/update code and save your image

start your server in a script (st handler) or with an expression (eval handler)

> I have started looking at the zeroconf scripts, and i think i have most of this figured out..
>
> I just have a few questions, to make sure I am doing this correctly.
>
> In order to run the current image headless, should I just do something like:
>
> ./pharo Pharo.image —no-quit &
>
> I can load up my project, but how can i get the latest updates to the project?
>
> ./pharo Pharo.image update seems like it just updates the VM..
>
> If i run something like this:
>
> ./pharo Pharo.image eval --save --no-quit "|server| server := PrintBotServer serveOn: 8080."
> a PrintBotServer
>
> I would expect that it would save my image..  but when i hit ^c, and restart it like so:
>
> ./pharo Pharo.image
>
> the printbot doesn’t exist anymore.
>
> any idea how to get this to work correctly?
>
> Thanks!
>
> ----
> peace,
> sergio
> photographer, journalist, visionary
>
> Public Key: http://bit.ly/29z9fG0
> #BitMessage BM-NBaswViL21xqgg9STRJjaJaUoyiNe2dV
> http://www.Village-Buzz.com
> http://www.ThoseOptimizeGuys.com
> http://www.coffee-black.com
> http://www.painlessfrugality.com
> http://www.twitter.com/sergio_101
> http://www.facebook.com/sergio101