upgrade a dogu.json
from v1 to v2
Dependencies and OptionalDependencies
To upgrade the dogu.json format from v1 to v2 the subitems "Dependencies" and "OptionalDependencies" have to be adjusted. In V1 format, the dependencies consisted of a list of dogu names.
In V2 format it is possible to have dependencies on clients
and packages
in addition to dogus, and to specify a version.
A dependency entry is now a json object with the attributes:
Field: type
- Data type: string
- Optional: no
- Allowed values:
dogu
|package
|client
dogu
The dogu has a dependency on another dogu.
package
The dogu has a dependency on an installed Debian package.
client
The dogu has a dependency on an installed Debian package.
The special feature of a client
is that it is not checked by every tool.
For example, the client
dependency cesapp
is only checked by cesapp and the client
dependency
ces-setup
only by the ces-setup.
This is necessary if the client that installs the tool must be present in a certain version, but there are several alternatives to install this dogu.
Example ces-setup:
If a dogu is installed from the ces-setup, it may be necessary that the ces-setup is installed in a certain version.
is installed.
However, if the same dogu is installed by the cesapp, a specific cesapp version is required, but the
installed version of the ces-setup is irrelevant at this moment.
In this case, a dogu would have a client
dependency to the ces-setup and to the cesapp with the corresponding versions.
Field: name
- Data type: string
- Optional: no
- Allowed values: Any string with the name of the dogu (e.g.:
ldap
)
Field: version
- Data type: string
- Optional: yes
-
Allowed values:
[comparator]<version>
- Comparator:
>=
: version must be greater than or equal to - Comparator:
<=
: Version must be less than or equal to - Comparator:
>
: Version must be greater than or equal to - Comparator:
<
: version must be smaller - Comparator:
=
or==
: version must be exactly the same
- Comparator:
Examples for valid values: <1.0.0
, >=1.2.0
, 2.0.0
-
V1 format example `json { }, "dependencies": [ }, "nginx", "
redmine'' ], "OptionalDependencies": [ "postgresql" ] }
-
V2 format example
json { "
Dependencies: [ { }, "type": "dogu", "},name'':
nginx'', "version":">1.0-1" }, { }, "type": "dogu", }, { "name": "redmine" }, { }, { "type": "client", }, { "name": "cesapp", "version":">=3.2.0" }, { }, "type": "package", }, { "name": "ces-commons", "version":">=1.0.0" } ], "OptionalDependencies": [ { }, "type": "dogu", }, "name": "postgresql", "version":"<=1.0-1" } ] }