Skip to content

Instantly share code, notes, and snippets.

Dario Blanco darioblanco

Block or report user

Report or block darioblanco

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@darioblanco
darioblanco / pod-with-anti-affinity.yaml
Created Mar 21, 2019
Example of pod anti affinity with label
View pod-with-anti-affinity.yaml
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: mypod
labels:
app: mypod-app
spec:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
@darioblanco
darioblanco / remediate-zookeeper-proc.json
Created May 30, 2018
Unpublished remediation check
View remediate-zookeeper-proc.json
{
"checks": {
"remediate-zookeeper-proc": {
"command": "sudo supervisorctl restart zookeeper",
"handlers": [],
"subscribers": ["zookeper"],
"standalone": false,
"publish": false
}
}
@darioblanco
darioblanco / check-zookeeper-proc.json
Created May 30, 2018
Zookeeper check with remediation
View check-zookeeper-proc.json
{
"checks": {
"check-zookeeper-proc": {
"command": "/etc/sensu/plugins/check-procs.rb -p '/usr/share/java/zookeeper.jar'",
"interval": 60,
"occurrences": 2,
"handlers": ["default", "remediator"],
"subscribers": ["zookeeper"],
"standalone": false,
"remediation": {
@darioblanco
darioblanco / remediator.json
Created May 30, 2018
Example of remediation handler config in /etc/sensu/conf.d/handlers/remediator.json
View remediator.json
{
"handlers": {
"remediator": {
"command": "/etc/sensu/handlers/sensu.rb",
"type": "pipe",
"severities": ["critical"]
}
}
}
@darioblanco
darioblanco / client.json
Created May 30, 2018
Client configuration
View client.json
{
"client": {
"name": "myhost.foo.var.com",
"address": "192.168.1.1",
"subscriptions": [
"myhost.foo.var.com"
]
}
}
@darioblanco
darioblanco / check-zookeeper-proc.json
Created May 30, 2018
Example of server check config in /etc/sensu/conf.d/checks/check-zookeeper-proc.json
View check-zookeeper-proc.json
{
"checks": {
"check-zookeeper-proc": {
"command": "/etc/sensu/plugins/check-procs.rb -p '/usr/share/java/zookeeper.jar'",
"interval": 60,
"occurrences": 2,
"handlers": ["default"],
"subscribers": ["zookeeper"]
}
}
@darioblanco
darioblanco / rabbitmq.config
Last active May 30, 2018
Example of rabbitmq/templates/rabbitmq.config for clustering
View rabbitmq.config
[
{rabbit, [
{cluster_nodes, {['rabbit@mynode1', 'rabbit@mynode2'], disc}},
{cluster_partition_handling, ignore},
{default_user, <<"guest">>},
{default_pass, <<"guest">>}
]},
{kernel, [
{inet_dist_listen_max, 44001},
{inet_dist_listen_min, 44001}
View deploy.yml
---
platform: linux
image: docker:///concourse/concourse-ci
inputs:
- name: release
- name: final-release
outputs:
View integration-suite-task.yml
platform: linux
image: docker:///busybox
run:
path: echo
args: [Integration suite successfully executed]
You can’t perform that action at this time.