Vagrant+Ansible project responsible of provisioning VMs for the ECOI services and installing and configuring its subcomponents (cordra nsidr, cordra prov, elasticsearch, mongodb, monitoring tools, etc)
0
stars
1
forks
source link
nginx config: allow up to 10M payload file to be added to nsidr objects. #1
During configuration of cordra_nsidr_server, the nginx config file (/etc/nginx/nginx.conf) must be modified to set the _client_max_bodysize parameter to 10M (instead of the nginx default of 1M). This is to allow larger payload files to cordra objects when the size of such files exceeds the default value for this nginx parameter. The parameter actually controls the maximum HTTP body size rather than the filesize itself, so several files can be attached to the object simultaneously provided they don't collectively cause the HTTP body size to be greater than 10M in total.
This configuration change doesn't need to be made for all VMs where nginx is installed. Nor does it need to be done for all cordra instances. It currently only applies to configuration of cordra_nsidr_server and not cordra_prov_server. In the future it will be needed also for cordra_image_server.
This deployment change will allow nsidr objects (principally digital specimens) to include payload files upto 10M in size e.g., if needed to include a hi-res image in the DS or other data file(s). It seems reasonable to put an approximately 10M limit on the maximum size of DS. In the short term it's needed to support SDR development work
The solution is to add in the ansible playbook tasks for setting up cordra_nsidr_server. (https://github.com/DiSSCo/ecoi_infrastructure_deployer/tree/master/ansible/roles/cordra/). I'm not fully familiar with all ansible details so I'm not quite sure how to do it for one of the cordra instances but not all of them. I suspect it requires a new nginx.conf file in the templates directory for cordra_nsidr_server and a new 04- playbook that inserts that file if the inventory_hostname is cordra_nsidr_server. Something like a new playbook 04-configure_nginx_for_cordra.yml that should insert a new nginx.conf file with the parameter in it into /etc/nginx and then reload the nginx service using systemctl.
This issue is the deployer fix corresponding to the issue described by https://github.com/DiSSCo/nsidr/issues/1.
During configuration of cordra_nsidr_server, the nginx config file (/etc/nginx/nginx.conf) must be modified to set the _client_max_bodysize parameter to 10M (instead of the nginx default of 1M). This is to allow larger payload files to cordra objects when the size of such files exceeds the default value for this nginx parameter. The parameter actually controls the maximum HTTP body size rather than the filesize itself, so several files can be attached to the object simultaneously provided they don't collectively cause the HTTP body size to be greater than 10M in total.
This configuration change doesn't need to be made for all VMs where nginx is installed. Nor does it need to be done for all cordra instances. It currently only applies to configuration of cordra_nsidr_server and not cordra_prov_server. In the future it will be needed also for cordra_image_server.
This deployment change will allow nsidr objects (principally digital specimens) to include payload files upto 10M in size e.g., if needed to include a hi-res image in the DS or other data file(s). It seems reasonable to put an approximately 10M limit on the maximum size of DS. In the short term it's needed to support SDR development work
The solution is to add in the ansible playbook tasks for setting up cordra_nsidr_server. (https://github.com/DiSSCo/ecoi_infrastructure_deployer/tree/master/ansible/roles/cordra/). I'm not fully familiar with all ansible details so I'm not quite sure how to do it for one of the cordra instances but not all of them. I suspect it requires a new nginx.conf file in the templates directory for cordra_nsidr_server and a new 04- playbook that inserts that file if the inventory_hostname is cordra_nsidr_server. Something like a new playbook 04-configure_nginx_for_cordra.yml that should insert a new nginx.conf file with the parameter in it into /etc/nginx and then reload the nginx service using systemctl.