This commit is contained in:
Tim Daly, Jr 2013-04-23 01:44:53 +00:00
parent 5771d5199b
commit c42249e13d

View File

@ -6,33 +6,33 @@ Tracing Openstack with Tomograph
2. Git clone tomograph
git clone git@github.com:timjr/tomograph.git
cd tomograph
sudo python setup.py develop
git clone git@github.com:timjr/tomograph.git
cd tomograph
sudo python setup.py develop
3. Apply tomograph patches to Openstack:
cd nova; patch -p1 < tomograph/doc/openstack-patches/nova-stable-folsom.patch
cd keystone; patch -p1 < tomograph/doc/openstack-patches/keystone-stable-folsom.patch
cd glance; patch -p1 < tomograph/doc/openstack-patches/glance-stable-folsom.patch
cd glance-client; patch -p1 < tomograph/doc/openstack-patches/glance-client-stable-folsom.patch
cd nova; patch -p1 < tomograph/doc/openstack-patches/nova-stable-folsom.patch
cd keystone; patch -p1 < tomograph/doc/openstack-patches/keystone-stable-folsom.patch
cd glance; patch -p1 < tomograph/doc/openstack-patches/glance-stable-folsom.patch
cd glance-client; patch -p1 < tomograph/doc/openstack-patches/glance-client-stable-folsom.patch
4. Modify the paste config for glance-registry to include the tomograph middleware:
# in glance-registry-paste.ini:
[pipeline:glance-registry]
pipeline = tomo unauthenticated-context registryapp
# in glance-registry-paste.ini:
[pipeline:glance-registry]
pipeline = tomo unauthenticated-context registryapp
[pipeline:glance-registry-keystone]
pipeline = tomo authtoken context registryapp
[pipeline:glance-registry-keystone]
pipeline = tomo authtoken context registryapp
[filter:tomo]
paste.filter_factory = tomograph:Middleware.factory
service_name = glance-registry
[filter:tomo]
paste.filter_factory = tomograph:Middleware.factory
service_name = glance-registry
5. Restart Openstack and boot a VM. You should see log messages from the tomograph logging backend:
2013-04-18 02:02:08,797 INFO tomograph.backends.log Span(trace_id=5731049070570866, parent_id=None, ...
2013-04-18 02:02:08,797 INFO tomograph.backends.log Span(trace_id=5731049070570866, parent_id=None, ...
Viewing Traces in Zipkin
@ -40,25 +40,25 @@ Viewing Traces in Zipkin
1. Set up cassandra, (something like the following):
wget http://mirror.metrocast.net/apache/cassandra/1.2.3/apache-cassandra-1.2.3-bin.tar.gz
tar xvzf apache-cassandra-1.2.3-bin.tar.gz
sudo mkdir /var/lib/cassandra
sudo chmod a+rw /var/lib/cassandra
sudo mkdir /var/log/cassandra
sudo chmod a+rw /var/log/cassandra
apache-cassandra-1.2.3/bin/cassandra &> cassandra-out
wget http://mirror.metrocast.net/apache/cassandra/1.2.3/apache-cassandra-1.2.3-bin.tar.gz
tar xvzf apache-cassandra-1.2.3-bin.tar.gz
sudo mkdir /var/lib/cassandra
sudo chmod a+rw /var/lib/cassandra
sudo mkdir /var/log/cassandra
sudo chmod a+rw /var/log/cassandra
apache-cassandra-1.2.3/bin/cassandra &> cassandra-out
2. Get zipkin and set up its schema:
git clone git://github.com/twitter/zipkin.git
apache-cassandra-1.2.3/bin/cassandra-cli -host localhost -port 9160 -f zipkin/zipkin-cassandra/src/schema/cassandra-schema.txt
git clone git://github.com/twitter/zipkin.git
apache-cassandra-1.2.3/bin/cassandra-cli -host localhost -port 9160 -f zipkin/zipkin-cassandra/src/schema/cassandra-schema.txt
3. Start the zipkin components. Note, you should wait until the build for each component is done before starting the next one, because sbt does not seem to handle multiple builds running in the same directory very well. We use setsid instead of nohup because sbt seems to try to frob the terminal so it gets a SIGTTOU and stops otherwise:
cd zipkin
setsid bin/collector &> collector-out
setsid bin/query &> query-out
setsid bin/web &> web-out
cd zipkin
setsid bin/collector &> collector-out
setsid bin/query &> query-out
setsid bin/web &> web-out
3. Restart Openstack
@ -66,9 +66,9 @@ Viewing Traces in Zipkin
5. View the trace:
visit http://localhost:8080
select rpcrun_instance from the service menu
make sure the time is set to now or later than now
"find traces"
click on the rpcrun_instance trace
visit http://localhost:8080
select rpcrun_instance from the service menu
make sure the time is set to now or later than now
"find traces"
click on the rpcrun_instance trace