A Scripts for Administration Tasks

Oracle Analytics Cloud provides scripts to perform common administration tasks. Always use the scripts provided. Don’t perform any administration tasks manually.

To run the scripts, see Running Administration Scripts.

Caution:

Don’t customize or edit any configuration files associated with your service. Customizations are overwritten when you patch your service and, in some cases, unsupported customizations can prevent patching.

Scripts for Data Visualization and Business Intelligence Services (BI Services)

Administrative Task Script Name More Information

Change the WebLogic administrator password for my BI service

update_wls_admin_password.py

Changing the WebLogic Administrator Password (BI Service Script)

Import a batch of users or roles from a CSV file

import_users_groups_csv.py

Importing Users and Roles from a CSV File (BI Service Script)

Edit or delete a batch of users or roles from a CSV file

update_users_groups.py

Updating or Deleting Users and Roles from Embedded LDAP (BI Service Script)

Gather diagnostic logs related to my BI service into a ZIP file before contacting Oracle Support

collect_diagnostic_logs.py

Gathering Diagnostic Logs into a ZIP file (BI Service Script)

Find out the current status of my BI service

status.sh

Getting Status Information (BI Service Script)

Stop BI component processes running on my service

stop_analytics_suite.py

Stopping and Starting Component Processes (BI Service Script)

Start up BI component processes on my service

start_analytics_suite.py

Stopping and Starting Component Processes (BI Service Script)

Register a SSL private key with my HTTP proxy

proxy_register_ssl_private_key.py

Registering SSL Private Keys with the HTTP Proxy (BI Service Script)

Redirect all HTTP calls to HTTPS

proxy_redirect_http_to_https.py

Redirecting HTTP Calls to HTTPS (BI Service Script)

Scripts for Essbase Services

Administrative Task Script Name More Information

Export Essbase applications and users from v17.3.x to latest update.

export.sh filename

Migrating Essbase Applications and Users

Import Essbase applications and users from v17.3.x to latest update.

import.sh filename

Migrating Essbase Applications and Users

Gather diagnostic logs related to my Essbase service into a ZIP file before contacting Oracle Support

python collect_diagnostic_logs.py

Gathering Diagnostic Logs into a ZIP file (Essbase Service Script)

Running Administration Scripts

You must be an Oracle Analytics Cloud administrator to run the administration scripts. To access a compute node associated with Oracle Analytics Cloud, you use Secure Shell (SSH) client software to establish a secure connection and log in as the user oracle. Several SSH clients are freely available. This topic describes how to run scripts using the ssh utility, included with UNIX and UNIX-like platforms.

Before you start, you’ll need some connection information:

  • The IP address of the compute node

    The IP address of a compute node associated with your Oracle Analytics Cloud service is displayed in My Services (Overview page for the service). See Viewing and Managing Services.

  • The SSH private key file that matches the public key associated with the service.

To connect to a compute node using the ssh utility:
  1. Run the utility.
    $ ssh -i private-key-file-location opc@node-ip-address
    Where:
    • private-key-file-location is the path to the SSH private key file that you registered when you created the service.

    • opc is the operating system user you must connect as. An opc user can perform operations that require root access to the compute node, such as running administration scripts, This user can use the sudo command to gain root access to the compute node.

    • node-ip-address is the IP address of the compute node in x.x.x.x format.

  2. Change to the oracle user.
    sudo su - oracle
  3. Run the Analytics Cloud script.

Changing the WebLogic Administrator Password (BI Service Script)

You set the administrator password for the WebLogic server when you set up your service. If you want to change the password you must always use the script update_wls_admin_password.py.

Script Location

/bi/app/public/bin/update_wls_admin_password.py

To run the script, see Running Administration Scripts.

Syntax

update_wls_admin_password.py [-h] [LOGLEVEL] [LOGDIR] username old_password new_password

Where:

username           Existing WebLogic server administrator username.

old_password  Existing WebLogic server administrator password.

new_password  New password for the WebLogic server administrator user.

Optional parameters:
  • -h      Shows help for the script and exits.

  • LOGLEVEL      Sets the logging level for standard errors (stderr). The default is INFO. Options:

    • DEBUG
    • INFO
    • WARNING
    • ERROR
    • CRITICAL

    The logging level for messages in the log file is always DEBUG.

  • LOGDIR      Log directory. The default directory is: /var/log/bi

