[Blog Post] PoC Alpine Linux Minimal Stateless Pharo

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

[Blog Post] PoC Alpine Linux Minimal Stateless Pharo

Pierce Ng-3
Hi all,

I've written a blog post on the topic.

  https://www.samadhiweb.com/blog/2019.07.20.alpine.pharo.minimal.html

TL;DR:

- Built pharo.cog.spur.minheadless on Alpine Linux.

- Built Docker image of same: 12.5MB.

- Using 7-minimal as base, built a stateless Pharo image with SUnit and
  SQLite: ~16MB.
 
- Ran the SQLite unit tests from the command line using said
  image statelessly.

- Built Docker image of Alpine Pharo VM and a/m SQLite Pharo image: 46.8MB.

- Ran said Docker image which ran the SQLite unit tests.

Pierce

Reply | Threaded
Open this post in threaded view
|

Re: [Blog Post] PoC Alpine Linux Minimal Stateless Pharo

Mariano Martinez Peck
Hi Pierce,

Cross posting my answer from VM to here, sorry for the duplicate. 

This is very interesting. I have been playing with docker too [1] [2] [3]  and indeed I also tried to make it work with alpine [4]. But it was complicated because alpine doesn't come with `glibc` but instead `musl`. And there are differences between them. So for example for VA Smalltalk I had to install `glibc`. I succeeded but the final size of the docker image with alpine + glibc was almost the same size as the debian lite... so it didn't make much sense to me. 
The support for glic is not official and as you can see I reported it [5]

Anyway, I will be curious to know your progress. Would cog VM work correctly with musl instead of glibc? 

Best, 


On Sat, Jul 20, 2019 at 5:39 AM Pierce Ng <[hidden email]> wrote:
Hi all,

I've written a blog post on the topic.

  https://www.samadhiweb.com/blog/2019.07.20.alpine.pharo.minimal.html

TL;DR:

- Built pharo.cog.spur.minheadless on Alpine Linux.

- Built Docker image of same: 12.5MB.

- Using 7-minimal as base, built a stateless Pharo image with SUnit and
  SQLite: ~16MB.

- Ran the SQLite unit tests from the command line using said
  image statelessly.

- Built Docker image of Alpine Pharo VM and a/m SQLite Pharo image: 46.8MB.

- Ran said Docker image which ran the SQLite unit tests.

Pierce



--
Mariano Martinez Peck
Reply | Threaded
Open this post in threaded view
|

Re: [Blog Post] PoC Alpine Linux Minimal Stateless Pharo

Pierce Ng-3
On Sat, Jul 20, 2019 at 10:58:36AM -0300, Mariano Martinez Peck wrote:
> This is very interesting. I have been playing with docker too [1] [2] [3]
> and indeed I also tried to make it work with alpine [4]. But it was

Hi Mariano,

Fun stuff!

> Anyway, I will be curious to know your progress. Would cog VM work
> correctly with musl instead of glibc?

That's what I'll find out. :-) I built the Cog VM from source on Alpine.
As written in my post said Cog VM successfully runs a minimal Pharo
image doing FFI and Fuel.

I'll be testing it with the regular image running some kind of webapp.

Pierce  

Reply | Threaded
Open this post in threaded view
|

Re: [Blog Post] PoC Alpine Linux Minimal Stateless Pharo

Mariano Martinez Peck


On Sat, Jul 20, 2019 at 9:05 PM Pierce Ng <[hidden email]> wrote:
On Sat, Jul 20, 2019 at 10:58:36AM -0300, Mariano Martinez Peck wrote:
> This is very interesting. I have been playing with docker too [1] [2] [3]
> and indeed I also tried to make it work with alpine [4]. But it was

Hi Mariano,

Fun stuff!


Yes, I think it was very fun but useful at the same time :)

 

> Anyway, I will be curious to know your progress. Would cog VM work
> correctly with musl instead of glibc?

That's what I'll find out. :-) I built the Cog VM from source on Alpine.
As written in my post said Cog VM successfully runs a minimal Pharo
image doing FFI and Fuel.

I'll be testing it with the regular image running some kind of webapp.



That sounds cool. Please keep us posted on your progress. Even if a "development" image cannot run on Alpine (because of whatever external lib), having a reduced/runtime/minima/production/whatever that would, is a great achievement. 
If I were you, I would also try to run the whole Pharo Test Suite on top of that minimal image (the test suite for that image, obviously). That may give you a better idea than just testing by using a webapp. 

Best, 

--
Mariano Martinez Peck