Skip to content

Commit

Permalink
Merge pull request #15 from MSOpenTech/host-management
Browse files Browse the repository at this point in the history
Cleaned up Azure driver output
  • Loading branch information
bfirsh committed Nov 11, 2014
2 parents 5f68d07 + 0ed3e89 commit 36583ed
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 15 deletions.
2 changes: 1 addition & 1 deletion hack/vendor.sh
Expand Up @@ -63,7 +63,7 @@ clone hg code.google.com/p/goauth2 afe77d958c70

clone git github.com/mitchellh/go-homedir 7d2d8c8a4e078ce3c58736ab521a40b37a504c52

clone git github.com/MSOpenTech/azure-sdk-for-go 457e677b69de60016b2cbf3fb7aa41a923ab0e63
clone git github.com/MSOpenTech/azure-sdk-for-go 814812a21a49da38c5cc808ec0958277e33c81d3

# get Go tip's archive/tar, for xattr support and improved performance
# TODO after Go 1.4 drops, bump our minimum supported version and drop this vendored dep
Expand Down
4 changes: 2 additions & 2 deletions hosts/drivers/azure/azure.go
Expand Up @@ -192,6 +192,7 @@ func (driver *Driver) Create() error {
return err
}

log.Infof("Creating Azure host...")
vmConfig, err := vmClient.CreateAzureVMConfiguration(driver.Name, driver.Size, driver.Image, driver.Location)
if err != nil {
return err
Expand Down Expand Up @@ -439,7 +440,7 @@ func (driver *Driver) waitForSSH() error {
}

func (driver *Driver) waitForDocker() error {
log.Infof("Waiting for docker daemon on host to be available")
log.Infof("Waiting for docker daemon on host to be available...")
maxRepeats := 48
url := fmt.Sprintf("%s:%v", driver.Name+".cloudapp.net", driver.DockerPort)
success := waitForDockerEndpoint(url, maxRepeats)
Expand All @@ -452,7 +453,6 @@ func (driver *Driver) waitForDocker() error {
func waitForDockerEndpoint(url string, maxRepeats int) bool {
counter := 0
for {
fmt.Print(".")
conn, err := net.Dial("tcp", url)
if err != nil {
time.Sleep(10 * time.Second)
Expand Down
Expand Up @@ -59,8 +59,6 @@ func CreateAzureVM(azureVMConfiguration *Role, dnsName, location string) error {
return fmt.Errorf(azure.ParamNotSpecifiedError, "location")
}

fmt.Println("Creating hosted service... ")

err := verifyDNSname(dnsName)
if err != nil {
return err
Expand All @@ -74,17 +72,13 @@ func CreateAzureVM(azureVMConfiguration *Role, dnsName, location string) error {
azure.WaitAsyncOperation(requestId)

if azureVMConfiguration.UseCertAuth {
fmt.Println("Uploading cert...")

err = uploadServiceCert(dnsName, azureVMConfiguration.CertPath)
if err != nil {
DeleteHostedService(dnsName)
return err
}
}

fmt.Println("Deploying azure VM configuration... ")

vMDeployment := createVMDeploymentConfig(azureVMConfiguration)
vMDeploymentBytes, err := xml.Marshal(vMDeployment)
if err != nil {
Expand Down Expand Up @@ -204,8 +198,6 @@ func CreateAzureVMConfiguration(dnsName, instanceSize, imageName, location strin
return nil, fmt.Errorf(azure.ParamNotSpecifiedError, "location")
}

fmt.Println("Creating azure VM configuration... ")

err := verifyDNSname(dnsName)
if err != nil {
return nil, err
Expand Down Expand Up @@ -237,8 +229,6 @@ func AddAzureLinuxProvisioningConfig(azureVMConfiguration *Role, userName, passw
return nil, fmt.Errorf(azure.ParamNotSpecifiedError, "userName")
}

fmt.Println("Adding azure provisioning configuration... ")

configurationSets := ConfigurationSets{}
provisioningConfig, err := createLinuxProvisioningConfig(azureVMConfiguration.RoleName, userName, password, certPath)
if err != nil {
Expand Down Expand Up @@ -281,8 +271,6 @@ func SetAzureVMExtension(azureVMConfiguration *Role, name string, publisher stri
return nil, fmt.Errorf(azure.ParamNotSpecifiedError, "referenceName")
}

fmt.Printf("Setting azure VM extension: %s... \n", name)

extension := ResourceExtensionReference{}
extension.Name = name
extension.Publisher = publisher
Expand Down

0 comments on commit 36583ed

Please sign in to comment.