Starting VM on demand from nginx

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

Starting VM on demand from nginx

Dave
Hi there,
I'd love to start a VM on demand like, as I read, oldie but goldie DabbleDB.

The scenario is:

nginx as web server and here's a configuration:

server {
 listen 80;
  server_name  a_subdomain.my_server.com ;
   location / {
      proxy_pass http://123.456.789.10:8080/;
   }
}

When user goes to http://a_subdomain.my_server.com, seaside, listening on 8080, replies.

My question is: how can I start the seaside VM on demand? Can anyone point me in the right direction?

TIA
 Dave
Reply | Threaded
Open this post in threaded view
|

RE: Starting VM on demand from nginx

Robert Sirois
Here's my supervisor config file if it helps (http://supervisord.org/)

[program:programname]
command=/usr/local/coglinux/bin/squeak -mmap 256m -vm-sound-null -vm-display-null webapp/imagename.image
directory=/var/www/programdirectory/
user=someone
group=somegroup


> Date: Fri, 2 Aug 2013 07:00:33 -0700

> From: [hidden email]
> To: [hidden email]
> Subject: [Seaside] Starting VM on demand from nginx
>
> Hi there,
> I'd love to start a VM on demand like, as I read, oldie but goldie DabbleDB.
>
> The scenario is:
>
> nginx as web server and here's a configuration:
>
> server {
> listen 80;
> server_name a_subdomain.my_server.com ;
> location / {
> proxy_pass http://123.456.789.10:8080/;
> }
> }
>
> When user goes to http://a_subdomain.my_server.com, seaside, listening on
> 8080, replies.
>
> My question is: how can I start the seaside VM on demand? Can anyone point
> me in the right direction?
>
> TIA
> Dave
>
>
>
> --
> View this message in context: http://forum.world.st/Starting-VM-on-demand-from-nginx-tp4701949.html
> Sent from the Seaside General mailing list archive at Nabble.com.
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

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

RE: Starting VM on demand from nginx

Dave
Robert Sirois wrote
Here's my supervisor config file if it helps (http://supervisord.org/)
[program:programname]command=/usr/local/coglinux/bin/squeak -mmap 256m -vm-sound-null -vm-display-null webapp/imagename.imagedirectory=/var/www/programdirectory/user=someonegroup=somegroup

Hi Robert,
 Thanks for your config files, I never used supervisor, anyway I can't understand how to start the VM when a user goes to a specific url. I guess there should be a command on nginx that allows to start a script on behalf of a request. Right?

Dave
Reply | Threaded
Open this post in threaded view
|

RE: Starting VM on demand from nginx

Paul DeBruicker
I don't know how to do what you want from nginx and am interested in
learning about it.  Have you read these threads?

http://forum.world.st/Unix-socket-plugin-patch-for-systemd-td4685021.html#a4685101

http://forum.world.st/Unix-socket-plugin-patch-for-systemd-td4684997.html#a4685004


Seems like with that patch you could just get it set up to have nginx
route the request to

http://mySubdomain.myDomain.com

to the backend it expects to be there and systemd will take care of
getting the image running





On 08/02/2013 09:45 AM, Dave wrote:

> Robert Sirois wrote
>> Here's my supervisor config file if it helps (http://supervisord.org/)
>> [program:programname]command=/usr/local/coglinux/bin/squeak -mmap 256m
>> -vm-sound-null -vm-display-null
>> webapp/imagename.imagedirectory=/var/www/programdirectory/user=someonegroup=somegroup
>
>
> Hi Robert,
>  Thanks for your config files, I never used supervisor, anyway I can't
> understand how to start the VM when a user goes to a specific url. I guess
> there should be a command on nginx that allows to start a script on behalf
> of a request. Right?
>
> Dave
>
>
>
> --
> View this message in context: http://forum.world.st/Starting-VM-on-demand-from-nginx-tp4701949p4701960.html
> Sent from the Seaside General mailing list archive at Nabble.com.
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>

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

RE: Starting VM on demand from nginx

Dave
Paul DeBruicker wrote
I don't know how to do what you want from nginx and am interested in
learning about it.  Have you read these threads?

