Skip to content

Instantly share code, notes, and snippets.

@VAdamec
VAdamec / snap_ds.yaml
Last active January 11, 2017 14:51
Metrics for K8S
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
name: snap
namespace: kube-system
spec:
template:
metadata:
name: snap
labels:
@VAdamec
VAdamec / test_1_firefox.py
Created January 10, 2017 08:22
Selenium test - python + webdriver, Firefox
import unittest
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
class PythonOrgSearch(unittest.TestCase):
def setUp(self):
self.driver = driver = webdriver.Remote(
command_executor='http://172.24.249.167:10000/wd/hub',
@VAdamec
VAdamec / test_1_chrome.py
Created January 9, 2017 15:48
Selenim simple python test
import unittest
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
class PythonOrgSearch(unittest.TestCase):
def setUp(self):
self.driver = driver = webdriver.Remote(
command_executor='http://172.24.249.167:10000/wd/hub',
@VAdamec
VAdamec / calico4dcos.yaml
Last active January 5, 2017 06:36
Calico DC/OS with latest versions
{
"volumes": null,
"id": "/calico-install-framework",
"cmd": null,
"args": null,
"user": null,
"env": {
"ETCD_BINARY_URL": "https://github.com/coreos/etcd/releases/download/v2.3.1/etcd-v2.3.1-linux-amd64.tar.gz",
"MESOS_CNI_PLUGINS_DIR": "/opt/mesosphere/active/cni/",
"CALICO_ALLOW_DOCKER_UPDATE": "true",
provider "vsphere" {
user = "xxxxx"
password = "xxxxx"
vsphere_server = "xxxxx"
}
resource "vsphere_virtual_machine" "default" {
name = "newvm-1"
domain = "foo"
datacenter = "location"
@VAdamec
VAdamec / run_errata.yml
Created May 18, 2016 10:10
Include run file for CentOS6 errata playbook
- name: Set Hipchat MSG
set_fact:
REPORTMSG: "LIVE UPDATE + ERRATA SYNC {{ timestamp.stdout }} - CENTOS Update"
COLORMSG: "green"
- name: Send notification to HipChat
include: hipchat-notification.yml
tags: notify
- name: Ensure git
@VAdamec
VAdamec / download_errata.yml
Created May 18, 2016 10:09
Download CentOS6 errata to Pulp repository and get raw (and dirty) diff result of new and old stage
#
# ansible-playbook -i hosts download_errata.yml --vault-password-file=/etc/.ipassword -s -U root
#
---
- name: Update ERRATAS if any new package
hosts: pulpservers
sudo: yes
gather_facts: yes
vars_files:
- pass.yml
@VAdamec
VAdamec / example_mapping_docval
Created February 24, 2016 22:40
Example of ES mapping with doc_values
{
"template" : "uac_*",
"mappings" : {
"tomcat" : {
"properties" : {
"@log_name" : {
"type" : "string"
},
"@timestamp" : {
"type" : "date",
@VAdamec
VAdamec / Docker_fedora23+ruby
Created February 3, 2016 18:14
Docker compose with fedora23 with zsh, ruby and ruby debug tools
#
# Dockerfile
#
FROM fedora:23
RUN dnf -y update && dnf install -y git ruby mysql-devel ruby-devel gcc make redhat-rpm-config tar patch unzip
RUN dnf -y install -y openssh-clients krb5-workstation bind-utils
RUN dnf -y install java-1.8.0-openjdk
RUN gem install bundler
RUN gem install pry
RUN gem install pry-doc
@VAdamec
VAdamec / es-cluster-restart.yml
Last active December 10, 2021 16:42
ES reload with puppet changes
#
# https://gist.githubusercontent.com/samdoran/
# https://forge.puppetlabs.com/elasticsearch/elasticsearch - cluster split prod/dev/stg/... by cluster name <project>-<cluster_name>-....
#
---
- name: Elasticsearch rolling upgrade
hosts: elk
serial: 1
sudo: yes
gather_facts: true