<commit_before>Cassandra on Docker
===================

This is a collection of images and scripts to help you run Cassandra in Docker containers.
These images are great to provision ephemeral Cassandra topologies for testing and development purpose.

- Currently supported:
	- A single Cassandra node
	- A client container to run tools such as cqlsh, nodetool, etc.
	- A multi-node cluster - running on a single Docker host
	- Monitored cluster using OpsCenter

- Work in progress:
	- A small cluster for production - running on multiple Docker hosts
		- The missing puzzle piece here is how to expose Cassandra on the real outside network so that peers running on different hosts can connect.

If you'd like to help, please get in touch with me, and/or send me pull requests.


Prerequisites
-------------

- A host running Docker - See https://www.docker.io/gettingstarted/#h_installation
- You need to be able to run the docker command successfully as the currently logged in user. For example:

		$ docker version
		Client version: 0.7.4
    ...
    
- If you're running as a user that can't run docker, add yourself to the docker group, or checkout out the project as root before you proceed. sudo might work too.

- Build the docker and opscenter images (optional)

		./cassandra/build.sh
		./opscenter/build.sh

The last step is optional because Docker will automatically pull the images from [index.docker.io](https://index.docker.io) if you don't already have them. The build process needs an Internet connection, but it is executed only once and then cached on Docker. If you modify the scripts, this is how you can re-build the images with your changes.


Single Cassandra node
---------------------

1. Launch a server called cass1:

		docker run -d -name cass1 poklet/cassandra

	You can also add the `-p 9042:9042` option to bind container's 9042 port (CQL / native transport port) to host's 9042 port.

2. Connect to it using `cqlsh`:

		docker run -i -t poklet/cassandra cqlsh $(./scripts/ipof.sh cass1) 

You should see something like:

	Connected to Test Cluster at 172.17.0.25:9160.
	[cqlsh 4.1.0 | Cassandra 2.0.3 | CQL spec 3.1.1 | Thrift protocol 19.38.0]
	Use HELP for help.
	cqlsh> 

<commit_msg>fix typo<commit_after>Cassandra on Docker
===================

This is a collection of images and scripts to help you run Cassandra in Docker containers.
These images are great to provision ephemeral Cassandra topologies for testing and development purpose.

- Currently supported:
	- A single Cassandra node
	- A client container to run tools such as cqlsh, nodetool, etc.
	- A multi-node cluster - running on a single Docker host
	- Monitored cluster using OpsCenter

- Work in progress:
	- A small cluster for production - running on multiple Docker hosts
		- The missing puzzle piece here is how to expose Cassandra on the real outside network so that peers running on different hosts can connect.

If you'd like to help, please get in touch with me, and/or send me pull requests.


Prerequisites
-------------

- A host running Docker - See https://www.docker.io/gettingstarted/#h_installation
- You need to be able to run the docker command successfully as the currently logged in user. For example:

		$ docker version
		Client version: 0.7.4
    ...
    
- If you're running as a user that can't run docker, add yourself to the docker group, or checkout out the project as root before you proceed. sudo might work too.

- Build the cassandra and opscenter images (optional)

		./cassandra/build.sh
		./opscenter/build.sh

The last step is optional because Docker will automatically pull the images from [index.docker.io](https://index.docker.io) if you don't already have them. The build process needs an Internet connection, but it is executed only once and then cached on Docker. If you modify the scripts, this is how you can re-build the images with your changes.


Single Cassandra node
---------------------

1. Launch a server called cass1:

		docker run -d -name cass1 poklet/cassandra

	You can also add the `-p 9042:9042` option to bind container's 9042 port (CQL / native transport port) to host's 9042 port.

2. Connect to it using `cqlsh`:

		docker run -i -t poklet/cassandra cqlsh $(./scripts/ipof.sh cass1) 

You should see something like:

	Connected to Test Cluster at 172.17.0.25:9160.
	[cqlsh 4.1.0 | Cassandra 2.0.3 | CQL spec 3.1.1 | Thrift protocol 19.38.0]
	Use HELP for help.
	cqlsh> 


{'fraction_non_alphanumeric': 0.08378378378378379, 'fraction_numerical': 0.02252252252252252, 'mean_word_length': 3.328460038986355, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '34835', 'n_tokens_mistral': 1380, 'n_tokens_neox': 1216, 'n_words': 633}