git clone https://github.com/gianlucaborello/cassandradump
pip install cassandra-driver
python cassandradump.py --keyspace system --export-file dump.cql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
First in kubernetes, check that we have the secret setup for Ceph: | |
calvin@calvinh-ws:~/Source/canonical-kubernetes-demos/cdk-ceph$ kubectl get secrets | |
NAME TYPE DATA AGE | |
ceph-secret kubernetes.io/rbd 1 14m | |
If this secret does not exist, I can give the steps to create it. Note that this secret needs to be created for every namespace in the cluster you want to use with the Ceph storage. It contains the API key which is used by k8s to interact with Ceph. | |
It is explained here, however: https://github.com/CanonicalLtd/canonical-kubernetes-demos/tree/master/cdk-ceph |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import bz2 | |
import datetime | |
import os | |
import sys | |
import time | |
import urllib2 | |
import warnings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#See: http://daringfireball.net/2010/07/improved_regex_for_matching_urls | |
import re, urllib | |
GRUBER_URLINTEXT_PAT = re.compile(ur'(?i)\b((?:https?://|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:\'".,<>?\xab\xbb\u201c\u201d\u2018\u2019]))') | |
for line in urllib.urlopen("http://daringfireball.net/misc/2010/07/url-matching-regex-test-data.text"): | |
print [ mgroups[0] for mgroups in GRUBER_URLINTEXT_PAT.findall(line) ] | |