WHAT
When installing a python package that depend on a set of OS specific libraries to be installed in the container, the build process fails. There are two parts to this issue:
The build container does not have the necessary OS libraries to build the package
Once the libraries are installed, there might be additional artifacts that need to be included in the zip package for the lambda function to work properly when deployed.
For instance if xmlsec package is added to the requirements file of a container. When juniper tries to build the zip artifact you get the following error:
xmlsec-layer_1 | File "/tmp/pip-install-s8bn_ccf/xmlsec/xmlsec_setupinfo.py", line 164, in load_xmlsec1_config
xmlsec-layer_1 | config = pkgconfig.parse('xmlsec1')
xmlsec-layer_1 | File "/tmp/pip-install-s8bn_ccf/xmlsec/.eggs/pkgconfig-1.5.1-py3.6.egg/pkgconfig/pkgconfig.py", line 248, in parse
xmlsec-layer_1 | _raise_if_not_exists(package)
xmlsec-layer_1 | File "/tmp/pip-install-s8bn_ccf/xmlsec/.eggs/pkgconfig-1.5.1-py3.6.egg/pkgconfig/pkgconfig.py", line 103, in _raise_if_not_exists
xmlsec-layer_1 | raise PackageNotFoundError(package)
xmlsec-layer_1 | pkgconfig.pkgconfig.PackageNotFoundError: xmlsec1 not found
From the documentation, in order to pip install this particular module, the following OS libraries need to be pre-installed:
That fixes the original build issue, however, for this particular package, once the pip install succeeds, there are two binaries that must be included in the zip, for the lambda
WHAT When installing a python package that depend on a set of OS specific libraries to be installed in the container, the build process fails. There are two parts to this issue:
For instance if
xmlsec
package is added to the requirements file of a container. When juniper tries to build the zip artifact you get the following error:From the documentation, in order to pip install this particular module, the following OS libraries need to be pre-installed:
yum install libxml2-devel xmlsec1-devel xmlsec1-openssl-devel libtool-ltdl-devel
That fixes the original build issue, however, for this particular package, once the pip install succeeds, there are two binaries that must be included in the zip, for the lambda
Support the inclusion of these binaries for both regular lambda functions as well as layers.