Example

update_wls_admin_password.py weblogic welcome1 mysecretpassword

Importing Users and Roles from a CSV File (BI Service Script)

Rather than add users manually one at a time through the Console, you can add a batch of users from a file. To do this, create a CSV (comma-separated values) file that contains the user data in a fixed format. You can create multiple user roles with member assignments from CSV files too. To import users and roles this way, use the script import_users_groups_csv.py.

It’s important that the CSV file is formatted correctly. Spaces are not allowed.

Import Type Information Required in the CSV Example
Users User ID,Display Name,Password,Given Name,Last Name,Email
AGold,Ali Gold,MyPassword1,Alice,Gold,alice.gold@example.com
BJones,Brian Jones,MyPassword12,Brian,Jones,brian.jones@example.com
JSmith,Johnnie Smith,MyPassword1234,John,Smith,john.smith@example.com
SWasher,Sal Washer,MyPassword12345,Sally,Washer,sally.washer@example.com
Roles Display Name,Description,User Members

One or more User IDs separated by a semicolon.

Reviewers,This role includes a group of users who can review reports,Agold;BJones;JSmith
Editors,This role defines a group of users who can edit reports,BJones;JSmith

Script Location

/bi/app/public/bin/import_users_groups_csv.py

To run the script, see Running Administration Scripts.

Syntax

import_users_groups_csv.py [-h] --admin-user ADMIN_USER
                                --type {users,groups}
                               [--loglevel LOGLEVEL] [--logdir LOGDIR]
                               filename

Where:

filename           Name of the CSV file.

Optional parameters:

  • h      Shows Help for the script and exits.

  • ADMIN_USER      Sets the administrator user name.

  • users,groups      Specifies the type of CSV you want to import.

  • LOGLEVEL       Sets the logging level for standard errors (stderr). The default is INFO. Options:

    • DEBUG
    • INFO
    • WARNING
    • ERROR
    • CRITICAL

    The logging level for messages in the log file is always DEBUG.

  • LOGDIR      Log directory. The default directory is: /var/log/bi

Example

import_users_groups_csv.py allmyusers.csv

Updating or Deleting Users and Roles from Embedded LDAP (BI Service Script)

(Only valid for services using WebLogic embedded LDAP server). Rather than updating or deleting users manually one at a time through the Console, you can update or delete a batch of users from a file. To do this, create a CSV (comma-separated values) file that contains the user data in a fixed format. You can update or delete multiple user roles from CSV files too. To modify users and roles this way, use the script update_users_groups.py.

It’s important that the CSV file is formatted correctly. Spaces are not allowed.

Type Information Required in the CSV Example
Users User ID,Display Name,Password,Given Name,Last Name,Email
AGold,Ali Gold,MyPassword1,Alice,Gold,alice.gold@example.com
BJones,Brian Jones,MyPassword12,Brian,Jones,brian.jones@example.com
JSmith,Johnnie Smith,MyPassword1234,John,Smith,john.smith@example.com
SWasher,Sal Washer,MyPassword12345,Sally,Washer,sally.washer@example.com
Roles Display Name,Description,User Members

One or more User IDs separated by a semicolon.

Reviewers,This role includes a group of users who can review reports,Agold;BJones;JSmith
Editors,This role defines a group of users who can edit reports,BJones;JSmith

Script Location

/bi/app/public/bin/update_users_groups.py

To run the script, see Running Administration Scripts.

Syntax

update_users_groups.py [-h] --admin-user ADMIN_USER
                                --action {update,delete}
                                --type {users,groups}                              [--loglevel LOGLEVEL] [--logdir LOGDIR]
                               filename

Where:

filename           Name of the CSV file.

Optional parameters:

  • h      Shows Help for the script and exits.

  • ADMIN_USER      Sets the administrator user name.

  • update,delete      Specifies whether you want to modify or delete users (or groups) in the CSV file.

  • users,groups      Specifies whether the CSV file contains users or groups.

  • LOGLEVEL       Sets the logging level for standard errors (stderr). The default is INFO. Options:

    • DEBUG
    • INFO
    • WARNING
    • ERROR
    • CRITICAL

    The logging level for messages in the log file is always DEBUG.

  • LOGDIR      Log directory. The default directory is: /var/log/bi

