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.
|
If you were using a dedicated server, you can now retire it with attention to:
- MariaDB
- 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.
Remove billing packages as required
yum remove abiquo-billing-ec2 yum remove abiquo-billing-arm yum remove abiquo-daily-billing-arm
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;
From the yaml files:
- For each reseller, note the billing bucket name to later add it as an enterprise property
Optionally remove the database user that you had configured in the config.yml file
Optionally remove the user of the Abiquo API that you had configured in the config.yml
Remove the appropriate folders
rm -rf /opt/abiquo-billing-ec2/ rm -rf /opt/abiquo-billing-arm/ rm -rf /opt/abiquo-daily-billing-arm*/
In the Abiquo database, remove the select privileges from the billing dashboards host for the abiquo_database user that ran the billing scripts:
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;
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'
- That's it!
Copyright © 2006-2022, Abiquo Holdings SL. All rights reserved