-
Notifications
You must be signed in to change notification settings - Fork 28
Added a nulecule for Apache Cassandra #77
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| FROM projectatomic/atomicapp:0.4.4 | ||
|
|
||
| MAINTAINER Varun Joshi <varunj.1011@gmail.com> | ||
|
|
||
| LABEL io.projectatomic.nulecule.providers="docker,kubernetes" \ | ||
| io.projectatomic.nuleclue.specversion="0.0.2" | ||
|
|
||
| ADD /Nulecule /Dockerfile /application-entity/ | ||
| ADD /artifacts /application-entity/artifacts | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| --- | ||
| specversion: 0.0.2 | ||
| id: cassandra-atomicapp | ||
|
|
||
| metadata: | ||
| name: Cassandra App | ||
| appversion: 0.0.1 | ||
| description: Cassandra Atomic App | ||
|
|
||
| graph: | ||
| - name: cassandra-app | ||
| params: | ||
| - name: image | ||
| description: The cassandra image | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no default value for what image? |
||
| - name: hostport | ||
| description: The port where cassandra runs | ||
| default: 7000 | ||
| - name: listen_address | ||
| description: This variable is for controlling which IP address to listen for incoming connections on. | ||
| default: auto | ||
| - name: broadcast_address | ||
| description: This variable is for controlling which IP address to advertise to other nodes. | ||
| default: auto | ||
| - name: rpc_address | ||
| description: This variable is for controlling which address to bind the thrift rpc server to. | ||
| default: 0.0.0.0 | ||
| - name: start_rpc | ||
| description: This variable is for controlling if the thrift rpc server is started. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't need Same goes with "Which IP address to advertise to other nodes" |
||
| default: "" | ||
| - name: seeds | ||
| description: This variable is the comma-separated list of IP addresses used by gossip for bootstrapping new nodes joining a cluster. | ||
| default: "" | ||
| - name: cluster_name | ||
| description: This variable sets the name of the cluster and must be the same for all nodes in the cluster. | ||
| default: "" | ||
| - name: num_tokens | ||
| description: This variable sets number of tokens for this node. | ||
| default: "" | ||
| - name: dc | ||
| description: This variable sets the datacenter name of this node. | ||
| default: "" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what happens if we don't include all the params that have "" as a default? :) does cassandra explictly require them?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Cassandra assumes default values for those, so I let them remain empty. |
||
| - name: rack | ||
| description: This variable sets the rack name of this node. | ||
| default: "" | ||
| - name: endpoint_snitch | ||
| description: This variable sets the snitch implementation this node will use. | ||
| default: "" | ||
| artifacts: | ||
| docker: | ||
| - file://artifacts/docker/cassandra_run | ||
| kubernetes: | ||
| - file://artifacts/kubernetes/cassandra-rc.yaml | ||
| - file://artifacts/kubernetes/cassandra-svc.yaml | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| [cassandra-app] | ||
| num_tokens = None | ||
| endpoint_snitch = "" | ||
| broadcast_address = auto | ||
| start_rpc = "" | ||
| image = "" | ||
| hostport = 7000 | ||
| dc = "" | ||
| cluster_name = "" | ||
| seeds = "" | ||
| rpc_address = 0.0.0.0 | ||
| listen_address = auto | ||
| rack = "" | ||
| [general] | ||
| namespace = default | ||
| provider = docker | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no answers.conf.sample please! :) I'll be updating the read-me to fix this. |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| docker run -d -p 7000:$hostport | ||
| -e CASSANDRA_LISTEN_ADDRESS=$listen_address | ||
| -e CASSANDRA_BROADCAST_ADDRESS=$broadcast_address | ||
| -e CASSANDRA_RPC_ADDRESS=$rpc_address | ||
| -e CASSANDRA_START_RPC=$start_rpc | ||
| -e CASSANDRA_SEEDS=$seeds | ||
| -e CASSANDRA_CLUSTER_NAME=$cluster_name | ||
| -e CASSANDRA_NUM_TOKENS=$num_tokens | ||
| -e CASSANDRA_DC=$dc | ||
| -e CASSANDRA_RACK=$rack | ||
| -e CASSANDRA_ENDPOINT_SNITCH=$endpoint_snitch | ||
| $image | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. missing new line backticks? ex. |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| --- | ||
| apiVersion: v1 | ||
| kind: ReplicationController | ||
| metadata: | ||
| name: cassandra | ||
| labels: | ||
| name: cassandra | ||
| spec: | ||
| replicas: 1 | ||
| selector: | ||
| name: cassandra | ||
| template: | ||
| metadata: | ||
| labels: | ||
| name: cassandra | ||
| spec: | ||
| containers: | ||
| - name: cassandra | ||
| image: $image | ||
| ports: | ||
| - name: cassandra-server | ||
| containerPort: $hostport | ||
| env: | ||
| - name: CASSANDRA_LISTEN_ADDRESS | ||
| value: $listen_address | ||
| - name: CASSANDRA_BROADCAST_ADDRESS | ||
| value: $broadcast_address | ||
| - name: CASSANDRA_RPC_ADDRESS | ||
| value: $rpc_address | ||
| - name: CASSANDRA_START_RPC | ||
| value: $start_rpc | ||
| - name: CASSANDRA_SEEDS | ||
| value: $seeds | ||
| - name: CASSANDRA_CLUSTER_NAME | ||
| value: $cluster_name | ||
| - name: CASSANDRA_NUM_TOKENS | ||
| value: $num_tokens | ||
| - name: CASSANDRA_DC | ||
| value: $dc | ||
| - name: CASSANDRA_RACK | ||
| value: $rack | ||
| - name: CASSANDRA_ENDPOINT_SNITCH | ||
| value: $endpoint_snitch |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| --- | ||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
| name: cassandra-svc | ||
| labels: | ||
| name: cassandra-svc | ||
| spec: | ||
| type: NodePort | ||
| ports: | ||
| - port: 7000 | ||
| targetPort: cassandra-server | ||
| selector: | ||
| name: cassandra |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0.4.5 please :)