Add APPROVAL_RBT to docklet.conf and user can turn on or off the robot by the field.
This commit is contained in:
parent
d7123625c6
commit
09745ab8e1
|
@ -87,11 +87,16 @@ Pay attention to the following settings:
|
||||||
or not. Both master and worker must be set by same value.
|
or not. Both master and worker must be set by same value.
|
||||||
- PUBLIC_IP : publick ip of this machine. If DISTRIBUTED_GATEWAY is True,
|
- PUBLIC_IP : publick ip of this machine. If DISTRIBUTED_GATEWAY is True,
|
||||||
users' gateways can be setup on this machine. Users can visit this
|
users' gateways can be setup on this machine. Users can visit this
|
||||||
machine by the public ip. default: IP of NETWORK_DEVICE.
|
machine by the public ip. default: IP of NETWORK_DEVICE.
|
||||||
- USER_IP : the ip of user server. default : localhost
|
- USER_IP : the ip of user server. default : localhost
|
||||||
- MASTER_IPS : tell the web server the ips of all the cluster master.
|
- MASTER_IPS : tell the web server the ips of all the cluster master.
|
||||||
- OPEN_REGISTRY : whether allow user to register a new account.
|
- OPEN_REGISTRY : whether allow user to register a new account.
|
||||||
|
- AUTH_KEY: the key to request users server from master, or to request
|
||||||
|
master from users server. Please set the same value on each machine.
|
||||||
|
Please don't use the default value.
|
||||||
|
- APPROVAL_RBT: whether to start the approval robot that will approve
|
||||||
|
beans applications from users automatically.
|
||||||
|
|
||||||
## Start ##
|
## Start ##
|
||||||
|
|
||||||
### distributed file system ###
|
### distributed file system ###
|
||||||
|
|
|
@ -171,8 +171,13 @@
|
||||||
# AUTH_KEY: the key to request users server from master,
|
# AUTH_KEY: the key to request users server from master,
|
||||||
# or to request master from users server. Please set the
|
# or to request master from users server. Please set the
|
||||||
# same value on each machine. Please don't use the default value.
|
# same value on each machine. Please don't use the default value.
|
||||||
# AUTH_KEY="docklet"
|
# AUTH_KEY=docklet
|
||||||
|
|
||||||
# OPEN_REGISTRY: whether allow user to register new account or not.
|
# OPEN_REGISTRY: whether allow user to register new account or not.
|
||||||
# default:False
|
# default:False
|
||||||
# OPEN_REGISTRY:False
|
# OPEN_REGISTRY=False
|
||||||
|
|
||||||
|
# APPROVAL_RBT: whether to start the approval robot that will approve
|
||||||
|
# beans applications from users automatically.
|
||||||
|
# ON or OFF, default: ON.
|
||||||
|
# APPROVAL_RBT=ON
|
||||||
|
|
|
@ -73,5 +73,7 @@ def getenv(key):
|
||||||
return os.environ.get("AUTH_KEY","docklet")
|
return os.environ.get("AUTH_KEY","docklet")
|
||||||
elif key =="OPEN_REGISTRY":
|
elif key =="OPEN_REGISTRY":
|
||||||
return os.environ.get("OPEN_REGISTRY","False")
|
return os.environ.get("OPEN_REGISTRY","False")
|
||||||
|
elif key =="APPROVAL_RBT":
|
||||||
|
return os.environ.get("APPROVAL_RBT","ON")
|
||||||
else:
|
else:
|
||||||
return os.environ.get(key,"")
|
return os.environ.get(key,"")
|
||||||
|
|
|
@ -591,7 +591,11 @@ if __name__ == '__main__':
|
||||||
|
|
||||||
G_applicationmgr = beansapplicationmgr.ApplicationMgr()
|
G_applicationmgr = beansapplicationmgr.ApplicationMgr()
|
||||||
approvalrbt = beansapplicationmgr.ApprovalRobot()
|
approvalrbt = beansapplicationmgr.ApprovalRobot()
|
||||||
approvalrbt.start()
|
if(env.getenv("APPROVAL_RBT") == "ON"):
|
||||||
|
approvalrbt .start()
|
||||||
|
logger.info("ApprovalRobot is started.")
|
||||||
|
else:
|
||||||
|
logger.info("ApprovalRobot is not started.")
|
||||||
|
|
||||||
# server = http.server.HTTPServer((masterip, masterport), DockletHttpHandler)
|
# server = http.server.HTTPServer((masterip, masterport), DockletHttpHandler)
|
||||||
logger.info("starting user server")
|
logger.info("starting user server")
|
||||||
|
|
Loading…
Reference in New Issue