masson v0.2.1
Masson
Masson is a configuration management, orchestration and do-anything-you-want tool. It is here to simplify your life installing complex setup and maintaining dozens, hundreds, or even thousands of servers.
At Adaltas, we use it to deploy full featured Hadoop Clusters.
Installation
Run npm install to download the project dependencies.
Usage
The script ./bin/masson is used to pilot the various command. Run it without
any arguments to print the help page or as ./bin/big help {command} to obtain
help for a particular command.
Features
- SSH: ability to execute remote commands using ssh without having the need for any client to run on the servers.
- Documentation: CoffeeScript Literate provides easy to read and self documented code.
- Code as the single source of truth
- Work entirely offline
- Easy introspection: source code is easy to navigate and understand
Developers
yarn link nikita
yarn link @nikitajs/core
yarn link @nikitajs/db
yarn link @nikitajs/docker
yarn link @nikitajs/filetypes
yarn link @nikitajs/ipa
yarn link @nikitajs/java
yarn link @nikitajs/krb5
yarn link @nikitajs/ldap
yarn link @nikitajs/lxd
yarn link @nikitajs/service
yarn link @nikitajs/tools
yarn link @rybajs/ambari
yarn link @rybajs/storage
yarn link @rybajs/system
yarn link @rybajs/toolsDocumentation
Note, this is a proposal for future Masson evolution and doesnt reflect the current implementation.
Option deps
singleInject a single dependency instead of an array of dependencies. Throw an error if more than one service is present Equals to null if no service is present Used conjointly withlocal, it will return the local service even if the service is present on more than one node.localLoad the service on the local node if the service is already activated.autoActivate the service. Can be used conjointly withlocalto ensure a dependency is executed on every node before a given service.recommandedMark the depencency as important, only for information purpose.requiredEnsure a dependency is activated. Cannot be used conjointly withauto, if a service cannot be automatically loaded, then it is pointless to mark it as required.minEnsure a dependency isn't activated on less then a minimum valuesmaxEnsure a dependency isn't activated on more then a maximum values
Usecases:
Considering a service A declared on one node and a service B declared on a second node, we defined service B with a dependency of service A with the following options:
- Use
local: trueto automatically declare service b on the same node as service A if and only if service B is already defined elsewhere. In the service configuration, the dependency will be set as "null" if service B was not activated elsewhere. - Use
local: true, required: trueto automatically declare service B on the same node as service A and ensure service A is activated elsewhere. - Use
local: true, single: trueto automatically declare service B on the same node as service A. In the service configuration, the dependency will be set as the service object relative to the current node instead of an array of services for every nodes. - Use
auto: trueto automatically activate service B. The service will not be declared on any node. In the service configuration, the dependency will be set as an empty array if the dependency affinity doesnt match any affinity. of services for every nodes. - Use
auto: true, local: trueto automatically activate service B and declare service B as a dependency of service a.
Suggestions on api for deps (lucasbak)
local dependencies
- Use
local: truefor loading the configuration of a module installedlocally(on the same node). It enables to reach the configuration in configure directly example, to enrich it or read from it
`ryba/hadoop/hdfs_nn/index.coffee.md`
module.exports:
deps:
hadoop_core: module: ryba/hadoop/core, local: true `ryba/hadoop/hdfs_nn/configure.coffee.md`
module.exports = (service) ->
service.deps.hadoop_core.options.nameserviceno-instance dependencies
- Use
load: truefor loading the configuration of a module which is not installed nor on the same node nor on the cluster. It enables the module which does the require to configure automatically configurations whithout having the module installed. Note: Should we make a special type for this kind of module, ie this kind of module should only contain a configure() function (configure.coffee.md). Using it as a module in configuration declaration (config.coffee) makes no sens
`ryba/ranger/admin/index.coffee.md`
module.exports:
deps:
db_admin: module: 'ryba/hadoop/core', load: true `ryba/ranger/admin/configure.coffee.md`
module.exports = (service) ->
service.deps.db_admin.options.engine #definedauto dependencies
Suggest-1:
- Use
auto: truefor installing a module locally (on the same node). as a consequenceload: trueis implicitly set and the module configuration can be reached.
`ryba/oozie/server/index.coffee.md`
module.exports:
deps:
mapred_client: module: 'ryba/hadoop/mapred_client', install: true `ryba/oozie/server/configure.coffee.md`
module.exports = (service) ->
service.deps.mapred_client.options #undefined if no other instanced of mapred_client exist on other nodesSuggest-2:
- Use
auto: trueor an other nameinstall: truefor installing a module locally (on the same node).BUTto access local configuration for installed dependencylocal: trueshould be set or all instances will be returned. like this the same behaviour is applied for local options
`ryba/oozie/server/index.coffee.md`
module.exports:
deps:
mapred_client: module: 'ryba/hadoop/mapred_client', install: true, local: true `ryba/oozie/server/configure.coffee.md`
module.exports = (service) ->
service.deps.mapred_client.options['mapreduce.java.mapred.opts'] #definedsingle dependencies
- User
single: truefor loading the configuration of only one instance of the module.
`ryba-env-metal/conf/config.coffee`
module.exports:
cluster: 'mycluster': services:
hdfs_namenode:
module: 'ryba/hadoop/hdfs_nn'
affinity: type: 'nodes', match: 'any', values: ['master01.metal.ryba', 'master02.metal.ryba'] `ryba/hadoop/hdfs_client/index.coffee.md`
module.exports:
deps:
hdfs_namenode: module: 'ryba/hadoop/hdfs_nn', single: true `ryba/hadoop/hdfs_client/configure.coffee.md`
module.exports = (service) ->
service.deps.hdfs_nn.options.nameservice #definedwhat about required
required: trueis a good option as it explicty declares the necessary deps. definition of required:true is: a service A required a service B. But it can be on a different node. On both cases an error is raised at configuration time if the layout of services is not good. We can haverequired: trueorrequired:trueandlocal: trueLike this we specifiy if the service should be installed on the same node or not, and load the local config if it is. Note:required:trueandlocal: trueis DIFFERENT fromauto/install: trueas in the first case the service must be declared in the configuration and in the second case the local config is not loaded by default.
options co-habitation
Options auto: true does not imply local: true. To get configuration for auto dependency, local must be set to true.
An error must be raised if local: true and single: strue are set.
load:true and local:true should be incompatible
load:true and auto:true should be incompatible
Contributors
- David Worms: https://github.com/wdavidw
1 year ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
8 years ago
8 years ago
10 years ago
11 years ago
11 years ago
11 years ago
11 years ago
12 years ago
12 years ago
15 years ago
15 years ago
15 years ago