Whats the easiest/cheapest way to run a Pharo web app in 2021?

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

Whats the easiest/cheapest way to run a Pharo web app in 2021?

Tim Mackinnon
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
Reply | Threaded
Open this post in threaded view
|

Re: Whats the easiest/cheapest way to run a Pharo web app in 2021?

Sanjay Minni
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 <[hidden email]> 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
cheers,
Sanjay
Reply | Threaded
Open this post in threaded view
|

Re: Whats the easiest/cheapest way to run a Pharo web app in 2021?

Tim Mackinnon
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 <[hidden email]> 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 <[hidden email]> 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

Reply | Threaded
Open this post in threaded view
|

Re: Whats the easiest/cheapest way to run a Pharo web app in 2021?

Esteban A. Maringolo
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/1360247046553362432

Esteban A. Maringolo


On Fri, Apr 2, 2021 at 6:33 AM Tim Mackinnon <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Whats the easiest/cheapest way to run a Pharo web app in 2021?

Stéphane Ducasse
esteban

I would like to have a success story for the Pharo web site 
Could you come up with two paragraphs?

And if you have a visual it would be perfect. 

Remember a success story is that you could do something not that your app become facebook.
S.



On 2 Apr 2021, at 16:32, Esteban Maringolo <[hidden email]> wrote:

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/1360247046553362432

Esteban A. Maringolo


On Fri, Apr 2, 2021 at 6:33 AM Tim Mackinnon <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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



--------------------------------------------
Stéphane Ducasse
03 59 35 87 52
Assistant: Aurore Dalle 
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley, 
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France

Reply | Threaded
Open this post in threaded view
|

Re: Whats the easiest/cheapest way to run a Pharo web app in 2021?

Tim Mackinnon
In reply to this post by Tim Mackinnon
Adding some thoughts to my own post - I have experimented with 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 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/ - 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 <[hidden email]> 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 <[hidden email]> 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

Reply | Threaded
Open this post in threaded view
|

Re: Whats the easiest/cheapest way to run a Pharo web app in 2021?

Tim Mackinnon
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: '[hidden email]';
token: 'xxxxxxxxxxxxxxx';
yourself) 
forHostname: 'gitlab.com'.

Metacello new
    baseline: 'myapp';
    repository: '<a href="gitlab://me/repo'" class="">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 <[hidden email]> wrote:

Adding some thoughts to my own post - I have experimented with 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 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/ - 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 <[hidden email]> 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 <[hidden email]> 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

Reply | Threaded
Open this post in threaded view
|

Re: Whats the easiest/cheapest way to run a Pharo web app in 2021?

Pierce Ng-3
On Wed, Apr 07, 2021 at 02:21:14AM +0100, Tim Mackinnon wrote:
> 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

Hi,

I build my Pharo image outside of Docker. My Dockerfile then packages the
built image plus whatever artefacts required into a Docker image. I am
using my Alpine Linux-based VM.

  GH: https://github.com/pharo-contributions/Docker-Alpine/
  DH: https://hub.docker.com/r/pierceng/pharovm-alpine

Pierce
Reply | Threaded
Open this post in threaded view
|

Re: Whats the easiest/cheapest way to run a Pharo web app in 2021?

