DROP Tutorials



Build VM on host

  1. Install Vagrant
  2. Install VirtualBox

curl -O https://raw.githubusercontent.com/droopp/vagrant/master/Vagrantfile .
vagrant up
vagrant status

On Premis

  1. Connect to host and run

curl https://dropfaas.com/RPMS/drop-bootstrap.sh | sudo sh



Configure DROP cluster namespace

.1. Connect to any node (ssh) or install drop-cli local

drop-cli <ANY NODE HOST>

.2. Run drop-cli and login (admin/admin123)

drop-core:> login admin

.3. View all avaliable nodes freenode_list

drop-core:> freenode_list

.4. Create namespace with name (example main)

drop-core:> cluster_create main --node-ids * --vip

--node-ids - number uid (ex 1,2,3 ) or * - all freenodes
--vip - floating/ virtual ip address

.5. View cluster namespace info

drop-core:> cluster_info main

and all avaliable clusters namespaces

drop-core:> cluster_list

.6. Install avaliable plugin

//Virew all plugins in repo 
drop-core:> plugin_repo

drop-core:> plugin_install main --id drop-plgn-cmd-exec
drop-core:> plugin_install main --id drop-plgn-rrd // Optional
drop-core:> plugin_install main --id drop-plgn-webbone //Optional

.7. View all installed plugin and check version nodes

drop-core:> plugin_list main

drop-core:> cluster_version main

.8. Configure services

service_conf <namespace> --id <systemd.service> 
    0 - not start service
    1 - start on node with vip
    N - start on N nodes

Haproxy run on node with vip

drop-core:> service_conf main --id haproxy --code 1

Web admin ui run on node with vip

drop-core:> service_conf main --id webbone --code 1

.9. Open you browser on vip adress (admin/admin123)

Create function (any lang / use stdin/stdout/stderr)


# Python func example

import sys
import time


def read():
    msg = sys.stdin.readline()
    return msg.strip()

def log(m):
    sys.stderr.write("{}: {}\n".format(time.time(), m))

def send(m):

# Process - actor
#  read - recieve message from world
#  send - send message to world
#  log  -  logging anything

def main(t):
    while 1:
      msg = read()
      if not msg:

      log("start working..")
      log("get message: " + msg)

      resp = "{}".format(msg)


      log("message send: {}".format(resp))

if __name__ == "__main__":

Create flow

Func declaration

# func declare example
name: pyex
    - name: pyex
    image: pyex:0.1.0
    cmd: /usr/bin/python pyex.py 1

Publish function on DROP

.1. Create image build and publish to registry

FROM ubuntu:16.04

RUN apt-get update && apt-get install -y python
RUN useradd drop

COPY ./pyex.py /home/drop/

.2. Run drop-cli and install function

drop-core:> fun_install main --id pyex --ver 0.1.0 --space droopp

--id image name
--ver image version
--space repository name

.3. Run drop-cli and install flow

drop-core:> flow_install main --id https://raw.githubusercontent.com/droopp/drop-fun-examples/master/python/pyex.yaml

--id local or remote YAML config location