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 sizeDisk spaceRAM
Formula
50 GB + 20*max_allowed_packet4 GB + 1 GB for every 100 MB over 150 MB app size
Baseline150 MB50 GB4 GB
Example250 MB55 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:

  1. Backup any data you have inside the policy console docker container. To get into the docker shell:

    $ docker exec -it policy_console_database bash
  2. 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
  3. 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/
    
  4. Within this config file, use any text editor to edit these values:

    1. 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.
    2. Change innodb_log_file_size value to at least 10 times the value of max_allowed_packet
  5. After making these changes, reboot with this command:

    $ sudo service policy-console reboot