Exemplo n.º 1
0
  def configure(self, env):
    import params

    ganglia.groups_and_users()

    Directory(params.ganglia_conf_dir,
              owner="root",
              group=params.user_group,
              recursive=True
    )

    ganglia.config()

    self.generate_slave_configs()

    Directory(path.join(params.ganglia_dir, "conf.d"),
              owner="root",
              group=params.user_group
    )

    File(path.join(params.ganglia_dir, "conf.d/modgstatus.conf"),
         owner="root",
         group=params.user_group
    )
    File(path.join(params.ganglia_dir, "conf.d/multicpu.conf"),
         owner="root",
         group=params.user_group
    )
    File(path.join(params.ganglia_dir, "gmond.conf"),
         owner="root",
         group=params.user_group
    )

    if params.is_ganglia_server_host:
      self.generate_master_configs()
Exemplo n.º 2
0
    def configure(self, env):
        import params

        ganglia.groups_and_users()

        Directory(params.ganglia_conf_dir,
                  owner="root",
                  group=params.user_group,
                  recursive=True)

        ganglia.config()

        self.generate_slave_configs()

        Directory(path.join(params.ganglia_dir, "conf.d"),
                  owner="root",
                  group=params.user_group)

        File(path.join(params.ganglia_dir, "conf.d/modgstatus.conf"),
             owner="root",
             group=params.user_group)
        File(path.join(params.ganglia_dir, "conf.d/multicpu.conf"),
             owner="root",
             group=params.user_group)
        File(path.join(params.ganglia_dir, "gmond.conf"),
             owner="root",
             group=params.user_group)

        if params.is_ganglia_server_host:
            self.generate_master_configs()

            if len(params.gmond_apps) != 0:
                self.generate_app_configs()
                pass
            pass
Exemplo n.º 3
0
    def configure(self, env):
        import params
        env.set_params(params)

        ganglia.config()

        generate_daemon("gmetad",
                        name="gmetad",
                        role="server",
                        owner="root",
                        group=params.user_group)

        server_files()
        File(path.join(params.ganglia_dir, "gmetad.conf"),
             owner="root",
             group=params.user_group)
Exemplo n.º 4
0
  def configure(self, env):
    import params
    env.set_params(params)

    ganglia.config()

    generate_daemon("gmetad",
                    name = "gmetad",
                    role = "server",
                    owner = "root",
                    group = params.user_group)

    server_files()
    File(path.join(params.ganglia_dir, "gmetad.conf"),
         owner="root",
         group=params.user_group
    )
Exemplo n.º 5
0
    def configure(self, env):
        import params

        ganglia.groups_and_users()
        ganglia.config()

        generate_daemon("gmetad",
                        name="gmetad",
                        role="server",
                        owner="root",
                        group=params.user_group)

        change_permission()
        server_files()
        File(path.join(params.ganglia_dir, "gmetad.conf"),
             owner="root",
             group=params.user_group)
Exemplo n.º 6
0
    def configure(self, env):
        import params

        ganglia.config()

        self.generate_slave_configs()

        File(path.join(params.ganglia_dir, "gmond.conf"),
             owner="root",
             group=params.user_group)

        if params.is_ganglia_server_host:
            self.generate_master_configs()

            if len(params.gmond_apps) != 0:
                self.generate_app_configs()
                pass
            pass
Exemplo n.º 7
0
  def configure(self, env):
    import params

    ganglia.config()

    self.generate_slave_configs()

    File(path.join(params.ganglia_dir, "gmond.conf"),
         owner="root",
         group=params.user_group
    )

    if params.is_ganglia_server_host:
      self.generate_master_configs()

      if len(params.gmond_apps) != 0:
        self.generate_app_configs()
        pass
      pass
