Skip to content

Instantly share code, notes, and snippets.


Bekir Dogan bergerx

Block or report user

Report or block bergerx

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

Keybase proof

I hereby claim:

  • I am bergerx on github.
  • I am bergerx ( on keybase.
  • I have a public key ASDOFqkSX0xxXCA1uPCCcSyaU-4aAQVdJoskMG0FPGGfCgo

To claim this, I am signing this object:

bergerx / metrics-aggregate
Created Feb 10, 2018
sensu-plugins-sensu use-generic-metrics-classes
View metrics-aggregate
# removed some "Broken pipe" error messages for clarity, which are caused by "head; kill"
[dcos-infra]sensu-plugins-sensu: (master *+ u=) $ set -x; for i in json graphite statsd dogstatsd influxdb; do { head; kill "$$"; } < <(bundle exec bin/metrics-aggregate.rb --metric_format $i); done; set +x
+ for i in json graphite statsd dogstatsd influxdb
+ head
++ bundle exec bin/metrics-aggregate.rb --metric_format json
bergerx /
Last active Nov 23, 2017
AWS tags as DC/OS agent attributes

We use this service to populate Agent attributes to DC/OS agent nodes during first boot.

This service populates the tags only during first boot and doesn't trigger changes afterwards, since Mesos Agent config change forces the agent to be re-bootstrapped.

bergerx /
Created Nov 23, 2017
mesos-graceful-shutdown for running DCOS nodes in ASG

Shut mesos down gracefully only when the node is shutting down but NOT rebooting.

A clean shutdown will cause the tasks that were scheduled on this node to be rescheduled to another node. Since a rebooting node will return to the cluster shortly, it's better to leave the rebooting node in an unhealthy state so that its tasks continue running on it when it rejoins the cluster.

This has particular importance when you manage your nodes in AWS autoscale groups. When scaling an ASG down you'll find stale agents around.

View gist:6ecd9e7fb2cc6b5c5f26fede5397d7de
1. cluster-level metrics and health (mesos-master, mesos-slave,
marathon, marathon-lb, mesos-dns, kafka ...)
Metrics for cluster components like mesos-master, mesos-slave,
frameworks (DC/OS services like zookeeper, marathon, marathon-lb,
mesos-dns, kafka,...).
These will be used to troubleshoot any problems at cluster-level.
Having each component's version as a metric label could help with
View gist:e8b20a2fbd3c47074bf5861b7e2fa598
items --> [1,2,3,4]
iter(items) --> <listiterator at 0x7f4d642273d0>
(iter(items) ) --> <listiterator at 0x7f4d64227690>
(iter(items), ) --> (<listiterator at 0x7f4d64227690>,)
(iter(items), ) * 2 --> (<listiterator at 0x7f4d64227590>, <listiterator at 0x7f4d64227590>)
zip(* (iter(items),)*2 ) --> zip(<listiterator at 0x7f4d64227590>, <listiterator at 0x7f4d64227590>)
bergerx / gist:46e226ceb385e28aa695e7d48c4b1ec4
Created Jul 27, 2016
Recent OpenShift Rleases as of 2016-07-27
View gist:46e226ceb385e28aa695e7d48c4b1ec4
2016-07-20 enterprise -- RHBA-2016:1466 - OpenShift Enterprise security and bug fix update
2016-07-14 origin v1.2.1
2016-07-05 enterprise -- RHBA-2016:1383 - OpenShift Enterprise bug fix and enhancement update
2016-06-27 enterprise -- RHBA-2016:1343 - OpenShift Enterprise bug fix and enhancement update (Docker 1.10 Now Supported) only manual upgrades are possible from 3.2.x
2016-06-21 origin v1.3.0-alpha.2
2016-06-07 enterprise -- RHBA-2016:1208 - atomic-openshift-utils Bug Fix Update
bergerx / main.yml
Created Jul 5, 2016
A sample for managing containers on ubuntu using ansible
View main.yml
- name: prepare calico-node upstart service file
template: src=roles/docker/templates/upstart-docker-instance.j2.j2 dest="/etc/init/{{ item.service_name }}.conf"
- service
- calico
- service_name: calico-node
docker_name: calico-node
docker_run: >
/usr/bin/docker run --rm \
bergerx / gist:d6a8fb52a7ed92cfb159
Last active Aug 29, 2015
own no-ip service with route53
View gist:d6a8fb52a7ed92cfb159
sudo pip install awscli
mkdir ~/.aws
cat <<EOF > credentials
aws_access_key_id = AKIA***
aws_secret_access_key = ***
cat <<EOF > bin/update-ev-bdgn-net
bergerx / ubuntu-airport-unlimited--wireless-connection
Last active Aug 29, 2015
resete mac address for airport wifi restriction
View ubuntu-airport-unlimited--wireless-connection
sudo ifconfig wlan0 down
/usr/bin/nmcli nm wifi off
sudo macchanger -r wlan0
/usr/bin/nmcli nm wifi on
while ! nmcli nm | grep ' connected'; do sleep 1; done
/home/local/ANT/bekir/bin/Firefox/firefox -P default --private-window
You can’t perform that action at this time.