Example

update_users_groups.py delete removeoldusers.csv

Gathering Diagnostic Logs into a ZIP file (BI Service Script)

It’s useful to have all available diagnostic logs and in one place if you’re trying to troubleshoot an issue with your service or your need to contact Oracle Support. Use the script collect_diagnostic_logs.py to collect diagnostic data into a ZIP file.

Script Location

/bi/app/public/bin/collect_diagnostic_logs.py

To run the script, see Running Administration Scripts.

Syntax

collect_diagnostic_logs.py [-h] [--loglevel LOGLEVEL] [--logdir LOGDIR] filename

Where:

filename           Name of the ZIP file you want to generate.

Optional parameters:

  • h      Shows help for the script and exits.

  • LOGLEVEL       Sets the logging level for standard errors (stderr). The default is INFO. Options:

    • DEBUG
    • INFO
    • WARNING
    • ERROR
    • CRITICAL

    The logging level for messages in the log file is always DEBUG.

  • LOGDIR      Log directory. The default directory is: /var/log/bi

Example

collect_diagnostic_logs.py DiagnosticsForMyService.zip

Getting Status Information (BI Service Script)

You can find out the status of your service at any time. Use the script status.sh to report whether WebLogic Server and various other BI processes are up and running.

Script Location

/bi/app/public/bin/status.sh

To run the script, see Running Administration Scripts.

Syntax

