-
Notifications
You must be signed in to change notification settings - Fork 9
feat(installer): Add possibility to install in custom directory #476
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…agent into feat-dai-custom-workdir
…agent into feat-dai-custom-workdir
…CreateWorkingDirectory functions; set directory permissions windows
…' of github.com:FlowFuse/device-agent into feat-dai-custom-workdir
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
first run works great - installed to my specified dir however uninstalling did not work:
Install
flowfuse-device-installer-windows-amd64.exe -d c:\da1
One time code has not been provided. The Device Agent automatic configuration is not possible.
Do you want to continue with the installation? (y/N): y
--<snip-for-brevity>--
FlowFuse Device Agent installation completed successfully!
The Device Agent has been installed but it is not configured.
To complete the setup:
1. Create a device.yml configuration file in c:\da1 directory
2. Start the Device Agent service
For information on how to manage the FlowFuse Device Agent,
please refer to the documentation at https://github.com/FlowFuse/device-agent/blob/main/installer/README.md
uninstall attempt #1
flowfuse-device-installer-windows-amd64.exe --uninstall
****************************************************************
* FlowFuse Device Agent Installer *
* *
* This installer will set up the FlowFuse Device Agent on your *
* system and configure it to run as a system service. *
* *
****************************************************************
[ERROR] Uninstall validation failed: c:\opt\flowfuse-device is not the FlowFuse Device Agent directory. If you installed it in a custom directory, please specify it using `--dir` flag
So I understand why this occurred but it adds credence to my prior suggestions of copying the installer local and adding uninstaller batch scripts that the user can discover/run AND the windows registry can use for a windows familiar admin.
uninstall attempt #2
flowfuse-device-installer-windows-amd64.exe -d c:\da1 --uninstall
****************************************************************
* FlowFuse Device Agent Installer *
* *
* This installer will set up the FlowFuse Device Agent on your *
* system and configure it to run as a system service. *
* *
****************************************************************
[ERROR] Uninstall validation failed: c:\da1 is not the FlowFuse Device Agent directory. If you installed it in a custom directory, please specify it using `--dir` flag
uninstall attempt #3
flowfuse-device-installer-windows-amd64.exe --uninstall -d c:\da1
****************************************************************
* FlowFuse Device Agent Installer *
* *
* This installer will set up the FlowFuse Device Agent on your *
* system and configure it to run as a system service. *
* *
****************************************************************
[ERROR] Uninstall validation failed: c:\da1 is not the FlowFuse Device Agent directory. If you installed it in a custom directory, please specify it using `--dir` flag
uninstall attempt #4
flowfuse-device-installer-windows-amd64.exe --dir c:\da1 --uninstall
****************************************************************
* FlowFuse Device Agent Installer *
* *
* This installer will set up the FlowFuse Device Agent on your *
* system and configure it to run as a system service. *
* *
****************************************************************
[ERROR] Uninstall validation failed: c:\da1 is not the FlowFuse Device Agent directory. If you installed it in a custom directory, please specify it using `--dir` flag
uninstall attempt #5
flowfuse-device-installer-windows-amd64.exe --uninstall --dir c:\da1
****************************************************************
* FlowFuse Device Agent Installer *
* *
* This installer will set up the FlowFuse Device Agent on your *
* system and configure it to run as a system service. *
* *
****************************************************************
[ERROR] Uninstall validation failed: c:\da1 is not the FlowFuse Device Agent directory. If you installed it in a custom directory, please specify it using `--dir` flag
Content of HDD

@Steve-Mcl Directory validation function improved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
windows local testing all good.
Testing both install directory and no otc on Linux. I get the following prompt:
This appears to be presenting a |
Also not 100% related, but if you choose to use an existing user (the current user) when uninstalling it tries to remove that user without asking. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved with comments in main body of PR.
Happy to ship but needs follow up PR about user removal and possibly the setup question.
@ppawlowski can I get a status update here please? |
It's pending a review after a recent bug discovery in the Windows installation. |
From My POV @joepavitt, this item was called out on my standup. I was mid testing it when another commit (Fix nssm appParameter) landed. I have just pulled it and will be doing re-review momentarily. Hold tight :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested install/uninstall with/without OTC, with/without -d, --dir (spaces and no spaces in dir name)
All good.
Description
This pull request adds possibility to instal the device agent in a custom directory via the device agent installer.
Related Issue(s)
Closes #404
Dependent upon #446 shipping first
Checklist
flowforge.yml
?FlowFuse/helm
to update ConfigMap TemplateFlowFuse/CloudProject
to update values for Staging/ProductionLabels
area:migration
label