The Zen of oriole: speed defines the winner.

Prerequisites

  1. Install following packages

    • mongodb
    • mysql
    • rabbitmq
    • redis
    • python3.6
    • libpython3.6

In ubuntu, you can use apt-get to install.
Python3.6 and libpython3.6 have been installed in Ubuntu >= 18.04.

  1. Install oriole-service

pip install oriole-service

Add services.cfg

1
2
3
4
AMQP_URI:      pyamqp://test:test@127.0.0.1                  
database: mysql://test:test@127.0.0.1/test?charset=utf8
test_database: mysql://test:test@127.0.0.1/test?charset=utf8
datasets: redis://127.0.0.1

Add orm

dao/__init__.py

1
2
3
4
5
6
from oriole_service.db import *

class Eric(Base):
__tablename__ = 'eric_table'
uid = Column(types.Integer(), primary_key=True, autoincrement=True)
param = Column(types.Unicode(255), unique=None, default='')

Add services/log.py

1
2
3
4
5
6
7
8
9
10
from oriole_service.app import *

class LogService(App):
name = service_name(__file__)
ver = "1.0.0"

@rpc
def add(self, params={"param": "eric"}):
self.log.debug("# %s(%s)" % ("add", params))
return self._o(params)

run

o r log

monitor

o s

document

o d

Create docker image

DONOT use it if you don’t know docker at all before.

Create log_service image.

o b log

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×