status.sh [-v[

Where:

v           Indicates verbose.

Example

status.sh

Stopping and Starting Component Processes (BI Service Script)

If you’re having issues, you can restart the BI components running on your service rather than the entire service. Restarting BI components is often quicker than restarting the service. When you stop BI processes, anyone who is signed in, is signed out. When you restart, users are prompted to sign in again. Use scripts stop_analytics_suite.py and start_analytics_suite.py to stop and start BI components.

Script Location

/bi/app/public/bin/stop_analytics_suite.py

/bi/app/public/bin/start_analytics_suite.py

To run the scripts, see Running Administration Scripts.

Syntax — stopPod.py

stop_analytics_suite.py [-h] [--loglevel LOGLEVEL] [--logdir LOGDIR]
start_analytics_suite.py [-h] [--loglevel LOGLEVEL] [--logdir LOGDIR]

Optional parameters:

  • h      Shows help for the script and exits.

  • LOGLEVEL      Sets the logging level for standard errors (stderr). The default is INFO. Options:

    • DEBUG
    • INFO
    • WARNING
    • ERROR
    • CRITICAL

    The logging level for messages in the log file is always DEBUG.

  • LOGDIR      Log directory. The default directory is: /var/log/bi

Examples

stop_analytics_suite.py
start_analytics_suite.py

Registering SSL Private Keys with the HTTP Proxy (BI Service Script)

You can register your custom SSL certificates to secure HTTPS access to your service. Use the script proxy_register_ssl_private_key.py. to register your private key and your Certificate Authority (CA) signed certificate.

When the service is created, a self-signed certificate is generated. The self-signed certificate is intended to be temporary and you must replace it with a new private key and a certificate signed by a CA which your browsers are configured to trust (that is, a commercial CA built into the browser by the browser vendor).  The temporary certificate expires after one year.

Before You Run the Script

  1. Verify that your private key and SSL certificate files contain the required information.
    • Private key and CA signed certificate must use the DNS registered name as the common name (CN).

      • CA signed certificate must also include the CN as the first Subject Alternative Name

    • Private key and CA signed certificate files must be in PEM format.

    • Private key must not be protected with passphrase.

    • Private key permissions must be set to read-only and owned by the oracle user.

    Note:

    To test any changes you make to certificates and certificate chains on Windows, you might need to clear your SSL state. From the Control Panel menu, select Internet Options, then Content, then Clear SSL State.
  2. If your service uses a DNS registered host name, specify the host name that you want to secure with SSL in servername.conf:

    Note:

    Each service has a public IP address available on the internet. You can register your own FQDN (Fully Qualified Domain Name) against this public IP address so your service appears in your organization's internet domain. The FQDN must match the CN in the certificate. The FQDN must also be present as Subject Alternative Name in the certificate.
    1. Create a file named servername.conf at this location:

      /bi/data/httpd/conf.d/servername.conf

    2. Set permissions on the file as, owned by the oracle user and readable by everyone.

    3. In servername.conf, add a single line:

      ServerName <DNS name that matches your SSL certificate>

      For example: ServerName analytics.myexample.com

Script Location

/bi/app/public/bin/proxy_register_ssl_private_key.py

To run the script, see Running Administration Scripts.

Syntax

proxy_register_ssl_private_key.py [-h] [LOGLEVEL] [LOGDIR] privatekeypath sslcertificatepath

Where:

privatekeypath Name and location of the file containing your private key. For example: /temp/myprivate.key

sslcertificatepath Name and location of the SSL certificate. For example: /temp/mycertfile.crt

Optional parameters:

  • h      Shows help for the script and exits.

  • LOGLEVEL      Sets the logging level for standard errors (stderr). The default is INFO. Options:

    • DEBUG
    • INFO
    • WARNING
    • ERROR
    • CRITICAL

    The logging level for messages in the log file is always DEBUG.

  • LOGDIR      Log directory. The default directory is: /var/log/bi

Redirecting HTTP Calls to HTTPS (BI Service Script)

By default, both HTTP and HTTPS access to the Oracle Analytics Cloud URL is enabled. If you want to redirect all incoming HTTP traffic to HTTPS, you can use the script proxy_redirect_http_to_https.py.

For example, if you currently access the service using http://analytics.mycorp.com/analytics, you are redirected to this URL after running the script: https://analytics.mycorp.com/analytics.  The browser should confirm the valid certificate.

Script Location

/bi/app/public/bin/proxy_redirect_http_to_https.py

Syntax

proxy_redirect_http_to_https.py [-h] [LOGLEVEL] [LOGDIR]

Optional parameters:

  • h      Shows help for the script and exits.

  • LOGLEVEL      Sets the logging level for standard errors (stderr). The default is INFO. Options:

    • DEBUG
    • INFO
    • WARNING
    • ERROR
    • CRITICAL

    The logging level for messages in the log file is always DEBUG.

  • LOGDIR      Log directory. The default directory is: /var/log/bi

Example

proxy_redirect_http_to_https.py

Migrating Essbase Applications and Users

You can migrate applications and users from Oracle Analytics Cloud — Essbase services from 17.3.x to the latest version (17.4.1).

Prerequisites

The scripts in this section will import the Essbase applications, users and groups for you when you install a new Essbase service version.

  1. Copy the following scripts from the old service to the new service, at the same file location. You can check first whether they already exist on the new host.

  • /u01/app/oracle/tools/acss/BI/esscs_tools/lcm/esscs_lcm.py

  • /u01/app/oracle/tools/acss/BI /esscs_tools/lcm/idcs_users.py

  • /u01/app/oracle/tools/acss/BI /esscs_tools/lcm/ldap_users.py

  • /u01/app/oracle/tools/acss/BI /esscs_tools/lcm/user_group.py

  • /u01/app/oracle/tools/acss/BI /esscs_tools/public/essbase_export.sh

  • /u01/app/oracle/tools/acss/BI /esscs_tools/public/essbase_import.sh

Export Script Location

/bi/app/public/bin

To run the export script, see Running Administration Scripts.

Export Syntax

essbase_export.sh filename

Where:

filename           Full path to the tar archive file that will contain all Essbase applications, CSV files of users and groups, and files of settings.

Import Script Location

/bi/app/public/bin

To run the import script, see Running Administration Scripts.

Import Syntax

essbase_import.sh filename

Where:

filename           Name of the tar created by the export script.

Gathering Diagnostic Logs into a ZIP file (Essbase Service Script)

If you’re trying to troubleshoot an issue with Essbase service, use the script python collect_diagnostic_logs.py to collect Essbase service diagnostic data into a ZIP file.

Script Location

/bi/app/public/bin

To run the script, see Running Administration Scripts.

Syntax

python collect_diagnostic_logs.py [-h] filename

Where:

filename           Full path of the ZIP file that you want to generate.

Optional parameter:

h      Shows help for the script.

Example

python collect_diagnostic_logs.py /tmp/DiagnosticsForEssbaseService