Skip to content

Instantly share code, notes, and snippets.

Tyler Flint tylerflint

Block or report user

Report or block tylerflint

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
@tylerflint
tylerflint / drains.sh
Created Sep 26, 2018
Nanobox external logdrains
View drains.sh
# papertrail
# export LOGGER_TOKEN=(from /etc/logvac/config.json)
# export APP=app-name
# export ENDPOINT=logs7.papertrailapp.com:16810
curl -k -v -X POST -H "X-Auth-Token: $LOGGER_TOKEN" https://127.0.0.1:6361/drains -d '{"type": "papertrail", "id": "${APP}", "endpoint": "${ENDPOINT}"}'
# datadog
# export LOGGER_TOKEN=(from /etc/logvac/config.json)
# export APP=app-name
# export KEY=(from dashboard)
@tylerflint
tylerflint / summary.md
Last active Oct 19, 2017
How does nanobox orchestration differ from Docker Swarm and Kubernetes
View summary.md

Generally speaking, Nanobox treats containers as lightweight VMs. So, many concepts from docker swarm or kubernetes won’t track with our system. If you’re familiar with solaris zones, the way we treat containers is very much like a solaris zone.

At a high level, docker (swarm) and kubernetes are moving the process management, logging, supervision, networking, etc out of the container and into the orchestration layer. Details aside, conceptually, they are moving pretty aggressively towards the notion of running simple processes inside of a namespace and a filesystem chroot, then the orchestration layer handles everything else.

Ultimately, the developer is left to define the service details in every implementation, like which commands to run, etc. I don’t necessarily think that’s a bad thing, in fact I think the implementation of kubernetes’ pods is pretty clever, thats just the direction they're going.

Our system was designed differently, on the notion of autonomy. Essentially, a docker image should have e

@tylerflint
tylerflint / boxfile.yml
Created Sep 20, 2017
Nanobox multi-headed nodejs app example boxfile configuration
View boxfile.yml
run.config:
engine: nodejs
dev_packages:
- forego
extra_packages:
- nginx-nchan
web.main:
@tylerflint
tylerflint / 0-instructions.md
Last active Jul 18, 2017
Install Hugo on Nanobox
View 0-instructions.md

Create a boxfile.yml

First create a boxfile using the content from this gist

Start the local env

nanobox run

Create a new site

@tylerflint
tylerflint / boxfile.yml
Created Jun 4, 2017
Nanobox Rails Example
View boxfile.yml
run.config:
  engine: ruby
  cache_dirs:
    - node_modules
    - vendor/assets/bower_components
    - .bundle
    - vendor/bundle
  extra_packages:
@tylerflint
tylerflint / current.txt
Created Feb 28, 2017
potential output styles
View current.txt
Preparing environment :
* Mounting codebase
Root privileges are required to modify network shares. Your password may be requested...
✓ Mounting codebase
--------------------------------------------------------------------------------
+ HEADS UP:
+ This is the first build for this project and will take longer than usual.
@tylerflint
tylerflint / prototype.txt
Created Feb 10, 2017
mount /data to host mount to bypass docker layering, to achieve best throughput on data services
View prototype.txt
# 1 - copy the contents of /data from within the image onto the host share
docker run \
-it \
--rm \
-v /var/nanobox/test-volume:/host \
nanobox/mysql \
bash -c "cp -a /data/* /host"
# 2 - run the real container with the host mount at /data
docker run \
@tylerflint
tylerflint / catalog.json
Created Jan 27, 2017
aws nanobox catalog
View catalog.json
[{
"id": "us-east-1",
"name": "US East (N. Virginia)",
"plans": [{
"id": "general_purpose",
"name": "General purpose",
"specs": [{
"id": "m1.small",
"ram": 1740,
"cpu": 0.25,
@tylerflint
tylerflint / catalog.json
Created Jan 13, 2017
aws pricing catalog for Nanobox
View catalog.json
{
"us-east-1": {
"id": "us-east-1",
"name": "US East (N. Virginia)",
"plans": {
"general_purpose": {
"id": "general_purpose",
"name": "General purpose",
"specs": [{
"id": "m1.small",
@tylerflint
tylerflint / boxfile.yml
Created Jan 11, 2017
elixir deploy strategy configuration
View boxfile.yml
run.config:
engine: elixir
engine.config:
rel_manager: distillery
distillery_rel: foo
distillery_env: bar
You can’t perform that action at this time.