Exemplo n.º 8
0
  def configure(self, env):
    import params

    ganglia.groups_and_users()
    ganglia.config()

    if params.has_namenodes:
      generate_daemon("gmond",
                      name = "HDPNameNode",
                      role = "server",
                      owner = "root",
                      group = params.user_group)

    if params.has_jobtracker:
      generate_daemon("gmond",
                      name = "HDPJobTracker",
                      role = "server",
                      owner = "root",
                      group = params.user_group)

    if params.has_hbase_masters:
      generate_daemon("gmond",
                      name = "HDPHBaseMaster",
                      role = "server",
                      owner = "root",
                      group = params.user_group)

    if params.has_resourcemanager:
      generate_daemon("gmond",
                      name = "HDPResourceManager",
                      role = "server",
                      owner = "root",
                      group = params.user_group)

    if params.has_nodemanager:
      generate_daemon("gmond",
                      name = "HDPNodeManager",
                      role = "server",
                      owner = "root",
                      group = params.user_group)

    if params.has_historyserver:
      generate_daemon("gmond",
                      name = "HDPHistoryServer",
                      role = "server",
                      owner = "root",
                      group = params.user_group)

    if params.has_slaves:
      generate_daemon("gmond",
                      name = "HDPDataNode",
                      role = "server",
                      owner = "root",
                      group = params.user_group)

    if params.has_tasktracker:
      generate_daemon("gmond",
                      name = "HDPTaskTracker",
                      role = "server",
                      owner = "root",
                      group = params.user_group)

    if params.has_hbase_rs:
      generate_daemon("gmond",
                      name = "HDPHBaseRegionServer",
                      role = "server",
                      owner = "root",
                      group = params.user_group)

    if params.has_nimbus_server:
      generate_daemon("gmond",
                      name = "HDPNimbus",
                      role = "server",
                      owner = "root",
                      group = params.user_group)

    if params.has_supervisor_server:
      generate_daemon("gmond",
                      name = "HDPSupervisor",
                      role = "server",
                      owner = "root",
                      group = params.user_group)


    if params.has_flume:
      generate_daemon("gmond",
                      name = "HDPFlumeServer",
                      role = "server",
                      owner = "root",
                      group = params.user_group)

    if params.has_journalnode:
      generate_daemon("gmond",
                      name = "HDPJournalNode",
                      role = "server",
                      owner = "root",
                      group = params.user_group)
                                
    if params.ganglia_server_host == params.hostname:
      generate_daemon("gmetad",
                      name = "gmetad",
                      role = "server",
                      owner = "root",
                      group = params.user_group)
                      
      generate_daemon("gmond",
          name = "HDPSlaves",
          role = "server",
          owner = "root",
          group = params.user_group)

    change_permission()
    server_files()
    File(path.join(params.ganglia_dir, "gmetad.conf"),
         owner="root",
         group=params.user_group
    )
Exemplo n.º 9
0
    def configure(self, env):
        import params

        ganglia.groups_and_users()

        Directory(params.ganglia_conf_dir,
                  owner="root",
                  group=params.user_group,
                  recursive=True)

        ganglia.config()

        if params.is_namenode_master:
            generate_daemon("gmond",
                            name="HDPNameNode",
                            role="monitor",
                            owner="root",
                            group=params.user_group)

        if params.is_jtnode_master:
            generate_daemon("gmond",
                            name="HDPJobTracker",
                            role="monitor",
                            owner="root",
                            group=params.user_group)

        if params.is_rmnode_master:
            generate_daemon("gmond",
                            name="HDPResourceManager",
                            role="monitor",
                            owner="root",
                            group=params.user_group)

        if params.is_hsnode_master:
            generate_daemon("gmond",
                            name="HDPHistoryServer",
                            role="monitor",
                            owner="root",
                            group=params.user_group)

        if params.is_nimbus_host:
            generate_daemon("gmond",
                            name="HDPNimbus",
                            role="monitor",
                            owner="root",
                            group=params.user_group)
        if params.is_supervisor_host:
            generate_daemon("gmond",
                            name="HDPSupervisor",
                            role="monitor",
                            owner="root",
                            group=params.user_group)

        if params.is_hbase_master:
            generate_daemon("gmond",
                            name="HDPHBaseMaster",
                            role="monitor",
                            owner="root",
                            group=params.user_group)

        if params.pure_slave:
            generate_daemon("gmond",
                            name="HDPSlaves",
                            role="monitor",
                            owner="root",
                            group=params.user_group)

        if params.is_slave:
            generate_daemon("gmond",
                            name="HDPDataNode",
                            role="monitor",
                            owner="root",
                            group=params.user_group)

        if params.is_tasktracker:
            generate_daemon("gmond",
                            name="HDPTaskTracker",
                            role="monitor",
                            owner="root",
                            group=params.user_group)

        if params.is_hbase_rs:
            generate_daemon("gmond",
                            name="HDPHBaseRegionServer",
                            role="monitor",
                            owner="root",
                            group=params.user_group)

        if params.is_flume:
            generate_daemon("gmond",
                            name="HDPFlumeServer",
                            role="monitor",
                            owner="root",
                            group=params.user_group)

        if params.is_jn_host:
            generate_daemon("gmond",
                            name="HDPJournalNode",
                            role="monitor",
                            owner="root",
                            group=params.user_group)

        Directory(path.join(params.ganglia_dir, "conf.d"),
                  owner="root",
                  group=params.user_group)

        File(path.join(params.ganglia_dir, "conf.d/modgstatus.conf"),
             owner="root",
             group=params.user_group)
        File(path.join(params.ganglia_dir, "conf.d/multicpu.conf"),
             owner="root",
             group=params.user_group)
        File(path.join(params.ganglia_dir, "gmond.conf"),
             owner="root",
             group=params.user_group)