-
Notifications
You must be signed in to change notification settings - Fork 95
Add support for client binary on upgrade #242
Add support for client binary on upgrade #242
Conversation
mmm, a couple of things to consider On Linux, this is dangerous - I install my |
Agreed, however I'm not sure what the best way to test this would be. Perhaps with the Github API?
Were you thinking this would be optional as a flag, or something that should prompt the user? |
yup, same GH api request as we make to get the iso version number (and we can amend that one to ask the VM what its version is too..) |
OK, I have added the requested changes:
PTAL @SvenDowideit and @tianon 👍 |
url := "https://api.github.com/repos/docker/docker/tags" | ||
tag, err := getLatestReleaseName(url) | ||
if err != nil { | ||
return fmt.Errorf("Error making Github API call to get docker client binary version: %s", err) |
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.
Capitalise Docker
or you'll make James cry.
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.
;_;
neat - do you want to do the same for the |
} | ||
fmt.Printf("Success: downloaded %s\n\tto %s\n", binaryUrl, path) | ||
} else { | ||
fmt.Println("docker client is up to date, skipping client upgrade...") |
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.
Docker
, and go on, tell them the version they have
this would close boot2docker/osx-installer#63 |
Yes - perhaps in a separate PR - this would over-write the existing (running) executable with the latest release if it is behind? And it would continue to be part of |
OK @SvenDowideit I have implemented the additional feedback! Let me know if I missed anything. One thing I had thought of is - should we move existing |
@@ -3,6 +3,7 @@ package main | |||
import ( | |||
"encoding/json" | |||
"fmt" | |||
|
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.
What's this blank line here for?
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.
It's an artifact from vim-go
(run goimports
on save hook).
@nathanleclaire darn - i presume this got lost in the busyness? |
Yes - finishing it is relatively low hanging fruit but it's too late for this release I'm afraid :( (well, unless the b2d release goes later than the docker 1.3 release) |
If mount fails, let's "modprobe" the partition type and try again
e852ac8
to
46ea9a9
Compare
Implemented some new stuff (boot2docker-cli binary upgrade) and code review feedback. @SvenDowideit when you get back from vacation and @tianon PTAL |
@@ -3,6 +3,9 @@ package main | |||
import ( | |||
"encoding/json" | |||
"fmt" | |||
"net/http" | |||
|
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.
Why the random blank line here? 😄
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.
goimports as an editor hook >_>
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.
But this doesn't make sense as a goimports
change. It's not "remote stuff" being pushed below, it's just other random stdlib imports.
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.
Must've accidentally added it - I'll fix
clientArch = "x86_64" | ||
// todo: wishful thinking? | ||
case "arm": | ||
clientArch = "armv7l" |
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.
Very wishful thinking, and will likely be very wrong (especially since it doesn't even account for GOARM
, let alone the actual ARM version of the current system). Please remove and add a default:
case that returns an error
like was mentioned above. 😉
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.
As a side note, this is where using uname -m
as a URL component completely breaks down. For example, on my Pogoplug, I get armv5tel
, but armv5el
is also very much a thing (ie, the bits after the number mark supported features).
Lots of little nits, but overall I'm a fan. 👍 |
I'm a big fan :) |
`boot2docker upgrade` will support the Docker client binary, boot2docker-cli binary, and boot2docker ISO now. Signed-off-by: Nathan LeClaire <[email protected]>
69e84dd
to
11c898c
Compare
Nice revised with the feedback from review. @SvenDowideit @tianon PTAL |
11c898c
to
59a7970
Compare
Signed-off-by: Nathan LeClaire <[email protected]>
59a7970
to
4a02eca
Compare
|
||
To do so, run the `boot2docker upgrade` command. | ||
|
||
``` |
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.
Can you add console
here so we get nice highlights? 👼
ie:
$ command here
output here
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.
Definitely!
Signed-off-by: Nathan LeClaire <[email protected]>
a173a35
to
b931320
Compare
Signed-off-by: Nathan LeClaire <[email protected]>
Signed-off-by: Nathan LeClaire <[email protected]>
LGTM |
1 similar comment
LGTM |
Add support for client binary on upgrade
Went ahead and implemented this, looking for feedback, how do those file permissions look to you?
ping @SvenDowideit @tianon