William Blankenship
Filter: April,September,October
Dockerizing your Node.js Infrastructure

Cross post from https://nodesource.com/blog/dockerizing-your-nodejs-infrastructure

This post is a deep dive into the concepts I introduced in my webinar: Need to Node Ep. 2: Dockerizing your Node.js Infrastructure from NodeSource on Vimeo.

Introduction

In our last walk through, we tackled taking a Node.js application and getting it inside of a Docker container. This time around, we are going to look at Dockerizing our entire infrastructure.

We are going to start from the project we completed in the last blog post. This project should contain the following files:

$ ls
app.js Dockerfile package.json

These examples will assume you are using terminal on a Unix style machine. If this assumption does not hold, you will nee

...truncated...

Automatically Populating a known_hosts File

You are probably here because you are trying to automate a service over ssh and you need to get past this prompt:

The authenticity of host '[REDACTED]' can't be established.
ECDSA key fingerprint is [REDACTED].
Are you sure you want to continue connecting (yes/no)?

TL;DR

Use the following bash script.

for address in $ADDRESSES; do
  ssh-keygen -F $address 2>/dev/null 1>/dev/null
  if [ $? -eq 0 ]; then
    echo “$address is already known”
    continue
  fi
  ssh-keyscan -t rsa -T 10 $address >> ~/.ssh/known_hosts
done

Where $ADDRESSES is a list of hostnames or IP addresses.

The long version

So you are automating some service that needs to communicate over ssh. Why not just ignore this warning and press on with your day?

Well, for starters, you have probably found that it can be rather difficult to bypass this warning depending on the tool you are using. More importantly, this prompt is giving you the opportunity to recognize a remote server as “trusted” f

...truncated...

Dockerizing your Node.js Applications

Cross post from https://nodesource.com/blog/dockerizing-your-nodejs-infrastructure

This post is a deep dive into the concepts I introduced in my webinar: Need to Node Ep. 2: Dockerizing your Node.js Infrastructure from NodeSource on Vimeo.

Introduction

So you have Node apps, and you want to use them with Docker. In this tutorial, we will show you how to take your Node.js application and bake it into a Docker image. This is part one of a two part tutorial on Dockerizing your Node.js Infrastructure. If you are interested in a big picture talk on what Docker is, and why Node.js and Docker are a powerhouse couple, checkout my latest webinar recording from #NeedToNode.

Without further ado, let’s get started!

Starting from a Node.js Project

I’ve put together a sample project for this tutorial. If

...truncated...

Docker and Node.js

Cross post from https://nodesource.com/blog/dockerizing-nodejs

The barriers between developers and operations are slowly eroding, creating a healthy environment of rapid iteration, continuous integration, and horizontal scaling. Increasingly, the tools of choice when breaking down that barrier are powered by open source software that promise openness, power and freedom to see their technology and business dreams realized. This is what brought many of us to Node.js and Docker in the first place.

But as the pace of innovation has increased, the mission of creating a “full-stack” development shop has broadened to a need for a full-stack dev/DevOps/deployment organization. Docker will increasingly become a common part of that stack.

So, what do we get out of Dockerizing Node.js?

Documenting dependencies beyond Node/npm

Part of the great appeal of Node.js is that it has a large, rich and [massive](https://medium.com/@nodesource/npm-i

...truncated...

Docker: Owning the Stack

slide1

This is the third post of a 3-part series on docker. This series was transformed from a talk I gave at an STL DevOps meetup.

Here we are going to dive into the implications of developers taking ownership of their stacks through docker, and the work I have been doing at NodeSource to help developers take ownership of their Node.js stacks. If you haven’t already, take a few minutes to skim through the previous article in this series which lays the groundwork for this topic.

slide2

In my previous article, we introduced the concept of developers owning the stack. Now let’s follow that rabbit hole down into the work I’ve been doing at NodeSource. When developers take ownership of their stack, they are no longer simply running Node 0.10.34, they are dep

...truncated...

How Docker Changes Things

slide1

This is the second post of a 3-part series on docker. This series was transformed from a talk I gave at an STL DevOps meetup.

We are going to talk about “owning the stack” via docker, and what that means to us as developers. If this post is successful, you will understand the full meaning and depth of that statement by the time you are done reading this. For a quick primer on what docker is, and why it is fantastic, check out the precursor to this blog post here.

slide2

Often, when we hear people talk about docker [being](http://www.zdnet.com/article/what-is-docker-and-why-is-it-so-darn-p

...truncated...

What Docker Is

slide1

This is the first post of a 3-part series on docker. This series was transformed from a talk I gave at an STL DevOps meetup.

Let’s take a moment, really quick, to bring everyone up to speed on what docker is. If you already understand what docker is — and why it is so great — feel free to skip ahead to the next article.

slide2

Docker started as an api on top of Linux Containers. It has grown to be a tool set and ecosystem for packaging and distributing applications. It’s api is built to be pluggable allowing the underlying technologies to be exchanged without any apparent changes to the end user.

Docker uses the primitives collectively known as “Linux Containers” including Linux Control Groups, Namespaces, and [IPtables](h

...truncated...