Skip to content

Instantly share code, notes, and snippets.

@smothiki
smothiki / generate.go
Last active May 12, 2016 23:25
generate params
package main
import (
"fmt"
"os"
"strings"
"text/template"
)
type generate struct {
@smothiki
smothiki / read.md
Last active May 10, 2016 23:34
Upgrade story with deployments
  1. Deployments are not available in v1 or server version 1.2, they are available as a part of v1extensions, basically we can't do it now
  2. Replicaiton controllers are not compatible with deployments. only replica sets
  3. Deployments support releases and rollbacks, canary and rolling updates
  4. Horizontal pod scalar again works on replica sets but scales the pods according to CPU utilization
  • Deployments are good only if you are thinking of doing a roll back.
  • For our usecase where every thing is an RC1 and just thinking about updating the exiting image for an RC , kubectl apply/edit RC is sufficient, unless we are not looking for kubectl rollback --release=<>
  • Coming to Apps, thoerically deployments adds features like releases to an App. Also if we can treat every build as a release then basically let the builder deploy an App as deployment,
  1. creates user, adds keys
  2. Deploys build pack , dockerfile and deis pull apps
  3. Uninstall workflow-dev chart
  4. install workflow-dev chart
  5. tries to login with the existing user
  6. Does deis apps:list
  7. Curls through all apps
@smothiki
smothiki / nodes.md
Created April 15, 2016 21:58
kubectl describe nodes
$ kubectl describe nodes
Name:			ip-172-20-0-245.us-west-1.compute.internal
Labels:			beta.kubernetes.io/instance-type=m3.medium,failure-domain.beta.kubernetes.io/region=us-west-1,failure-domain.beta.kubernetes.io/zone=us-west-1a,kubernetes.io/hostname=ip-172-20-0-245.us-west-1.compute.internal
CreationTimestamp:	Fri, 15 Apr 2016 15:22:08 -0600
Phase:			
Conditions:
  Type		Status	LastHeartbeatTime			LastTransitionTime			Reason			Message
  ----		------	-----------------			------------------			------			-------
  OutOfDisk 	False 	Fri, 15 Apr 2016 15:57:32 -0600 	Fri, 15 Apr 2016 15:57:22 -0600 	KubeletHasSufficientDisk 	kubelet has sufficient disk space available
curl 10.3.0.144:9200/_search?pretty=true -d '{"query":{"query_string":{"fields" : ["kubernetes",".*"],"query": "august-barbecue"}}}'
Cluster of N nodes
Runs 3 or more deis installs with different namesapces
So already componenets are running with same RC but in different namepsaces
Now A queue of test exists
1. Round robin these queue of tests to the exisiting deis install of differents namespaces
2. Each test builds a respective image and update the Image in the RC of the assigned namesapce
package main
import(
"fmt"
"bytes"
"encoding/json"
bjson "github.com/bitly/go-simplejson"
elastic "gopkg.in/olivere/elastic.v3"
)
package tests
import (
"fmt"
"math/rand"
"os"
"regexp"
"sort"
"strconv"
"sync"
@smothiki
smothiki / observations.md
Last active March 22, 2016 20:25
service endpoints api
smothiki$ kubectl get endpoints --all-namespaces -w
NAMESPACE         NAME                    ENDPOINTS
absurd-lakeside   absurd-lakeside         <none>
default           kubernetes              10.0.0.50:443
deis              deis-builder            10.2.44.2:2223
deis              deis-controller         10.2.94.2:8000
deis              deis-database           10.2.44.3:5432
deis              deis-minio              10.2.94.5:9000
deis              deis-registry           10.2.94.3:5000
@smothiki
smothiki / shell session output
Last active March 21, 2016 22:56
test log session output
=== RUN TestTests
Running Suite: Deis Workflow
============================
Random Seed: 1458595389
Will run 112 of 114 specs
$ deis register http://deis.10.3.0.198.xip.io --username=admin --password=admin --email=admin@example.com
Registered admin
Logged in as admin
$ deis users:list