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
1 #!/usr/bin/env ruby | |
2 # | |
3 # a test for a poll creation, with new members. | |
4 # | |
5 require 'rubygems' | |
6 require 'icontrol' | |
7 | |
8 # you want this in a yaml or json somewhere | |
9 IControl.config[:user] = 'blash' | |
10 IControl.config[:password] = 'balablah' |
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 ruby | |
# | |
# Zabbix library, | |
# to facilitate interaction with Zabbix API. | |
# make sure the the apiuser has permittion on the objects you are trying to manipulate, it took me an hour to figure out why my results return empty arrays. | |
require "net/https" | |
require "json" | |
require "resolv" |
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 ruby | |
# | |
# | |
# In this script we'll add each node we have in | |
require "zbx_api.rb" | |
require 'chef' | |
zbx = Lvp::Zbx.new | |
# lets get the list of groups and templates: |
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
Custom runner: cs | |
... | |
def meta_get(name, node_keys): | |
log.debug('Requested keys for meta_get: {0}'.format(node_keys)) | |
cs_node = _get_cs_node(name) | |
if not cs_node: | |
log.debug('{0} CS node is missing, returning values as "unknown"\ | |
'.format(name)) | |
data = {k: 'unknown' for k in node_keys} | |
return data |
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
from reactor: | |
start_container: | |
runner.lxc.init: | |
- host: salt-master | |
- arg: | |
- lxc-test | |
- kwarg: | |
template: ubuntu | |
start: true | |
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
in top.sls file | |
... | |
{% set roles = salt['grains.get']('roles', []) %} | |
{% for role in roles -%} | |
- {{ role }} | |
{% endfor %} | |
... | |
#!pyobjects | |
# salt://roles/init.sls |
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
/* | |
Copyright 2016 The Rook Authors. All rights reserved. | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |
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
apiVersion: rook.io/v1alpha1 | |
kind: Cluster | |
metadata: | |
name: rook-eval | |
namespace: rook | |
spec: | |
versionTag: v0.5.1 | |
dataDirHostPath: "/var/lib/docker/rook-eval" | |
storage: | |
useAllNodes: true |
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
$ kubectl get nodes | |
NAME STATUS AGE VERSION | |
ip-172-20-37-102.us-west-2.compute.internal Ready 1m v1.7.0 | |
ip-172-20-46-42.us-west-2.compute.internal Ready 1m v1.7.0 | |
ip-172-20-60-92.us-west-2.compute.internal Ready 1m v1.7.0 | |
ip-172-20-61-88.us-west-2.compute.internal Ready 3m v1.7.0 |
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
$ kubectl create --filename=rook-cluster.yaml | |
cluster "rook-eval" created | |
$ kubectl get pods --namespace rook | |
NAME READY STATUS RESTARTS AGE | |
rook-api-3588729152-s0dxw 1/1 Running 0 46s | |
rook-ceph-mgr0-1957545771-bsg7h 1/1 Running 0 46s | |
rook-ceph-mon0-t1m3z 1/1 Running 0 1m | |
rook-ceph-mon1-mkdl4 1/1 Running 0 1m | |
rook-ceph-mon2-bv1qk 1/1 Running 0 1m | |
rook-ceph-osd-0027l 1/1 Running 0 46s |
OlderNewer