I've been running a Pharo application since August last year,
initially setup with everything inside a Docker swarm (database,
reverse proxy and Pharo workers for the UI and REST API).
I wanted to give Docker a try because I thought it was going to be
"better". After having some issues with the Swarm networking affecting
PostgreSQL connections [1], I ended up having a hybrid that is not the
best of both worlds (I wouldn't say it's the worst either).
So my summary is that unless you have several host machines, having a
"swarm" is completely overkill and brings more friction than anything
else.
The plus of docker is that from Gitlab everytime I push a commit to
master, a new docker image is created and I can update things smoothly
on the server by pulling the image and upgrading the stack service.
"Whenever I have time" I plan to make the reverse proxy external to
docker (I currently use traefik as a container), and just keep the
database and Pharo workers as docker containers.
As for the stability, I only shut it down for upgrades, but in
February I tried with a single VM+image serving everything (just to
measure real use) and albeit it was a little slower, it handled
everything perfectly [2] without a single hiccup.
Regards,
[1]
https://twitter.com/emaringolo/status/1296635983358763010[2]
https://twitter.com/emaringolo/status/1360247046553362432Esteban A. Maringolo
On Fri, Apr 2, 2021 at 6:33 AM Tim Mackinnon <
tim@testit.works> wrote:
Thanks Sanjay - you have reminded me that I have some similar notes somewhere (now located) that did the command line foo to get things running - looking at mine there was quite a big of dance to provide a way to gracefully stop and start the image so that you can easily and automatically redeploy your changes (read: use Github actions or Gitlab CI).
So I���m curious on whether Docker is now sufficiently stable stable/easy/cheap to make it a viable alternative - and whether that is also cost efficient.
Pablo wrote a recent blog post on running Pharo in Docker using the BA images - https://thepharo.dev/2021/02/24/running-pharo-9-in-docker/ - but while easy on the surface, if anything goes wrong - there seems to be very little debug output to know what has happened (I���ll post separately on this - as I���m looking at comparing options here).
With Docker options, I notice that dockerize.io (not used, just a quick search) - has a micro plan for $2/m - but is 500mb ram enough (there is a $5 one for 1gm ram).
Or - I stick with DigitalOcean and roll my own like before - and perhaps that has got a bit simpler.
I���m still curious what the wider community is doing.
Tim
On 2 Apr 2021, at 05:43, Sanjay Minni <sm@planage.com> wrote:
Hi Tim
Here are my notes on installing Pharo in a DigitalOcean Ubuntu droplet.
I usually go thru a Windows Command prompt box having installed xfec4 in the ubuntu droplet, but the command line connect and graphical remote may be easier for a Linux users. my ssh public key is also in the DO droplet
Now the first step for me is a installing Pharo launcher thru command line and then everything is thru graphical interface
Installing and checking Pharo-Launcher, Installing Pharo 8 64 bit from pharo.org (instructions as on Pharo.org)
1. In Windows 10 command prompt connect thru > ssh root@<Droplet-ip>
2. cd
3. curl -o pharo-launcher.zip -L https://files.pharo.org/pharo-launcher/linux64
4. unzip pharo-launcher.zip
or thru the GUI-> extract here
(pharo-launcher files will be extracted in ./pharo-launcher)
Now while connected to the linux graphical interface thru windows remote terminal and in the GUI
5. Create a icon on desktop thru right-click ���Create Launcher��� for pharo-launcher
6. Create pharo images thru pharo-launcher
hope this is of use
Sanjay Minni
On Thu, 1 Apr 2021 at 16:31, Tim Mackinnon <tim@testit.works> wrote:
Hi everyone - its been a few year since I last hosted a little Pharo web app - and the last time I did, Sven pointed me to DigitalOcean and creating a tiny instance and configuring an Ubuntu server and then copying a pharo image on to that. It recall it wasn���t too bad, albeit a bit fiddly���
Now several years later - I can���t recall the exact steps, and vaguely recall there was something about 32bit vs 64bit setup etc - but am wondering if things have advanced a bit and whether its much simpler these days? I���ve seen references to Docker images for Pharo, and am wondering if now that is a prime time way to easily get a small demo application up and running with minimal fuss.
Does anyone have advice - or something to point me to?
Ideally I want to hook something up in Gitlab CI do deploy to this thing automatically (this is where I got to a few years ago - but in picking things back up I am hoping this has all got much simpler).
Tim