Skip to content

Instantly share code, notes, and snippets.

Paul Basov pbasov

Block or report user

Report or block pbasov

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 cluster.tf
# 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"
View k8s-cluster.yml
# 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
View pubkey
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6cHg1SvsxWp5tD0Ee7nl4pyW9cLO/ZQYYxUYa2zSn/RWFm9BFuy1VwkJiYCIvk0lTXfKQMiO10mKm2xFC3VT0vpTSGIYDh4oxDu0FpIaTmXX3ULVdLNwWvrkHoPkIbPy1nUYlJQ+9PEh6KWkbxeYXFxVPoouWkDwshF63GrRA7Pyg2CuVn/FEA+ldSeq7mp/kkOWvlKXpJzvKXt4A/6odOCUiCnX//CWreHCnfCV3KsteyBc+UP2ql6wpEXmIIYdrOF0O3ofqRPTx6ivIOGGDuYB6e/XDivoEBPWNcLYcr9d5HKOTgRE6xF2Q1ElzpbvAY4AS+kggEjIgImiB3TxX
View gist:c6e41234f64a7e8da65941f9622ab4ae
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
View gist:54eea1133137da79d50aea5a909f872f
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
View gist:7123dcfe12516c32233d737bbe369587
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:
View request1.py
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':'',
You can’t perform that action at this time.