Hi Michael,

On Tue, Sep 20, 2016 at 9:11 PM, Michael Hall <mhall...@gmail.com> wrote:

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

Yes, I know that .deb isn't going away.
I just said it to express my frustration with those 196MB.


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

What if I need different combination of Tomcat and JRE versions than what
your Snap versions provide ?
Let's say I experience some bug in the bundled JRE version (e.g. X) and
your next Snap version bundles JRE X+1 but also Tomcat Y+1.
What if I need JRE X+1 and Tomcat Y because there is a regression in Y+1 ?
Just thinking loud here.


> resulting snap is only 48MB. Snaps are never "unzipped", instead they
> are loop-mounted into your filesystem, so the download size is the
>

I haven't read about squashfs, so I'm not sure how exactly it works.
196MB is what "du" program reports.
If it is not disk size then I hope this 60MB download is not unzipped in
the RAM.
http://snapcraft.io/ says "That directory will be compressed into a
squashfs - a zipped directory - and then it will be mounted at
/snap/<name>/current when the snap is installed."


> 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.
>

Thanks!


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