Skip to content

Expose host labels#18

Merged
ibuildthecloud merged 1 commit intorancher:masterfrom
LLParse:expose-host-labels
Oct 4, 2016
Merged

Expose host labels#18
ibuildthecloud merged 1 commit intorancher:masterfrom
LLParse:expose-host-labels

Conversation

@LLParse
Copy link

@LLParse LLParse commented Sep 30, 2016

Exposing non-rancher host labels is useful in many cases. It helps users understand their topology at a glance.

For example, Docker Swarm:

Jamess-MacBook-Pro:cli joliver$ for f in $(env|grep DOCKER|cut -d= -f1); do unset $f; done
Jamess-MacBook-Pro:cli joliver$ rancher host
ID        HOSTNAME         STATE     IP               LABELS          DETAIL
1h76      james-10acre-1   active    10.240.0.5       swarm=master    
1h77      james-10acre-2   active    10.240.0.6       swarm=manager   
1h79      james-10acre-4   active    10.240.0.13      swarm=manager   
1h80      james-10acre-5   active    10.240.0.40                      
1h81      james-10acre-6   active    10.240.0.32                      
1h82      james-10acre-7   active    146.148.93.243
Jamess-MacBook-Pro:cli joliver$ rancher --host 1h77 docker node ls
ID                           HOSTNAME        STATUS  AVAILABILITY  MANAGER STATUS
0p2308mvfgq340ycib33e6iay    james-10acre-7  Ready   Active
1tuxzn94d73hl308mru10snye *  james-10acre-1  Ready   Active        Leader
3kndicps7o0jw7cnroetwv9rv    james-10acre-2  Ready   Active        Reachable
5bphx97jtkl2t5ehr1kh5lpap    james-10acre-5  Ready   Active
5hv5ke5qeqplnursujlw9hore    james-10acre-4  Ready   Active        Reachable
adbhevj2v8wqmcp0sqb3vuemg    james-10acre-6  Ready   Active
Jamess-MacBook-Pro:cli joliver$ rancher --host 1h77 docker service create --name redis --replicas=7 redis:3.0.6
a76bdbs6w9jqsf1q7kls1v070
Jamess-MacBook-Pro:cli joliver$ rancher --host 1h77 docker service ls
ID            NAME   REPLICAS  IMAGE        COMMAND
a76bdbs6w9jq  redis  7/7       redis:3.0.6

@ibuildthecloud
Copy link
Contributor

@LLParse can you squash the commits?

@LLParse LLParse force-pushed the expose-host-labels branch from ce018f7 to 54cc867 Compare October 3, 2016 17:16
@LLParse
Copy link
Author

LLParse commented Oct 3, 2016

done

@ibuildthecloud ibuildthecloud merged commit 94c6a3a into rancher:master Oct 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants