My JAU Updater
UseCase
Business Value
Allow for automatic update of Java-auto-updater on remote locations.
MJAUU State and Events
State | Event Notification | Comment |
---|---|---|
UpgradeRequired | New Config is made available in CS | |
Started | MjauuStarted | |
UnzipOk/UnzipFailed | Ok = continue. Failed = pause process | |
BackupJauOk/Failed | ||
UninstallOk/Failed | Failed due to missing access | |
UpdatedConfig | Update JAU´s local configuration. | |
JauInstalledOk/JauInstallFailed | ||
JauStartedOk/JauStartFailed | ||
Sucess | UpgradeSuccess | Verify JAU started with new and correct configuration. CS must provide JAU with new agent config on next sync. |
MjaauuFinished | MJAUU will terminate, and exit. |
Alternative ending
State | Event Notification | Comment |
---|---|---|
Failure | UpgradeFailed | |
MjauuFinished | Manual interception will be required |
Main functionallity:
- Download required artifacts.
- Start mjauu
- Check if another instance of MJAUU has started?
- Unpack new version of JAU to tmp area
- Verify unpacking?
- Stop JAU service
- Verify MJAUU has write access to JAU files.
- Remove JAU service from Windows Services
- Move JAU files in place
- Update configuration files.
- Install JAU service
- Report status to CS
- Start JAU service
- Report status to CS
- Stop MJAUU
CS = Config Service
JAU = Java Auto Update
MJAUU = My JAU Updater
Logs from MJAUU should be forwarded to CS.
Download artifacts:
- start-majuu.bat
- mjauu-<version>.jar
- jau-<version>.zip
start-mjauu
This .sh/.bat file will have a single responsibillity:
- Start mjauu in separate process.
It is essential that the mjauu process runs, when JAU process is killed. This is due to beeing able to safely overwrite existing files.
mjauu
mjauu must be easy to start, and possibly without command line arguments. is started with "java jar mjauu<version>.jar"
TODO: figure out how to forward client spesific content to mjauu, if needed.
jau-<version>.zip
This is the new package of all contents needed for JAU.
Code
References
Design notes
Labels:
None