Managing Sites and Apps¶
Determine the list of available Apps and Accessories:¶
% pacman -Sl hl
Display the currently installed Sites and Apps¶
% sudo ubos-admin listsites
To find out about options for this command, add --help as an argument to the command.
Display Site information¶
To show information about a currently installed Site with hostname hostname, execute:
% sudo ubos-admin showsite --hostname <hostname>
Interactively create a new Site with a single App¶
% sudo ubos-admin createsite
If you wish to use SSL/TLS encryption. you need to decide whether you would like to use a self-signed certificate (recommended for your home network but not for publicly accessible website), an official certificate that you have purchased, or a letsencrypt.org certificate (either work for publicly available websites). Depending on that:
% sudo ubos-admin createsite --tls
will ask you to provide the purchased certificate files. Alternatively:
% sudo ubos-admin createsite --tls --selfsigned
% sudo ubos-admin createsite --tls --letsencrypt
To generate the Site JSON without deploying the Site, e.g. in order to then manually edit the Site JSON:
% sudo ubos-admin createsite --dry-run --out <site.json>
This will save the created Site JSON in <site.json>. You can deploy it with ubos-admin deploy --file <site.json>
For an annotated example, see Setting up your first web App.
If you are curious what UBOS does under the hood, please refer to ubos-admin createsite.
Deploy a Site¶
% sudo ubos-admin deploy [--quiet] [--siteid <siteid>] ... --file <site.json>
You can manually create the Site JSON, or have UBOS create it for you, by executing:
% sudo ubos-admin createsite --dry-run
and interactively answering the questions asked. For an annotated example, see Setting up your first web App.
When deploying a Site over the network, option --stdin may be preferable over option --file. For example, if you maintain your Site JSON files on your workstation’s desktop, the following command allows you to quickly deploy a new Site, or update an existing Site, on your UBOS device (hostname ubos-pc.local) over ssh:
% cat <site.json> | ssh email@example.com sudo ubos-admin deploy --stdin
Note: ubos-admin createsite is just a wrapper around ubos-admin deploy.
If you redeploy a Site using a different configuration (e.g. the new configuration does not contain the same set of Apps as before), this operation may throw away valuable data, as this does not create a backup of your data.
To perform a backup first to file ~/backup.ubos-backup, and then redeploy the Site, execute:
% sudo ubos-admin deploy --backup ~/backup.ubos-backup --file <site.json>
If you are curious what UBOS does under the hood, please refer to ubos-admin deploy.
Undeploy a Site¶
To undeploy a Site with hostname <hostname>, execute:
% sudo ubos-admin undeploy --hostname <hostname>
To perform a backup first to file ~/backup.ubos-backup, and then undeploy the Site, execute:
% sudo ubos-admin undeploy --backup ~/backup.ubos-backup --hostname <hostname>
To undeploy all currently deployed Sites at the same time, execute:
% sudo ubos-admin undeploy --all
Use with care.
If you are curious what UBOS does under the hood, please refer to ubos-admin undeploy.