Introduction to Cassandra
Deploy Cassandra as a docker container in Bluemix:
- If it hasn't been done already, you need to sign up for Bluemix account and create an organization/space. There are plenty of tutorials in the internet to do so. It should be an easy straight-forward step.
- Login and select your organization/space that was created in the first step using the below terminal command:
cf login
- Install the bluemix container "cf ic" terminal plugin using the below terminal command:
cf install-plugin https://static-ice.ng.bluemix.net/ibm-containers-mac
- Create a namespace:
cf ic namespace set <namespace_name>
- Prepare the container plugins "cf ic":
cf ic init
- Copy the cassandra official docker image to bluemix:
cf ic cpi cassandra:latest registry.ng.bluemix.net/<namespace_name>/cassandra:latest
- Confirm that the image copied:
cf ic images
- Run the cassandra docker container in bluemix:
cf ic run --name cassandra -p 9042:9042 -d registry.ng.bluemix.net/<namespace_name>/cassandra:latest
- Confirm that the container is running:
cf ic ps
- Request a public IP address from Bluemix:
cf ic ip request
- Bind the created IP address to the running cassandra container:
cf ic ip bind <IP_Address> cassandra
- Confirm that cassandra container is up and running and test it with some queries using cqlsh:
cf ic exec -it cassandra bash
cqlsh
- After executing all the above steps, you should be able to see the container running in bluemix as shown below:
No comments:
Post a Comment