Cleaning up IBM value-add services

This topic describes how to remove IBM value-added services (such as Text Analytic) from your system as part of a migration.

About this task

Important: DO NOT remove Big SQL using the script described in this topic.
These clean-up processes do not remove the Ambari server, nor do they impact any of the configurations. The scripts will remove the top-level value-add RPMs. The value-add services you might see include:
  • Text Analytics (service name: TEXTANALYTICS)
  • BigInsights Home (service name: WEBUIFRAMEWORK)
  • BigSheets (service name: BIGSHEETS)
  • Big R (service name: BIGR)
  • Data Server Manager (service name: DATASERVERMANAGER)

If you are upgrading from 5.0.0.0 or 5.0.1.0 to 5.0.2.0, the only value-add service you need to remove is DATASERVERMANAGER as described in step 1. If you are upgrading from 4.x to 5.0.2.0, you must follow steps 2 to 4 to remove all value-add services.

Note: The cleanup process for removing BigSheets removes data on HDFS for the child workbooks. If you want to save any of the child workbook data, use the Export Data option from the BigSheets home page for each of the child workbooks and save the data on HDFS. For information on how to export data, see Exporting data from a BigSheets workbook.
In the Ambari UI, when you navigate to the service page for a service, the last action listed under Service Actions is Delete Service. The Delete Service option should NOT be used for these services, as it can leave the service in an undefined state. The proper way to remove any of these four services is to follow the steps on this page.  If you already used the Delete Service option for one of the services, you still must follow the steps on this page for proper removal of the service. In such a scenario, you will see a message like the following during removal (using Text Analytics as an example). You must type in y or Y to finish the removal successfully.
Current TEXTANALYTICS status: EMPTY
Unable to detect TEXTANALYTICS in Ambari. It may have already been removed.
Would you like to continue cleanup? (Y/n) y

Procedure

  1. If you are upgrading from 5.0.0.0 or 5.0.1.0, follow these steps to remove DATASERVERMANAGER:
    1. In Ambari, select Services > Big SQL DSM, then select Service Actions > Turn On Maintenance Mode to put Big SQL DSM into Maintenance mode.
    2. Run the DSM Cleanup script:
      /var/lib/ambari-server/resources/extensions/IBM-Big_SQL/5.0.2.0/services/DATASERVERMANAGER/package/scripts/dsm-cleanup.sh -u <ambari_user> -p <ambari_password> -x <ambari_port> -D <node where DSM is installed> -r
    3. Delete the Big SQL DSM service from the UI.
    4. Go to step 5.
  2. Navigate to the directory that contains the clean up scripts:
    cd /usr/ibmpacks/bin/<version>
    Note: The <version> numbers you see will start with 3.0, not 5.0.2.0.
  3. The value-add services include scripts to help you remove the value-add services and to clean up your environment:
    Option Description
    Service cleanup
    
    remove_value_add_services.sh 
      -u <AMBARI_ADMIN_USERNAME> 
      -p <AMBARI_ADMIN_PASSWORD> 
      -x <AMBARI_PORT>   
      -a <STOPSERVICECOUNT> 
      -b <REMOVESERVICECOUNT>  
      -r 
      -l  
      -c <RUN_AS_USER>
      -f
      -s
      -q
    Use the following parameter definitions:
    -u
    The Ambari administrator user name.
    -p
    The Ambari administrator password.
    -x
    The Ambari server port number.
    -s
    The service to remove. The following values are allowed:
    Service
    • TEXTANALYTICS
    • WEBUIFRAMEWORK - This is the BigInsights Home.
    • BIGSHEETS
    • BIGR
    • DATASERVERMANAGER
    -f
    This option is optional. The FORCE option allows you to continue removing the service, even if intermittent steps fail.
    Warning: This might result in an Ambari unknown service state.
    -q
    This option is optional. If removing a service, the parameter specifies to remove stack files that are associated with the service.
    Warning: When running the remove service script, this option prevents a reinstallation.
    -a
    This option is optional. Specifies the number of attempts to stop the service.
    -b
    This option is optional. Specifies the number of attempts to remove the service.
    -r
    (optional) Removes service users.
    -l
    This option is optional. It enables secure https mode.
    -c
    This option is optional. Run as user if a non-root user is installed.
    The following commands can be run to clean up the old IBM value-added services. Additional options may be required.
    remove_value_add_services.sh -u admin -p admin -x 8080 -s BIGSHEETS 
    remove_value_add_services.sh -u admin -p admin -x 8080 -s BIGR 
    remove_value_add_services.sh -u admin -p admin -x 8080 -s TEXTANALYTICS 
    remove_value_add_services.sh -u admin -p admin -x 8080 -s DATASERVERMANAGER 
    remove_value_add_services.sh -u admin -p admin -x 8080 -s WEBUIFRAMEWORK
  4. For the Text Analytics service -TEXTANALYTICS- if an existing MySQL database server was used during install, then delete the database manually from the server after running the removal script:
    mysql> drop database tawebtoolingdb;
  5. Complete the removal process with the following steps:
    1. Restart the Ambari server:
      sudo ambari-server restart
    2. Restart all services requiring a restart to refresh configurations. From the Services list click the Actions drop down and select the Restart All Required action.

Example

Service cleanup examples:
Normal removal
Remove the BigR service:
sudo remove_value_add_services.sh 
  -u admin -p admin -x 8081 BIGR
Removal including users
Remove the Big R service including the users:
sudo remove_value_add_services.sh 
  -u admin -p admin -x 8081 BIGR -r
Run as non-root user
Remove the Big R service as non-root user (with sudo privilege) biadmin:
sudo remove_value_add_services.sh 
  -u admin -p admin -x 8081 BIGR 
  -r  -c biadmin

What to do next

The next step in the migration process is to remove deprecated components and services. See Removing deprecated components and services for details.