Skip to content

Commit

Permalink
More useful help / documentation for auto-generated SSH keys.
Browse files Browse the repository at this point in the history
  • Loading branch information
tintoy committed Feb 13, 2017
1 parent eefdecf commit d2821a0
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
7 changes: 7 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
# Changes

## v0.9

New features:

* More useful help / documentation for auto-generated SSH keys.

## v0.8

New features:

* The driver can now use the new `--ddcloud-mcp-endpoint` command-line argument (environment: `MCP_ENDPOINT`) to designate a custom end-point URI for the CloudControl API.
* The driver will now generate a new SSH keypair if one was not already configured via command-line arguments.


Breaking changes:

* The following command-line arguments have changed to be consistent with their corresponding environment variables:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION = 0.7
VERSION = 0.9

default: fmt build test

Expand Down
7 changes: 4 additions & 3 deletions client_public_ip.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ package main
* Detect the client machine's external IPv4 address
* -------------------------------------------------
*
* Uses http://ifconfig.co/json
* Uses https://v4.ifconfig.co/json
*/

import (
"encoding/json"
"fmt"
"github.com/docker/machine/libmachine/log"
"io/ioutil"
"net/http"

"github.com/docker/machine/libmachine/log"
)

// A subset of the IP address information returned by ifconfig.co.
Expand All @@ -24,7 +25,7 @@ type ipInfo struct {
func getClientPublicIPv4Address() (string, error) {
log.Infof("Auto-detecting client's public (external) IP address...")

response, err := http.Get("https://ifconfig.co/json")
response, err := http.Get("https://v4.ifconfig.co/json")
if err != nil {
return "", fmt.Errorf("Unable to connect to ifconfig.co to determine your IP address: %s", err.Error())
}
Expand Down
7 changes: 4 additions & 3 deletions driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ package main
import (
"errors"
"fmt"
"net"
"os"

"github.com/DimensionDataResearch/go-dd-cloud-compute/compute"
"github.com/docker/machine/libmachine/drivers"
"github.com/docker/machine/libmachine/log"
"github.com/docker/machine/libmachine/mcnflag"
"github.com/docker/machine/libmachine/state"
"net"
"os"
)

// DefaultImageName is the name of the default OS image used to create machines.
Expand Down Expand Up @@ -150,7 +151,7 @@ func (driver *Driver) GetCreateFlags() []mcnflag.Flag {
mcnflag.StringFlag{
EnvVar: "MCP_SSH_KEY",
Name: "ddcloud-ssh-key",
Usage: "The SSH key file to use",
Usage: "The SSH key file to use (if not specified, then a new key will be generated)",
Value: "",
},
mcnflag.IntFlag{
Expand Down

0 comments on commit d2821a0

Please sign in to comment.