Giter Site home page Giter Site logo

exoframejs / exoframe Goto Github PK

View Code? Open in Web Editor NEW
1.1K 23.0 68.0 4.74 MB

Exoframe is a self-hosted tool that allows simple one-command deployments using Docker

Home Page: https://exoframejs.github.io/exoframe/

JavaScript 97.08% Dockerfile 0.09% HTML 0.15% Shell 0.71% TypeScript 1.61% CSS 0.36%
nodejs docker exoframe cli-app docker-manage-tool deployment deploy-tool self-hosted docker-container devops

exoframe's Introduction

Exoframe

Simple Docker deployment tool

⚠️ This is a pre-release version: it is a work in progress and might be unstable at the moment!
You can check the progress towards stable release here.
If you are looking for stable version and docs - look in legacy-master branch.

Test Status npm license

Exoframe is a self-hosted tool that allows simple one-command deployments using Docker.

Features

  • One-command project deployment
  • SSH key based auth
  • Rolling updates
  • Deploy tokens (e.g. to deploy from CI)
  • Deploy secrets (e.g. to hide sensitive env vars)
  • Automated HTTPS setup via letsencrypt *
  • Automated gzip compression *
  • Rate-limit support *
  • Basic HTTP Auth support *
  • Simple access to the logs of deployments
  • Multiple deployment endpoints and multi-user support
  • Simple update procedure for client, server and Traefik
  • Optional automatic subdomain assignment (i.e. every deployment gets its own subdomain)
  • Complex recipes support (i.e. deploy complex systems in one command)

* Feature provided by Traefik

Demo

asciicast

Getting started

To be done.

Docs

To be done.

Special thanks

Thanks to:

License

Licensed under MIT.

exoframe's People

Contributors

0xflotus avatar aeolun avatar andrasbacsai avatar dggodfrey avatar fdiskas avatar fox1t avatar fweinb avatar greenkeeper[bot] avatar henrikcoll avatar lguzzon avatar mradke avatar robgraeber avatar schorsch3000 avatar sealife avatar sealife97 avatar socarlosb avatar tiim avatar ulan08 avatar unixcow avatar victorberland avatar yamalight avatar yatki avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

exoframe's Issues

Add update way to self-update

Currently there's no way to know that new version of cli or server has been released (I guess for cli you can use npm outdated but that's not very user-friendly).
Would be great to have:

  1. Notifications - for both cli and server (in cli on requests to server?) - that new versions are out.
  2. Update command for server (pull, kill and then recreate) and cli (simply execute npm i -g exoframe@latest?)

Add support for multiple endpoints

Currently you can only use one endpoint and have to login every time upon changing it.
Would be nice to have a way to be authorized with multiple endpoints at the same time.

Template: Java

Create new template for java deployment with "java -jar app.jar" command

Better list output

Currently list command only shows service name and status.
It'd be better to display it as a table, e.g.

1 deployment found on http://exoframe.dev

Project             |  Domain           | Status
test_html_project   | http://html.dev   | Up 1 day

Broken project config file results in a endless "Uploading project to server..."

Hi,
having a broken config-file ( nonvalid json) results in a possible endless 2 minutes spinner with the uploading message, resulting in an Bad Gateway message which results in a JSON parsing error since "Bad Gateway" is not valid JOSN :)
It would be easy to check the config file to be a valid json before uploading.

I would happily provide a PR for this issue, but i'm not 100% sure what the error workflow is.
is it just this:?

spinner.fail("Your exoframe.json is not valid");
return;

Implement rolling update

Currently, when you deploy new version of the service, you have to kill the old one yourself.
Would be great to have a flag that would do that for you (e.g. --update or --replace).

Workflow on server should be something like:

  1. Get new project for deployment
  2. Build it and start it
  3. Wait for it to start
  4. Remove old deployments for current project

That should allow for zero-downtime redeployments.

Domains list on deployment still uses http:// prefix

Current output:

Deploying current project to endpoint: https://exoframe.codezen.net
⠋ Uploading project to server...Deploying using given token..
✔ Upload finsihed!
Your project is now deployed as:

   ID                                   URL                                  Hostname
   exo-yamalight-codezen-97f14790       http://codezen.net, codezen.ru       Not set

Needs to be fixed.

Infrastructure setup recipes

Add way to autoscaffold infrastructure from user recipes.
E.g.:

  • Traefik
  • Nginx proxy + letsencrypt
  • Base for Django project (db, static proxy, etc)

Recipes might include CLI extensions that should enhance deployment process (e.g. Traefik/Nginx recipes should ask user for host name input during deploy)

New command: log

Exoframe currently lack a way to view container logs.
Adding simple exoframe log <svcId> should be sufficient.

Implement deploy tokens

Currently there's no easy way to deploy project from CI/CD system. Adding your private cert to it is not nice.
Deploy tokens system should solve that. How it should work:

  1. User logs in
  2. User generates a deploy token (possibly for specific project?)
  3. The deploy token can then be used with exoframe deploy -t $TOKEN command to deploy project (only specific project?) without authenticating first

Healthchecks support

Add support for docker healthchecks and a config option to make them mandatory.

Implement token management

Now that deployment token support is in - we need a way to manage (mostly name/list/revoke) existing tokens.

Add way to specify hardware limits using presets

Implement a way to specify hardware limits to containers using predefined performance presets.

Basic presets:

  • low-priority service (25% limits)
  • normal service (50% limits)
  • priority service (no limits)

Way to switch endpoints

Add way to have multiple Exoframe servers with persisted auth configs and possibility to switch between them.

Trying to set new endpoint without existing config crashes CLI

  1. Remove cli.config.yml
  2. Execute exoframe endpoint http://test.com

Produces following error:

Updating endpoint URL to: http://test.com
(node:16959) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): YAMLException: unacceptable kind of an object to dump [object Undefined]
(node:16959) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Deploy should show human-friendly error when deployment path doesn't exist

If you try to deploy non-existent path at the moment you'll see javascript errors, e.g.:

Deploying status to endpoint: https://localhost:8080
(node:63765) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: ENOENT: no such file or directory, open '/Users/yamalight/Projects/exoframe/exoframe-server/status/exoframe.json'
(node:63765) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Should be handled and display a user-friendly error there.

Add command to update traefik image

Currently when Traefik update comes out, you have to manually pull it, kill it and then restart exoframe to re-instantiate it.
Would be great to have exoframe traefik-update or something like this to automate it.

Beta checklist

Before beta release, we need the following things:

  • make sure all bugs are fixed
  • make sure all new minor features are implemented
  • unit tests to make sure everything works:
    • unit tests for server
    • unit tests for cli
  • setup CI/CD to auto-test and auto-publish new versions
  • refactor and cleanup code (after unit tests are done)
  • implement all the major features
  • update docs to reflect current state of tool

Shell access to running services

Investigate if it's possible to provide direct shell access to running services.
Question is basically - can you proxy shell with REST? (websockets?)

Display deploy progress

Currently exoframe does not show any deploy progress.
Would be good to have an upload progress bar.

Cannot read property 'username' of undefined

I receive an error when executing the command exoframe build

Probably it's unexpected first usage, but below is the error I receive.

 $ exoframe --help

Installing missing plugin: exoframe-template-node
Installing missing plugin: exoframe-template-maven
Installing missing plugin: exoframe-template-nginx
Commands:
  endpoint <url>  set exoframe server URL
  login           login into exoframe server
  build           build current folder using exoframe server
  list [type]     list your images on exoframe server
  deploy [image]  deploy image on exoframe server
  status          get exoframe status info
  stop [service]  stop running service on exoframe server
  rm [service]    remove non-running service on exoframe server
  pull <image>    pull image from registry on exoframe server
  update          update exoframe plugins immediately

Options:
  --version  Show version number                                       [boolean]
  --help     Show help                                                 [boolean]

$ cd /srv/psichi/git/chix-server

$ exoframe build

Building current folder using endpoint: http://localhost:3000
Using template: Dockerfile Exoframe Template
? Image tag: chix-server
? Custom label: 
Trace: Unhandled rejection: TypeError: Cannot read property 'username' of undefined
    at Object.<anonymous> (/home/rhalff/.nvm/versions/node/v6.4.0/lib/node_modules/exoframe/dist/build.js:141:45)
    at next (native)
    at step (/home/rhalff/.nvm/versions/node/v6.4.0/lib/node_modules/exoframe/dist/build.js:56:191)
    at /home/rhalff/.nvm/versions/node/v6.4.0/lib/node_modules/exoframe/dist/build.js:56:368
    at process.on.error (/home/rhalff/.nvm/versions/node/v6.4.0/lib/node_modules/exoframe/dist/index.js:77:51)
    at emitTwo (events.js:106:13)
    at process.emit (events.js:191:7)
    at emitPendingUnhandledRejections (internal/process/promises.js:44:22)
    at runMicrotasksCallback (internal/process/next_tick.js:61:9)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)

The contents of the config at that stage is:

{
    "endpoint": "http://localhost:3000",
    "plugins": {
      "templates": [
        "exoframe-template-node",
        "exoframe-template-maven",
        "exoframe-template-nginx"
      ]
 }

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.