コード例 #1
0
  def pre_upgrade_restart(self, env, upgrade_type=None):
    import params
    env.set_params(params)

    upgrade.prestart(env, "ranger-admin")

    if params.xml_configurations_supported:
      from setup_ranger_xml import ranger, setup_ranger_db, setup_java_patch
      ranger('ranger_admin', upgrade_type=upgrade_type)
      setup_ranger_db(upgrade_type=upgrade_type)
      setup_java_patch(upgrade_type=upgrade_type)

    self.set_ru_rangeradmin_in_progress()
コード例 #2
0
  def install(self, env):
    self.install_packages(env)
    import params
    env.set_params(params)
    if params.xml_configurations_supported:
      from setup_ranger_xml import setup_ranger_db
      setup_ranger_db()

    self.configure(env)

    if params.xml_configurations_supported:
      from setup_ranger_xml import setup_java_patch
      setup_java_patch()
コード例 #3
0
  def pre_rolling_restart(self, env):
    import params
    env.set_params(params)

    upgrade.prestart(env, "ranger-admin")

    if params.xml_configurations_supported:
      from setup_ranger_xml import ranger, setup_ranger_db, setup_java_patch
      ranger('ranger_admin', rolling_upgrade=True)
      setup_ranger_db(rolling_upgrade=True)
      setup_java_patch(rolling_upgrade=True)

    self.set_ru_rangeradmin_in_progress()
コード例 #4
0
ファイル: ranger_admin.py プロジェクト: z00251311/ambari
  def configure(self, env, upgrade_type=None, setup_db=False):
    import params
    env.set_params(params)
    if params.xml_configurations_supported:
      from setup_ranger_xml import ranger
    else:
      from setup_ranger import ranger

    # set up db if we are not upgrading and setup_db is true
    if setup_db and upgrade_type is None:
      if params.xml_configurations_supported:
        from setup_ranger_xml import setup_ranger_db
        setup_ranger_db()

    ranger('ranger_admin', upgrade_type=upgrade_type)

    # set up java patches if we are not upgrading and setup_db is true
    if setup_db and upgrade_type is None:
      if params.xml_configurations_supported:
        from setup_ranger_xml import setup_java_patch
        setup_java_patch()

      if params.stack_supports_ranger_admin_password_change:
        setup_ranger_admin_passwd_change()
コード例 #5
0
    def setup_ranger_java_patches(self, env):
        import params
        env.set_params(params)

        setup_ranger_xml.setup_java_patch()