Skip to content
This repository has been archived by the owner on Jan 21, 2020. It is now read-only.

Support for multiple remotes in infrakit CLI #528

Merged
merged 8 commits into from
May 7, 2017

Conversation

chungers
Copy link
Contributor

@chungers chungers commented May 7, 2017

This PR makes the use of -H to connect to remote hosts easier:

  • A hosts file in $INFRAKIT_HOME/hosts is used to determine the url of the remote infrakit daemons to connect to. Multiple hosts can be specified in one file:
    • The format is YAML
    • It's simply a dictionary of : <url_list> where <url_list> is a comma-delimited list of URL remote mux endpoints and is a logical name.
    • An environment variable INFRAKIT_HOST is used to determine which hostname to use. If the environment variable is not set, then local, unix socket discovery is used.

This is the order of determining where to connect:

  1. If -H is set, it takes priority ==> continue
  2. If the INFRAKIT_HOST env is set, then use it as a key in the hosts file:
    • Load the hosts file in INFRAKIT_HOME/hosts
    • Look up the comma delimited string associated with INFRAKIT_HOST value
    • Use the host list as connection string for remote client access
  3. If INFRAKIT_HOST env is not set ==> do nothing; this matches current functionality
  4. If hosts file does not exist, then assume local mode.

David Chung added 4 commits May 7, 2017 11:11
Signed-off-by: David Chung <david.chung@docker.com>
Signed-off-by: David Chung <david.chung@docker.com>
Signed-off-by: David Chung <david.chung@docker.com>
@GordonTheTurtle
Copy link

Please sign your commits following these rules:
https://github.com/moby/moby/blob/master/CONTRIBUTING.md#sign-your-work
The easiest way to do this is to amend the last commit:

$ git clone -b "work-0504" git@github.com:chungers/infrakit.git somewhere
$ cd somewhere
$ git rebase -i HEAD~842354613824
editor opens
change each 'pick' to 'edit'
save the file and quit
$ git commit --amend -s --no-edit
$ git rebase --continue # and repeat the amend for each commit
$ git push -f

Amending updates the existing PR. You DO NOT need to open a new one.

Signed-off-by: David Chung <david.chung@docker.com>
@codecov
Copy link

codecov bot commented May 7, 2017

Codecov Report

Merging #528 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #528   +/-   ##
=======================================
  Coverage   56.73%   56.73%           
=======================================
  Files          57       57           
  Lines        3904     3904           
=======================================
  Hits         2215     2215           
  Misses       1403     1403           
  Partials      286      286

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0bda756...d447708. Read the comment docs.

David Chung added 3 commits May 7, 2017 14:09
Signed-off-by: David Chung <david.chung@docker.com>
Signed-off-by: David Chung <david.chung@docker.com>
Signed-off-by: David Chung <david.chung@docker.com>
@chungers chungers merged commit 59dc9e2 into docker-archive:master May 7, 2017
chungers pushed a commit to chungers/infrakit that referenced this pull request Sep 30, 2017
…re_public_beat

Add final changes for Azure v1.13.0-rc2-beta12 release
chungers pushed a commit to chungers/infrakit that referenced this pull request Oct 1, 2017
…re_public_beat

Add final changes for Azure v1.13.0-rc2-beta12 release
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants