Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Utkarsh Mani Tripathi utkarshmani1997

🎯
Focusing
Block or report user

Report or block utkarshmani1997

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 testing_demo_suite_test.go
package main_test
import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"testing"
)
func TestTestingDemo(t *testing.T) {
RegisterFailHandler(Fail)
@utkarshmani1997
utkarshmani1997 / sum.go
Last active Aug 9, 2017
Demo of unit testing using Ginkgo
View sum.go
package main
import "fmt"
func Sum(x, y int) int {
fmt.Println("Received Digits :", x, y)
return x + y
}
func main() {
@utkarshmani1997
utkarshmani1997 / sum_test.go
Last active Aug 10, 2017
Demo of unit testing
View sum_test.go
package main_test
import (
. "github.com/testing-demo"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
var _ = Describe("Sum", func() {
View Server.go
package main
import (
"fmt"
"net/http"
)
func handler(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Hi there, the end point is : %s !", r.URL.Path[1:])
}
View Dockerfile
FROM golang:1.7-alpine
MAINTAINER Utkarsh Mani Tripathi <utkarshmani1997@gmail.com>
ADD . /home
WORKDIR /home
CMD ["go","run","Server.go"]
EXPOSE 8080
View openebs-operator.yaml
# Define the Service Account
# Define the RBAC rules for the Service Account
# Launch the maya-apiserver ( deployment )
# Launch the maya-storagemanager ( deameon set )
# Create Maya Service Account
apiVersion: v1
kind: ServiceAccount
metadata:
name: openebs-maya-operator
View prometheus.yaml
kind: ConfigMap
metadata:
name: prometheus-config
apiVersion: v1
data:
prometheus.yml: |-
global:
scrape_interval: 5s
evaluation_interval: 5s
scrape_configs:
View deployment-prometheus.yaml
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: prometheus-deployment
spec:
replicas: 1
template:
metadata:
labels:
app: prometheus-server
View maya-apiserver log
MAYA_API_SERVER_NETWORK=eth0
+ NOMAD_ADDR=http://172.28.128.3:4646
+ NOMAD_CN_TYPE=host
+ NOMAD_CN_NETWORK_CIDR=172.28.128.1/24
+ NOMAD_CN_INTERFACE=enp0s8
+ NOMAD_CS_PERSISTENCE_LOCATION=/tmp/
+ NOMAD_CS_REPLICA_COUNT=2
+ ip -4 addr show scope global dev eth0
+ grep inet
+ awk {print $2}
View openebs-provisionar description
Name: openebs-provisioner-3312871894-bdlbb
Namespace: default
Node: kubeminion-01/172.28.128.4
Start Time: Fri, 06 Oct 2017 07:46:27 +0000
Labels: name=openebs-provisioner
pod-template-hash=3312871894
Annotations: kubernetes.io/created-by={"kind":"SerializedReference","apiVersion":"v1","reference":{"kind":"ReplicaSet","namespace":"default","name":"openebs-provisioner-3312871894","uid":"75f45af7-aa6a-11e7-b2db-0...
Status: Running
IP: 10.44.0.1
Created By: ReplicaSet/openebs-provisioner-3312871894
You can’t perform that action at this time.