Tim Mackinnon
Head slap.... I completely forgot I could do that, thanks for reminding Pierce (its almost better as well, as you can build your image, save it, then run tests on it, and then if it passes all your stages you can included the saved version in your docker build...  which sits better with me as it also means that log artifacts etc can be more easily examined for failures (and your not trying to console into a docker image to figure it out). As a nice side effect - if you are doing this in something like Gitlab - you have your project source already there and so you can avoid an extra checkout step, so its a little bit faster.

Pierce - who/where are you rnning your Docker image? Do you use a particular service (or are you running your own?)

Tim



On Thu, 8 Apr 2021, at 4:29 AM, Pierce Ng wrote:

> On Wed, Apr 07, 2021 at 02:21:14AM +0100, Tim Mackinnon wrote:
> > 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
>
> Hi,
>
> I build my Pharo image outside of Docker. My Dockerfile then packages the
> built image plus whatever artefacts required into a Docker image. I am
> using my Alpine Linux-based VM.
>
>   GH: https://github.com/pharo-contributions/Docker-Alpine/
>   DH: https://hub.docker.com/r/pierceng/pharovm-alpine
>
> Pierce
>
Reply | Threaded
Open this post in threaded view
|

Re: Whats the easiest/cheapest way to run a Pharo web app in 2021?

Pierce Ng-3
On Thu, Apr 08, 2021 at 11:58:10AM +0100, Tim Mackinnon wrote:
> Pierce - who/where are you rnning your Docker image? Do you use a
> particular service (or are you running your own?)

I am using a Linux VPS which I manage myself.

The Pharo application is my blog. It was a web app fronted by a HTTPS
reverse proxy. At the start of this year I rewrote it into a static site
generator. Instead of running all the time, Pharo is now invoked when
triggered by a CI hook, which happens when I publish a new blog post or
otherwise update my site.

I play with all kinds of software on my VPS and it was getting a bit RAM
cramped, hence the rewrite. Wasn't willing to spend more money every month
for more RAM. :-P

Pierce
Reply | Threaded
Open this post in threaded view
|

Re: Whats the easiest/cheapest way to run a Pharo web app in 2021?

NorbertHartl
I have the same. A cloud instance at Hetzner, nginx as webserver using certbot for automatic SSL generation. I also use a static site generator which I wrote myself to produce my blog https://norbert.hartl.name . I use the skeleton CSS library which is tiny and understandable and does not need tons of markup.

This is one of my playgrounds for pillar and microdown. I think pharo settles around this combination to produce documents which is very well suited to produce a website, too.

Norbert

Am 09.04.2021 um 03:33 schrieb Pierce Ng <[hidden email]>:

On Thu, Apr 08, 2021 at 11:58:10AM +0100, Tim Mackinnon wrote:
Pierce - who/where are you rnning your Docker image? Do you use a
particular service (or are you running your own?)

I am using a Linux VPS which I manage myself.

The Pharo application is my blog. It was a web app fronted by a HTTPS
reverse proxy. At the start of this year I rewrote it into a static site
generator. Instead of running all the time, Pharo is now invoked when
triggered by a CI hook, which happens when I publish a new blog post or
otherwise update my site.

I play with all kinds of software on my VPS and it was getting a bit RAM
cramped, hence the rewrite. Wasn't willing to spend more money every month
for more RAM. :-P

Pierce

Reply | Threaded
Open this post in threaded view
|

Re: Whats the easiest/cheapest way to run a Pharo web app in 2021?

Stéphane Ducasse


On 10 Apr 2021, at 10:34, Norbert Hartl <[hidden email]> wrote:

I have the same. A cloud instance at Hetzner, nginx as webserver using certbot for automatic SSL generation. I also use a static site generator which I wrote myself to produce my blog https://norbert.hartl.name . I use the skeleton CSS library which is tiny and understandable and does not need tons of markup.

This is one of my playgrounds for pillar and microdown. I think pharo settles around this combination to produce documents which is very well suited to produce a website, too.

 Leo a new student is arriving next week to work on pillar and help to start with. 


Norbert

Am 09.04.2021 um 03:33 schrieb Pierce Ng <[hidden email]>:

On Thu, Apr 08, 2021 at 11:58:10AM +0100, Tim Mackinnon wrote:
Pierce - who/where are you rnning your Docker image? Do you use a
particular service (or are you running your own?)

I am using a Linux VPS which I manage myself.

The Pharo application is my blog. It was a web app fronted by a HTTPS
reverse proxy. At the start of this year I rewrote it into a static site
generator. Instead of running all the time, Pharo is now invoked when
triggered by a CI hook, which happens when I publish a new blog post or
otherwise update my site.

I play with all kinds of software on my VPS and it was getting a bit RAM
cramped, hence the rewrite. Wasn't willing to spend more money every month
for more RAM. :-P

Pierce


--------------------------------------------
Stéphane Ducasse
03 59 35 87 52
Assistant: Aurore Dalle 
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley, 
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France

Reply | Threaded
Open this post in threaded view
|

Re: Whats the easiest/cheapest way to run a Pharo web app in 2021?

Jeff Gray
In reply to this post by Tim Mackinnon
Considering easiest and cheapest, there's always self hosting, or are you
discounting that idea?
Most geeks have a bit of spare hardware laying around and broadband
up-speeds aren't too bad.
I'm guessing that if we are in the $5 a month ball park then we aren't
needing a guaranteed up time.

 



--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
Reply | Threaded
Open this post in threaded view
|

Re: Whats the easiest/cheapest way to run a Pharo web app in 2021?

NorbertHartl


> Am 12.04.2021 um 04:02 schrieb Jeff Gray <[hidden email]>:
>
> Considering easiest and cheapest, there's always self hosting, or are you
> discounting that idea?
> Most geeks have a bit of spare hardware laying around and broadband
> up-speeds aren't too bad.
> I'm guessing that if we are in the $5 a month ball park then we aren't
> needing a guaranteed up time.
>

My cloud instance is 3€/month. With an additional 20% amount the instance has a backup. And setting it up is way simpler then getting dynamic DNS updates and all of that configured. Times have changed a bit.


Norbert
Reply | Threaded
Open this post in threaded view
|

Re: Whats the easiest/cheapest way to run a Pharo web app in 2021?

Tim Mackinnon
That is cheap 3e/m is definitely worth considering… but I guess you do have to take care of your own patching etc right (which isn’t necessarily horrible, but does require a bit of extra effort to track things). I was interested in whether the next step up in the food chain using Docker images that are hosted for you, might lessen the burden a bit? E.g. if your CI injects a pharo image into the latest “safe” docker image from the community - then hopefully you are insulated from all of this.  It does look like this is becoming a reality if that dockerize.io soln plays out (I got that working, its cheap - however they haven’t answered any of my email queries… so I do wonder how real it actually is). The fallback would definitely be something like Hetzner or Digital Ocean I guess.

Tim

> On 12 Apr 2021, at 08:47, Norbert Hartl <[hidden email]> wrote:
>
>
>
>> Am 12.04.2021 um 04:02 schrieb Jeff Gray <[hidden email]>:
>>
>> Considering easiest and cheapest, there's always self hosting, or are you
>> discounting that idea?
>> Most geeks have a bit of spare hardware laying around and broadband
>> up-speeds aren't too bad.
>> I'm guessing that if we are in the $5 a month ball park then we aren't
>> needing a guaranteed up time.
>>
>
> My cloud instance is 3€/month. With an additional 20% amount the instance has a backup. And setting it up is way simpler then getting dynamic DNS updates and all of that configured. Times have changed a bit.
>
>
> Norbert
Reply | Threaded
Open this post in threaded view
|

Re: Whats the easiest/cheapest way to run a Pharo web app in 2021?

Jeff Gray
In reply to this post by NorbertHartl
LOL - Yes, time marches forward, and definitely an old dog :-)
That ( and some of the other services mentioned already) is pretty
inexpensive.
What storage do you get for your 3 euros?



