Skip to content

adam-stokes/cdk-field-agent

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

CDK Field Agent

Collects data from a CDK deployment for analysis.

Quick start

Download and execute the collect.py script from this repo on a box that has Juju configured such that the current controller and model are pointed at your CDK deployment of interest:

$ wget https://raw.githubusercontent.com/juju-solutions/cdk-field-agent/master/collect.py
$ python3 collect.py
Getting juju status...
Executing debug action on kubernetes-master/0...
Executing debug action on kubernetes-worker/0...
Executing debug action on kubernetes-worker/1...
Executing debug action on kubernetes-worker/2...
Executing debug action on etcd/0...
Executing debug action on etcd/1...
Executing debug action on etcd/2...
Running juju status --format yaml...
Running juju debug-log --replay...
Running juju model-config...
Running juju debug-log -m controller --replay...
Running juju storage --format yaml...
Running juju storage-pools --format yaml...
Running juju config kubernetes-master --format yaml...
Running juju config kubernetes-worker --format yaml...
Running juju config kubeapi-load-balancer --format yaml...
Running juju config etcd --format yaml...
Running juju config easyrsa --format yaml...
Running juju config flannel --format yaml...
Running juju show-status-log -n 10000 easyrsa/0...
Running juju show-status-log -n 10000 etcd/0...
Running juju show-status-log -n 10000 etcd/1...
Running juju show-status-log -n 10000 etcd/2...
Running juju show-status-log -n 10000 kubeapi-load-balancer/0...
Running juju show-status-log -n 10000 kubernetes-master/0...
Running juju show-status-log -n 10000 kubernetes-worker/0...
Running juju show-status-log -n 10000 kubernetes-worker/1...
Running juju show-status-log -n 10000 kubernetes-worker/2...
Results stored in results-2018-05-14-09-09-04.tar.gz.

The resultant archive contains helpful data for debugging CDK issues.

Manual steps

The purpose of CDK Field Agent is to save you the tedium of collecting the data we may need to debug your problems in production. If for some reason things don't proceed smoothly, here's the data collected:

  • debug action output from all kubernetes-master units
    • juju run-action kubernetes-master/0 debug
    • juju show-action-output <action-id>
    • juju scp kubernetes-master/0:<action output result path> .
    • juju run-action kubernetes-master/1 debug
    • ...
  • debug action output from all kubernetes-worker units
  • debug action output from all etcd units
  • juju status --format yaml
  • juju debug-log --replay
  • juju storage --format yaml
  • juju storage-pools --format yaml
  • juju config kubernetes-master --format yaml
  • juju config kubernetes-worker --format yaml
  • juju config kubeapi-load-balancer --format yaml
  • juju config etcd --format yaml
  • juju config easyrsa --format yaml
  • juju config flannel --format yaml

About

Collects data from a CDK deployment for analysis.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%