http://forum.world.st/Unix-socket-plugin-patch-for-systemd-td4685021.html#a4685101

http://forum.world.st/Unix-socket-plugin-patch-for-systemd-td4684997.html#a4685004


Seems like with that patch you could just get it set up to have nginx
route the request to

http://mySubdomain.myDomain.com

to the backend it expects to be there and systemd will take care of
getting the image running

Paul,
 I'm going to read the threads, thanks.
But are you suggesting that with another web server it would be simpler? I know DabbleDB was behind Apache.

Dave
Reply | Threaded
Open this post in threaded view
|

RE: Starting VM on demand from nginx

Robert Sirois
In reply to this post by Paul DeBruicker
That's pretty cool. Otherwise, you'd probably have to do a redirect.

RS

> Date: Fri, 2 Aug 2013 09:55:57 -0700

> From: [hidden email]
> To: [hidden email]
> Subject: Re: [Seaside] RE: Starting VM on demand from nginx
>
> I don't know how to do what you want from nginx and am interested in
> learning about it. Have you read these threads?
>
> http://forum.world.st/Unix-socket-plugin-patch-for-systemd-td4685021.html#a4685101
>
> http://forum.world.st/Unix-socket-plugin-patch-for-systemd-td4684997.html#a4685004
>
>
> Seems like with that patch you could just get it set up to have nginx
> route the request to
>
> http://mySubdomain.myDomain.com
>
> to the backend it expects to be there and systemd will take care of
> getting the image running
>
>
>
>
>
> On 08/02/2013 09:45 AM, Dave wrote:
> > Robert Sirois wrote
> >> Here's my supervisor config file if it helps (http://supervisord.org/)
> >> [program:programname]command=/usr/local/coglinux/bin/squeak -mmap 256m
> >> -vm-sound-null -vm-display-null
> >> webapp/imagename.imagedirectory=/var/www/programdirectory/user=someonegroup=somegroup
> >
> >
> > Hi Robert,
> > Thanks for your config files, I never used supervisor, anyway I can't
> > understand how to start the VM when a user goes to a specific url. I guess
> > there should be a command on nginx that allows to start a script on behalf
> > of a request. Right?
> >
> > Dave
> >
> >
> >
> > --
> > View this message in context: http://forum.world.st/Starting-VM-on-demand-from-nginx-tp4701949p4701960.html
> > Sent from the Seaside General mailing list archive at Nabble.com.
> > _______________________________________________
> > seaside mailing list
> > [hidden email]
> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> >
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

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

RE: Starting VM on demand from nginx

Paul DeBruicker
In reply to this post by Dave
I'm not recommending either over the other.  Based on your subject line  I thought you were asking about nginx.  I think either apache or nginx would work equally well and be able to do what you want.



On Aug 2, 2013, at 10:30 AM, Dave <[hidden email]> wrote:

> Paul DeBruicker wrote
>> I don't know how to do what you want from nginx and am interested in
>> learning about it.  Have you read these threads?
>>
>> http://forum.world.st/Unix-socket-plugin-patch-for-systemd-td4685021.html#a4685101
>>
>> http://forum.world.st/Unix-socket-plugin-patch-for-systemd-td4684997.html#a4685004
>>
>>
>> Seems like with that patch you could just get it set up to have nginx
>> route the request to
>>
>> http://mySubdomain.myDomain.com
>>
>> to the backend it expects to be there and systemd will take care of
>> getting the image running
>
>
> Paul,
> I'm going to read the threads, thanks.
> But are you suggesting that with another web server it would be simpler? I
> know DabbleDB was behind Apache.
>
> Dave
>
>
>
> --
> View this message in context: http://forum.world.st/Starting-VM-on-demand-from-nginx-tp4701949p4701964.html
> Sent from the Seaside General mailing list archive at Nabble.com.
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: Starting VM on demand from nginx

Dave
Paul DeBruicker wrote
I'm not recommending either over the other.  Based on your subject line  I thought you were asking about nginx.  I think either apache or nginx would work equally well and be able to do what you want.
You are right, Paul, I'm asking about nginx, but if there is a known way on apache I can copy it to nginx ;-)

Dave