• This repository has been archived on 11/Mar/2019
  • Stars
    star
    325
  • Rank 129,350 (Top 3 %)
  • Language
    JavaScript
  • License
    Artistic License 2.0
  • Created over 10 years ago
  • Updated over 9 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Deployment just got easy

nscale

![Gitter](https://badges.gitter.im/Join Chat.svg)

A toolkit for application deployment and container management

nscale is an open toolkit supporting configuration, build and deployment of connected container sets. nscale is ideally used to support the development and operation of microservice based systems.

Unlike other distributed container management systems, nscale aims to do the simplest thing that could possibly work. nscale aims to be simple to setup, configure and operate.

Full documentation including setup guides and tutorials are available here.

nscale depends on nodejs, npm, git and docker.

Overview

Typically an nscale deployment consists of a management server running nscale and a number of managed systems. Each of the managed systems requires a docker runtime only. nscale helps you perform the following tasks:

  • Build and manage containers
  • Define system infrastructure
  • Track system changes over time
  • Track deployment history
  • Perform immutable deployments
  • Perform fast safe rollback to known good state
  • Perform homeostatic monitoring and updates
  • Perform algorithmic deployments

nscale can run in a local development configuration on a single system or as a management system for multipe target servers.

Development configuration

Local Mode

In a development configuration, the nscale server and running containers live on the same system. This is a great way to get started with nscale or to use it for local development and testing. As of v0.16, nscale supports running containers as processes, this mode is called 'process-container', and it supports automatic reloading if files are changed.

Production configuration

Local Mode

In a prodction configuration, the nscale server is installed on a managment instance and is configured to manage and control a set of controlled server instances. This configuration is commonly used on top of cloud infrastructure or on premesis servers.

Quickstart

These quickstart instructions will get you up and running with nscale in a local development configuration. For more advanced use cases including production configrations on top of AWS please see the documentation.

Install docker

Mac

If you are on Mac OS X, you need to install and run boot2docker. Once you have installed boot2docker start it using:

boot2docker init
boot2docker up

IMPORTANT!!!! - Follow the instructions given by boot2docker and ensure that the correct environment variables are set!

Linux

If you are on Linux, you will need to install docker. Once you have docker installed and running you will need to add your user account to the docker group. To do this run the following:

sudo usermod -G docker -a `whoami`

You may need to log out and log back in again for this change to take effect. To confirm that you have the appropriate permissions run:

groups

You should see that your user is included in the docker group. If this is not apparent you may need to close your current terminal session and login again.

IMPORTANT!!!! nscale will not function correctly unless the group permissions are set as above

Other Platforms

We understand that there exist other operating systems, however at this time we do not support nscale on them. If you are feeling brave by all means give it a try, we always appreciate pull requests!!

Install node

nscale is built using node.js. To install node, go to the download page and install the appropriate binary for your system.

Install git

nscale uses git as a backing store for system configuration and versioning. Git can be installed using the package manager on your system of choice (i.e. homebrew on osx, apt-get on ubuntu...)

Configure github access

Once git is installed, it should be configured for use with github if you wish to follow along with the nscale tutorials. You should run the following to set your username and email address:

git config --global user.name "<user name>"
git config --global user.email "<email>"

You will need to configure ssh access to github. See this guide to get ssh keys setup.

Install nscale

nscale can be installed using npm. To install the latest version run:

[sudo] npm install -g nscale

Preflight check

Before running nscale please ensure that the terminal you are running in is correctly configured with the above pre-requisites.

github

Ensure github is correctly configured by checking the output of the following command

ssh -T -o "VerifyHostKeyDNS yes" [email protected]

docker

Ensure that docker can run correctly by executing the following command

docker ps

Note that this command should run WITHOUT NEEDING SUDO.

IMPORTANT!!! If the above checks do not run cleanly, please go back and check your configuration. Don't even think about starting nscale until this is corrected. Seriously... we mean it - We'll be very sad otherwise :(

Running nscale

start-stop nscale start/stop cycle.

Now that everything is configured you are good to start nscale:

nscale start

If you are running on Linux, you need to add yourself to the docker group before running any nscale command. To do that:

nscale login

Finally let's check that nscale is good to go by running:

nscale status

You should see output similar to the following

nscale-kernel { running: true, port: '3223', listening: true, pid: 1294 }

Run a demo application

You should now be able to clone and run a small demo application. To do this cd into a new empty working directory and clone the repository:

mkdir ~/work; cd ~/work
git clone [email protected]:nearform/nscaledemo.git

This will create a sub directory named nscaledemo. You now need to link this repository into nscale. By running:

nscale system link nscaledemo

Check that the system was linked in correctly by running a system list command again. Which should now contain the linked system:

nscale system list
Name                           Id
nscaledemo                     e1144711-47bb-5931-9117-94f01dd20f6f

Compile the system definition

In order to work with the demo system we first need to run a compile.

nscale system compile nscaledemo

Once the compile has completed you should be able to list the available containers in the system. Run:

nscale container list nscaledemo

You should see the following output

Name                 Type                 Id
root                 container            85d99b2c-06d0-5485-9501-4d4ed429799c
web                  process              web$2f9f7ddadc8bead84de4a74665085d362b1..

Build the demo container

Next you will need to build the example container. To do this run:

nscale container build nscaledemo web

This command will create a docker container ready for nscale to start.

Run the demo

Before we run the system, take a quick look at the revsion list:

nscale revision list nscaledemo

This command shows a list of the revisions on this system repository. You will see a number of commits from the repository that was originally cloned plus a fresh commit representing the compile that was executed a few steps above. Go ahead and run the system by executing:

nscale revision deploy nscaledemo latest development

nscale will start the demo container. You can check that all is well by running:

nscale system check nscaledemo development

And check that the web container is running using:

docker ps

You should be able to open a browser and point it to the boot2docker ip address (mac os X) or localhost (linux) port 8000. This should display the string 'hello world'. You can get the boot2docker ip address with the following command:

boot2docker ip

So, you can run:

open http://`boot2docker ip`:8000

Next steps

Full documentation for nscale is available on the nscale document repository here.

License

Copyright (c) 2014-2015 Nearform and other contributors

Licensed under the Artistic License 2.0

More Repositories

1

graphql-hooks

🎣 Minimal hooks-first GraphQL client
TypeScript
1,878
star
2

temporal_tables

Postgresql temporal_tables extension in PL/pgSQL, without the need for external c extension.
PLpgSQL
429
star
3

fast-jwt

Fast JSON Web Token implementation
JavaScript
330
star
4

react-animation

Animation components and styles for React projects
JavaScript
285
star
5

sql

SQL injection protection module
JavaScript
201
star
6

react-browser-hooks

React Browser Hooks
JavaScript
128
star
7

udaru

Open source Access Manager for node.js
JavaScript
125
star
8

node-cephes

Implementation of special functions and distributions mathematical functions from the cephes library.
C
115
star
9

the-fastify-workshop

A workshop about Fastify
JavaScript
113
star
10

gammaray

Node.js vulnerability scanner
Go
104
star
11

autopsy

dissect your dead node services with mdb via a smart os vm
JavaScript
89
star
12

fastify-auth0-verify

Auth0 verification plugin for Fastify
JavaScript
87
star
13

titus

Deploy useful features in sprint one
JavaScript
61
star
14

micro-services-tutorial-iot

An instructor led microservices workshop
JavaScript
54
star
15

developing-microservices

A workshop on microservices in nodejs
JavaScript
54
star
16

heap-profiler

Heap dump and sample profiler generator for Node.
JavaScript
52
star
17

docker-cloudwatch

Docker Cloudwatch
JavaScript
46
star
18

promises-workshop

Broken Promises Exercises
HTML
45
star
19

polaris

NearForm multi-platform application accelerator
JavaScript
35
star
20

nscale-workshop

Nodeconf.eu nscale workshop
35
star
21

well

well
JavaScript
35
star
22

nceubadge

The NodeConf EU 2017 Badge
HTML
34
star
23

owasp-top-ten-workshop

NearForm OWASP Top Ten Security Vulnerabilities Workshop
JavaScript
34
star
24

graphql-auto-federate

Automatically federate a Mercurius GraphQL service
JavaScript
32
star
25

trail

Audit trail log service
JavaScript
32
star
26

slow-rest-api

A REST API that is slow
HTML
31
star
27

stats

📊 Collect stats about your node.js process 📊
JavaScript
29
star
28

node-hidden-markov-model-tf

A trainable Hidden Markov Model with Gaussian emissions using TensorFlow.js
JavaScript
28
star
29

autocannon-ui

A graphical user interface for autocannon providing the same user experience
JavaScript
28
star
30

react-pwa

Hackernews Progressive Web Application built with React
JavaScript
28
star
31

open-banking-reference-app

NearForm reference application for open banking - https://community.nearform.com/api-banking
TypeScript
27
star
32

react-redux-typescript-saga-immutable

Sample React boilerplate written in TypeScript, including React Router, Redux, Redux Saga, ImmutableJS and Styled Components.
TypeScript
27
star
33

fastify-overview-ui

UI for fastify-overview
JavaScript
26
star
34

minishift-demo

Demo for local development using minishift
Shell
25
star
35

reviewbot

A bot to assist with code reviews via AI
JavaScript
25
star
36

get-jwks

Fetch utils for JWKS keys
JavaScript
23
star
37

sharing-components

JavaScript
23
star
38

tf-modules-example

Code example for the reusable, configurable Terraform modules blog post
HCL
22
star
39

aws-proxy-pattern

Terraform module to create a transparent proxy within AWS
HCL
20
star
40

openapi-transformer-toolkit

Automate design-first API workflows by generating schemas and types from OpenAPI specs.
TypeScript
20
star
41

fastify-casbin

A plugin for Fastify that adds support for Casbin
JavaScript
19
star
42

the-graphql-workshop

A workshop about GraphQL with mercurius
JavaScript
18
star
43

choo-pwa

PWA with Choo
JavaScript
17
star
44

no-gres

A small module to mock pg for testing purposes.
JavaScript
17
star
45

nscale-docs

Documentation for nscale
17
star
46

optic

App for generating OTP tokens for 2FA protected accounts
JavaScript
17
star
47

initium-platform

A set of Kubernetes add-ons with optimal configuration and test coverage to create a day zero platform for your code
Go
16
star
48

optic-release-automation-action

Automate the release process of your npm modules, apps and actions
JavaScript
15
star
49

brokeneck

Admin UI for Auth0, Azure AD and AWS Cognito
JavaScript
15
star
50

node-test-runner-workshop

The Node.js Test Runner Workshop
JavaScript
14
star
51

graphql-hooks-workshop

HTML
14
star
52

react-patterns-workshop

A workshop which covers intermediate and advanced React usage patterns
JavaScript
14
star
53

node-test-github-reporter

A GitHub test reporter for the Node.js test runner
JavaScript
14
star
54

mira

The Mira Accelerator fast-tracks the setup of common Amazon Web Services (AWS) Serverless infrastructure
TypeScript
13
star
55

react-native-apple-wallet-demo

Create Custom Apple Wallet Passes with React Native and Fastify
JavaScript
13
star
56

langchain-google-calendar

A spike project: allows natural language to create actions in Google Calendar
TypeScript
12
star
57

fastify-casbin-rest

A plugin for Fastify that adds support for Casbin's REST model
JavaScript
12
star
58

cloudwatchlogs-stream

Stream interfacet to CloudWatch Logs
JavaScript
11
star
59

mercurius-apollo-registry

A Mercurius plugin for schema reporting to Apollo Studio
JavaScript
11
star
60

leaistic

An ElasticSearch manager
JavaScript
11
star
61

stats-to-elasticsearch

Collect and send stats about your node.js process to elasticsearch. 📊🔌📈
JavaScript
10
star
62

nceubadge2018

NodeConf EU 2018 Badge code and hardware design files
JavaScript
10
star
63

openshift-kafka

Run Apache Kafka in Openshift Origin
Smarty
10
star
64

create-stats-dashboard

📈 A wrapper to create and initialise a stats dashboard on kibana using import-kibana-dashboard, for easy manipulation of stats sent via stats-to-elasticsearch 📉
JavaScript
10
star
65

fastify-mssql

MSSQL Plugin for Fastify
JavaScript
10
star
66

mercurius-explain

A Mercurius plugin that shows the execution time of each resolver in a query
JavaScript
10
star
67

the-micro-frontends-workshop

The Micro Frontends Workshop with Module Federation
JavaScript
9
star
68

commentami

A 'google docs' like commenting system
JavaScript
9
star
69

zoom-shuffle-bot

Zoom Chatbot used to retrieve a randomized list of your current meeting's participants
JavaScript
9
star
70

jsnation-node-workshop

Our workshop at JSNation 2019
JavaScript
9
star
71

optic-expo

Secure 2FA OTP via Mobile Push Notifications
TypeScript
8
star
72

choo-data

Simple data fetching plugin for Choo with server-side rendering support
JavaScript
8
star
73

nodeconfeu-gesture-models

Ongoing attempts at gesture models
C++
8
star
74

slack-knowledgebase-chatgpt-responder

ChatGPT powered slack responder to the questions that are about NearForm knowledge base
JavaScript
8
star
75

initium

Deploy your code on day zero, avoiding vendor lock-in.
7
star
76

playwright-firebase

A plugin to handle Firebase authentication in Playwright tests
TypeScript
7
star
77

docker-container

JavaScript
7
star
78

otlp-blueprint

Open Telemetry + Jaeger + 3-tier application Blueprint
HCL
7
star
79

pwa-poc

PWA for proof of concept for sharing images, qrcode scanning and geolocation from a PWA
JavaScript
7
star
80

slidev-theme-nearform

NearForm theme for sli.dev presentations
CSS
6
star
81

saluki

Utility based CSS-in-JS theming
JavaScript
6
star
82

fastify-secrets-aws

Fastify secrets plugin for AWS Secrets Manager
JavaScript
6
star
83

fastify-cloud-run

Fastify on Google Cloud Run
JavaScript
6
star
84

iot-system

A fuge config for a demo iot system
JavaScript
6
star
85

fastify-slow-down

A slow down plugin for fastify
JavaScript
6
star
86

github-action-check-linked-issues

GitHub action to check if pull requests have their corresponding issues.
JavaScript
6
star
87

github-board-slack-notifications

Send notifications to a Slack channel for any changes that are performed in a GitHub board (Projects v2 / beta)
JavaScript
6
star
88

openshift-ansible

Ansible code for openshift
Python
5
star
89

fastify-jwt-jwks

JSON Web Key Set (JWKS) verification plugin for Fastify
JavaScript
5
star
90

memleak-exercise

JavaScript
5
star
91

github-action-notify-release

GitHub Action that automatically creates an issue with an overview of the commits that are waiting to be released
JavaScript
5
star
92

fastify-ravendb

Fastify RavenDB connection plugin
JavaScript
5
star
93

fastify-secrets-azure

Fastify secrets plugin for Azure Key Vault
JavaScript
5
star
94

anger

pub-sub tester for Nes
JavaScript
5
star
95

choo-bundles

Bundle splitting with HTTP2 push support for Choo with choo-ssr
JavaScript
5
star
96

sentinel

Sentinel - a testing & monitoring application
JavaScript
5
star
97

mercurius-explain-graphiql-plugin

A Graphiql plugin to show the results from mercurius-explain
JavaScript
5
star
98

azure-workshop

Azure Workshop on Kubernetes
JavaScript
5
star
99

webinar-streams

Examples for the streams Webinar
JavaScript
4
star
100

initium-cli

CLI tool for the Initium project
Go
4
star