How To Deploy UI
The PARETO UI is deployed using Electron.js.
The deployment process is dependent on the operating system in use. We currently support Windows and MacOS (ARM64).
Prerequisites
npm
Active conda environment with PARETO UI installed locally. To install the PARETO UI locally, follow the steps in our guide How To Install UI Locally
Windows
1. Install build requirements
With your conda environment active, install the proper build requirements. Navigate to <pareto-ui>/backend and run the following command:
pip install -r requirements-build.txt
2. Build the application
To build the application installer, navigate to <pareto-ui>/electron and run the following command:
npm run dist:win
The application build handles 3 substeps - building the backend, building the frontend, and building the electron package.
3. Code sign the application
For a complete guide to code signing electron applications, see their code signing guide.
The general steps required to obtaining and implementing a code signing certificate are as follows:
Purchase a code signing certificate.
This can be a standard certificate or an extended validation (EV) certificate
For a list of certificate authorities, check out Microsoft’s documentation on managing code signing certificates
Implement the certificate key
Using a hardware device such as a USB token OR
Using an HSM or cloud hosted vault such as Azure Key Vault
Sign the Electron application
with a CLI tool such as Microsoft SignTool if using a USB token
with a CLI tool such as AzureSignTool if using Azure Key Vault
MacOS (ARM64)
1. Install the build requirements
With your conda environment active, install the proper build requirements. Navigate to <pareto-ui>/backend and run the following command:
pip install -r requirements-build.txt
2. Build the application
To build the application installer, navigate to <pareto-ui>/electron and run the following command:
npm run dist:mac
The application build handles 3 substeps - building the backend, building the frontend, and building the electron package.
3. Code sign the application
For a complete guide to code signing electron MacOS applications, see the Mac App Store Submission Guide.
The general steps required to obtaining and implementing an Apple code signing certificate are as follows:
Create an Apple developer account.
Attain a Developer ID Application certificate and add it to your Keychain
Create a
.envfile in the<pareto-ui>/electrondirectory with the following variables:APPLE_ID
APPLE_ID_PASSWORD
TEAM_ID *
Build the application (step 2)
*MacOS applications can be notarized with Apple as an additional step after being signed. This allows Apple to scan the application, provide feedback about any vulnerabilties or issues, and, if approved, provide a reputation to the application so that it will be trusted by other Mac users. The TEAM_ID, which is connected to your developer account, and the NOTARIZE_TOOL, which should be set to a CLI tool such as “notarytool”, are necessary for this notarization process to run.