{"id":16328267,"url":"https://github.com/nicolasff/docker-cassandra","last_synced_at":"2025-03-16T14:31:07.698Z","repository":{"id":11115919,"uuid":"13473483","full_name":"nicolasff/docker-cassandra","owner":"nicolasff","description":"A set of scripts and config files to run a Cassandra cluster from Docker","archived":false,"fork":false,"pushed_at":"2014-04-24T18:01:12.000Z","size":440,"stargazers_count":215,"open_issues_count":7,"forks_count":52,"subscribers_count":23,"default_branch":"master","last_synced_at":"2025-02-27T10:39:28.273Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nicolasff.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-10-10T14:25:05.000Z","updated_at":"2023-06-25T02:14:43.000Z","dependencies_parsed_at":"2022-09-10T16:41:42.605Z","dependency_job_id":null,"html_url":"https://github.com/nicolasff/docker-cassandra","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicolasff%2Fdocker-cassandra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicolasff%2Fdocker-cassandra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicolasff%2Fdocker-cassandra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicolasff%2Fdocker-cassandra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nicolasff","download_url":"https://codeload.github.com/nicolasff/docker-cassandra/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243818194,"owners_count":20352629,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T23:14:11.677Z","updated_at":"2025-03-16T14:31:07.361Z","avatar_url":"https://github.com/nicolasff.png","language":"Shell","funding_links":[],"categories":["General"],"sub_categories":["Cassandra Deployment"],"readme":"Docker setup for Apache Cassandra\n=================================\n\nThis repository contains a set of scripts and configuration files to run a Cassandra cluster\nfrom [Docker](https://www.docker.io/) containers. The current version of this repository is\nconfigured to create a Cassandra 1.2 or 2.0 image and cluster.\n\nExample:\n\n![Sample session](https://i.imgur.com/pS8twa3.gif)\n\nCassandra nodes are created with their own IP address and configured hostname:\n\n    $ ./start-cluster.sh 2.0.3 3\n    Starting node 1\n    Starting node 2\n    Starting node 3\n    \n    $ ./client.sh 2.0.3 nodetool -h cass1 status\n    Datacenter: datacenter1\n    =======================\n    Status=Up/Down\n    |/ State=Normal/Leaving/Joining/Moving\n    --  Address        Load       Tokens  Owns   Host ID                               Rack\n    UN  192.168.100.3  40.84 KB   256     34.9%  9d4a223f-e80e-4b50-b379-0705b1c8971d  rack1\n    UN  192.168.100.1  38.93 KB   256     33.7%  5128dcb0-14d0-4d17-9b53-acc8f9a0844b  rack1\n    UN  192.168.100.2  30.92 KB   256     31.4%  8e6faaba-601f-4812-a33b-05ceaecf1159  rack1\n\nNote that the nodes might take about 30 seconds to show up as they join the Cassandra ring.\n\nThe shell scripts all assume that you have `sudo` privilege.\n\nGetting started\n---------------\n\n### 1. Check out this repository\n\n    $ git clone https://github.com/nicolasff/docker-cassandra.git\n    $ cd docker-cassandra\n\n### 2. Install pipework\n\nMake sure that the bundled script `pipework` is in your path. You can install it with:\n\n    $ sudo cp install/bin/pipework /usr/bin/\n\nThe latest version is on GitHub at https://github.com/jpetazzo/pipework.\n\n### 3. Create a Docker image for Cassandra\n\nTo create a Cassandra 2.0.3 image and tag it, run:\n\n\t$ make image VERSION=2.0.3\n\nYou should then see it appear in your list of Docker images:\n\n    $ sudo docker images\n    REPOSITORY          TAG                 ID                  CREATED              SIZE\n    cassandra           2.0.3              b9ba84a33bb5        About a minute ago   12.29 kB (virtual 404.7 MB)\n\n    $ ./list-images.sh\n    2.0.3\n\n### 4. Start a cluster\n\nRun `./start-cluster.sh 2.0.3 3` to create a cluster of 3 nodes running Cassandra 2.0.3. They are given an IP address and name each, from `cass1` (`192.168.100.1`) to `cass3` (`192.168.100.3`).\n\nRun `sudo docker ps` to list your Cassandra nodes:\n\n    $ sudo docker ps\n    ID                  IMAGE               COMMAND                CREATED             STATUS              PORTS\n    99d67692f535        cassandra:2.0.3    /usr/bin/start-cassa   10 minutes ago      Up 10 minutes       49332-\u003e9160         \n    fe7e2b13cb9e        cassandra:2.0.3    /usr/bin/start-cassa   10 minutes ago      Up 10 minutes       49331-\u003e9160         \n    f21da380b00c        cassandra:2.0.3    /usr/bin/start-cassa   10 minutes ago      Up 10 minutes       49330-\u003e9160  \n\n### 5. Connect to your cluster\n\nCassandra nodes expose port 9160 for Thrift. Use `sudo docker port \u003ccontainer-id\u003e 9160` or `sudo docker ps` to find the local port it is mapped to.\n\n`client.sh` creates a docker container with access to the Cassandra cluster network (`192.168.100.0/24`). The first client is given the name `cass254`\nwith IP `192.168.100.254`, the next one `cass253`, etc. Names are reused when client containers are stopped.\n\n`client.sh` runs any command that is passed to it, e.g. `nodetool`, `cassandra-cli`, `cqlsh`... You can also open a shell with `./client.sh 2.0.3 bash`.\n\n### 6. Terminate your cluster\n\n\t$ ./stop-cluster.sh 2.0.3\n    Killing and removing containers 99d67692f535 fe7e2b13cb9e f21da380b00c\n    \n    $ sudo docker ps\n    ID                  IMAGE               COMMAND             CREATED             STATUS              PORTS\n\nLicensing and contributions\n---------------------------\n\nThis set of scripts and configuration files is released under the [Apache 2.0 License](https://github.com/nicolasff/docker-cassandra/blob/master/LICENSE).\n`pipework` is Copyright 2013 [Jérôme Petazzoni](https://github.com/jpetazzo) and distributed under the Apache 2.0 license.\n\nContributions and suggestions welcome [on GitHub](https://github.com/nicolasff/docker-cassandra/issues) or [on Twitter](https://twitter.com/yowgi).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicolasff%2Fdocker-cassandra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnicolasff%2Fdocker-cassandra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicolasff%2Fdocker-cassandra/lists"}