NAME
Disbatch::Roles - define and create MongoDB roles and users for Disbatch
VERSION
version 3.990
SUBROUTINES
- new
-
Parameters:
db => $db, plugin_perms => $plugin_perms, disbatchd => $disbatchd_pw, disbatch_web => $disbatch_web_pw, task_runner => $task_runner_pw, plugin => $plugin_pw
C<db> is a C<MongoDB::Database> object which must be authenticated with an accout having the C<root> role. C<plugin_perms> is a C<HASH> in the format of C<< { collection_name => array_of_actions, ... } >>, to give the plugin the needed permissions for MongoDB. C<disbatchd>, C<disbatch_web>, C<task_runner>, and C<plugin> are roles and users to create, with their values being their respective passwords.
Dies if invalid parameters.
- create_roles_and_users
-
Parameters: none.
Creates the roles and users for
disbatchd
,disbatch_web
,task_runner
, andplugin
.Dies if the roles or users already exist, or on any other MongoDB error.
- drop_roles_and_users
-
Parameters: none.
Drops the roles and users for
disbatchd
,disbatch_web
,task_runner
, andplugin
.Dies if the roles or users don't exist(???), or on any other MongoDB error.
SEE ALSO
AUTHORS
Ashley Willis <awillis@synacor.com>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2016 by Ashley Willis.
This is free software, licensed under:
The Apache License, Version 2.0, January 2004