nebari-dev / nebari-docker-images

📦 Ready to use Docker images maintained by the Nebari team
BSD 3-Clause "New" or "Revised" License
6 stars 13 forks source link

[ENH] Add Argo CLI to base Nebari image #83

Open kcpevey opened 1 year ago

kcpevey commented 1 year ago

Feature description

While I'm writing Argo workflows its very helpful to be able to debug in the command line. It would be great if the Argo CLI were installed by default.

Installing it on my local machine might be easy, but there are some things about working on Nebari that make this more involved.

First, the Argo docs recommend you follow the instructions on the Releases page

This includes the command mv ./argo-linux-amd64 /usr/local/bin/argo which will not work on Nebari. You'll first need to create the directory mkdir -p ~/bin/argo and then move it into there mv ./argo-linux-amd64 ~/bin/argo since our /usr/local is not writable.

There may be a better location that is already being added to PATH, but if you put it in the above path, you'll also need to create a .bash_profile with

export PATH="/home/kcpevey@quansight.com/bin/argo:$PATH"
alias argo="argo-linux-amd64"

This will cause you to lose all the fancy coloring and conda env display that is specified in the .bashrc. I dont have time right now to work through that, but you get the point. Its frustrating.

Value and/or benefit

It will be easier for users to debug Argo things, and they don't have to go through the above.

Anything else?

No response

kcpevey commented 1 year ago

Note to self: You also have to set up env vars or argo list will fail (though argo version will work for a check).

export ARGO_SERVER='your_nebari_url:443' 
export ARGO_HTTP1=true  
export ARGO_SECURE=true
export ARGO_BASE_HREF=/argo # NOTE: this has a different location for the slash than in the argo docs
export ARGO_TOKEN='REDACTED' 
export ARGO_NAMESPACE=dev ;# NOTE: Nebari deploys to `dev` by default
export KUBECONFIG=/dev/null ;# recommended
maxrjones commented 7 months ago

Hi @kcpevey, do you have any recommendations for circumventing this in order to use the Argo CLI on Nebari?

kcpevey commented 7 months ago

If I'm not mistaken, the summary above is the workaround to using it on nebari. Unfortunately I wrote it not as a guide but rather a "see how involved this is?". I think it should cover everything you need to get it working though.

maxrjones commented 7 months ago

If I'm not mistaken, the summary above is the workaround to using it on nebari. Unfortunately I wrote it not as a guide but rather a "see how involved this is?". I think it should cover everything you need to get it working though.

the summary above is the workaround to using it on nebari

Just to make sure I understand, this summary is for creating a docker image that inherits from the base Nebari image and includes the Argo CLI, which can then be specified in the Nebari config?

kcpevey commented 7 months ago

No, although you can certainly do it that way. My approach was just to install the argo cli manually for only my user in my user instance.

dharhas commented 7 months ago

This issue is a proposal to add argo-cli to the base image so it would be available to everyone. Currently, you have to add it manually by uploading to somewhere in your path.

maxrjones commented 7 months ago

This issue is a proposal to add argo-cli to the base image so it would be available to everyone. Currently, you have to add it manually by uploading to somewhere in your path.

If you're open to contributions I would be glad to submit a PR with this feature. We are currently using a separate docker image when argo-cli is needed (https://github.com/carbonplan/argo-docker) but I agree it would be great for everyone to have easier access to the argo cli.

maxrjones commented 7 months ago

Also, fwiw it seems the argo cli increases the image size by ~.2 GB.

dharhas commented 6 months ago

I think a PR would be welcome, plus any improvements to docs that help using Argo effectively.