3.2. Provisioning

It is possible to import the system configuration of Package Drone directly from the command line. Package Drone provides a URL which can receive the configurations.xml file, containing the system settings (see also Section 4.1.1, “System settings”), and apply it. A second URL allows to also perform and database schema creating or upgrade at the same time.

Also see Section 4.1.1.1, “File format of system configuration” for more information about the file format used for provisioning.

The URL for the provisioning process is http://localhost:8080/system/backup/provision and the URL for provisioning and schema update is http://localhost:8080/system/backup/provisionWithSchema.

The request expects the configurations.xml file content as POST data.

It is necessary to authenticate when applying the configuration. Even if it is the initial configuration. For this it is necessary to use the default admin user (also see Section 3.1.1, “Login in with admin user”).

The authentication is done using HTTP basic authentication.

The following examples assume you have a valid configuration file named cfg.xml in your local directory and that your admin token is abcdef.

Using the command line tool wget the configuration can be imported by executing:

wget --http-user=admin --http-password=abcdef --post-file cfg.xml http://localhost:8080/system/backup/provision

And by executing the following command, it will also create the database schema if the configuration was successfully applied:

wget --http-user=admin --http-password=abcdef --post-file cfg.xml http://localhost:8080/system/backup/provisionWithSchema