Exemplo n.º 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()
Exemplo n.º 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()
Exemplo n.º 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()
Exemplo n.º 4
0
  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()
Exemplo n.º 5
0
    def setup_ranger_java_patches(self, env):
        import params
        env.set_params(params)

        setup_ranger_xml.setup_java_patch()