我要评分
获取效率
正确性
完整性
易理解

Initializing the Feature

Before using OmniAdvisor 2.0, initiate the feature by setting the PostgreSQL database password and history server password as well as creating related database tables.

Command Function

Initializes or updates the PostgreSQL database password and history server password.

Syntax

python ./crypto.pyc [-h] (-i | -d | -s )

Parameter Description

Table 1 Options and values

Option

Description

-h or --help

Optional. It displays help information about a command. The help information contains the command usage, parameter definition, and additional description.

-i or --initialize

Initializes the database password and history server password.

-d or --update database-password

Updates the database password.

-s or --update-history-server-password

Updates the history server password.

Example

Display the command usage, parameter definition, and additional description.

cd $OMNIADVISOR_HOME/BoostKit-omniadvisor_2.0.0/src
python ./crypto.pyc --help

Initialize and update the database password and history server password.

  1. Install OmniAdvisor 2.0 in a specified directory on the management node, for example, /opt/OmniAdvisor2.0, which is represented as $OMNIADVISOR_HOME.
    export OMNIADVISOR_HOME=/opt/OmniAdvisor2.0
  2. Run the auto_deploy.sh script.

    Before using the auto_deploy.sh script, grant the write permission on the $SPARK_HOME/bin/ directory to the Linux user who uses OmniAdvisor 2.0.

    cd $OMNIADVISOR_HOME/BoostKit-omniadvisor_2.0.0/script
    ./auto_deploy.sh
  3. Add the dependency path of the key encryption component to LD_LIBRARY_PATH.
    export LD_LIBRARY_PATH=$OMNIADVISOR_HOME/BoostKit-omniadvisor_2.0.0/kmc_env/lib/:$LD_LIBRARY_PATH
  4. Modify the configuration file based on OmniAdvisor Configuration File.
    Deploy PostgreSQL. Then fill in the backend database configuration in the OmniAdvisor configuration file. For details about how to deploy PostgreSQL, see PostgreSQL Installation Guide.
    cd $OMNIADVISOR_HOME/BoostKit-omniadvisor_2.0.0/config
    vi common_config.ini
  5. Initialize the PostgreSQL database password and history server password.
    cd $OMNIADVISOR_HOME/BoostKit-omniadvisor_2.0.0/src
    python ./crypto.pyc -i

    Enter the database password and history server password as prompted. If you do not want to set the history server password, press Enter when prompted.

    Check that the password meets the following requirements:

    • Contains at least eight characters.
    • Contains at least two types of the following characters:
      • Lowercase letters
      • Uppercase letters
      • Digits
      • Spaces or the following special characters:`~!@#$%^&*()-_=+\|[{}];:'",<.>/?
    • Differs from the account name.

    If the following information is displayed after you run the python ./crypto.pyc -i command, the password has been initialized.

    If you need to initialize the password again, delete the ~/.local/share/python_keyring/keyring_pass.cfg file and try again.

  6. Perform this step if you need to update the database password and history server password. If not required, skip this step.
    cd $OMNIADVISOR_HOME/BoostKit-omniadvisor_2.0.0/src
    python ./crypto.pyc -d # Update the database password.
    python ./crypto.pyc -s # Update the history server password.

  7. Initialize the database tables.
    cd $OMNIADVISOR_HOME/BoostKit-omniadvisor_2.0.0/src
    python ./init.pyc makemigrations
    python ./init.pyc migrate