Skip to content

Instantly share code, notes, and snippets.

View akutz's full-sized avatar

Andrew Kutz akutz

View GitHub Profile
package models
import "gopkg.in/mgo.v2/bson"
// Beer represents the structure of the resource
type Beer struct {
Id bson.ObjectId `json:"id" bson:"_id"`
Name string `json:"name" bson:"name"`
Type string `json:"type" bson:"type"`
ABV float64 `json:"ABV" bson:"ABV"`
@akutz
akutz / README.md
Last active March 3, 2019 18:31
Testing TCP Endpoints with Go

This gist demonstrates how to test the availability of a TCP endponit using Golang. The following example checks if an endpoint is available and responding to both TCP and TLS connections. To run the example, simply open a command line and execute the following:

$ curl -sSL https://goo.gl/ENx9d8 > tcp-tls-ping.go && go run tcp-tls-ping.go
tcp success
tls success

The program shows that the specified endpoint (defaults to google.com:443) is available and responding to TCP and TLS connection attempts. To illustrate the error that occurs when an endpoint presents an invalid TLS certificate, execute the following:

@akutz
akutz / build-libstorage.sh
Created February 22, 2017 19:00
Building libStorage with Docker
[0]akutz@red:~$ git clone https://github.com/codedellemc/libstorage && make -C libstorage
Cloning into 'libstorage'...
remote: Counting objects: 5496, done.
remote: Compressing objects: 100% (92/92), done.
remote: Total 5496 (delta 39), reused 0 (delta 0), pack-reused 5398
Receiving objects: 100% (5496/5496), 1.97 MiB | 1.92 MiB/s, done.
Resolving deltas: 100% (2893/2893), done.
make: Entering directory '/home/akutz/libstorage'
make docker-build
make[1]: Entering directory '/home/akutz/libstorage'
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# look ma, no go!
$ which go
# look no, no git!
$ which git
# create cinder
$ ./ndp cinder
The plug-in has been successfully created!
@akutz
akutz / 00-build-client.sh
Last active May 8, 2017 20:46
Build REX-Ray with Docker
[0]akutz@pax:rexray$ ./build.sh -t client
building REX-Ray (this may take a few minutes)
Dockerfile........... ./.Dockerfile.tmp
REX-Ray Binary....... ./rexray-client
Sending build context to Docker daemon 109.6MB
Step 1/17 : FROM golang:1.8.1
---> 6d0bfafa0452
@akutz
akutz / 00-build-std-w-ebs.sh
Created May 9, 2017 16:14
Build REX-Ray with Make
[130]akutz@pax:rexray$ ./build.sh -b make -d ebs rexray-ebs
building REX-Ray (this may take a few minutes)
Version.............. 0.9.0+7
Builder.............. make
REX-Ray Binary....... ./rexray-ebs
calculating make targets
(the screen may appear frozen for a few moments)
@akutz
akutz / build.md
Last active May 10, 2017 22:28
build.sh

REX-Ray's Build Command

The new build.sh command (PR #864) simplifies building REX-Ray from source. The command supports two types of build platforms: make and Docker.

Build with make

The make command is the traditional tool used to build software. To build REX-Ray with make using the build.sh command, simply use the -b flag to specify the make builder:

$ ./build.sh -b make
@akutz
akutz / README.md
Last active June 5, 2017 07:24
REX-Ray/CSI Architecture Diagrams

REX-Ray/CSI Architecture Review

REX-Ray and the Container Storage Interface (CSI) support three architectural models: centralized, decentralized-split, and decentralized-unified. This document identifies the components of each architecture and their relationship to the three, common component types: client, agent, and controller.

Terms

This document uses the following terms:

| Term | Description |

@akutz
akutz / README.md
Last active June 5, 2017 21:01
REX-Ray+CSI

REX-Ray+CSI

The introduction of the Container Storage Interface (CSI) provides an exciting opportunity to the world of Container Orchestrator (CO) and storage. This document reviews how CSI adds value to REX-Ray, strengthening its position as the leading CO storage management solution.

Note: Before reading this document please take time to review the several REX-Ray/CSI architecture and component types.