Пример #1
0
    expand(master, N_MASTER),
    # expand(data, N_DATA),
))

_zookeepernodes = [(master, [0,1,2])]
_namenodes = [(master, [0, 1])]
_journalnodes = [(master, [0,1,2])]
_historyservers = [(master, [2])]
_resourcemanagers = [(master, [0,1])]
_datanodes = [(master, xrange(N_DATA))]
_frontends = [(master, [0])]
_monitor = [(master, [2])]



zookeepers = group('zookeepernodes', _zookeepernodes)
namenodes = group('namenodes', _namenodes)
journalnodes = group('journalnodes', _journalnodes)
historyservers = group('historyservernodes', _historyservers)
resourcemanagers = group('resourcemanagernodes', _resourcemanagers)
datanodes = group('datanodes', _datanodes)
frontends = group('frontendnodes', _frontends)
hadoopnodes = combine('hadoopnodes', namenodes, datanodes,
                      journalnodes, historyservers, frontends)
monitor = group('monitornodes', _monitor)

inventory = [
    zookeepers,
    namenodes,
    journalnodes,
    historyservers,
        expand(master, N_MASTER),
        # expand(data, N_DATA),
    )
)

_zookeepernodes = [(master, [0, 1, 2])]
_namenodes = [(master, [0, 1])]
_journalnodes = [(master, [0, 1, 2])]
_historyservers = [(master, [2])]
_resourcemanagers = [(master, [0, 1])]
_datanodes = [(master, xrange(N_DATA))]
_frontends = [(master, [0])]
_monitor = [(master, [2])]


zookeepers = group("zookeepernodes", _zookeepernodes)
namenodes = group("namenodes", _namenodes)
journalnodes = group("journalnodes", _journalnodes)
historyservers = group("historyservernodes", _historyservers)
resourcemanagers = group("resourcemanagernodes", _resourcemanagers)
datanodes = group("datanodes", _datanodes)
frontends = group("frontendnodes", _frontends)
hadoopnodes = combine("hadoopnodes", namenodes, datanodes, journalnodes, historyservers, frontends)
monitor = group("monitornodes", _monitor)

inventory = [
    zookeepers,
    namenodes,
    journalnodes,
    historyservers,
    resourcemanagers,
Пример #3
0
    'provider': 'openstack',

}

vcl = lambda i: {
    'vcl%d' % i: {
        'ip': '10.0.0.{}'.format(i+10),
    },
}

N_VCL = 1
machines = list(chain(
    expand(vcl, N_VCL)
))


inventory = [
    group('vclnodes', [(vcl, xrange(N_VCL))])
]

spec = dict(
    defaults=defaults,
    machines=machines,
    inventory=inventory,
)

namespace = mk_namespace(spec)


Пример #4
0
N_FRONTEND = 1
N_LOADBALANCER = 0
N_MONITOR = 1
N_GLUSTER = 0

machines = list(chain(
    expand(zk, N_ZK),
    expand(master, N_MASTER),
    expand(data, N_DATA),
    expand(frontend, N_FRONTEND),
    expand(loadbalancer, N_LOADBALANCER),
    expand(monitor, N_MONITOR),
    expand(gluster, N_GLUSTER)
))

zookeepers = group('zookeepernodes', [(zk, xrange(N_ZK))])
namenodes = group('namenodes', [(master, [0,1])])
journalnodes = group('journalnodes', [(master, xrange(N_MASTER))])
historyservers = group('historyservernodes', [(master, [2])])
resourcemanagers = group('resourcemanagernodes', [(master, xrange(N_MASTER))])
datanodes = group('datanodes', [(data, xrange(N_DATA))])
frontends = group('frontendnodes', [(frontend, xrange(N_FRONTEND))])
glusternodes = group('glusternodes', [(gluster, xrange(N_GLUSTER))])
hadoopnodes = combine('hadoopnodes', namenodes, datanodes,
                      journalnodes, historyservers)
loadbalancer = group('loadbalancernodes', [(loadbalancer,
                                            xrange(N_LOADBALANCER))])
monitor = group('monitornodes', [(monitor, xrange(N_MONITOR))])

inventory = [
    zookeepers,