3

About Halyard,
I want to use --password-command option to refresh Amazon ECR Authorization Token. If you have experience of using this option, please teach me.
Thank you!

Chacko
  • 1,506
  • 1
  • 20
  • 42
Son Nguyen
  • 195
  • 1
  • 10

1 Answers1

4

Here you go, the below worked for me.

hal config provider docker-registry account add my-ecr-registry \
 --address https://< Your ECR Endpoint> \
 --username AWS \
 --password-command "aws --region us-east-1 ecr get-authorization-token --output text --query 'authorizationData[].authorizationToken' | base64 -d | sed 's/^AWS://'"
Armali
  • 18,255
  • 14
  • 57
  • 171
alok
  • 56
  • 5
  • Thank you so much for answering my question! I have another question: Does the clouddriver container has `aws` command installed? – Son Nguyen Jan 25 '19 at 11:23
  • Yes indeed. As I'm able to run the aws command inside the clouddriver pod . – alok Jan 27 '19 at 06:24
  • Hi @alok I install Spinnaker from Helm Chart, but AWS CLI is not avaliable on halyard pod. On CloudDriver is ok. Do you have any ideas whats is wrong? – kchrusciel Feb 21 '19 at 08:17
  • yes, aws cli is not installed on halyard by default I believe. If required, you can access the container as root and install it. However, if you are trying to configure ECR using --password-command, you won't need aws cli to be installed in halyard pod. – alok Feb 24 '19 at 11:43