Skip to content

Instantly share code, notes, and snippets.

Alexandre Mclean alexandrem

  • Ubisoft
  • Quebec
Block or report user

Report or block alexandrem

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
View systemd-networkd-restart.log
Dec 18 23:26:25 worker1 systemd-networkd[9517]: Bus bus-api-network: changing state RUNNING → CLOSED
Dec 18 23:26:25 worker1 systemd[1]: Stopping Network Service...
Dec 18 23:26:25 worker1 systemd-networkd[9517]: DHCP CLIENT (0xed9675aa): FREE
Dec 18 23:26:25 worker1 systemd-networkd[9517]: DHCP CLIENT (0xc559887e): FREE
Dec 18 23:26:25 worker1 systemd-networkd[9517]: DHCP CLIENT (0x72d08386): FREE
Dec 18 23:26:25 worker1 systemd-networkd[9517]: DHCP CLIENT (0xf52f8076): FREE
Dec 18 23:26:25 worker1 systemd-networkd[9517]: DHCP CLIENT (0xe4bd18bc): FREE
Dec 18 23:26:25 worker1 systemd-networkd[9517]: DHCP CLIENT (0xf4e3b5f2): FREE
Dec 18 23:26:25 worker1 systemd-networkd[9517]: DHCP CLIENT (0x505a962b): FREE
Dec 18 23:26:26 worker1 systemd[1]: systemd-networkd.service: Succeeded.
@alexandrem
alexandrem / 1_README.md
Created Nov 13, 2018 — forked from superseb/1_README.md
Generate Rancher 2 cluster/node agent definitions
View 1_README.md

Generate Rancher 2 cluster/node agents definitions

This is not official documentation/tooling, use with caution

This generate the Kubernetes definitions of the cattle-cluster-agent Deployment and cattle-node-agent DaemonSet, in case it's accidentally removed/server-url was changed/certficates were changed. It is supposed to run on every cluster Rancher manages. If you have custom clusters created in Rancher, see Kubeconfig for Custom clusters created in Rancher how to obtain the kubeconfig to directly talk to the Kubernetes API (as usually it doesn't work via Rancher anymore). For other clusters, use the tools provided by the provider to get the kubeconfig.

IMPORTANT: You get the cluster/node agents definitions from Rancher, and you apply them to the cluster that is created/managed so you need to switch kubeconfig to point to that cluster before applying them.

Running it

@alexandrem
alexandrem / openconnect.sh
Created Feb 11, 2016
osx openconnect with iproute2mac
View openconnect.sh
openconnect --user <user> --script /etc/vpnc/vpnc-script <vpn server>
@alexandrem
alexandrem / ansible-galaxy
Created May 10, 2015
ansible-galaxy with development mode
View ansible-galaxy
#!/usr/bin/env python
########################################################################
#
# (C) 2013, James Cammarata <jcammarata@ansible.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@alexandrem
alexandrem / init.coffee
Created May 8, 2015
Atom Editor - Default ansible syntax for .yml
View init.coffee
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
View include_vars_merged

#Why? Current version of Ansible (1.7.1) does not merge hashes in the include_vars task even if told so via hash_behaviour = merge in your ansible.cfg. https://github.com/ansible/ansible/issues/9116

This action plugin will merge hashes no matter how you have configured your hash_behaviour.

#Compatibility Tested on Ansible 1.9.0.1

#Updates

  • Now works both for explicit inventory hosts and aliases (e.g ansible_ssh_host)
@alexandrem
alexandrem / gist:60018eb0428da7e713da
Created May 5, 2014
graphite-ng test metrics error
View gist:60018eb0428da7e713da
writing to template {1399232203 1399318603 [{test.metric2 ReadMetric("test.metric2")} {derivative(test.metric1) functions.ProcessDerivative(
ReadMetric("test.metric1"))}]}
executing: go run executor-5577006791947779410.go data.go
stdout:
sterr: # command-line-arguments
./executor-5577006791947779410.go:21: cannot use config (type "_/root/go/src/github.com/graphite-ng/graphite-ng/config".Main) as type "github.com/graphite-ng/graphite-ng/config".Main in function argument
./executor-5577006791947779410.go:30: cannot use ReadMetric("test.metric2") (type "github.com/graphite-ng/graphite-ng/chains".ChainEl) as type "_/root/go/src/github.com/graphite-ng/graphite-ng/chains".ChainEl in assignment
./executor-5577006791947779410.go:34: cannot use dep_el (type "_/root/go/src/github.com/graphite-ng/graphite-ng/chains".ChainEl) as type "github.com/graphite-ng/graphite-ng/chains".ChainEl in function argument
./executor-5577006791947779410.go:40: cannot use functions.ProcessDerivative(ReadMetric("test.metric1")) (type "githu
@alexandrem
alexandrem / Debug output from logstash
Created Nov 19, 2012
Logstash filter using grok and multiline
View Debug output from logstash
{"@source"=>"rendez-vous", "@tags"=>["multiline"], "@fields"=>{"thread_id"=>["2812"], "pid"=>["42122"], "loglevel"=>["DEBUG"]}, "@timestamp"=>"2012-11-19T16:39:22.302Z", "@source_host"=>"devsandbox", "@source_path"=>"/", "@message"=>"TrackingService::SendTag(), eventName = screenpagenavig, eventData = ", "@type"=>"rendezvous"}
You can’t perform that action at this time.