-
Notifications
You must be signed in to change notification settings - Fork 9
feat(installer): install Device Agent without One-Time-Code #446
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
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.
In this current iteration, if a device.yml is found, the only option is to QUIT or DELETE and continue. I am not sure it works as Nick had expected.
Consider this set of steps:
- User already has a
device.yml
in place (or restored it from a backup, or downloaded it from the FF device setup dialog) - User runs installer
- Installer finds
device.yml
- The only option is to delete the file to continue.
IMO, just like if you installed Device Agent via NPM, it will simply start up and use device.yml already present.
I think the better approach is to (like NPM installation does today) is to keep existing yml (or at least offer the option to use existing yml file)
Output
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
Continuing with installation in interactive mode...
Logger initialized.
****************************************************************
* 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. *
* *
****************************************************************
Installing FlowFuse Device Agent...
The working directory c:\opt\flowfuse-device exists and contains Device Agent configuration file
Do you want to remove it and continue installation? (Y/n): n
[ERROR] Installation failed: pre-check failed: configuration file pre-check failed: the c:\opt\flowfuse-device directory has not been removed. Please remove it manually and try again
Yep I agree with Steve, if there is an existing file it should offer the choice to use it. |
Added the possibility to decide what should happen if |
Tested new "keep settings" option - this was the result:
Observations:
Hard Issues:
|
Fixed.
Addressed in a separate issue.
Fixed.
Why did it confuse you? I wanted a user to be 100% sure what would happen and to give them a chance to cancel the installation process. |
@ppawlowski can you drop a status update on here please, 25 days and no updates. |
@Steve-Mcl can I ask for feedback on my last comment, please? |
I can't remember. Lets forget that for now. |
Latest testing. Run latest installer without entering a OTC (skip entering device.yml)This was successful and outputs instructions at the end.
My only suggestion would be we provide a batch/shell script that fires up the graphical setup ( Run latest installer without entering a OTC (entering device.yml when prompted)A second run (without removing the prev existing installation) failed at the service check.
|
@Steve-Mcl Fixed, please re-review. |
Yup, that'll do it 👍 Please note: I am currently only checking against windows (would love to see some tests and trials by linux/mac users here in case I miss something) |
Could you share those testing scenarios afterwards? I will create a list of them for future use. |
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 all good
Description
This pull request introduces a possibility to run the Device Agent Installer without the need to provide the One-Time-Code used for automatic device onboarding.
Without OTC provided:
device.yaml
content or skip the configuration stepdevice.yaml
is provided, simple validation is made, and the file is saved in the proper directory, installation continuesRelated Issue(s)
Closes #407
Checklist
flowforge.yml
?FlowFuse/helm
to update ConfigMap TemplateFlowFuse/CloudProject
to update values for Staging/ProductionLabels
area:migration
label