Skip to content

Commit

Permalink
Merge pull request #218 from m-lab/sandbox-pboothe
Browse files Browse the repository at this point in the history
Make an experiments library
  • Loading branch information
pboothe authored Jun 4, 2019
2 parents e7e09be + 01a94a5 commit 3532ee8
Show file tree
Hide file tree
Showing 9 changed files with 402 additions and 786 deletions.
54 changes: 1 addition & 53 deletions config/nodeinfo.jsonnet
Original file line number Diff line number Diff line change
@@ -1,55 +1,4 @@
local config = [
{
Datatype: 'lshw',
Filename: 'lshw.json',
Cmd: ['lshw', '-json'],
},
{
Datatype: 'lspci',
Filename: 'lspci.txt',
Cmd: ['lspci', '-mm', '-vv', '-k', '-nn'],
},
{
Datatype: 'lsusb',
Filename: 'lsusb.txt',
Cmd: ['lsusb', '-v'],
},
{
Datatype: 'ipaddress',
Filename: 'ip-address.txt',
Cmd: ['ip', 'address', 'show'],
},
{
Datatype: 'iproute4',
Filename: 'ip-route-4.txt',
Cmd: ['ip', '-4', 'route', 'show'],
},
{
Datatype: 'iproute6',
Filename: 'ip-route-6.txt',
Cmd: ['ip', '-6', 'route', 'show'],
},
{
Datatype: 'uname',
Filename: 'uname.txt',
Cmd: ['uname', '-a'],
},
{
Datatype: 'osrelease',
Filename: 'os-release.txt',
Cmd: ['cat', '/etc/os-release'],
},
{
Datatype: 'biosversion',
Filename: 'bios_version.txt',
Cmd: ['cat', '/sys/class/dmi/id/bios_version'],
},
{
Datatype: 'chassisserial',
Filename: 'chassis_serial.txt',
Cmd: ['cat', '/sys/class/dmi/id/chassis_serial'],
},
];
local config = import 'nodeinfo/config.jsonnet';

{
apiVersion: 'v1',
Expand All @@ -60,5 +9,4 @@ local config = [
metadata: {
name: 'nodeinfo-config',
},

}
52 changes: 52 additions & 0 deletions config/nodeinfo/config.jsonnet
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
[
{
Datatype: 'lshw',
Filename: 'lshw.json',
Cmd: ['lshw', '-json'],
},
{
Datatype: 'lspci',
Filename: 'lspci.txt',
Cmd: ['lspci', '-mm', '-vv', '-k', '-nn'],
},
{
Datatype: 'lsusb',
Filename: 'lsusb.txt',
Cmd: ['lsusb', '-v'],
},
{
Datatype: 'ipaddress',
Filename: 'ip-address.txt',
Cmd: ['ip', 'address', 'show'],
},
{
Datatype: 'iproute4',
Filename: 'ip-route-4.txt',
Cmd: ['ip', '-4', 'route', 'show'],
},
{
Datatype: 'iproute6',
Filename: 'ip-route-6.txt',
Cmd: ['ip', '-6', 'route', 'show'],
},
{
Datatype: 'uname',
Filename: 'uname.txt',
Cmd: ['uname', '-a'],
},
{
Datatype: 'osrelease',
Filename: 'os-release.txt',
Cmd: ['cat', '/etc/os-release'],
},
{
Datatype: 'biosversion',
Filename: 'bios_version.txt',
Cmd: ['cat', '/sys/class/dmi/id/bios_version'],
},
{
Datatype: 'chassisserial',
Filename: 'chassis_serial.txt',
Cmd: ['cat', '/sys/class/dmi/id/chassis_serial'],
},
]
8 changes: 4 additions & 4 deletions config/prometheus/prometheus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ scrape_configs:

relabel_configs:
# node-exporter is scraped in a separate job.
- source_labels: [__meta_kubernetes_pod_label_workload]
regex: (node-exporter|nodeinfo)
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scheme]
regex: https
action: drop

# For inventory, record whether a pod is ready. This helps distinguish
Expand Down Expand Up @@ -228,8 +228,8 @@ scrape_configs:
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token

relabel_configs:
- source_labels: [__meta_kubernetes_pod_label_workload]
regex: (node-exporter|nodeinfo)
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scheme]
regex: https
action: keep

# For inventory, record whether a pod is ready. This helps distinguish
Expand Down
3 changes: 3 additions & 0 deletions k8s/daemonsets/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
We have two kinds of daemonset we want to run on our nodes: Those that make the platform work ([core]) and those which cause an actual researcher's experiment to run ([experiments]).

[templates.json] contains helpful templates for the creation of new daemonsets of both kinds.
Loading

0 comments on commit 3532ee8

Please sign in to comment.