-
Notifications
You must be signed in to change notification settings - Fork 0
Deployment
There are several ways to deploy an Optimal Framework-based application, but the primary way it using setup files and install repositories. Setup files kan easily be generated by using the setup application. There will also be a web based solution to this later on.
A setup file is basically a json-file that defines what and where to install.
{
"install_location": "~/of/",
"plugins_folder": "~/of/plugins",
"plugins": {
"admin": {
"url": "https://github.com/OptimalBPM/of-admin.git",
"branch": "main"
}
}
}
In a OF-application, that means:
Where to put the installation, typically ~of
or %USERPROFILE%
.
The application installation is typically not that many files, there are initialisation and management scripts.
Also, the base configuration is put here, i.e. the config.json
file.
Where to put the plugins if not in the installLocation/plugins
-folder.
They may take quite a lot of disk space, also they need to be writeable by the application for it to be able to update itself.
An application in OF is typically a plugin(https://github.com/OptimalBPM/of/wiki/Plugins ), and in the plugins dictionary, they are listed by their registered identifier, in this case we are looking at the of-admin plugin. This will cause the setup to install the of-admin plugin (the Optimal Framework admin interface):
"plugins": {
"admin": {
"url": "https://github.com/OptimalBPM/of-admin.git",
"branch": "main"
}
}
The url
is the URL of the git-repository of the plugin.
It is also possible to specify a branch via thebranch
-property.
what actually happens when the installer first installs the plugin, is that it clones the plugin GIT repository into the folder in plugins with the same name as specified in the setup file.
There are a number of advantages to using GIT, a VCS, from a setup perspective:
- safe, hashes are always made and verified
- flexible, easy to change into using any branch or commit
- a nice way to integrate plugin development and deployment, no intermediary steps
- updating is just a git command
- a GIT
For example, the OF-admin provides a pretty advanced web interface. As these do, it has a large amount of dependencies, over 100 megabytes and thousands of files. The installer can download and unpack these files.
If the plugin uses Github is used, a nice feature is to bundle binaries with the release, and then just point to them in the definitions, like OF-admin does here:
"binaries": [
{
"url": "https://github.com/OptimalBPM/of-admin/releases/download/1.0-alpha-rc1/jspm_packages.zip",
"target": "ui"
},
{
"url": "https://github.com/OptimalBPM/of-admin/releases/download/1.0-alpha-rc1/typings.zip",
"target": "ui"
}
]
This way it is also possible for a plugin to install files somewhere else.
The possibilities here will be greatly expanded in the future, features planned are:
- Conditions - for example different files depending on platforms)
- Running Python scripts on install - sometimes things are needed, expecially on windows installations
- A customizeable json-schema-form based declarative UI for editing plugin settings in both OF-admin and the installer
Likely commercial:
- A web based definition file management UI, an web application to manage the application
- Generating MSI bundles for even simpler installation on windows(probably commercial functionality)