No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

HUAWEI CLOUD Stack 6.5.0 Alarm and Event Reference 04

Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Appendix

Appendix

Importing Environment Variables

Scenarios

You need to manually import environment variables when executing the CPS commands and OpenStack commands.

The system provides a quick script for importing environment variables, but you need to check whether the default environment variable matches the system.

Prerequisites

  • You have logged in to any host in the AZ.
  • You have installed all hosts.
  • You have installed and configured FusionSphere OpenStack.

Procedure

  1. Run the following command and enter the password of the root user to switch to the root user:

    su - root

    The default password of the root user is Huawei@CLOUD8!.

  2. Run the following command to disable user logout upon system timeout:

    TMOUT=0

  3. Check whether the script for importing the environment variables stored in the current system is executed directly.

    The default environment variables are as follows:

    export OS_USERNAME=dc1_admin 
     export OS_TENANT_NAME=dc_system_dc1 
     export OS_REGION_NAME=az1.dc1 
     export OS_AUTH_URL=https://identity.az1.dc1.domainname.com:443/identity/v2.0 
     export OS_PASSWORD=$password 
     export NOVA_ENDPOINT_TYPE=internalURL 
     export OS_ENDPOINT_TYPE=internalURL 
     export CINDER_ENDPOINT_TYPE=internalURL 
     export OS_VOLUME_API_VERSION=2 
    export BASE_BOND=brcps

    For details about the variables, see Table 9-1.

    If you have modified the default environment variables, you can run the cat /usr/bin/install_tool/set_env | grep export command to obtain the current environment variables.

    • If the script is directly executed, go to 8.
    • If the script is not executed, go to 4.
  4. Run the following command to open the preset environment variable script using the vi editor:

    vi /usr/bin/install_tool/set_env

  5. Press i to enter the editing mode.
  6. Change the following italicized information to the actual AZ name and DC name, respectively:
     
     export OS_AUTH_URL=https://identity.az1.dc1.domainname.com:443/identity/v2.0 
     export OS_USERNAME=dc1_admin 
     export OS_TENANT_NAME=dc_system_dc1 
     export OS_REGION_NAME=az1.dc1

    Table 9-1 describes the environment variables.

    Table 9-1 Environment variables

    Parameter

    Description

    OS_AUTH_URL

    Specifies the authentication address, which corresponds to the endpoint of the Keystone service.

    Use the publicURL endpoint.

    You need to modify the AZ, DC name and the domain name suffix.

    OS_USERNAME

    Specifies the DC administrator name. The account is automatically created after the DC installation, and its format is dcname_admin. For example, if the DC name is dc1, the DC administrator username is dc1_admin.

    OS_TENANT_NAME

    Specifies information about the tenant who owns the DC administrator. The information is automatically created after the DC installation, and its format is dc_system_dcname.

    OS_REGION_NAME

    Specifies the AZ name, for example, az1.dc1.

    OS_ENDPOINT_TYPE

    Specifies the endpoint type. This parameter is required when you run OpenStack commands. Set it to internalURL.

    NOVA_ENDPOINT_TYPE

    CINDER_ENDPOINT_TYPE

    OS_VOLUME_API_VERSION

    Specifies the volume version. Set it to 2.

  7. Press Esc, enter :wq, and press Enter.

    The system saves the configuration and exits the vi editor.

  8. Run the following command and enter the password of the OS_USERNAME user as instructed to import environment variables:

    source set_env

    The default password is FusionSphere123.

    Information similar to the following is displayed:

    ... 
     Enter CPS_USERNAME=
  9. Enter the CPS username cps_admin and press Enter.

    Information similar to the following is displayed:

    Enter CPS_PASSWORD=
  10. Enter the password of the cps_admin user and press Enter.

    The default password is FusionSphere123.

    The environment variables are successfully imported if the command outputs of cps host-list and nova list are automatically displayed.

Translation
Download
Updated: 2019-08-30

Document ID: EDOC1100062365

Views: 34306

Downloads: 31

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next