Skip to content
This repository has been archived by the owner on Oct 23, 2019. It is now read-only.

Load the correct version of the schema into zipkin-cassandra #33

Merged
merged 1 commit into from
Aug 30, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion cassandra/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:sid
FROM openzipkin/zipkin-base:1.2.2
MAINTAINER OpenZipkin "http://zipkin.io/"

ADD install.sh /usr/local/bin/install
Expand Down
16 changes: 13 additions & 3 deletions cassandra/install.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#!/bin/bash

set -eu

echo "*** Adding Cassandra deb source"
cat << EOF >> /etc/apt/sources.list
deb http://www.apache.org/dist/cassandra/debian 21x main
Expand All @@ -10,19 +14,25 @@ gpg --export --armor 749D6EEC0353B12C | apt-key add -

echo "*** Installing Cassandra"
apt-get update
apt-get install -y cassandra procps wget
# adduser, python and python-support are dependencies of cassandra
# we'll install cassandra without dependency checks to use the JRE 8 provided by the base image
# otherwise it'd pull in JRE 7
apt-get install -y procps wget adduser python>=2.7 python-support>=0.90.0
apt-get download cassandra
dpkg --force-depends -i cassandra*.deb
rm cassandra*.deb

echo "*** Starting Cassandra"
sed -i s/Xss180k/Xss256k/ /etc/cassandra/cassandra-env.sh
/usr/sbin/cassandra
sleep 10

echo "*** Importing Scheme"
wget https://raw.githubusercontent.com/openzipkin/zipkin/master/zipkin-cassandra-core/src/main/resources/cassandra-schema-cql3.txt
wget https://raw.githubusercontent.com/openzipkin/zipkin/$ZIPKIN_VERSION/zipkin-cassandra-core/src/main/resources/cassandra-schema-cql3.txt
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the important part

cqlsh --debug -f cassandra-schema-cql3.txt localhost

echo "*** Stopping Cassandra"
killall java
pkill -f java
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't have killall, but we do have pkill.


mv /etc/cassandra/cassandra.yaml /etc/cassandra/cassandra.default.yaml

Expand Down