siliond
siliond

Reputation: 83

Deploying a Service fabric app from Team Services to Azure

I need some help with deploying a Service fabric app from Team Services to Azure.

I’m getting the following error from the Agent in Team Services (see screenshot below):

2018-06-22T13:17:13.3007613Z ##[error] An error occurred attempting to import the certificate. Ensure that your service endpoint is configured properly with a correct certificate value and, if the certificate is password-protected, a valid password.

Error message: Exception calling "Import" with "3" argument(s): "Cannot find the requested object.

Please advise.

TS Deploy error

Here is my Service Fabric Security security page, don't remember where I set up the password needed on the VSTS side but I took note of it and believe it's correct. SF Security

Here is the Endpoint page on the VSTS side: enter image description here

Upvotes: 0

Views: 435

Answers (2)

siliond
siliond

Reputation: 83

Issue resolved with the help of MS Support by creating a new Certificate in the Key Vault and Adding it to the Service Fabric, steps:

Azure Portal:

  • Home > Key vaults > YourKeyVault - Certificates: Generate/Import Generate new key with a CertificateName of your choosing and CN=CertificateName as Subject.
  • Home > Key vaults > YourKeyVault - Certificates > CertificateName Select the only version available and Download in PFX/PEM format.
  • Power Shell: Convert to Base64 string, CertificateBase64 [System.Convert]::ToBase64String([System.IO.File]::ReadAllBytes("c:\YourCertificate.pfx"))
  • Home > YourServicefabric - Security: Add Add the Certificate you created as Admin Client by providing 's thumbprint.

VSTS/TFS:

  • Build and release > Your pipeline: Edit In the Deployment Process Service Fabric Environment click Manage for Cluster Connection and add a new connection. Besides the other information, in the Client Certificate paste the previous CertificateBase64.

Upvotes: 1

LoekD
LoekD

Reputation: 11470

Check the Service Endpoint in VSTS:

  • Whether it has a properly base64 encoded certificate, with a private key.
  • Also, check if the provided passphrase is correct.
  • Also, check if the service endpoint is configured as tcp://mycluster.region.cloudapp.azure.com:19000.
  • Check if the thumbprint is correct.

Upvotes: 0

Related Questions