Skip to content

Instantly share code, notes, and snippets.

View jwreagor's full-sized avatar

J R jwreagor

  • New Gillington, WI
View GitHub Profile
@jwreagor
jwreagor / notes.md
Last active October 25, 2017 15:12
Incoming Triton features for the Triton Terraform Provider
package main
import (
"fmt"
"time"
)
const (
// killBackoffBaseline is the baseline time for exponential backoff while
// killing a task.
provider "triton" {
# insecure_skip_tls_verify = true
}
data "triton_image" "image" {
name = "base-64"
most_recent = true
}
data "triton_network" "public" {
package main
import (
"context"
"fmt"
"log"
"os"
triton "github.com/joyent/triton-go"
"github.com/joyent/triton-go/account"
=== RUN TestAccTritonFabric_basic
--- FAIL: TestAccTritonFabric_basic (1.59s)
testing.go:434: Step 0 error: Error applying: 1 error(s) occurred:
* triton_fabric.test: 1 error(s) occurred:
* triton_fabric.test: Error executing CreateFabric request: InvalidArgument: property "subnet": subnet overlaps with another network
FAIL
=== RUN TestAccTritonMachine_addNIC
provider "triton" {
insecure_skip_tls_verify = true
}
data "triton_image" "base" {
name = "base-64-lts"
version = "16.4.1"
}
data "triton_network" "public" {
Error applying plan:
1 error(s) occurred:
* triton_machine.test: 1 error(s) occurred:
* triton_machine.test: Error executing Create request: : no active instances found matching tag "role=database" for affinity "role==database"
Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
$ build/containerpilot -config ../simple.json5
DEBU[0000] loaded config: {"Discovery":{},"LogConfig":{"level":"DEBUG","format":"text","output":"stdout"},"StopTimeout":5,"Jobs":[{"Name":"main-process","Exec":"/Users/justinreagor/go/src/github.com/joyent/test-daemon/test-daemon -p 5 -t 2","Port":0,"Interfaces":null,"Tags":null,"ConsulExtras":null,"Health":null,"ExecTimeout":"","Restarts":"unlimited","StopTimeout":"","When":{"Frequency":"","Source":"","Once":"","Each":"","Timeout":""},"Logging":null},{"Name":"main-process2","Exec":"/Users/justinreagor/go/src/github.com/joyent/test-daemon/test-daemon -p 2 -t 10","Port":0,"Interfaces":null,"Tags":null,"ConsulExtras":null,"Health":null,"ExecTimeout":"","Restarts":"unlimited","StopTimeout":"","When":{"Frequency":"","Source":"","Once":"","Each":"","Timeout":""},"Logging":null}],"Watches":null,"Telemetry":null,"Control":{"SocketPath":"/tmp/cp-simple.socket"}}
DEBU[0000] control: initialized router for control server
DEBU[0000] control: listening to /tmp/cp-simple.sock
@jwreagor
jwreagor / README
Created August 21, 2017 17:05 — forked from louiscryan/README
GRPC - Curl, HTTP/1.1 & nghttp misc
# Build the GRPC Java server which is used for interop testing.
# Interface defined here
# https://github.com/grpc/grpc-java/blob/master/interop-testing/src/main/proto/io/grpc/testing/integration/test.proto
./gradlew :grpc-interop-testing:installDist
# Run it with TLS turned on so ALPN is enabled. Uses a dummy cert
./interop-testing/build/install/grpc-interop-testing/bin/test-server --port=8080 --use_tls=true
# Run the awesome nghttp2 as a proxy in front of it.
# See https://nghttp2.org/documentation/package_README.html#building-from-git
// goAttach creates a goroutine on a given function and tracks it using
// the etcdserver waitgroup.
func (s *EtcdServer) goAttach(f func()) {
s.wg.Add(1)
go func() {
defer s.wg.Done()
f()
}()
}