Skip to content
This repository was archived by the owner on Oct 11, 2023. It is now read-only.

Add overwriting of AZURE/SSH Volume info - #9

Merged
Sorra (SorraTheOrc) merged 2 commits into
Azure:masterfrom
lastcoolnameleft:patch-3
Aug 9, 2017
Merged

Sorra (SorraTheOrc) merged 2 commits into
Azure:masterfrom
lastcoolnameleft:patch-3

Conversation

@lastcoolnameleft

Copy link
Copy Markdown
Contributor

I'm not sure how your environment is setup; however, if I want to interact with the Azure CLI, then I need to mount my local .azure directory for it to work.

Expected use:
AZURE_VOLUME=/Users/thfalgou/.azure scripts/run.sh cli /Users/thfalgou/git/azure/acs-demos/incubator/aci demo

Personally, I think $HOME/.azure should be the default value, but I don't know how much that would break.

I'm not sure how your environment is setup; however, if I want to interact with the Azure CLI, then I need to mount my local .azure directory for it to work.

Expected use: 
`AZURE_VOLUME=/Users/thfalgou/.azure scripts/run.sh cli /Users/thfalgou/git/azure/acs-demos/incubator/aci demo`

Personally, I think $HOME/.azure should be the default value, but again I don't want to break anything.
@msftclas

Tommy Falgout (@lastcoolnameleft),
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot

Comment thread scripts/run.sh Outdated
SCRIPTS_VOLUME=${CONTAINER_NAME}_scripts
AZURE_VOLUME=azure_data
SSH_VOLUME=ssh_data
AZURE_VOLUME=${AZURE_VOLUME:-azure_data}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a good change in principle, but I'm not sure if this is the best approach... lets discuss...

In my case I have two data volumes, "azure_data" and "ssh_data", these are reused across many different containers. I have them available in my private docker registry, do all that is needed to work from a new machine is a docker pull of those volumes.

In a single machine environment mounting ".azure" and ".ssh" would make more sense, I agree.

Perhaps the best approach is to cater for the (more common?) single client machine use case, thus making the defaults ".ssh" and ".azure".

If we do this should we use command line parameters to change the default, introducing params 4 and 5 (i.e. `${4:-~/.azure})

ASIDE (not a blocker for this PR) with 4-5 params we really auto put command line options in (e.g. --ssh_dir=~/.ssh)

If you agree please make the change to this PR, if not lets disuss

I agree that it should be ~/.ssh, ~/.azure.
@lastcoolnameleft

Copy link
Copy Markdown
Contributor Author

Your original comment got overwritten due to my updated commit, so creating new thread.

I agree that the default should be for a single machine environment, and should not make assumptions about other tools/envs.

I also agree that CLI options would be better, but that's for a later/different PR.

@SorraTheOrc
Sorra (SorraTheOrc) merged commit 30c3d71 into Azure:master Aug 9, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants