GithubHelp home page GithubHelp logo

fspot / fabkins Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 0.0 480 KB

Femto-jenkins based on fabfiles. Install : http://ascii.io/a/5133

License: MIT License

Python 24.29% Shell 3.53% CSS 72.18%

fabkins's Introduction

Fabkins

Femto-jenkins based on fabfiles.

Features

  • simple, tiny and fast.
  • no database :
    • old build logs are in plain text.
    • job configurations are short json files.
    • fabfiles are actually just fabfiles. You could use them without fabkins.
  • builds can be triggered by hand or by web-hooks.
  • output of current builds can be visualized in "realtime" with websockets.

Screenshots

screenshot_1 screenshot_2

Installation

You need a UNIX server with python >= 2.6.

Install it in a virtualenv, please.

(venv) $ pip install fabkins
$ # if you've done that in a virtualenv, you should do that then:
$ # fabkins-patch-venv

Configuration and launch

Usage:

(venv) $ fabkins -h
Usage: fabkins [OPTIONS]

Fabkins, a femto-jenkins based on fabfiles.

Options:
  -c, --config-file=STR   path of fabkins.ini
  --fabfile=STR           path of default fabfile.py template
  --workdir=STR           path of fabkins working directory (default: ~/workdir)
  --web-port=INT          listening http port (default: 8010)
  --web-prefix=STR        '/fabkins' if your instance is at example.com/fabkins(default: '/fabkins')
  --password=STR          the password used for log-in (sha256) (default: sha256 of "password")
  --webhook-key=STR       the password used to trigger web hooks (default: "th3w3bh00kk3y")
  --secret-key=STR
  --debug=STR
  -h, --help              Show this help

ProTip /!\ you should probably just use the "-c" option.
First, generate a "fabkins.ini" file -> "fabkins-gen-config -o ./fabkins.ini"
Edit it, and then launch fabkins -> "fabkins -c ./fabkins.ini"

Configuration:

(venv) $ fabkins-gen-config -o ~/fabkins.ini -p pass  # "pass" will be sha256summed
(venv) $ vim ~/fabkins.ini  # some edits
(venv) $ cat ~/fabkins.ini
[fabkins]
workdir = /home/me/workdir
web-port = 8010
web-prefix = /fabkins
password = d74ff0ee8da3b9806b18c877dbf29bbde50b5bd8e4dad7a3a725000feb82e8f1
webhook-key = th3w3bh00kk3y

Launch:

(venv) $ fabkins -c ~/fabkins.ini
# some output : it runs !

You can access the app at http://localhost:8010/fabkins, password = "pass".

Next steps : make nginx serve static content, and create an upstart job to control the service.

Security

The security of this application relies only on UNIX basic rights. Someone who can log in the webapp can do everything the user that launched the service can do. So you should use a separate user for this service, with restricted rights, be the only one who knows the password, use HTTPS, and be confident.

Dependencies

  • gevent
  • gevent-websocket
  • Flask
  • Fabric
  • clize

See requirements.txt for more info about well working versions of these dependencies.

Caution

Although it seems to work fine, I'm not using thread-safe stuff, so it should break. So make backups. Do not use it for production / critical stuff.

fabkins's People

Contributors

fspot avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  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.