Skip to content

Instantly share code, notes, and snippets.

View jayunit100's full-sized avatar
🎯
Focusing

jay vyas jayunit100

🎯
Focusing
View GitHub Profile
kubernetes-vm-jay-1 | success >> {
"ansible_facts": {
"ansible_all_ipv4_addresses": [
"172.18.147.19"
],
"ansible_all_ipv6_addresses": [
"fe80::f816:3eff:fe2b:5baa"
],
"ansible_architecture": "x86_64",
"ansible_bios_date": "01/01/2007",
Pods: 30 out of 30 created, 0 running, 30 pending, 0 waiting, 0 inactive, 0 unknown
INFO: 2015-07-14 16:56:07.679790472 -0400 EDT density30-b3c38835-2a6a-11e5-91f7-3c970e4b8bbd Pods: 30 out of 30 created, 0 running, 30 pending, 0 waiting, 0 inactive, 0 unknown
INFO: 2015-07-14 16:56:17.680058695 -0400 EDT density30-b3c38835-2a6a-11e5-91f7-3c970e4b8bbd Pods: 30 out of 30 created, 0 running, 30 pending, 0 waiting, 0 inactive, 0 unknown
INFO: 2015-07-14 16:56:27.680314095 -0400 EDT density30-b3c38835-2a6a-11e5-91f7-3c970e4b8bbd Pods: 30 out of 30 created, 0 running, 30 pending, 0 waiting, 0 inactive, 0 unknown
KILL KCM,
INFO: 2015-07-14 16:56:37.680653983 -0400 EDT density30-b3c38835-2a6a-11e5-91f7-3c970e4b8bbd Pods: 30 out of 30 created, 5 running, 25 pending, 0 waiting, 0 inactive, 0 unknown
INFO: 2015-07-14 16:56:47.680985771 -0400 EDT density30-b3c38835-2a6a-11e5-91f7-3c970e4b8bbd Pods: 30 out of 30 created, 5 running, 25 pending, 0 waiting, 0 inactive, 0 unknown
@jayunit100
jayunit100 / roulette.py
Created August 4, 2015 20:12
bps roulette wheel !
__author__ = 'jayvyas'
import random
import math
def roulette_wheel(model):
wheel = [None] * len(model)
cumProb = 0.0
for i in range(len(model)):
(item, prob) = model[i]
print(i,item,prob)
__author__ = 'jayvyas'
import random
import math
#558986-AFCN6-EJ927-WAEZ1-D95LF-BTAY4
def roulette_probability_boundaries(model):
"""
Wheel returns a list of (item, probability) tuples with additive probability boundaries.
Input: [("fish food", .1), ("dog food", .1), ("cat food", .8)]
Some intermediate notes....
`sudo cluster/kubectl.sh replace --filename` isn't happy..
It gives `spec.clusterIP: invalid value '10.0.0.6', Details: field is immutable`
but this create snippet seems to sort of work. playing more.
```
{
"kind": "Service",
@jayunit100
jayunit100 / -
Created September 21, 2015 17:14
#!/bin/bash
# Copyright 2014 The Kubernetes Authors All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@jayunit100
jayunit100 / backoff
Last active October 30, 2015 16:52
backoff
this has moved to a branch .. .
@jayunit100
jayunit100 / -
Last active November 26, 2015 18:36
This is a big diff i did to hack vbox to work w/ vagrant+ansible contrib recipes. just some notes. probably some of it was unnecessary.
diff --git a/ansible/roles/common/tasks/fedora-install.yml b/ansible/roles/common/tasks/fedora-install.yml
index 48454fa..91cb424 100644
--- a/ansible/roles/common/tasks/fedora-install.yml
+++ b/ansible/roles/common/tasks/fedora-install.yml
@@ -5,3 +5,15 @@
name: python-firewall
state: latest
when: ansible_distribution_major_version|int >= 22
+
+- name: Generic | Install Python
@jayunit100
jayunit100 / -
Created November 29, 2015 19:44
Nov 29 14:43:14.543: INFO: >>> testContext.KubeConfig: /Users/jayunit100/.kube/config
Nov 29 14:43:14.546: INFO: >>> testContext.KubeConfig: /Users/jayunit100/.kube/config
Nov 29 14:43:14.548: INFO: Waiting up to 10m0s for all pods (need at least 1) in namespace 'kube-system' to be running and ready
Nov 29 14:43:14.831: INFO: 17 / 17 pods in namespace 'kube-system' are running and ready (0 seconds elapsed)
Nov 29 14:43:14.831: INFO: expected 5 pod replicas in namespace 'kube-system', 5 are Running and Ready.
Running Suite: Kubernetes e2e suite
===================================
Random Seed: 1448826194 - Will randomize all specs
commit 7773c6d6b400a9059cab111b7eb3228e78a4abe2
Author: Mike Danese <[email protected]>
Date: Sun Nov 29 19:33:53 2015 -0800
move vagrant to masterless salt
diff --git a/cluster/saltbase/salt/kube-apiserver/kube-apiserver.manifest b/cluster/saltbase/salt/kube-apiserver/kube-apiserver.manifest
index 1202be4..1191e07 100644
--- a/cluster/saltbase/salt/kube-apiserver/kube-apiserver.manifest
+++ b/cluster/saltbase/salt/kube-apiserver/kube-apiserver.manifest