Group
Extension

Matches 2

MongoHosting ( O/OV/OVNTATAR/MongoHosting.tar.gz, OVNTATAR, 2019; MetaCPAN )
MongoHosting/lib/MongoHosting/ReplicaSet/Shard.pm ( view source; MetaCPAN )
s::Run;
use Rex::Commands::Service;
use namespace::clean;
use Rex::Resource::firewall;
use JSON qw(decode_json);

has is_arbiter => (is => 'ro', init_arg => 'arbiter', default => sub {0});

sub init {
al',
    'var s = rs.status(); printjson([s.ok, s.set])'
    ];

  return if $?;
  my $json = eval { decode_json($out) } or warn $@, return;
  my ($ok, $rs) = @$json;

  return 1 if $ok && defined $rs
: <%= ($index++) %>, host: "<%= $host->dsn %>" },
    <% } %>
    ]
  }
);
sleep(10000);
<% if($c->is_primary) { %>
rs.addArb("<%= $c->parent->arbiter->dsn %>");
<% } %>

printjson(rs.status());
@end
MongoHosting ( O/OV/OVNTATAR/MongoHosting.tar.gz, OVNTATAR, 2019; MetaCPAN )
MongoHosting/lib/MongoHosting/ReplicaSet/Config.pm ( view source; MetaCPAN )
Service;
use Rex::Commands::Pkg;
use Rex::Commands::Host;
use Rex::Resource::firewall;
use JSON qw(decode_json);

sub init {
  my $self = shift;

  return unless $self->is_primary;
  return if $self->
--eval',
    'var s = rs.status(); printjson([s.ok, s.set])'
    ];

  return if $?;
  my $json = eval { decode_json($out) } or return;
  my ($ok, $rs) = @$json;
  return 1 if $ok && defined $rs && $r

    configsvr: true,
    members: [
    <% foreach my $host (@{$c->siblings}) { %>
      { _id : <%= ($index++) %>, host: "<%= $host->dsn %>" },
    <% } %>
    ]
  }
)

printjson(rs.status());
@end

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.