See also Command reference.
If the Site JSON file provided to this command is valid, UBOS will perform the following steps:
Install required packages that haven’t been installed yet. This includes:
- the packages of Apps to be deployed per the the Site JSON, but not yet installed on the device;
- the packages of Accessories to be deployed per the Site JSON, but not yet installed on the device;
- dependencies of those packages as listed in the respective PKGBUILD files;
- packages listed in the depends section of the manifest JSONs of the App and Accessories, for those roles that are being used on the device.
- the database engine(s) required for the App, if not already installed.
The Site‘s frontpage will be replaced with a placeholder saying “upgrade in progress”.
If a backup was requested, the backup will be created.
If the Site specifies to use a Letsencrypt certificate, and no valid certificate is available on the device, certbot will automatically contact the Letsencrypt web service and attempt to obtain a valid certificate for the Site. This involves the temporary publication of a document in the Site‘s .well-known subdirectory.
If a valid certificate was found or obtained, the Site will then be set up with it. If no valid certificate could be obtained (e.g. because Letsencrypt could not contact the device due to DNS problems or a lack of public IP address, per Letsencrypt requirements), the Site will still be set up, but without SSL/TLS.
All the Apps and the Accessories in the new Site JSON will be deployed. For each of them, the manifest JSONs is processed for each of the roles, and each of the AppConfigItems is deployed: files are copied, directories created, databases provisioned and populated, and scripts run.
The frontpage of the Site will be re-enabled.
UBOS uses the siteid and the appconfigid fields in the Site JSON to determine whether a Site and/or an AppConfiguration is being newly deployed, redeployed or undeployed. This makes it easy to move a Site from one hostname to another (the Site JSON is the same with the same siteid and appconfigid, but a changed hostname), or to move an App from one context path to another (the appconfigid is the same, just the context is different).
This command also accepts the --template flag. In this case, ubos-admin deploy allows the provided Site JSON file to leave out SiteIds and AppConfigIds, and automatically generate new IDs before deploying the Site JSON.
This command must be run as root (sudo ubos-admin deploy).