--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
Reply | Threaded
Open this post in threaded view
|

Re: Whats the easiest/cheapest way to run a Pharo web app in 2021?

Esteban A. Maringolo
In reply to this post by NorbertHartl
What do you use that's so cheap/affordable?

El lun., 12 de abril de 2021 04:48, Norbert Hartl <[hidden email]> escribió:


> Am 12.04.2021 um 04:02 schrieb Jeff Gray <[hidden email]>:
>
> Considering easiest and cheapest, there's always self hosting, or are you
> discounting that idea?
> Most geeks have a bit of spare hardware laying around and broadband
> up-speeds aren't too bad.
> I'm guessing that if we are in the $5 a month ball park then we aren't
> needing a guaranteed up time.
>

My cloud instance is 3€/month. With an additional 20% amount the instance has a backup. And setting it up is way simpler then getting dynamic DNS updates and all of that configured. Times have changed a bit.


Norbert
Reply | Threaded
Open this post in threaded view
|

Re: Whats the easiest/cheapest way to run a Pharo web app in 2021?

Sven Van Caekenberghe-2
Although my main instance is on Digital Ocean, I have a test/play instance on AWS.

This is really hip & cool: it is an AWS Graviton 2 instance (Amazon's own ARM64 CPU, much like Apple Silicon) [ https://aws.amazon.com/ec2/graviton/ ]. I run a small t4g.micro instance, 1GB RAM, 8GB Disk.

Last bill was just USD 2.89 which is crazy cheap for a full month 24/7.

Thanks to the fact that Pharo has a full JIT VM on ARM64, this is crazy fast as well.

I am sure that the reason this is so cheap is the fact that it is super efficient.

You can try this easily for yourself.

> On 13 Apr 2021, at 01:57, Esteban Maringolo <[hidden email]> wrote:
>
> What do you use that's so cheap/affordable?
>
> El lun., 12 de abril de 2021 04:48, Norbert Hartl <[hidden email]> escribió:
>
>
> > Am 12.04.2021 um 04:02 schrieb Jeff Gray <[hidden email]>:
> >
> > Considering easiest and cheapest, there's always self hosting, or are you
> > discounting that idea?
> > Most geeks have a bit of spare hardware laying around and broadband
> > up-speeds aren't too bad.
> > I'm guessing that if we are in the $5 a month ball park then we aren't
> > needing a guaranteed up time.
> >
>
> My cloud instance is 3€/month. With an additional 20% amount the instance has a backup. And setting it up is way simpler then getting dynamic DNS updates and all of that configured. Times have changed a bit.
>
>
> Norbert
Reply | Threaded
Open this post in threaded view
|

Re: Whats the easiest/cheapest way to run a Pharo web app in 2021?

Tim Mackinnon
These are some useful inputs - its definitely getting to a place where a little pocket money gives you a real environment to hobby deploy to (even professionally if you are careful i guess).

Sven - presumably this Graviton setup is an EC2 instance - and so you patch your own OS and provide any additional pieces like SSL cert etc right? (which I know you are ace at doing - but I find that that I painfully learn how to do it one month, and then 6 months later have to relearn it all again).

So I'm interested in how reasonable it is to live higher up the food chain - where it seems that a Docker image insulates you (in theory) from a lot of this. Is this true - and are options like dockerize.io (or others that perhaps I am missing) viable options for the time constrained?

(really appreciate all the input in this thread everyone - its very instructive)

Tim

On Tue, 13 Apr 2021, at 7:43 AM, Sven Van Caekenberghe wrote:

> Although my main instance is on Digital Ocean, I have a test/play
> instance on AWS.
>
> This is really hip & cool: it is an AWS Graviton 2 instance (Amazon's
> own ARM64 CPU, much like Apple Silicon) [
> https://aws.amazon.com/ec2/graviton/ ]. I run a small t4g.micro
> instance, 1GB RAM, 8GB Disk.
>
> Last bill was just USD 2.89 which is crazy cheap for a full month 24/7.
>
> Thanks to the fact that Pharo has a full JIT VM on ARM64, this is crazy
> fast as well.
>
> I am sure that the reason this is so cheap is the fact that it is super
> efficient.
>
> You can try this easily for yourself.
>
> > On 13 Apr 2021, at 01:57, Esteban Maringolo <[hidden email]> wrote:
> >
> > What do you use that's so cheap/affordable?
> >
> > El lun., 12 de abril de 2021 04:48, Norbert Hartl <[hidden email]> escribió:
> >
> >
> > > Am 12.04.2021 um 04:02 schrieb Jeff Gray <[hidden email]>:
> > >
> > > Considering easiest and cheapest, there's always self hosting, or are you
> > > discounting that idea?
> > > Most geeks have a bit of spare hardware laying around and broadband
> > > up-speeds aren't too bad.
> > > I'm guessing that if we are in the $5 a month ball park then we aren't
> > > needing a guaranteed up time.
> > >
> >
> > My cloud instance is 3€/month. With an additional 20% amount the instance has a backup. And setting it up is way simpler then getting dynamic DNS updates and all of that configured. Times have changed a bit.
> >
> >
> > Norbert
>
Reply | Threaded
Open this post in threaded view
|

Re: Whats the easiest/cheapest way to run a Pharo web app in 2021?

Esteban A. Maringolo
I really like the Dockerize option, seems pretty straight forward, I wonder how you could manage volumes for DB containers, static assets and how flexible/configurable is the routing/scaling.

Unless, as it seems, everything is stateless there.


Esteban A. Maringolo


On Tue, Apr 13, 2021 at 8:36 AM Tim Mackinnon <[hidden email]> wrote:
These are some useful inputs - its definitely getting to a place where a little pocket money gives you a real environment to hobby deploy to (even professionally if you are careful i guess).

Sven - presumably this Graviton setup is an EC2 instance - and so you patch your own OS and provide any additional pieces like SSL cert etc right? (which I know you are ace at doing - but I find that that I painfully learn how to do it one month, and then 6 months later have to relearn it all again).

So I'm interested in how reasonable it is to live higher up the food chain - where it seems that a Docker image insulates you (in theory) from a lot of this. Is this true - and are options like dockerize.io (or others that perhaps I am missing) viable options for the time constrained?

(really appreciate all the input in this thread everyone - its very instructive)

Tim

On Tue, 13 Apr 2021, at 7:43 AM, Sven Van Caekenberghe wrote:
> Although my main instance is on Digital Ocean, I have a test/play
> instance on AWS.
>
> This is really hip & cool: it is an AWS Graviton 2 instance (Amazon's
> own ARM64 CPU, much like Apple Silicon) [
> https://aws.amazon.com/ec2/graviton/ ]. I run a small t4g.micro
> instance, 1GB RAM, 8GB Disk.
>
> Last bill was just USD 2.89 which is crazy cheap for a full month 24/7.
>
> Thanks to the fact that Pharo has a full JIT VM on ARM64, this is crazy
> fast as well.
>
> I am sure that the reason this is so cheap is the fact that it is super
> efficient.
>
> You can try this easily for yourself.
>
> > On 13 Apr 2021, at 01:57, Esteban Maringolo <[hidden email]> wrote:
> >
> > What do you use that's so cheap/affordable?
> >
> > El lun., 12 de abril de 2021 04:48, Norbert Hartl <[hidden email]> escribió:
> >
> >
> > > Am 12.04.2021 um 04:02 schrieb Jeff Gray <[hidden email]>:
> > >
> > > Considering easiest and cheapest, there's always self hosting, or are you
> > > discounting that idea?
> > > Most geeks have a bit of spare hardware laying around and broadband
> > > up-speeds aren't too bad.
> > > I'm guessing that if we are in the $5 a month ball park then we aren't
> > > needing a guaranteed up time.
> > >
> >
> > My cloud instance is 3€/month. With an additional 20% amount the instance has a backup. And setting it up is way simpler then getting dynamic DNS updates and all of that configured. Times have changed a bit.
> >
> >
> > Norbert
>
12