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

Feature/awscliv2 #31

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

Orachigami
Copy link

Replaced aws-cli v1 with aws-cli v2.
aws-cli v2.1.39 is compatible with gcompat + groff

aws/aws-cli#4685

@ozbillwang
Copy link
Collaborator

that's great. Let me review.

In fact, I worked on this feature before via

#10

#9

but can't work it out at that time.

@ozbillwang
Copy link
Collaborator

ozbillwang commented Apr 12, 2022

I'd like to keep both versions, I explained it in #10

We need keep compatible in this image.

  • install both aws cli v1 and v2 in same image
  • set ENTRYPOINT to switch default aws cli version when run the container.
    • if environment variable awscli is set to v2, default aws cli version is v2
    • if environment variable awscli is set to v1, not set or set to anything else, except v2, aws cli will be run from /usr/bin, and version is v1
  • you can still run specific version with full path in container.
$ docker build -t k8s .
$ docker run -ti --rm -e awscli=v2 k8s aws --version
aws-cli/2.1.22 Python/3.7.3 Linux/4.19.121-linuxkit exe/x86_64.alpine.3 prompt/off
$ docker run -ti --rm -e awscli=v1 k8s aws --version
aws-cli/1.18.223 Python/3.8.7 Linux/4.19.121-linuxkit botocore/1.19.63
$ docker run -ti --rm k8s --version
aws-cli/1.18.223 Python/3.8.7 Linux/4.19.121-linuxkit botocore/1.19.63

can you adjust your codes to keep both versions?

@Orachigami
Copy link
Author

Orachigami commented Apr 14, 2022

@ozbillwang added entrypoint script, results here:

$ docker build -t k8s .
$ docker run -ti --rm -e awscli=v2 k8s aws --version
aws-cli/2.1.39 Python/3.8.8 Linux/5.10.76-linuxkit exe/x86_64.alpine.3 prompt/off
$ docker run -ti --rm k8s aws --version
aws-cli/1.22.96 Python/3.9.7 Linux/5.10.76-linuxkit botocore/1.24.41
$ docker run -ti --rm -e awscli=100500 k8s aws --version
aws-cli/1.22.96 Python/3.9.7 Linux/5.10.76-linuxkit botocore/1.24.41

I reread your message and reverted aws iam authenticator to Dockerfile for compatibility

README.md Show resolved Hide resolved
@Orachigami
Copy link
Author

@ozbillwang, shall I make any other changes for this image?

@yi-yang-github
Copy link

how can I use / test this? I am using AWS v2 and I can't get helm work on a k8s 1.22 cluster (AWS EKS). Wondering is it because AWS v1 is not supported anymore.

Also the latest AWS v2 seems to be aws-cli/2.4.5.

@yi-yang-github
Copy link

also maybe need to specify kubectl version (1.23.6) instead of latest
actions/runner-images#5493 (comment)

@ozbillwang
Copy link
Collaborator

@Orachigami

So should we lock the aws v2 version in Dockerfile, or we can always install the latest version? I put the comments before.

@Orachigami
Copy link
Author

@ozbillwang have you checked this comment?
#31 (comment)

@ozbillwang
Copy link
Collaborator

oh, I missed that comment, let me check

@bombergio
Copy link

Is this PR abandoned, and is it missing something?

@Orachigami
Copy link
Author

Is this PR abandoned, and is it missing something?

Kinda abandoned I suppose 😃

If all packages are still available then it still should work

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

Successfully merging this pull request may close these issues.

None yet

4 participants