Code Monkey home page Code Monkey logo

firmament's Introduction

Firmament

Perl and bash scripts to create cooperative database and web server docker containers.
Firmament also provides a much more streamlined command line interface for interacting with docker containers.

Installation

Pull the latest version.
Run "./firmament.js init"
Firmament will download all of its dependencies.

Install-Scripts

There is a folder named "install-scripts". Inside of that folder there are some useful scripts to deal with setting up a ubuntu image.
One in particular, "useradd.sh" contains all of the requisite groups that a user might need to run firmament docker containers.

"_docker-cleanup-volumes.sh"

This script will clean up after docker as it eats up disk space. If you find yourself running low on disk space, docker is probably to blame and this script will fix that.

Dependencies

Nodejs installed under ~/usr/local/bin/node
NOTE If your node install is located somewhere else you will need to modify the top line of the firmament.js file accordingly.

Usage

Make Interaction Shell:
"./firmament.js make"
You will see a make prompt.
make->>
type "help" to get a list of all make commands.
type "template" to generate a template firmament configuration file.
type "make build [filename]" to execute a firmament configuration file.

Docker Interaction Shell:
"./firmament.js docker"
You will see a docker prompt
docker->>
type help to get a list of all docker commands

Config File

The config file is basically just a json array filled with docker container config objects.
Each config object will create and start a docker container.

[{
     "name": "StrongloopWebApp",
     "Image": "jreeme/strongloop:10",
     "DockerFilePath": "docker/strong-pm",
     "Hostname": "webapp",
     "ExposedPorts": {
       "3001/tcp": {}
     },
     "HostConfig": {
       "VolumesFrom": [
         "data-container"
       ],
       "PortBindings": {
         "3001/tcp": [
           {
             "HostPort": "3002"
           }
         ],
         "8701/tcp": [
           {
             "HostPort": "8702"
           }
         ]
       }
     },
     "ExpressApps": [
       {
         "GitUrl": "https://github.com/User/Project",
         "GitSrcBranchName": "master",
         "StrongLoopBranchName": "deploy",
         "StrongLoopServerUrl": "http://localhost:8702",
         "ServiceName": "MyService",
         "Scripts": [
           {
             "RelativeWorkingDir": "./public",
             "Command": "bower",
             "Args": [
               "install",
               "--config.interactive=false"
             ]
           }
         ]
       }
     ]
   }]

NOTE Firmament will run "npm install --ignore_scripts" so any npm scripts in your package.json file need to placed under the scripts section of the appropriate docker config object (see above).

Credits

Author: John Reeme
Moral Support: Justin Lueders, Mike Frame

firmament's People

Contributors

jreeme avatar justinlueders avatar lukewendling avatar foobar123asdf avatar

Stargazers

 avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.