Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Add machine add option in paictl #819

Merged
merged 7 commits into from
Jul 6, 2018
Merged

Conversation

ydye
Copy link
Contributor

@ydye ydye commented Jul 6, 2018

Add machine from node-list.
The nodelist.yaml format

# Copyright (c) Microsoft Corporation
# All rights reserved.
#
# MIT License
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
# documentation files (the "Software"), to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
# to permit persons to whom the Software is furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
# BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


machine-list:

    - hostname: host1 # echo `hostname`
      hostip: 192.168.1.11
      machine-type: D8SV3
      etcdid: etcdid1
      sshport: PORT
      username: username
      password: password
      k8s-role: master
      dashboard: "true"
      zkid: "1"
      pai-master: "true"

    - hostname: host2
      hostip: 192.168.1.12
      machine-type: NC24R
      sshport: PORT
      username: username
      password: password
      k8s-role: worker
      pai-worker: "true"

The command:

./paictl.py machine add -p /conf/path -l nodelist.yaml

The supported node type:

master and worker

@ydye ydye requested review from hao1939, hwuu and wangcan0329 July 6, 2018 03:18
@ydye
Copy link
Contributor Author

ydye commented Jul 6, 2018

Test result

root@dev-box:~/pai/pai-management# kubectl exec -it etcd-server-10.240.0.6 etcdctl member list
17f4464cf534b2c8: name=etcdid5 peerURLs=http://10.240.0.6:2380 clientURLs=http://10.240.0.6:4001 isLeader=false
20255328899b8c2e: name=etcdid4 peerURLs=http://10.240.0.5:2380 clientURLs=http://10.240.0.5:4001 isLeader=false
abb4499d886b40e0: name=etcdid2 peerURLs=http://10.240.0.12:2380 clientURLs=http://10.240.0.12:4001 isLeader=true
eef97f15c8e64b72: name=etcdid3 peerURLs=http://10.240.0.13:2380 clientURLs=http://10.240.0.13:4001 isLeader=false
f614574e9935e3db: name=etcdid1 peerURLs=http://10.240.0.10:2380 clientURLs=http://10.240.0.10:4001 isLeader=false
root@dev-box:~/pai/pai-management# kubectl exec -it etcd-server-10.240.0.6 etcdctl cluster-health
member 17f4464cf534b2c8 is healthy: got healthy result from http://10.240.0.6:4001
member 20255328899b8c2e is healthy: got healthy result from http://10.240.0.5:4001
member abb4499d886b40e0 is healthy: got healthy result from http://10.240.0.12:4001
member eef97f15c8e64b72 is healthy: got healthy result from http://10.240.0.13:4001
member f614574e9935e3db is healthy: got healthy result from http://10.240.0.10:4001
cluster is healthy

@coveralls
Copy link

coveralls commented Jul 6, 2018

Coverage Status

Coverage increased (+11.5%) to 71.356% when pulling 1384d36 on yuye/k8s-machine-master-add into c526da7 on master.

@ydye ydye merged commit 07b45ac into master Jul 6, 2018
@ydye ydye deleted the yuye/k8s-machine-master-add branch July 9, 2018 06:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants