Skip to content

closes #503 w/ readme updates#505

Merged
mikermcneil merged 4 commits intomasterfrom
mikermcneil-patch-2
Mar 20, 2021
Merged

closes #503 w/ readme updates#505
mikermcneil merged 4 commits intomasterfrom
mikermcneil-patch-2

Conversation

@mikermcneil
Copy link
Copy Markdown
Member

  • Add workaround for browser warning when accessing Fleet
  • Add workaround for docker/compose#7495 to quickstart instructions
  • Add quickstart instructions for using a real-world device

@mikermcneil mikermcneil requested a review from zwass March 19, 2021 23:48
Comment thread README.md Outdated
Comment on lines +18 to +22
# Edit your Docker config
# • remove "credsStore": "desktop"
# • remove the preceding comma (,) to ensure well-formed JSON
nano ~/.docker/config.json

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be added as a note as the error does not happen on every Docker installation. It didn't happen on a fresh Ubuntu VM and I am in the process of testing in a fresh Big Sur VM.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Edited

My thought process: Since it's a quickstart, trying to stay away from multiple notes b/c folks stop reading them (we've already got the SSL one)
image

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works on my Big Sur VM as well.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just saw it be necessary on a brand new (non VM) Catalina macOS (10.15.7) box that had never had Docker installed
Also saw it again on a non VM Big Sur (11.2.3) box after uninstalling and reinstalling Docker

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ohhh, interesting, it reproduces when fleetctl preview is run without sudo. On my other attempts I had installed Node via other means (besides homebrew) that meant I had to do sudo fleetctl preview. Can you check if sudo fleetctl preview works on the machines you are testing? Maybe we can recommend that?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I’ll change the config back and give it a try to verify. Some folks will no doubt prefer not to use sudo, but we can nestle alternative instructions somewhere else in the docs for when/if that comes up.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After:

  1. adding back "credsStore": "desktop"
  2. and quitting and restarting Docker Desktop
  3. then running fleetctl preview anew (without sudo)....

I couldn't replicate the issue. It's like it only needs credsStore to be gone the very first time you run fleetctl preview, like when it's first setting up the containerbundlethang with the simulated Linux hosts in it.

After that thing exists in Docker Desktop, whether green and online or grayed out and offline, running fleetctl preview without sudo works just fine, regardless of the credsStore config.

It's still possible Docker just isn't picking up the config change-- I didn't dig in docs to verify that. Though I did notice the ~/.docker/config.json keys were reordered after reopening Docker Desktop, so that leads me to believe it was being read.

Nevertheless, might as well get to the bottom of it while I remember all of the details.

Soooooooooooooo:

  1. I uninstalled Docker Desktop again. Then reinstalled it. Opened it. All good.
  2. As a sanity check, I then verified the contents of my ~/.docker/config.json file. Just like before, uninstalling+reinstalling Docker caused that file to revert back to its default (i.e. "credsStore": "desktop" is back.)
  3. Then, I tried running the first-time fleetctl preview without sudo again.

Sure enough, got the expected error again, at the same place as before (when attempting to start up simulated hosts for the first time with a clean Docker install):

File "docker/credentials/store.py", line 23, in __init__
docker.credentials.errors.InitializationError: docker-credential-desktop not installed or not available in PATH

But this time, rather than changing the ~/.docker/config.json file, I ran sudo fleetctl preview.

As predicted, this worked!

Epilogue

In the spirit of hopefully not having to uninstall and reinstall Docker again for a while, I went ahead and tried one more thing:

  1. Quit Docker Desktop.
  2. Started it up again. As expected, fleet-preview-devices and fleet-preview-server both still showed up as gray (EXITED (UNDEFINED)). And as expected, localhost:8412 was not accessible in the browser.
  3. Then, just to prove I'm not crazy, I checked ~/.docker/config.json and saw it was indeed still the default ("credsStore":"desktop" was still there)
  4. Last but not least, I ran fleetctl preview without the sudo.

As expected, it worked!

version

In case this comes back up later: All of the above testing was done with the latest (unpublished) code from Fleet's master branch fleet@439dfbdc7a5005236e22febff8772106d2738f42 -- when I said fleetctl preview and sudo fleetctl preview, I really meant go run ./cmd/fleetctl preview and sudo go run ./cmd/fleetctl preview.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FUTURE: Figure out why starting the simulated hosts fails the first time you do it if you don't either use sudo or remove credsStore from docker config. Probably something we could work around. Seems like something we're doing w/ docker is maybe expecting docker-credential-desktop to be in the process-executing user's path, but it's only available in the path with sudo? And presumably the reason why removing credsStore works is because it just skips whatever Docker is trying to do with docker-credential-desktop.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for down the road someday: #507

@mikermcneil mikermcneil merged commit ad6a33b into master Mar 20, 2021
@mikermcneil mikermcneil deleted the mikermcneil-patch-2 branch March 20, 2021 03:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants