Hi Martin,

On 09/20/2016 02:56 PM, Martin Grigorov wrote:
> Hi Michael,
> 
> On Tue, Sep 20, 2016 at 3:10 PM, Michael Hall <mhall...@gmail.com> wrote:
> 
>> Hi Coty,
>>
>> Have you had an opportunity to try this yet? If you need help please let
>> me know, or you could find help on #snappy on Freenode or
>> https://gitter.im/ubuntu/snappy-playpen (a new slack-like service
>> connected to github)
>>
> 
> I am an Ubuntu user and I've tried once Snap.
> I've installed the featured Notes application and I was amazed to see that
> it downloaded 60Mb for such a simple application! After being unzipped it
> is 196MB !!
> Then I removed it.
> I hope Canonical will keep .deb around for the near future!
> 

.deb package aren't going away, snaps are just a new option that bring a
lot of benefit. Desktop apps like Notes are currently quite large
because they bundle the whole GUI toolkit that they use. This is
something that has a solution underway, but it won't affect services
like tomcat nearly as much,

The Tomcat snap does include a JRE though, so you always know that one
is available and that Tomcat will work with it. Even with that the
resulting snap is only 48MB. Snaps are never "unzipped", instead they
are loop-mounted into your filesystem, so the download size is the
installed size.

> About your package: 
> I see it uses "plugs: [network-bind]" to be able to bind the ports, but
> does this also allow to make connections to external resources like a
> remote DB for example ?
> 

I would have to double check. There is a "network" interface that allows
only out-bound connection, which can be added if "network-bind" doesn't
already do that.

> 
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
> 
> 
> 
>>
>> Michael Hall
>> mhall...@gmail.com
>>
>> On 09/15/2016 10:06 AM, Michael Hall wrote:
>>> Hi Coty,
>>>
>>> To learn more about snaps in general and how to make them you can go to
>>> http://snapcraft.io/
>>>
>>> The tl;dr is that they are self-contained application bundles, including
>>> dependencies, that are packed into a squashfs that is then loop-mounted
>>> when installed. This means that the application's own files are
>>> read-only and isolated from other apps and the system, which makes
>>> updating them safe and simple. For Tomcat this means it includes a JRE,
>>> OpenSSL, and anything else needed for Tomcat to run.
>>>
>>> I have attached the files needed to build a Tomcat snap using the the
>>> Snapcraft tool (only available on Ubuntu currently), just run "snapcraft
>>> snap" in the same directory as these files. The snapcrafy.yaml will pull
>>> Tomcat 8.5.5 binary tarball as it's source, so no re-compiling is
>>> needed. The run.sh simply sets some environment variables to their
>>> proper snap-environment locations, copies the server.xml into
>>> CATALINE_BASE (if it's not there), and starts Tomcat.
>>>
>>> Because the snapcraft.yaml declares this to be a daemon, it will create
>>> a systemd service file upon installation and start it automatically.
>>> Then you can copy a .war files into $CATALINA_BASE/webapps/ and Tomcat
>>> will pick it up. I tested with the sample.war from
>>> https://tomcat.apache.org/tomcat-8.0-doc/appdev/sample/ and it works
>>> with the servlet portion, but not the JSP (I suspect the JSP compilation
>>> is trying write to use a read-only space, but haven't dug too far into
>> it).
>>>
>>> If you don't run Ubuntu the easiest way to build the snap is in a VM or
>>> container that has Ubuntu 16.04, just install the snapcraft package from
>>> the archive. If you just want to try a pre-built binary, you can
>>> download mine from http://people.ubuntu.com/~mhall119/snaps/
>>>
>>> You can install it on Ubuntu 16.04 or a derivative right away with "snap
>>> install $snapfile --force-dangerous". The --force-dangerous is required
>>> because the resulting snap won't be signed. On non-Ubuntu distros you
>>> can get snaps running by following the instructions on
>>> http://snapcraft.io/docs/core/install
>>>
>>>
>>> Michael Hall
>>> mhall...@ubuntu.com
>>>
>>> On 09/14/2016 11:23 PM, Coty Sutherland wrote:
>>>> Hi Micheal,
>>>>
>>>> I hadn't heard of snaps (or used Ubuntu much) but the concept seems
>>>> interesting to me. Would you be able to send me links to what you have
>>>> so far so I can check it out? I have a few questions, but I'll reserve
>>>> those until I get a chance to review what you have.
>>>>
>>>> Thanks!
>>>>
>>>>
>>>> On Sep 14, 2016 3:51 PM, "Michael Hall" <mhall...@ubuntu.com
>>>> <mailto:mhall...@ubuntu.com>> wrote:
>>>>
>>>>     Hi everyone,
>>>>
>>>>     Ubuntu has developed a new platform for deploying applications using
>>>>     bundled packages called "snaps". These make it easier to deploy and
>>>>     update on Ubuntu independently of it's release cycle (and on
>> non-Ubuntu
>>>>     distros too for that matter). I would like to make Tomcat available
>> in
>>>>     this format so it can be more easily used on lightweight cloud
>> instances
>>>>     or devices like the Raspberry Pi.
>>>>
>>>>     I have a working example of Tomcat as a snap, and it works really
>> well
>>>>     with a separate read-only CATALINE_HOME and a writable, versioned
>>>>     CATALINA_BASE that will allow for atomic updates and rollbacks
>> without
>>>>     breaking application data, and it's very easy to use.
>>>>
>>>>     The next step is to contribute this to upstream, where it can be
>>>>     improved (I've only scratched the surface of what can be done with
>> it)
>>>>     and integrated with the CI system so that snap package can be
>>>>     automatically created and uploaded for testers and users. This is
>> where
>>>>     I need help from somebody on this list, so please let me know if
>> you are
>>>>     interested and I will provide you the packaging files (there are
>> only 2)
>>>>     and a working binary package if you want to give it a try.
>>>>
>>>>     Thanks.
>>>>
>>>>     --
>>>>     Michael Hall
>>>>     mhall...@ubuntu.com <mailto:mhall...@ubuntu.com>
>>>>
>>>>     ------------------------------------------------------------
>> ---------
>>>>     To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
>>>>     <mailto:dev-unsubscr...@tomcat.apache.org>
>>>>     For additional commands, e-mail: dev-h...@tomcat.apache.org
>>>>     <mailto:dev-h...@tomcat.apache.org>
>>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: dev-h...@tomcat.apache.org
>>
>>
> 


Michael Hall
mhall...@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to