Skip to content
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

Add support for custom certificates when creating new Azure Cloud Service #6418

Closed
ross-bohr opened this issue Feb 13, 2018 · 8 comments
Closed
Assignees

Comments

@ross-bohr
Copy link
Contributor

Troubleshooting

A new feature: Allow for certificates to be specified in the AzureCloudPowerShellDeployment task settings (in the "Advanced Options For Creating New Service" section, similar to the "Diagnostic storage account keys" setting) in a Release definition.

Environment

  • Server - VSTS or TFS on-premises?
    Does NOT depend on the cloud/on-premise environment.

  • Agent - Hosted or Private:
    Does not depend on the Agent type.

Issue Description

Task AzureCloudPowerShellDeployment should be able to support certificates for creating a new Azure Cloud Service instance. Without the support for certificates, the task fails when it tries to create a new ACS and then deploy the ACS which does use custom certificates.

Error logs

2018-02-13T08:55:01.4184581Z ##[error] BadRequest: The certificate with thumbprint 58e54ffab7...........a5 was not found.

new-acs

@ross-bohr
Copy link
Contributor Author

I am willing to implement this if the feature is accepted.

@Ajay-MS
Copy link

Ajay-MS commented Feb 14, 2018

@ross-bohr

It refers to certificate within the cspkg. Can you please check if certificate is valid.

Also, can you please share debug logs at [email protected] . Debug logs you can enable by adding RD variable System.debug = true

@ross-bohr
Copy link
Contributor Author

ross-bohr commented Feb 14, 2018

@Ajay-MS , the error shown above is related to a certificate that the ACS is using. It is listed in the ACS Cloud config as:
acs_using_custom_certificate

This is a certificate which the ACS starts using as soon as it boots up. It must be present in the ACS definition (in the certificates list) , otherwise the deployment of the ASC roles fails with the above error.

Effectively, this makes the procedure to deploy a new ACS as follows:

  1. Run the Release (it creates the ACS definition and then fails upon deployment due to the missing cert(s) )
  2. Manually upload the cert(s) (using PS or Portal blades)
  3. Run the Release again (redeploy)

This is not the optimal experience as one would like to automate the ACS creation end-to-end. Thus, I'm proposing this new feature to allow for the VSTS/TFS task to include the list of required cert(s) (by the ACS) as a string of ["base64StringOfCertPfx":"securedVariableForCertPassword"]

@Ajay-MS
Copy link

Ajay-MS commented Feb 14, 2018

Sounds good to me. I will discuss this with PM and will update you by tomorrow on this.

@Ajay-MS
Copy link

Ajay-MS commented Feb 16, 2018

@ross-bohr

We will be happy to have a contribution from you. Let me know as soon as you are done with your PR for this feature.

Thanks in advance.

@ross-bohr
Copy link
Contributor Author

@Ajay-MS

Please find my PR for this feature here #6467

Please advise how to provide the translations for the other languages besides en-US.

Thanks in advance.

@chshrikh
Copy link
Contributor

chshrikh commented Mar 1, 2018

@ross-bohr Thanks for your contribution. You dont need worry for translation, our system will take care of it.
@Ajay-MS to proceed with PR

Ajay-MS pushed a commit that referenced this issue Mar 10, 2018
* Implemented issue #6418 : Add support for custom certificates when creating new Azure Cloud Service

* Removed unnecessary whitespace characters and corrected indentation.

* Corrected the new version number to match semantic scheme.
@chshrikh
Copy link
Contributor

@ross-bohr thanks for your contribution. @Ajay-MS has taken care to merge this.

The changes will be available with next deployment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants