Skip to content

Instantly share code, notes, and snippets.

View minyk's full-sized avatar
😀
Containerize! all the things!

Drake Youngkun Min minyk

😀
Containerize! all the things!
View GitHub Profile
@minyk
minyk / marathon.json
Created September 12, 2017 01:51
DC/OS External Volume Test
{
"id": "/drake/volumetest",
"backoffFactor": 1.15,
"backoffSeconds": 1,
"constraints": [
[
"hostname",
"LIKE",
"192.10.250.234"
]
@minyk
minyk / dcos-container-metrics.json
Last active July 20, 2017 02:13
dcos-container-metrics
{
"datapoints":[
{"name":"cpus.limit","value":1.1,"unit":"count","timestamp":"2017-07-20T02:00:34.11517831Z","tags":{"container_id":"e6c0b967-fa45-42f1-8b2c-d979f1ddf8bf","executor_id":"ceph.mon.598f9b7e-3931-4b39-86e7-1b4607001ea7","executor_name":"Command Executor (Task: ceph.mon.598f9b7e-3931-4b39-86e7-1b4607001ea7) (Command: sh -c '\necho \"$CEPH...')","framework_id":"ab856169-0aa1-4d11-ae56-0da524f8b70b-0012","source":"ceph.mon.598f9b7e-3931-4b39-86e7-1b4607001ea7"}},
{"name":"cpus.throttled.time","value":0,"unit":"seconds","timestamp":"2017-07-20T02:02:34.412170697Z","tags":{"container_id":"e6c0b967-fa45-42f1-8b2c-d979f1ddf8bf","executor_id":"ceph.mon.598f9b7e-3931-4b39-86e7-1b4607001ea7","executor_name":"Command Executor (Task: ceph.mon.598f9b7e-3931-4b39-86e7-1b4607001ea7) (Command: sh -c '\necho \"$CEPH...')","framework_id":"ab856169-0aa1-4d11-ae56-0da524f8b70b-0012","source":"ceph.mon.598f9b7e-3931-4b39-86e7-1b4607001ea7"} },
{"name":"net.tx.errors","value":0,"unit":"count","timesta
@minyk
minyk / metronome.json
Created July 11, 2017 00:48
iperf3 test
{
"id": "iperf3-test",
"description": "iperf3 network test",
"labels": {},
"run": {
"cpus": 1,
"mem": 128,
"disk": 0,
"env": {
"IPERF_MODE": "client",
@minyk
minyk / Dockerfile
Created July 6, 2017 05:16
DC/OS Overlay Network Iperf3 Test
FROM alpine:3.6
RUN set -ex && \
apk upgrade --update && \
apk add --no-cache --update libstdc++ curl ca-certificates bash iperf3
ADD entrypoint.sh /entrypoint.sh
ENV IPERF_MODE server
ENV IPERF_PORT 5201
@minyk
minyk / a1.log
Last active April 18, 2017 05:45
dcos-navstar.log
Apr 18 01:38:22 a1.dcos systemd[1]: Started Navstar: A distributed systems & network overlay orchestration engine.
Apr 18 01:38:22 a1.dcos navstar-env[6270]: Exec: /opt/mesosphere/packages/navstar--1128db0234105a64fb4be52f4453cd6aa895ff30/navstar/erts-8.2.2/bin/erlexec -noshell -noinput +Bd -boot /opt/mesosphere/packa
Apr 18 01:38:22 a1.dcos navstar-env[6270]: Root: /opt/mesosphere/packages/navstar--1128db0234105a64fb4be52f4453cd6aa895ff30/navstar
Apr 18 01:38:22 a1.dcos navstar-env[6270]: /opt/mesosphere/packages/navstar--1128db0234105a64fb4be52f4453cd6aa895ff30/navstar
Apr 18 01:38:22 a1.dcos navstar-env[6270]: Setup running ...
Apr 18 01:38:22 a1.dcos navstar-env[6270]: Directories verified. Res = {[ok],[]}
Apr 18 01:38:22 a1.dcos navstar-env[6270]: Setup finished processing hooks ...
Apr 18 01:38:28 a1.dcos navstar-env[6270]: [warning] <0.780.0> lager_error_logger_h dropped 99 messages in the last second that exceeded the limit of 50 messages/sec
Apr 18 01:38:31 a1.dcos navstar-env[6270]: [warning] <0.931
@minyk
minyk / plugin-agent.log
Last active April 13, 2017 14:13
DC/OS metrics prometheus plugins
time="2017-04-13T17:23:06+09:00" level=info msg="Getting metrics from metrics service" plugin=default
time="2017-04-13T17:23:06+09:00" level=info msg="Setting plugin endpoints for role agent" plugin=default
time="2017-04-13T17:23:06+09:00" level=info msg="Discovered new container endpoint /system/v1/metrics/v0/containers/cb1dcfd0-a808-4342-87da-2d077f1db35b" plugin=default
time="2017-04-13T17:23:06+09:00" level=info msg="Discovered new container endpoint /system/v1/metrics/v0/containers/10b2e953-a929-4399-9ee6-bbdfef66876f" plugin=default
time="2017-04-13T17:23:06+09:00" level=info msg="Discovered new container endpoint /system/v1/metrics/v0/containers/e83c928c-e72a-4b94-9fd6-0cd5cbf299b8" plugin=default
time="2017-04-13T17:23:06+09:00" level=info msg="Discovered new container endpoint /system/v1/metrics/v0/containers/9655954a-dcd6-471c-9a7d-cfbb19bd1344" plugin=default
time="2017-04-13T17:23:06+09:00" level=info msg="Discovered new container endpoint /system/v1/metrics/v0/containers/a607ab0b-44cd-406b-a64b-f
@minyk
minyk / etcd-viewer.json
Created April 13, 2017 00:51
DC/OS 1.8.8 app json file.
{
"id": "/etcd-viewer",
"env": {
"TZ": "Asia/Seoul",
"ETCD_CLIENT_URL": "http://etcd-server-oyi7a-s2.etcd-erp-prod.mesos:1026/"
},
"cpus": 1,
"mem": 2048,
"container": {
"docker": {
@minyk
minyk / config-1.8.8.yaml
Created April 13, 2017 00:46
DC/OS 1.8.8 -> 1.9.0 configs
---
agent_list:
- 192.168.10.229
- 192.168.10.230
- 192.168.10.231
public_agent_list:
- 192.168.10.228
bootstrap_url: http://192.168.10.226:8080
cluster_name: 'dcos.ajway.kr'
exhibitor_storage_backend: static
Apr 06 15:23:24 master.dcos.ajway.kr systemd[1]: Starting Navstar: A distributed systems & network overlay orchestration engine...
Apr 06 15:23:24 master.dcos.ajway.kr check-time[31520]: Checking whether time is synchronized using the kernel adjtimex API.
Apr 06 15:23:24 master.dcos.ajway.kr check-time[31520]: Time can be synchronized via most popular mechanisms (ntpd, chrony, systemd-timesyncd, etc.)
Apr 06 15:23:24 master.dcos.ajway.kr check-time[31520]: Time is in sync!
Apr 06 15:23:24 master.dcos.ajway.kr ping[31524]: PING ready.spartan (127.0.0.1) 56(84) bytes of data.
Apr 06 15:23:24 master.dcos.ajway.kr ping[31524]: 64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.015 ms
Apr 06 15:23:24 master.dcos.ajway.kr ping[31524]: --- ready.spartan ping statistics ---
Apr 06 15:23:24 master.dcos.ajway.kr ping[31524]: 1 packets transmitted, 1 received, 0% packet loss, time 0ms
Apr 06 15:23:24 master.dcos.ajway.kr ping[31524]: rtt min/avg/max/mdev = 0.015/0.015/0.015/0.000 ms
Apr 06 15:23:24 master.dco
@minyk
minyk / find-etcd.sh
Last active April 3, 2017 23:41
Find ETCD host on DC/OS using shell and jq
#!/bin/bash
ETCD_SERVICE_NAME=$1
SRV_RECORDS=`curl -s http://leader.mesos:8123/v1/services/_etcd-server._client.${ETCD_SERVICE_NAME}.mesos`
ETCD_INSTANCES=`echo $SRV_RECORDS | jq '.|length'`
SELECTED_INSTANCE=$(($RANDOM % ${ETCD_INSTANCES} ))
echo ${SRV_RECORDS} | jq --argjson index ${SELECTED_INSTANCE} '[.[$index].host[:40], ":", .[$index].port]|add'