Skip to content

Instantly share code, notes, and snippets.

View rodrickbrown's full-sized avatar

Rodrick Brown rodrickbrown

View GitHub Profile
#!/usr/bin/env python3
# Simple Script to check Std Dev offset
# of ntp servers
def checkStdDev(ntpsd: dict) -> None:
hostnames = ntpsd.keys()
for host in hostnames:
for loglines in ntpsd[host]:
logvalues = [ float(x) for x in loglines[2:len(loglines)] ]
#!/usr/bin/env python3
# Simple Script to check Std Dev offset
# of ntp servers
def checkStdDev(ntpsd: dict) -> None:
hostnames = ntpsd.keys()
for host in hostnames:
for loglines in ntpsd[host]:
logvalues = [ float(x) for x in loglines[2:len(loglines)] ]
#!/bin/bash
source_cluster=es-eks.npe-estest-euw1.euw1.rms-npe-internal.com
target_cluster=es-eks2.npe-estest-euw1.euw1.rms-npe-internal.com
# We need to set reindex.remote.whitelist in elasticsearch.yml on the new cluster
# reindex.remote.whitelist: oldhost:9200
indexes=$(http -a elastic:xxxxxxx http://${source_cluster}/_cat/indices | awk '/green/ { print $3 }')
locals {
m_vpc_id = "vpc-7a9ab71c"
region = "us-west-2"
stack = "npe"
env = "dev"
azs = "3"
mgmt_eks_role = "EKSWorker-mgmt-ri"
mgmt_cidr = "10.99.0.0/16"
plan = "large"
{
"variables": {
"platform_name": "CentOS",
"platform_version": "7"
},
"builders": [{
"type": "amazon-ebs",
"name": "HVM AMI builder",
"region": "us-west-2",
"source_ami": "ami-0c2aba6c",
[2018-01-18 18:18:15,976] INFO --------------------- (org.apache.mesos.chronos.scheduler.Main$:26)
[2018-01-18 18:18:16,058] INFO Initializing chronos. (org.apache.mesos.chronos.scheduler.Main$:27)
[2018-01-18 18:18:16,059] INFO --------------------- (org.apache.mesos.chronos.scheduler.Main$:28)
[2018-01-18 18:18:21,662] INFO Wiring up the application (org.apache.mesos.chronos.scheduler.config.MainModule:39)
[2018-01-18 18:18:23,764] INFO Starting (org.apache.curator.framework.imps.CuratorFrameworkImpl:235)
[2018-01-18 18:18:23,770] INFO Client environment:zookeeper.version=3.4.6-1569965, built on 02/20/2014 09:09 GMT (org.apache.zookeeper.ZooKeeper:100)
[2018-01-18 18:18:23,770] INFO Client environment:host.name=acfe7d019e4c (org.apache.zookeeper.ZooKeeper:100)
[2018-01-18 18:18:23,771] INFO Client environment:java.version=9-internal (org.apache.zookeeper.ZooKeeper:100)
[2018-01-18 18:18:23,771] INFO Client environment:java.vendor=Oracle Corporation (org.apache.zookeeper.ZooKeeper:100)
[2018-01-18 18:18:23,7
@rodrickbrown
rodrickbrown / chronos.json
Last active January 18, 2018 18:19
chronos marathon configuration
{
"id": "/chronos",
"user": "root",
"cmd": "chronos run_jar --zk_hosts master0.prod.mesos:2181,master1.prod.mesos:2181,master2.prod.mesos:2181 --master zk://master0.prod.mesos:2181,master1.prod.mesos:2181,master2.prod.mesos:2181/mesos --mesos_framework_name chronos --hostname chronos.marathon.prod.mesos --zk_timeout 10000 --http_port $PORT0",
"cpus": 0.5,
"mem": 512,
"instances": 1,
"constraints": [
[
"hostname", "UNIQUE"
[2018-01-18 18:01:04,559] INFO Socket connection established to ip-172-24-3-202.us-west-2.compute.internal/172.24.3.202:2181, initiating session (org.apache.zookeeper.ClientCnxn:852)
[2018-01-18 18:01:04,566] INFO Session establishment complete on server ip-172-24-3-202.us-west-2.compute.internal/172.24.3.202:2181, sessionid = 0x160f5f7e4c4000d, negotiated timeout = 40000 (org.apache.zookeeper.ClientCnxn:1235)
[2018-01-18 18:01:04,570] INFO State change: CONNECTED (org.apache.curator.framework.state.ConnectionStateManager:228)
[2018-01-18 18:01:06,564] INFO Adding HTTP support. (mesosphere.chaos.http.HttpModule:47)
[2018-01-18 18:01:06,565] INFO No HTTPS support configured. (mesosphere.chaos.http.HttpModule:50)
[2018-01-18 18:01:06,660] INFO Trying to become leader. (org.apache.mesos.chronos.scheduler.jobs.JobScheduler:584)
[2018-01-18 18:01:06,662] INFO jetty-8.y.z-SNAPSHOT (org.eclipse.jetty.server.Server:272)
[2018-01-18 18:01:07,465] INFO Registering com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider as
I0118 16:50:08.367775 1831 exec.cpp:162] Version: 1.4.1
I0118 16:50:08.370815 1836 exec.cpp:237] Executor registered on agent f9eb53b4-b3dd-4731-a44c-7f1e39139d67-S0
I0118 16:50:08.371297 1839 executor.cpp:120] Registered docker executor on prod-mesos-slave-02.aws.octanelending.com
I0118 16:50:08.371737 1834 executor.cpp:160] Starting task chronos.a3533c6a-fc6f-11e7-b776-0672876902ca
2018-01-18 16:50:18,669:1(0x7fa1ce7fc700):ZOO_INFO@log_env@726: Client environment:zookeeper.version=zookeeper C client 3.4.8
2018-01-18 16:50:18,669:1(0x7fa1ce7fc700):ZOO_INFO@log_env@730: Client environment:host.name=47c84029ace5
2018-01-18 16:50:18,669:1(0x7fa1ce7fc700):ZOO_INFO@log_env@737: Client environment:os.name=Linux
2018-01-18 16:50:18,669:1(0x7fa1ce7fc700):ZOO_INFO@log_env@738: Client environment:os.arch=3.10.0-693.5.2.el7.x86_64
2018-01-18 16:50:18,669:1(0x7fa1ce7fc700):ZOO_INFO@log_env@739: Client environment:os.version=#1 SMP Fri Oct 20 20:32:50 UTC 2017
2018-01-18 16:50:18,669:1(0x7fa1ce7fc700):ZOO_INFO@log_en
@rodrickbrown
rodrickbrown / rds-stop-start-instance.sh
Last active November 16, 2022 15:21
rds stop start script
#!/bin/bash
function start-stopRDSInstance {
case ${1} in
stop)
action=stop
;;
start)
action=start
;;