folklore-cli

Folklore service framework command line toolkit


License
MIT
Install
pip install folklore-cli==0.2.0

Documentation

folklore-cli: Folklore command line toolkit

https://travis-ci.org/maralla/folklore-cli.svg?branch=master

Command line tool for managing Folklore services.

Install

$ pip install folklore-cli

Usage

$ folklore -h

Run Folklore service

$ folklore serve

Deploy an application

To deploy using ansible, extra requirements should be installed:

$ pip install folklore-cli[deploy]

Add deploy entry to app.yaml:

deploy:
  vars:
    version: HEAD
  targets:
    testing:
      - localhost
      - testing.com
    prod:
      - app.prod

Using the following command to deploy:

$ folklore deploy testing -t deploy

The deploy command is implemented using ansible.

To deploy crontab, add the following config to app.yaml

deploy:
  crontab:
    - name: check dirs
      schedule: "0 5,2 * * *"
      job: 'ls -alh > /dev/null'

    - name: say hello
      schedule:
        minute: 0
        hour: 5,2
      job: 'scripts/say_hello.py'

then run:

$ folklore deploy <target> -t cron

Cron jobs are run under app working directory /srv/{{ app_name }}.

Start an interactive shell

To start an IPython shell, extra requirements should be installed:

$ pip install folklore-cli[shell]

Start the shell:

$ folklore shell -t <host> -- <ipython args>