0

I'm currently focusing in building DevOps pipeline with VSTS to both Azure Container Service and AWS ECS, but now I'm blocked somehow.

I'm following the steps in the Docker tool instruction, but have problem and feel like I haven't done some steps correctly?

In my Release task of "docker deploy" to DC/OS, if the ACS DC/OS Type is Direct, what shall the ACS DC/OS Master URL be? it's defaulted to http://leader/mesos, but it's said cannot find the host, I changed leader to my ACS mesos's leader IP:port, but it's said

##[error]Error occurred during deployment: HTTPConnectionPool(host='xxx.16.0.5', port=5050): Max retries exceeded with url: /mesos:80//dcos-metadata/dcos-version.json (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7fa12bbba910>: Failed to establish a new connection: [Errno 110] Connection timed out',))

I changed http://leader/mesos to http://localhost/mesos, neither worked.

And I changed ACS DC/OS Type to SSH type, but it complains that the RSA file is not correct

Error occurred during deployment: not a valid RSA private key file

I pasted the ppk content generated in puTTYGen like below,

2017-06-06T11:53:02.7670160Z Encryption: aes256-cbc
2017-06-06T11:53:02.7685800Z Comment: rsa-key-20170606
2017-06-06T11:53:02.7701390Z Public-Lines: 6
2017-06-06T11:53:02.7715470Z AAANzxxxxxx......xQ==
2017-06-06T11:53:02.7794230Z Private-Lines: 14
2017-06-06T11:53:02.7808300Z Mapoxxx.....xxxXKbm/

I created Azure Container Registry and Azure Container Service (no more configuration for ACS though), do I miss something??

Appreciate if you have successful experience with this and share here as it's really hard now to find articles regarding this.

Elaine
  • 1,288
  • 5
  • 17
  • 35
  • Do you use private build/release agent? What's the working folder you set? Can you share the whole release log here? – starian chen-MSFT Jun 07 '17 at 02:46
  • @starain-MSFT I edited my question even previous problem still there, but by re-creating an almost the same release task of "docker deploy" it now can retrieve files from artifact (still no idea why it couldn't). Now another problem occurs, I have been stumbling by the tool for a few days :( – Elaine Jun 07 '17 at 03:11
  • Can you connect to container service? Refer to https://blogs.msdn.microsoft.com/uk_faculty_connection/2016/09/23/getting-started-with-docker-and-container-services/ (Task 3: Connect to the Azure Container Service section) – starian chen-MSFT Jun 07 '17 at 05:23
  • Another article: https://learn.microsoft.com/en-us/azure/container-service/container-service-connect – starian chen-MSFT Jun 07 '17 at 05:54
  • @starain-MSFT thanks, I can connect to DC/OS master per puTTY. I also got another error "Cannot connect to the Docker daemon. Is the docker daemon running on this host?" when run sudo docker commands there. – Elaine Jun 08 '17 at 08:04

1 Answers1

1

You need to select "Secure Shell(SSH)" Connection Type and create a SSH Connection with the private key you used when create the Azure Container Service.

For the Host Name you need to enter when create the SSH Connection, you can get it from Azure Portal->Azure Container Service->Agents->Master FQDN. enter image description here

Eddie Chen - MSFT
  • 29,708
  • 2
  • 46
  • 60
  • This is useful, I'm still trying the DC/OS deployment task, now I changed to SSH type, in which I put OpenSSH file instead of the ssh file generated per puTTY, yet, I got another error, ##[warning]Could not read SSH configuration file: ~/.ssh/config 2017-06-15T08:58:40.9469930Z ##[error]Could not connect to gateway open-api-agents.eastus.cloudapp.azure.com:22 : 110 2017-06-15T08:58:40.9491930Z ##[error]Error occurred during deployment: Could not establish session to SSH gateway – Elaine Jun 15 '17 at 09:00
  • @Elaine Does the SSH key works on your local machine? I saw the same warning but didn't see this error at my side. Can you queue the build with "system.debug" variable set to "true" and then share the logs? – Eddie Chen - MSFT Jun 15 '17 at 09:43
  • Yes, I can now successfully run this directly in a machine per SSH connection using the SSH private key. – Elaine Jun 15 '17 at 10:24
  • @Elaine Is the private key you used when create SSH Endpoint the same as the format below: "-----BEGIN RSA PRIVATE KEY-----XXXXXXX-----END RSA PRIVATE KEY-----" – Eddie Chen - MSFT Jun 16 '17 at 07:50