[Seaside] Ci automated deploy of seaside to Digital Ocean
Norbert Hartl
norbert at hartl.name
Fri May 11 17:46:46 UTC 2018
> Am 11.05.2018 um 17:48 schrieb Tim Mackinnon <tim at testit.works>:
>
> This is very interesting - as I was taking the hobbyist view I completely overlooked what docker solutions there are.
>
> Would like to hear more - and whether there is something that’s easy/cheap to play with part time. I would hope for something I can just stick my Pharo images in and it takes care of restarts etc and could scale if my hobby grew.
>
> I’m understanding your experience is that it’s still not quite that simple?
>
It can be quite simple. To create a simple docker container running a pharo image is very easy. Docker provides a restart policy for containers. So this is by far easier than those unix services (which I find more and more annoying over the years). But most things are easy if you have a single runtime and get really complicated as soon as you have two runtimes. Going from two to three is easy again ;)
Norbert
> I really love the simplicity of lambda - and it’s pretty easy to run Pharo there too - but could you write a web app that way? They say no - but there are some attractions to escape this nonsense we still face today.
>
> You’ve really got me thinking now...
>
> Tim
>
> Sent from my iPhone
>
> On 11 May 2018, at 14:39, Norbert Hartl <norbert at hartl.name <mailto:norbert at hartl.name>> wrote:
>
>>
>>
>>> Am 10.05.2018 um 23:55 schrieb Tim Mackinnon <tim at testit.works <mailto:tim at testit.works>>:
>>>
>>> I forgot to mention - you are correct that this isn’t a good solution for a widely use production system - as I think you would want to use a load balancer to stop traffic to one image while sessions complete before terminating it. OR - there must be some cloud based solution for this these days - presumably using docker…
>>>
>> All of this can be done. It just depends on the learning curve you want to take. I successfully escaped the unix/linux hell (used daemontools, monti, systemd before) for my services and entered docker hell :P
>> I use docker swarm and that has everything you describe above. I can deploy any number of images across all my machines with ease. There is a zero-downtime option so there is no service interruption. But the amount of time I had to put into there was massive. So while I would encourage the usage of docker I’m not sure it is for everyone.
>> The medium heavy approach for you should be:
>>
>> 1. nginx as frontend server. This proxies all requests to a docker service traefik (https://traefik.io/ <https://traefik.io/>)
>> 2. traefik listens on docker whenever a container is started and adds it to the load balancing routine.
>> 3. You deploy any number of your application and they will automatically load balanced.
>>
>> Norbert
>>
>>> Still for hobby experiments - this and Digital Ocean seems ideal.
>>>
>>> Tim
>>>
>>>> On 10 May 2018, at 22:17, Tim Mackinnon <tim at testit.works <mailto:tim at testit.works>> wrote:
>>>>
>>>> Ah - I see (hadn’t thought about having a configurable port number),
>>>>
>>>> So if Ive understood correctly I could install supervisord with a config file like yours.
>>>>
>>>> Then on completion of my build, I could sftp my new image up to DO, and then execute a command like: supervisorctl restart psworker?
>>>>
>>>> Doing a check does seem to show lots of people use either it or monit (the latter being a bit more complicated).
>>>>
>>>> Thanks for the help - this is my next learning step.
>>>>
>>>> Tim
>>>>
>>>>> On 10 May 2018, at 19:47, Esteban A. Maringolo <emaringolo at gmail.com <mailto:emaringolo at gmail.com>> wrote:
>>>>>
>>>>>
>>>>>
>>>>> On 10/05/2018 15:30, Esteban A. Maringolo wrote:
>>>>>> How would you know when to kill the running vm+image? It might have
>>>>>> active sessions.
>>>>>>
>>>>>> If you don't care about that, what I used to manage a bunch of "worker
>>>>>> images" (process groups) with supervisord [1], so in that case you'd
>>>>>> stop all the related workers, copy the new image, and start the
>>>>>> workers again.
>>>>> My supervisord.conf entry for a pool of working images was:
>>>>>
>>>>> [program:psworker]
>>>>> command=/home/trentosur/perfectstore/pharo-vm/pharo --nodisplay
>>>>> /home/trentosur/perfectstore/ps.image worker.st <http://worker.st/> 818%(process_num)1d
>>>>> process_name=%(program_name)s_%(process_num)02d ; process_name expr
>>>>> (default %(program_name)s)
>>>>> numprocs=2
>>>>> directory=/home/trentosur/perfectstore
>>>>> autostart=false
>>>>> autorestart=true
>>>>> user=trentosur
>>>>> stopasgroup=true
>>>>> killasgroup=true
>>>>>
>>>>>
>>>>> Part of the worker.st <http://worker.st/> file handling the port number was:
>>>>>
>>>>> "Seaside server start"
>>>>> Smalltalk isHeadless ifTrue: [
>>>>> Smalltalk commandLine arguments
>>>>> ifEmpty: [
>>>>> Transcript show: 'No port parameter was specified.'; cr.
>>>>> Smalltalk quitPrimitive. ]
>>>>> ifNotEmpty: [:args |
>>>>> | port |
>>>>> port := args first asNumber asInteger.
>>>>> Transcript show: 'Starting worker image at port ', port asString; cr.
>>>>> ZnZincServerAdaptor startOn: port.
>>>>> ZnZincServerAdaptor default server debugMode: false.
>>>>> ]
>>>>> ]
>>>>> ifFalse: [
>>>>> | port |
>>>>> port := 8080.
>>>>> Transcript show: 'Starting worker image at port ', port asString; cr.
>>>>> ZnZincServerAdaptor startOn: port.
>>>>> ZnZincServerAdaptor default server debugMode: true.
>>>>> ].
>>>>>
>>>>>
>>>>> I hope it helps.
>>>>>
>>>>> Best regards,
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Esteban A. Maringolo
>>>>> _______________________________________________
>>>>> seaside mailing list
>>>>> seaside at lists.squeakfoundation.org <mailto:seaside at lists.squeakfoundation.org>
>>>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside <http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside>
>>>>
>>>> _______________________________________________
>>>> seaside mailing list
>>>> seaside at lists.squeakfoundation.org <mailto:seaside at lists.squeakfoundation.org>
>>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside <http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside>
>>>
>>> _______________________________________________
>>> seaside mailing list
>>> seaside at lists.squeakfoundation.org <mailto:seaside at lists.squeakfoundation.org>
>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside <http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside>
>>
>> _______________________________________________
>> seaside mailing list
>> seaside at lists.squeakfoundation.org <mailto:seaside at lists.squeakfoundation.org>
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside <http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/seaside/attachments/20180511/9e0dddf8/attachment.html>
More information about the seaside
mailing list