Skip to content

Instantly share code, notes, and snippets.

View Oloremo's full-sized avatar

Proskurin Kirill Oloremo

  • Behavox
  • GB, London
View GitHub Profile
@Oloremo
Oloremo / salt-vault-performance.md
Created July 10, 2020 11:12
Saltstack with Vault performance test

Salt Vault configuration

Salt: 3000.3

vault:
  url: "https://127.0.0.1:8200"
  verify: False
  role_name: salt-cluster
  auth:
test-run-kproskurin-rm.aws.internal_master:
----------
ID: orch.runner.hadoop
Function: salt.runner
Name: state.orchestrate
Result: True
Comment: Runner function 'state.orchestrate' executed.
Started: 13:11:09.580991
Duration: 15533.901 ms
Changes:
test-run-kproskurin-rm.aws.internal_master:
----------
ID: orch.runner.zookeeper
Function: salt.runner
Name: state.orchestrate
Result: True
Comment: Runner function 'state.orchestrate' executed.
Started: 13:02:00.974024
Duration: 22599.948 ms
Changes:
orch.runner.hbase:
salt.runner:
- name: state.orchestrate
# https://github.com/saltstack/salt/issues/55121
- parallel: False
- kwarg:
mods: orch/services/hbase
test: True
- require:
- salt: orch.runner.zookeeper
# -*- coding: utf-8 -*-
'''
Consul KV State
===============
Simple state to manage Consul KV operations:
.. code-block:: yaml
consul_kv.put:
[ERROR ] An un-handled exception was caught by salt's global exception handler:
TypeError: a bytes-like object is required, not 'str'
Traceback (most recent call last):
File "/usr/local/bin/salt-call", line 10, in <module>
sys.exit(salt_call())
File "/usr/local/lib/python3.6/site-packages/salt/scripts.py", line 431, in salt_call
client.run()
File "/usr/local/lib/python3.6/site-packages/salt/cli/call.py", line 47, in run
caller = salt.cli.caller.Caller.factory(self.config)
File "/usr/local/lib/python3.6/site-packages/salt/cli/caller.py", line 80, in factory
@Oloremo
Oloremo / parse-options.sh
Created August 7, 2018 13:42 — forked from cosimo/parse-options.sh
Example of how to parse options with bash/getopt
#!/bin/bash
#
# Example of how to parse short/long options with 'getopt'
#
OPTS=`getopt -o vhns: --long verbose,dry-run,help,stack-size: -n 'parse-options' -- "$@"`
if [ $? != 0 ] ; then echo "Failed parsing options." >&2 ; exit 1 ; fi
echo "$OPTS"
@Oloremo
Oloremo / gist:482c5247ef80ce60bab93c8628909ae5
Created August 4, 2018 16:15 — forked from Ray33/gist:ba189a729d81babc99d7cef0fb6fbcd8
Amazon Elastic Network Adapter (ENA) on CentOS 7
sudo su
yum --enablerepo=extras install epel-release
yum -y install patch dkms kernel-devel perl
yum update
reboot
//TODO fetch latest ena_driver from: https://github.com/amzn/amzn-drivers/releases, this script is based on 1.5.3
cd /tmp
@Oloremo
Oloremo / ec2_group_set
Created August 1, 2018 17:36 — forked from weirdbricks/ec2_group_set
Alter security groups on EC2 nodes
#!/usr/bin/python
from boto.ec2 import connect_to_region
from boto.ec2.group import Group
from pprint import pprint
def main():
module = AnsibleModule(
argument_spec = dict(
ec2_id = dict(required=True),
#!/bin/bash
BOOTSTRAP_STATUS=1
RECONN_STATUS=1
RECOVERY_STATUS=1
BOOTSTRAP_S_COUNT=0
RECONN_S_COUNT=0
RECOVERY_S_COUNT=0