This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir ~/.simple-tpm-pk11 | |
stpm-keygen -p -o ~/.simple-tpm-pk11/$USER.key | |
echo "key $USER.key" > ~/.simple-tpm-pk11/config | |
ssh-keygen -D /lib64/libsimple-tpm-pk11.so > "~/.ssh/$USER.pub" | |
ssh-keygen -D /usr/lib/x86_64-linux-gnu/libsimple-tpm-pk11.so > "~/.ssh/$USER.pub" (ubuntu) | |
cat <<EOF > ~/.ssh/config | |
Host * | |
PKCS11Provider libsimple-tpm-pk11.so | |
EOF |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
force=0 | |
function getInstanceIdByEnvTag { | |
export instance_ids=$(aws ec2 describe-instances --filter Name=tag:Environment,Values=${environment} | jq '.Reservations[].Instances[].InstanceId' | tr -d '"') | |
echo "The following instances with Tag:${environment} will be stopped" | |
for instance in ${instance_ids[@]}; | |
do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Color(DefaultColor): | |
USERNAME_FG = 15 | |
USERNAME_BG = 4 | |
USERNAME_ROOT_BG = 1 | |
HOSTNAME_FG = 15 | |
HOSTNAME_BG = 8 | |
HOME_SPECIAL_DISPLAY = True | |
PATH_FG = 7 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
from requests.packages.urllib3.exceptions import InsecureRequestWarning | |
requests.packages.urllib3.disable_warnings(InsecureRequestWarning) | |
import json | |
import time | |
from checks import AgentCheck | |
from hashlib import md5 | |
class OMSServiceCheck(AgentCheck): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import urllib | |
import json | |
from checks import AgentCheck | |
from hashlib import md5 | |
class AccumuloCheck(AgentCheck): | |
def check(self, instance): | |
if 'host' not in instance: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ $ egrep run_jar roles/microservice/tasks/main.yml | |
template: src=run_jar.sh.j2 dest={{ orch_svc_base_dir }}/bin/run_jar.sh owner={{ orchard_service_user }} group={{ orchard_service_group }} mode=0755 | |
$ cat roles/microservice/templates/run_jar.sh.j2 | |
#!/bin/env bash | |
# {{ ansible_managed }} | |
{% if orch_svc_main_class == 'com.orchard.noteserver.NoteServer' %} | |
EC2_REGION="`echo \"$EC2_AVAIL_ZONE\" | sed -e 's:\([0-9][0-9]*\)[a-z]*\$:\\1:'`" | |
{% endif %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"id": "/production/haproxy/marathon-lb-test", | |
"args": [ "-s", "--group", "production", "-m", "prod-mesos-m-1.aws.orchardplatform.com:8080", "--health-check" ], | |
"cpus": 0.5, | |
"mem": 4096, | |
"instances": 1, | |
"constraints": [ | |
[ | |
"hostname","UNIQUE" | |
], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"id": "/production/haproxy/marathon-lb", | |
"cpus": 0.5, | |
"mem": 4096, | |
"instances": 1, | |
"constraints": [ | |
[ | |
"hostname","UNIQUE" | |
], | |
[ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I0527 12:38:37.445116 51736 exec.cpp:143] Version: 0.28.1 | |
I0527 12:38:37.447388 51749 exec.cpp:217] Executor registered on slave ed03b83f-1696-45ef-b0c9-6d4e0307b5bc-S16 | |
Generating RSA private key, 2048 bit long modulus | |
..............................................+++ | |
...............................+++ | |
e is 65537 (0x10001) | |
Signature ok | |
subject=/CN=* | |
Getting Private key | |
marathon_lb: setting default value for HAPROXY_HTTP_FRONTEND_ACL_ONLY_WITH_PATH_AND_AUTH |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I0527 12:38:37.445116 51736 exec.cpp:143] Version: 0.28.1 | |
I0527 12:38:37.447388 51749 exec.cpp:217] Executor registered on slave ed03b83f-1696-45ef-b0c9-6d4e0307b5bc-S16 | |
Generating RSA private key, 2048 bit long modulus | |
..............................................+++ | |
...............................+++ | |
e is 65537 (0x10001) | |
Signature ok | |
subject=/CN=* | |
Getting Private key | |
marathon_lb: setting default value for HAPROXY_HTTP_FRONTEND_ACL_ONLY_WITH_PATH_AND_AUTH |