You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cassandra.apache.org by Evan Dandrea <ev...@ubuntu.com> on 2016/06/22 01:26:21 UTC

Easy path to the latest Cassandra in Ubuntu

Hi,

Ubuntu 16.04 comes with a new way to deliver applications (
http://snapcraft.io), and I thought it would be a great way to simplify
getting set up with Cassandra.

So now, if you run the following on any Ubuntu 16.04 system

    snap install cassandra && snap connect cassandra:mount-observe
ubuntu-core:mount-observe

Cassandra 3.7 will be installed with Java and the rest of the dependencies
bundled in. You can even install the tip of master (built about once a day):

    snap install --channel=edge cassandra && snap connect
cassandra:mount-observe ubuntu-core:mount-observe

Or if you already installed 3.7:

    snap refresh --channel=edge cassandra

None of this requires complex packaging or approval from the distribution
powers that be. If we move the snapcraft.yaml file [1] to a tree owned by
the dev community you can completely control upload and publishing.

This isn't limited to Ubuntu, either. If you install snapd this will work
on Arch, Debian, Fedora, and Gentoo too.

What do you think? I'd be happy to walk anyone through the details or put
together a pull request.

1: https://github.com/evandandrea/cassandra-snap/blob/master/snapcraft.yaml

Re: Easy path to the latest Cassandra in Ubuntu

Posted by Dave Brosius <db...@mebigfatguy.com>.
I notice that snapcraft.io already lists Cassandra as having a snap 
available on the front page.

On 06/26/2016 12:03 PM, Jonathan Ellis wrote:
> Hi Evan,
>
> Is Snap a new packaging format like deb/rpm, or does it consume the
> existing deb package?
>
> On Tue, Jun 21, 2016 at 8:26 PM, Evan Dandrea <ev...@ubuntu.com> wrote:
>
>> Hi,
>>
>> Ubuntu 16.04 comes with a new way to deliver applications (
>> http://snapcraft.io), and I thought it would be a great way to simplify
>> getting set up with Cassandra.
>>
>> So now, if you run the following on any Ubuntu 16.04 system
>>
>>      snap install cassandra && snap connect cassandra:mount-observe
>> ubuntu-core:mount-observe
>>
>> Cassandra 3.7 will be installed with Java and the rest of the dependencies
>> bundled in. You can even install the tip of master (built about once a
>> day):
>>
>>      snap install --channel=edge cassandra && snap connect
>> cassandra:mount-observe ubuntu-core:mount-observe
>>
>> Or if you already installed 3.7:
>>
>>      snap refresh --channel=edge cassandra
>>
>> None of this requires complex packaging or approval from the distribution
>> powers that be. If we move the snapcraft.yaml file [1] to a tree owned by
>> the dev community you can completely control upload and publishing.
>>
>> This isn't limited to Ubuntu, either. If you install snapd this will work
>> on Arch, Debian, Fedora, and Gentoo too.
>>
>> What do you think? I'd be happy to walk anyone through the details or put
>> together a pull request.
>>
>> 1:
>> https://github.com/evandandrea/cassandra-snap/blob/master/snapcraft.yaml
>>
>
>


Re: Easy path to the latest Cassandra in Ubuntu

Posted by Michael Shuler <mi...@pbandjelly.org>.
On 06/27/2016 09:59 AM, Jonathan Ellis wrote:
> How would I deploy a cluster with Snap?
> 
> With the package I can pre-deploy my configuration to the node with cluster
> name, seeds, etc.  With Snap do I have to build a custom container to do
> that?  Or is there some way to pull in config from the host machine or a
> config server?

I haven't played with snap at all, yet, so maybe Evan could elaborate,
but building your own snapshots appears to be pretty straightforward.
I'm not sure about hosting your own snap service, but I assume would be
the way to go for customized deployments.

> Aside: there's at 3 other reasonably popular projects called Snap; makes it
> hard to Google.

Yep, not a unique name choice, and this is blocking snapd transition to
Debian testing:  https://bugs.debian.org/826884

-- 
Kind regards,
Michael

Re: Easy path to the latest Cassandra in Ubuntu

Posted by Jonathan Ellis <jb...@gmail.com>.
How would I deploy a cluster with Snap?

With the package I can pre-deploy my configuration to the node with cluster
name, seeds, etc.  With Snap do I have to build a custom container to do
that?  Or is there some way to pull in config from the host machine or a
config server?

Aside: there's at 3 other reasonably popular projects called Snap; makes it
hard to Google.

On Mon, Jun 27, 2016 at 9:42 AM, Michael Shuler <mi...@pbandjelly.org>
wrote:

> On 06/26/2016 11:03 AM, Jonathan Ellis wrote:
> >
> > Is Snap a new packaging format like deb/rpm, or does it consume the
> > existing deb package?
>
> It's an LXD container delivery system.
>
> --
> Kind regards,
> Michael
>



-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder, http://www.datastax.com
@spyced

Re: Easy path to the latest Cassandra in Ubuntu

Posted by Michael Shuler <mi...@pbandjelly.org>.
On 06/26/2016 11:03 AM, Jonathan Ellis wrote:
> 
> Is Snap a new packaging format like deb/rpm, or does it consume the
> existing deb package?

It's an LXD container delivery system.

-- 
Kind regards,
Michael

Re: Easy path to the latest Cassandra in Ubuntu

Posted by Evan Dandrea <ev...@ubuntu.com>.
Thanks for following up, Dave, Michael, and Jonathan.

On Sun, 26 Jun 2016 at 11:04 Jonathan Ellis <jb...@gmail.com> wrote:

> Is Snap a new packaging format like deb/rpm, or does it consume the
> existing deb package?
>

It's a new packaging format. Each application is isolated such that it
cannot see beyond its own filesystem (mounted squashfs plus writable
directory), make certain syscalls, etc.

It is not whole operating system isolation like docker and lxc, and there's
ongoing work to let you run snaps inside these containers:
https://github.com/lxc/lxd/issues/1952

That said, you can already run it just fine inside a cloud instance.


On Mon, 27 Jun 2016 at 09:59 Jonathan Ellis <jb...@gmail.com> wrote:

> How would I deploy a cluster with Snap?
>

There's no native support for scaling out a single snap process yet, but it
can be accomplished by holding a little extra logic in the snap.

I'll look into this tonight using the Cassandra snap.


With the package I can pre-deploy my configuration to the node with cluster
> name, seeds, etc.  With Snap do I have to build a custom container to do
> that?  Or is there some way to pull in config from the host machine or a
> config server?
>

Today you'd build a container and call:
cat cassandra.yaml | sudo /snap/bin/cassandra.config-set cassandra.yaml

In the future there will be native support in snapd for setting config, and
I could see a path to that optionally being a pull rather than push
operation.


Aside: there's at 3 other reasonably popular projects called Snap; makes it
> hard to Google.
>

I've found this frustrating too. More documentation is being written under
the "snapcraft" branding, which should improve discoverability some.


On Sun, 26 Jun 2016 at 12:51 Dave Brosius <db...@mebigfatguy.com> wrote:

> I notice that snapcraft.io already lists Cassandra as having a snap
> available on the front page.


Yes, I've already built and published a Cassandra snap [1]. I'd like to
prove that this is low maintenance enough that the Cassandra release team
could take over version bumping and publishing without being further
burdened.

1: https://github.com/evandandrea/cassandra-snap/


On Mon, 27 Jun 2016 at 10:15 Michael Shuler <mi...@pbandjelly.org> wrote:

> I haven't played with snap at all, yet, so maybe Evan could elaborate,
> but building your own snapshots appears to be pretty straightforward.
>

If I understand the context you're applying to snapshots, that will be
specific to your container system / cloud. That said, new versions of snaps
unpack to new directories, and snapd lets you roll forward and back.


I'm not sure about hosting your own snap service, but I assume would be
> the way to go for customized deployments.


There's a centralised "store" for snaps, which is nice for app discovery.
If your deployment is locked down to not pull from the Internet, you can
run your own store:

http://blog.dustinkirkland.com/2016/06/howto-host-your-own-snap-store.html

Re: Easy path to the latest Cassandra in Ubuntu

Posted by Jonathan Ellis <jb...@gmail.com>.
Hi Evan,

Is Snap a new packaging format like deb/rpm, or does it consume the
existing deb package?

On Tue, Jun 21, 2016 at 8:26 PM, Evan Dandrea <ev...@ubuntu.com> wrote:

> Hi,
>
> Ubuntu 16.04 comes with a new way to deliver applications (
> http://snapcraft.io), and I thought it would be a great way to simplify
> getting set up with Cassandra.
>
> So now, if you run the following on any Ubuntu 16.04 system
>
>     snap install cassandra && snap connect cassandra:mount-observe
> ubuntu-core:mount-observe
>
> Cassandra 3.7 will be installed with Java and the rest of the dependencies
> bundled in. You can even install the tip of master (built about once a
> day):
>
>     snap install --channel=edge cassandra && snap connect
> cassandra:mount-observe ubuntu-core:mount-observe
>
> Or if you already installed 3.7:
>
>     snap refresh --channel=edge cassandra
>
> None of this requires complex packaging or approval from the distribution
> powers that be. If we move the snapcraft.yaml file [1] to a tree owned by
> the dev community you can completely control upload and publishing.
>
> This isn't limited to Ubuntu, either. If you install snapd this will work
> on Arch, Debian, Fedora, and Gentoo too.
>
> What do you think? I'd be happy to walk anyone through the details or put
> together a pull request.
>
> 1:
> https://github.com/evandandrea/cassandra-snap/blob/master/snapcraft.yaml
>



-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder, http://www.datastax.com
@spyced