Remove deprecated billing dashboard configuration

This page describes how to remove configuration of the public cloud billing dashboard for resellers for Abiquo versions prior to Abiquo 5.2.

Before you remove the configuration, first disable the billing dashboard scripts.

On the server where you were running the billing packages, remove the Cron jobs to run the billing scripts.

# rm /etc/cron.d/abiquo-billing-ec2
# rm /etc/cron.d/abiquo-billing-arm
# rm /etc/cron.d/abiquo-daily-billing-arm*


If you were using a dedicated server, you can now retire it with attention to:

  1. MariaDB 
  2. Access to the Abiquo API, Abiquo database, and public cloud providers

If you were using a shared server, you can now remove packages and configuration as follows.

  1. Remove billing packages as required

    yum remove abiquo-billing-ec2
    yum remove abiquo-billing-arm
    yum remove abiquo-daily-billing-arm
  2. Log in to MariaDB as an administrator and check the names of the databases. Remove the billing databases as required

    DROP DATABASE IF EXISTS ec2_billing;
    DROP DATABASE IF EXISTS arm_billing;
    DROP DATABASE IF EXISTS arm_daily_billing;
  3. From the yaml files:

    1. For each reseller, note the billing bucket name to later add it as an enterprise property
    2. Optionally remove the database user that you had configured in the config.yml file 

    3. Optionally remove the user of the Abiquo API that you had configured in the config.yml

  4. Remove the appropriate folders

    rm -rf /opt/abiquo-billing-ec2/
    rm -rf /opt/abiquo-billing-arm/
    rm -rf /opt/abiquo-daily-billing-arm*/
  5. In the Abiquo database, remove the select privileges from the billing dashboards host for the abiquo_database user that ran the billing scripts:

    1. From the OS command line, adapt and execute this command to get all the privileges related to the abiquo_database user that ran the billing scripts:

      mysql --silent --skip-column-names --host DB_FQDN_or_IP --port 3306 --user root --password --execute "SELECT CONCAT('SHOW GRANTS FOR ''',user,'''@''',host,''';') FROM mysql.user WHERE user LIKE '%billing%';" | while read line ; do mysql --silent --skip-column-names --host DB_FQDN_or_IP --port 3306 --user root --password --execute "$line"; done;
    2. Revoke the appropriate privileges from the database command line for every user with privileges upon each database:

      REVOKE ALL PRIVILEGES ON `ec2_billing`.* FROM 'user1'@'xxx';
      REVOKE ALL PRIVILEGES ON `ec2_billing`.* FROM ...;
      REVOKE ALL PRIVILEGES ON `ec2_billing`.* FROM 'userN'@'xxx';
      
      REVOKE ALL PRIVILEGES ON `arm_billing`.* FROM 'user1'@'xxx';
      REVOKE ALL PRIVILEGES ON `arm_billing`.* FROM ...;
      REVOKE ALL PRIVILEGES ON `arm_billing`.* FROM 'userN'@'xxx';
      
      REVOKE ALL PRIVILEGES ON `arm_daily_billing`.* FROM 'user1'@'xxx';
      REVOKE ALL PRIVILEGES ON `arm_daily_billing`.* FROM ...;
      REVOKE ALL PRIVILEGES ON `arm_daily_billing`.* FROM 'userN'@'xxx'
  6. That's it!


Copyright © 2006-2022, Abiquo Holdings SL. All rights reserved