Increase the upload limit on app size
CONSOLE 3.22.4+
With the 3.22.4 (and later) release of Blue Cedar Console (on-premises), users can upload apps larger than 50 MB. To do so, you need to increase the app size limit, RAM, and disk space on the console host.
Prerequisites
For consoles managing apps with a 150 MB size limit:
- Minimum required RAM: 4 GB
- Minimum required disk space: 50 GB
When changing the app size limit, RAM and disk space on the console host should also be increased.
Note: The app's complexity as well as its size affects the amount of RAM needed. The formulas here describe a rule of thumb, but the RAM may need to be tuned for apps with a larger number of classes than usual.
App size | Disk space | RAM | |
---|---|---|---|
Formula | 50 GB + 20*max_allowed_packet | 4 GB + 1 GB for every 100 MB over 150 MB app size | |
Baseline | 150 MB | 50 GB | 4 GB |
Example | 250 MB | 55 GB (50 GB + 20*250 MB) | 5 GB |
Step-by-step guide
On your console host with 3.22.4 or later installed, follow the steps below:
Backup any data you have inside the policy console docker container. To get into the docker shell:
$ docker exec -it policy_console_database bash
Run the following commands from the docker shell prompt. Use your MySQL credentials for MySQLuser and MySQLpwd. (You can find the default credentials in /etc/policy-console-{release_version}.env.)
$ cd /tmp/ $ mkdir -p appcontrol-export/data $ chmod a+rwx appcontrol-export/data $ mysqldump -u MySQLuser -pMySQLpwd -f --routines --no-data appcontrol > appcontrol-export/appcontrol-schema.sql $ mysqldump -u MySQLuser -pMySQLpwd -f --max-allowed-packet=1G --tab=/tmp/appcontrol-export/data appcontrol $ zip -x '**/data/*.sql' -r appcontrol-export.zip appcontrol-export/ $ exit
Back on the console host (after exiting the docker shell above), copy the config file to the /etc/ directory on your host:
$ sudo docker cp policy_console_database:/console/database/policy-console-sql.cnf /etc/
Within this config file, use any text editor to edit these values:
- Change max_allowed_packet value to a little over the app size you would want to upload to the console, accounting for the integrated app's size. Make sure the max_allowed_packet value for both mysql and mysqld sections match.
- Change innodb_log_file_size value to at least 10 times the value of max_allowed_packet
After making these changes, reboot with this command:
$ sudo service policy-console reboot
Related articles