Commit c17df384 authored by Dimitris Aragiorgis's avatar Dimitris Aragiorgis Committed by Christos Stavrakakis

deploy: Change gunicorn file only if Archip is installed

Currently cyclades and pithos require a specific gunicorn setup
with GeventArchipelagoWorker. Plus they require a config
file that is included in snf-pithos-app; pithos.conf.py

This file must be installed both in pithos and cyclades. Therefore
we have it as a template and install it under /etc/archipelago.

Add archipelago.conf template in order to customize SEGMENT_SIZE.

For the above responsible is Archip component.
Signed-off-by: default avatarDimitris Aragiorgis <dimara@grnet.gr>
parent 830b912a
# xseg
[XSEG]
# Max xseg ports supported by segment
SEGMENT_PORTS = 2048
SEGMENT_DYNPORTS = 1024
# Max segment size
SEGMENT_SIZE = 512
# Start port of xsegbd devices
XSEGBD_START=0
# End port of xsegbd devices
XSEGBD_END=499
# Start of port range that can be used by the vlmc tool
VTOOL_START=1003
# End of port range that can be used by the vlmc tool
VTOOL_END=1022
[PEERS]
ROLES=blockerb blockerm mapperd vlmcd
# Order matters. Peers will be started with list order and stopped with reversed
# order.
ORDER=blockerb blockerm mapperd vlmcd
# (peer role, peer type)
# Mandatory peer roles:
# blockerb
# blockerm
# mapperd
# vlmcd
#
# Available peer types:
# rados_blocker
# file_blocker
# mapperd
# vlmcd
#
# Generic peer options
# portno_start: Start of port range that will be used by the peer
# portno_end: End of port range that will be used by the peer
# nr_ops: Max number of flying operations. Must be a power of 2.
# log_level: verbosity levels for each xseg peer
# 0 - Error
# 1 - Warnings
# 2 - Info
# 3 - Debug
# Warning: debug level 3 logs A LOT!
# nr_threads: Number of threads of each peer. Currently only blockers supports
# threads with the following tricks:
# a) Threads in file_blocker are I/O threads that block.
# b) Threads in rados_blocker are processing threads. For lock
# congestion reasons, avoid setting them to a value larger than 4.
# file_blocker specific options:
#
# archip_dir: Where archipelago files will reside
# fdcache: Fd cache size
# rados_blocker specific options:
#
# pool: rados pool where objects will reside
[blockerb]
type=file_blocker
portno_start=1000
portno_end=1000
log_level=3
nr_ops=64
nr_threads=64
archip_dir=/srv/archip/blocks
fdcache=512
direct=True
[blockerm]
type=file_blocker
portno_start=1002
portno_end=1002
log_level=3
nr_ops=64
nr_threads=64
archip_dir=/srv/archip/maps
fdcache=512
direct=True
# mapperd specific options:
#
# blockerb_port: target port that will be used to communicate with the blockerb
# blockerm_port: target port that will be used to communicate with the blockerm
[mapperd]
type=mapperd
portno_start=1001
portno_end=1001
log_level=3
nr_ops=512
blockerb_port=1000
blockerm_port=1002
# vlmcd specific options:
#
# blocker_port: target port that will be used to communicate with the blockerb
# mapper_port: target port that will be used to communicate with the mapper
[vlmcd]
type=vlmcd
portno_start=500
portno_end=999
log_level=3
nr_ops=512
blocker_port=1000
mapper_port=1001
......@@ -4,13 +4,12 @@ CONFIG = {
'DJANGO_SETTINGS_MODULE': 'synnefo.settings',
},
'working_dir': '/etc/synnefo',
'user': 'root',
'group': 'root',
'user': 'www-data',
'group': 'www-data',
'args': (
'--bind=127.0.0.1:8080',
'--workers=6',
'--worker-class=pithos.workers.gevent_archipelago.GeventArchipelagoWorker',
'--config=/etc/synnefo/pithos.conf.py',
'--workers=8',
'--worker-class=gevent',
# '--worker-class=sync',
'--log-level=debug',
),
......
CONFIG = {
'mode': 'django',
'environment': {
'DJANGO_SETTINGS_MODULE': 'synnefo.settings',
},
'working_dir': '/etc/synnefo',
'user': 'root',
'group': 'root',
'args': (
'--bind=127.0.0.1:8080',
'--workers=6',
'--worker-class=pithos.workers.gevent_archipelago.GeventArchipelagoWorker',
'--config=/etc/archipelago/pithos.conf.py',
# '--worker-class=sync',
'--log-level=debug',
),
}
......@@ -372,10 +372,7 @@ class Ganeti(SynnefoComponent):
] + self.prepare_net_infra()
def restart(self):
return ["/etc/init.d/ganeti restart",
"mkdir -p /srv/archip/blocks",
"mkdir -p /srv/archip/maps",
"archipelago restart"]
return ["/etc/init.d/ganeti restart"]
class Master(SynnefoComponent):
......@@ -1157,15 +1154,20 @@ class Archip(SynnefoComponent):
]
def prepare(self):
return ["mkdir -p /etc/archip"]
return ["mkdir -p /etc/archipelago"]
def configure(self):
r1 = {"HOST": self.node_info.fqdn}
return [
("/etc/archip/pithos.conf.py", {}, {})
("/etc/gunicorn.d/synnefo-archip", r1,
{"remote": "/etc/gunicorn.d/synnefo"}),
("/etc/archipelago/pithos.conf.py", {}, {}),
("/etc/archipelago/archipelago.conf", {}, {})
]
def restart(self):
return [
"/etc/init.d/gunicorn restart",
"archipelago restart"
]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment