Re: Cassandra image for Kubernetes

2019-09-19 Thread Dimo Velev
Sidecar would be fine I guess provided that it does not require a lot of 
resources - which kind of eliminates more or less any java implementation. 
Unsure whether jvm metrics etc are available via virtual tables though.

Also forgot an important point about the image for local usage - ability to 
load cql scripts upon start only once. Most databases offer these so that you 
can add initialization stuff like creating keyspaces, users, tables upon first 
start.

> On 19. Sep 2019, at 23:02, Jon Haddad  wrote:
> 
> I recently had a side conversation about including a Prometheus endpoint in
> the sidecar project, which would query virtual tables exclusively.  Is it
> reasonable to require running the sidecar in addition to Cassandra when
> deploying on K8?  My container knowledge is pretty limited.
> 
> If that's not a problem, I think it shouldn't be too hard to add, it's just
> a matter of someone finding the time.
> 
> On Thu, Sep 19, 2019 at 1:39 PM Dimo Velev  wrote:
> 
>> Hi,
>> 
>> A docker image for Cassandra would be the first step in the right
>> direction. What one would really want is a kubernetes Operator that can
>> deploy, upgrade, etc. a Cassandra cluster (
>> https://kubernetes.io/docs/concepts/extend-kubernetes/operator).
>> 
>> A base image with placeholders would be neat for people to quickly start
>> using Cassandra. We have built our own image (actually a few of them over
>> the time) and also use it e.g. for cqlsh (docker run -it —rm —entrypoint
>> cqlsh  —help). What one would probably do in the end is building
>> their own image based on the official one adding a layer with the
>> configuration file, certificates, etc (or mounting them from a configmap in
>> kubernetes).
>> 
>> Some things to consider for the image:
>> • Special care must be taken to make the image usable in OpenShift as it
>> does not run the processes in the containers as root.
>> • Logging should be changed to stdout so that it is easier to use and
>> automatically picked up by log indexers of kubernetes clusters.
>> • As for metrics, exposing Prometheus endpoint with them would be great as
>> this makes scraping them just a matter of meta configuration of the pods
>> (telling Prometheus the actual endpoint to scrape)
>> • I had issues with Cassandra binding on the wrong IP in a container
>> 
>> Would be happy to help with the image part / testing on OpenShift.
>> 
>> Cheers,
>> Dimo
>> 
>>> On 19. Sep 2019, at 18:32, Nate McCall  wrote:
>>> 
>>> Hi Cyril,
>>> Thanks for bringing this topic up. I think it would be a good idea for us
>>> to have an "official" docker file in the source tree.
>>> 
>>> There are, however, some caveats:
>>> 
>> https://issues.apache.org/jira/browse/LEGAL-270?focusedCommentId=15524446=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-15524446
>>> 
>>> As long as we could adhere to those guidelines (which I don't see as
>> hard)
>>> we could do this.
>>> 
>>> In looking through your specific image (thanks for posting this, btw), I
>>> would personally prefer something with a lot fewer dependencies
>> (basically
>>> from just our source tree) and a lot more replacement properties
>> available
>>> for config files.
>>> 
>>> Curious what other folks think?
>>> 
>>> Cheers,
>>> -Nate
>>> 
 On Wed, Sep 18, 2019 at 6:43 AM Cyril Scetbon 
>> wrote:
 
 Hey guys,
 
 I heard that at the last summit there were discussions about providing
>> an
 official docker image to run Cassandra on Kubernetes. Is it something
>> that
 you’ve started to work on ? We have our own at
 https://github.com/Orange-OpenSource/cassandra-image <
 https://github.com/Orange-OpenSource/cassandra-image> but I think
 providing an official image makes sense. As long as we can easily do
 everything we do today. We could also collaborate.
 
 Thank you
 —
 Cyril Scetbon
 
 
>> 

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



Re: Cassandra image for Kubernetes

2019-09-19 Thread Jon Haddad
I recently had a side conversation about including a Prometheus endpoint in
the sidecar project, which would query virtual tables exclusively.  Is it
reasonable to require running the sidecar in addition to Cassandra when
deploying on K8?  My container knowledge is pretty limited.

If that's not a problem, I think it shouldn't be too hard to add, it's just
a matter of someone finding the time.

On Thu, Sep 19, 2019 at 1:39 PM Dimo Velev  wrote:

> Hi,
>
> A docker image for Cassandra would be the first step in the right
> direction. What one would really want is a kubernetes Operator that can
> deploy, upgrade, etc. a Cassandra cluster (
> https://kubernetes.io/docs/concepts/extend-kubernetes/operator).
>
> A base image with placeholders would be neat for people to quickly start
> using Cassandra. We have built our own image (actually a few of them over
> the time) and also use it e.g. for cqlsh (docker run -it —rm —entrypoint
> cqlsh  —help). What one would probably do in the end is building
> their own image based on the official one adding a layer with the
> configuration file, certificates, etc (or mounting them from a configmap in
> kubernetes).
>
> Some things to consider for the image:
> • Special care must be taken to make the image usable in OpenShift as it
> does not run the processes in the containers as root.
> • Logging should be changed to stdout so that it is easier to use and
> automatically picked up by log indexers of kubernetes clusters.
> • As for metrics, exposing Prometheus endpoint with them would be great as
> this makes scraping them just a matter of meta configuration of the pods
> (telling Prometheus the actual endpoint to scrape)
> • I had issues with Cassandra binding on the wrong IP in a container
>
> Would be happy to help with the image part / testing on OpenShift.
>
> Cheers,
> Dimo
>
> > On 19. Sep 2019, at 18:32, Nate McCall  wrote:
> >
> > Hi Cyril,
> > Thanks for bringing this topic up. I think it would be a good idea for us
> > to have an "official" docker file in the source tree.
> >
> > There are, however, some caveats:
> >
> https://issues.apache.org/jira/browse/LEGAL-270?focusedCommentId=15524446=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-15524446
> >
> > As long as we could adhere to those guidelines (which I don't see as
> hard)
> > we could do this.
> >
> > In looking through your specific image (thanks for posting this, btw), I
> > would personally prefer something with a lot fewer dependencies
> (basically
> > from just our source tree) and a lot more replacement properties
> available
> > for config files.
> >
> > Curious what other folks think?
> >
> > Cheers,
> > -Nate
> >
> >> On Wed, Sep 18, 2019 at 6:43 AM Cyril Scetbon 
> wrote:
> >>
> >> Hey guys,
> >>
> >> I heard that at the last summit there were discussions about providing
> an
> >> official docker image to run Cassandra on Kubernetes. Is it something
> that
> >> you’ve started to work on ? We have our own at
> >> https://github.com/Orange-OpenSource/cassandra-image <
> >> https://github.com/Orange-OpenSource/cassandra-image> but I think
> >> providing an official image makes sense. As long as we can easily do
> >> everything we do today. We could also collaborate.
> >>
> >> Thank you
> >> —
> >> Cyril Scetbon
> >>
> >>
>


Re: Cassandra image for Kubernetes

2019-09-19 Thread Dimo Velev
Hi,

A docker image for Cassandra would be the first step in the right direction. 
What one would really want is a kubernetes Operator that can deploy, upgrade, 
etc. a Cassandra cluster 
(https://kubernetes.io/docs/concepts/extend-kubernetes/operator).

A base image with placeholders would be neat for people to quickly start using 
Cassandra. We have built our own image (actually a few of them over the time) 
and also use it e.g. for cqlsh (docker run -it —rm —entrypoint cqlsh  
—help). What one would probably do in the end is building their own image based 
on the official one adding a layer with the configuration file, certificates, 
etc (or mounting them from a configmap in kubernetes).

Some things to consider for the image:
• Special care must be taken to make the image usable in OpenShift as it does 
not run the processes in the containers as root.
• Logging should be changed to stdout so that it is easier to use and 
automatically picked up by log indexers of kubernetes clusters.
• As for metrics, exposing Prometheus endpoint with them would be great as this 
makes scraping them just a matter of meta configuration of the pods (telling 
Prometheus the actual endpoint to scrape)
• I had issues with Cassandra binding on the wrong IP in a container

Would be happy to help with the image part / testing on OpenShift.

Cheers,
Dimo

> On 19. Sep 2019, at 18:32, Nate McCall  wrote:
> 
> Hi Cyril,
> Thanks for bringing this topic up. I think it would be a good idea for us
> to have an "official" docker file in the source tree.
> 
> There are, however, some caveats:
> https://issues.apache.org/jira/browse/LEGAL-270?focusedCommentId=15524446=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-15524446
> 
> As long as we could adhere to those guidelines (which I don't see as hard)
> we could do this.
> 
> In looking through your specific image (thanks for posting this, btw), I
> would personally prefer something with a lot fewer dependencies (basically
> from just our source tree) and a lot more replacement properties available
> for config files.
> 
> Curious what other folks think?
> 
> Cheers,
> -Nate
> 
>> On Wed, Sep 18, 2019 at 6:43 AM Cyril Scetbon  wrote:
>> 
>> Hey guys,
>> 
>> I heard that at the last summit there were discussions about providing an
>> official docker image to run Cassandra on Kubernetes. Is it something that
>> you’ve started to work on ? We have our own at
>> https://github.com/Orange-OpenSource/cassandra-image <
>> https://github.com/Orange-OpenSource/cassandra-image> but I think
>> providing an official image makes sense. As long as we can easily do
>> everything we do today. We could also collaborate.
>> 
>> Thank you
>> —
>> Cyril Scetbon
>> 
>> 


Re: Virtual tables in Cassandra 4.0

2019-09-19 Thread Chris Lohfink
It's a new feature in a version thats just in alpha so how they will look
may change in the end. There will hopefully be documentation around 4.0 GA
release.

The feature at a high level though is an interface to handle queries with
an implementing class instead of the storage engine. A usecase that the
virtual tables currently created in system_views keyspace are for exploring
whats happening on system with cqlsh or directed cql queries (instead of
nodetool with jmx).

Chris

On Thu, Sep 19, 2019 at 9:52 AM Pankaj Gajjar 
wrote:

> Hello All,
>
> I was exploring the Virtual tables and there is not much material
> available on internet or even apache Cassandra site.
>
> I found one link little old one :
> https://thelastpickle.com/blog/2019/03/08/virtual-tables-in-cassandra-4_0.html
>
> have you guys explored it ? what use case it’s fit well ?
>
> Regards
> Pankaj G.
>


Re: Cassandra image for Kubernetes

2019-09-19 Thread Nate McCall
Hi Cyril,
Thanks for bringing this topic up. I think it would be a good idea for us
to have an "official" docker file in the source tree.

There are, however, some caveats:
https://issues.apache.org/jira/browse/LEGAL-270?focusedCommentId=15524446=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-15524446

As long as we could adhere to those guidelines (which I don't see as hard)
we could do this.

In looking through your specific image (thanks for posting this, btw), I
would personally prefer something with a lot fewer dependencies (basically
from just our source tree) and a lot more replacement properties available
for config files.

Curious what other folks think?

Cheers,
-Nate

On Wed, Sep 18, 2019 at 6:43 AM Cyril Scetbon  wrote:

> Hey guys,
>
> I heard that at the last summit there were discussions about providing an
> official docker image to run Cassandra on Kubernetes. Is it something that
> you’ve started to work on ? We have our own at
> https://github.com/Orange-OpenSource/cassandra-image <
> https://github.com/Orange-OpenSource/cassandra-image> but I think
> providing an official image makes sense. As long as we can easily do
> everything we do today. We could also collaborate.
>
> Thank you
> —
> Cyril Scetbon
>
>


Virtual tables in Cassandra 4.0

2019-09-19 Thread Pankaj Gajjar
Hello All,

I was exploring the Virtual tables and there is not much material available on 
internet or even apache Cassandra site.

I found one link little old one : 
https://thelastpickle.com/blog/2019/03/08/virtual-tables-in-cassandra-4_0.html

have you guys explored it ? what use case it’s fit well ?

Regards
Pankaj G.