Thought it might be useful for anyone who has read Pabloâs blog post - this is a comment that I have tried to add (hopefully it will come through there): Nice article which was very helpful in getting me quickly up to speed on deploying a Pharo app with Docker. It might be worth adding a small addendum - when build doing a "docker build" I had some issues, and adding an additional switch "--progress=plain" gives much more verbose output that can help better see whats going on. I also feel its quite important to call out that the "eval 'Metacello new..." command referenced in the DockerFile RUN - is only going to work on a public repository. This had me stumped when I tried the example on my repository - and its made particularly mysterious because the Docker output (even with --progress=plain) shows nothing - it just echo's the VM info text and then stops and hangs. I think this is something that should be addressed either by the BA Docker image (I've reported it as an issue there for now) or by Pharo (in my case it was P8). I am guessing that there is a credentials error/system prompter sitting waiting for user input. I think there should be a way to disable this behaviour somehow - but at the very least it should write something out to stderr so that you know something has happened? Luckily there is an easy fix (for anyone wanting to load their own private project) - rather than using the "eval" command, use the "st" command and specify a load.st script. In this script specify some IceCredentialStore details eg: IceCredentialStore current storeCredential: (IceTokenCredentials new username: 'email@mail.com'; token: 'xxxxxxxxxxxxxxx'; yourself) forHostname: 'gitlab.com'. Metacello new baseline: 'myapp'; repository: 'gitlab://me/repo''; onConflict: [ :ex | ex useLoaded ]; onUpgradeUseLoaded; onWarningLog; load. Hopefully this might help anyone else directed here. I also added some extra logging to my load.st - eg. | logger | logger := Stdio stderr. logger crlf; nextPutAll: 'Starting Load Script...'. Tim
On 6 Apr 2021, at 18:09, Tim Mackinnon <tim@testit.works> wrote:
Adding some thoughts to my own post - I have experimented with dockerize.io <http://dockerize.io/> and so far the $2 plan (which so far I haven't been charged for) has been quite adequate for hosting something simple (and I suspect the $5 plan would do the trick as well).
It does get a bit more pricey when you add a database and unlimited traffic (60GB MySQL Database: 4GB, 1000m + no traffic + 60GB persistance + 100 mb logs = $26/m) - but even then thats pretty good.
It was relatively easy to do (doesn't have native Github integration yet, but has a cli for easy deployment) , and given what Esteban mentioned of his experience - this seems worth pursuing for ease of deployment/maintenance.
I did find Pablo's instructions were a bit limited - in particular covering a private repo (and how Pharo and the BA docker image give no output on credential failure - I've raised an issue on BA github, but may be a pharo thing - not yet sure - but it is quite easy to overcome). It also doesn't cover safe credential storage and best practices etc. (so hopefully a future article from someone more experienced in this?)
I'm curious if others have experienced anything similar they can share? I am a bit nervous the dockerize.io <http://dockerize.io/> has little history (been around since 2019 allegedly) - but for my experimentation its fine. Others may need more, and I'm wondering where to help document this as deployment is a big stumbling block - that we actually can handle quite well with recent tooling.
In this vein - I wonder where SmalltalkCI sits? Do you need it for a plain Pharo app - you just need to grep the output of Metacello and your test runner - but perhaps it does this better (I can see the need for building multiple platforms etc).
Tim
On Fri, 2 Apr 2021, at 10:32 AM, Tim Mackinnon 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/ <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 <http://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 <mailto: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 <http://pharo.org/> (instructions as on Pharo.org <http://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 <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 <mailto: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