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

Add / Remove Nodes with layout.yaml #5167

Closed
suiguoxin opened this issue Dec 11, 2020 · 3 comments
Closed

Add / Remove Nodes with layout.yaml #5167

suiguoxin opened this issue Dec 11, 2020 · 3 comments
Assignees
Labels

Comments

@suiguoxin
Copy link
Member

suiguoxin commented Dec 11, 2020

Target

allow users to add / remove nodes with layout.yaml instead of hosts.yml.

Design

add nodes :

Step 1: add nodes info to layout.yaml

pull layout to local

./paictl.py config pull -o /cluster-configuration

add the corresponding nodes in to the machine-list field in layout.yaml

machine-sku:
  xxx-sku: 
    mem: ...
    cpu: ...

machine-list:
  - hostname: a
    hostip: x.x.x.x
    machine-type: xxx-sku
    pai-worker: "true"
  - hostname: b
    hostip: x.x.x.x
    machine-type: xxx-sku
    pai-worker: "true"

push layout back to k8s

./paictl.py config push -p /cluster-configuration/ -m service

Step 2: add nodes to k8s

./paictl.py node add -n a b

in this step, we will:

  • generate hosts.yaml, openpai.yml with layout.yaml, config.yaml
  • call ansible-playbook to add the nodes to k8s

Step 3: restart related services

Modify HiveD config in services-configuration.yaml manually, restart services: cluster-configuration hivedscheduler rest-server

remove nodes:

Step 1: remove nodes from k8s

./paictl.py node remove --nodes a b

in this step, we will:

  • generate hosts.yaml, openpai.yml with layout.yaml, config.yaml
  • call ansible-playbook to remove the nodes from k8s
  • modify layout.yaml in the k8s

Step 2: restart related services

Modify HiveD config in services-configuration.yaml, restart services: cluster-configuration hivedscheduler rest-server

Problems:

  • config.yaml is local but layout.yaml is saved in k8s
@suiguoxin suiguoxin mentioned this issue Dec 11, 2020
52 tasks
@suiguoxin suiguoxin self-assigned this Dec 11, 2020
@hzy46
Copy link
Contributor

hzy46 commented Dec 11, 2020

scale to add-nodes ? Also remove-nodes is better in my view.

@suiguoxin
Copy link
Member Author

scale to add-nodes ? Also remove-nodes is better in my view.

After discussion, we'll use ./paictl.py node add -n a b & ./paictl.py node remove -n a b

@suiguoxin
Copy link
Member Author

Implemented in #5400

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants