Skip to content

Instantly share code, notes, and snippets.

Loren Siebert loren

Block or report user

Report or block loren

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 SafeStrategy.java
package com.mesosphere.sdk.scheduler.plan.strategy;
import com.mesosphere.sdk.scheduler.plan.Interruptible;
import com.mesosphere.sdk.scheduler.plan.PodInstanceRequirement;
import com.mesosphere.sdk.scheduler.plan.Step;
import java.util.Collection;
import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;
@loren
loren / test_kibana.py
Created May 22, 2017
Once ELASTIC-84 is done
View test_kibana.py
import pytest
import shakedown
import sdk_install as install
import sdk_tasks as tasks
import sdk_utils as utils
from tests.config import (
wait_for_expected_nodes_to_exist,
check_kibana_adminrouter_integration,
DEFAULT_TASK_COUNT,
View test_marathon_constraint.py
@pytest.mark.sanity
@pytest.mark.recovery
def test_change_constraint():
install.uninstall(PACKAGE_NAME)
options = {
"service": {
"spec_file": "examples/marathon_constraint.yml"
},
"hello": {
"count": num_private_agents,
@loren
loren / stdout
Created Mar 20, 2017
Problem with master re-election under ZenDiscovery
View stdout
[2017-03-20T17:16:35,559][TRACE][o.e.d.z.MasterFaultDetection] [master-0-node] [master] [{master-2-node}{3jmeBAXdQlG9McfMB3J3Xg}{Nnyc66TvQCKwyEHQahpwbg}{10.0.0.89}{10.0.0.89:9300}] transport disconnected
[2017-03-20T17:16:35,560][DEBUG][o.e.d.z.MasterFaultDetection] [master-0-node] [master] stopping fault detection against master [{master-2-node}{3jmeBAXdQlG9McfMB3J3Xg}{Nnyc66TvQCKwyEHQahpwbg}{10.0.0.89}{10.0.0.89:9300}], reason [master failure, transport disconnected]
[2017-03-20T17:16:35,562][INFO ][o.e.d.z.ZenDiscovery ] [master-0-node] master_left [{master-2-node}{3jmeBAXdQlG9McfMB3J3Xg}{Nnyc66TvQCKwyEHQahpwbg}{10.0.0.89}{10.0.0.89:9300}], reason [transport disconnected]
[2017-03-20T17:16:35,563][WARN ][o.e.d.z.ZenDiscovery ] [master-0-node] master left (reason = transport disconnected), current nodes: nodes:
{master-2-node}{3jmeBAXdQlG9McfMB3J3Xg}{Nnyc66TvQCKwyEHQahpwbg}{10.0.0.89}{10.0.0.89:9300}, master
{ingest-0-node}{KuOUQ9bIRDquPo9ksxCOsQ}{zcrLSPVFTF2Xt9_v5IK_1w}{10.0.1.11}{10.0.1.11:1
@loren
loren / config_for_es.sh
Created Nov 11, 2016
Make a stock Centos7 install ready to run Elasticsearch 5.0
View config_for_es.sh
#!/bin/bash
cat > /etc/sysctl.d/01-elastic.conf << END
vm.max_map_count=262144
END
cat > /etc/security/limits.d/30-elastic.conf << END
centos - nofile 65536
centos soft memlock unlimited
centos hard memlock unlimited
View marathon.json
{
"id": "haproxy",
"mem": 128,
"cpus": 0.5,
"requirePorts": true,
"instances": 1,
"container": {
"type": "DOCKER",
"docker": {
"network": "HOST",
View haproxy.cfg
defaults
log global
mode tcp
contimeout 50000000
clitimeout 50000000
srvtimeout 50000000
errorfile 400 /etc/haproxy/errors/400.http
errorfile 403 /etc/haproxy/errors/403.http
errorfile 408 /etc/haproxy/errors/408.http
errorfile 500 /etc/haproxy/errors/500.http
@loren
loren / install.sh
Last active Jun 26, 2016
Chef install script with retry logic on dpkg to get around race with unattended upgrades
View install.sh
#!/bin/sh
# WARNING: REQUIRES /bin/sh
#
# - must run on /bin/sh on solaris 9
# - must run on /bin/sh on AIX 6.x
#
# Copyright:: Copyright (c) 2010-2015 Chef Software, Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@loren
loren / iso2.json
Created Mar 8, 2016
sample JSON array of country codes to use as controlled vocabulary
View iso2.json
["DE","UK","US","FR"]
@loren
loren / allow_unmapped_fields.sh
Created Nov 11, 2014
index.query.parse.allow_unmapped_fields setting does not seem to allow unmapped fields in alias filters
View allow_unmapped_fields.sh
# verify we are allowing unmapped fields
curl -s -XGET '/_nodes?pretty=true' | grep allow_unmapped
# "allow_unmapped_fields" : "true"
# delete the index
curl -XDELETE 127.0.0.1:9200/test1
# create index with explicit mapping only for user field
curl -XPUT 127.0.0.1:9200/test1 -d '
{
You can’t perform that action at this time.