Skip to content

Instantly share code, notes, and snippets.

# your Kubernetes cluster name here
cluster_name = "k8s-caas-iav"
az_list = ["nogpu"]
dns_nameservers = ["8.8.8.8"]
# SSH key to use for access to nodes
public_key_path = "/Users/basov/Cryptostore/Passwords/mirantis/k8s-workshop-public"
# image to use for bastion, masters, standalone etcd instances, and nodes
image = "ubuntu-xenial-0918"
# Kubernetes configuration dirs and system namespace.
# Those are where all the additional config stuff goes
# the kubernetes normally puts in /srv/kubernetes.
# This puts them in a sane location and namespace.
# Editing those values will almost surely break something.
kube_config_dir: /etc/kubernetes
kube_script_dir: "{{ bin_dir }}/kubernetes-scripts"
kube_manifest_dir: "{{ kube_config_dir }}/manifests"
# This is where all the cert scripts and certs will be located
@pbasov
pbasov / pubkey
Created September 20, 2018 15:06
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6cHg1SvsxWp5tD0Ee7nl4pyW9cLO/ZQYYxUYa2zSn/RWFm9BFuy1VwkJiYCIvk0lTXfKQMiO10mKm2xFC3VT0vpTSGIYDh4oxDu0FpIaTmXX3ULVdLNwWvrkHoPkIbPy1nUYlJQ+9PEh6KWkbxeYXFxVPoouWkDwshF63GrRA7Pyg2CuVn/FEA+ldSeq7mp/kkOWvlKXpJzvKXt4A/6odOCUiCnX//CWreHCnfCV3KsteyBc+UP2ql6wpEXmIIYdrOF0O3ofqRPTx6ivIOGGDuYB6e/XDivoEBPWNcLYcr9d5HKOTgRE6xF2Q1ElzpbvAY4AS+kggEjIgImiB3TxX
KRPC basics
import readline
import rlcompleter
if 'libedit' in readline.__doc__:
readline.parse_and_bind("bind ^I rl_complete")
else:
readline.parse_and_bind("tab: complete")
import krpc, time, math
KRPC basics
import readline
import rlcompleter
if 'libedit' in readline.__doc__:
readline.parse_and_bind("bind ^I rl_complete")
else:
readline.parse_and_bind("tab: complete")
import krpc, time, math
import requests
import keystoneclient
import json
keystoneauth={"auth":{"passwordCredentials":{"username": "admin", "password": "admin"},"tenantName": "admin"}}
token = requests.post('http://localhost:5000/v2.0/tokens', headers={'Content-Type': 'application/json'}, data=json.dumps(keystoneauth))
token = json.loads(token.text)['access']['token']['id']
nodes = requests.get('http://localhost:8000/api/nodes', headers={'X-Auth-Token': token})
nodes = json.loads(nodes.text)
for node in nodes:
http://db.tt/NwJ7bako
import requests
r = requests.session()
empinfo = {'color':'#000000','usr_id':'0',
'login':'placeholder','password':'passw','password1':'passw',
'sname':'surname','fname':'firstname','pname':'middlename',
'bdate_dd':'01','bdate_mm':'01','bdate_yy':'1970',
'ref_id':'0','dept':'','tasks':'',
'phone_i':'','phone_e':'','email_e':'',
'ho_text':'','sh_text':'',