New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Penetrator: Support batch adding nodes #121
Conversation
Signed-off-by: 00pf00 <feeli202012@gmail.com>
…to update crd spec) and field verification Signed-off-by: 00pf00 <feeli202012@gmail.com>
Signed-off-by: 00pf00 <feeli202012@gmail.com>
Signed-off-by: 00pf00 <feeli202012@gmail.com>
Signed-off-by: 00pf00 <feeli202012@gmail.com>
Signed-off-by: 00pf00 <feeli202012@gmail.com>
Signed-off-by: 00pf00 <feeli202012@gmail.com>
Signed-off-by: 00pf00 <feeli202012@gmail.com>
Signed-off-by: 00pf00 <feeli202012@gmail.com>
Signed-off-by: 00pf00 <feeli202012@gmail.com>
Signed-off-by: 00pf00 <feeli202012@gmail.com>
Signed-off-by: 00pf00 <feeli202012@gmail.com>
build/docker/penetrator-job/build.sh
Outdated
|
||
cp -r pkg/penetrator/job/script "$DST_DIR" | ||
|
||
wget https://attlee-1251707795.cos.ap-chengdu.myqcloud.com/superedge/v0.3.0/edgeadm-linux-amd64-v0.3.0.tgz -O "$DST_DIR"/edgeadm-amd64-v1.18.2.tar.gz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not use personal cloud-obj-storage
deployment/penetrator.yaml
Outdated
fieldRef: | ||
apiVersion: v1 | ||
fieldPath: metadata.name | ||
image: ccr.ccs.tencentyun.com/superedge/penetrator-controller:v0.1.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use tcr
deployment/penetrator.yaml
Outdated
- penetrator-job | ||
- --secret-path=/etc/superedge/penetrator/job/secret/ | ||
- --jobconf-path=/etc/superedge/penetrator/job/conf/ | ||
image: ccr.ccs.tencentyun.com/superedge/penetrator-job:v0.1.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tcr
deployment/penetrator.yaml
Outdated
- penetrator-job | ||
- --secret-path=/etc/superedge/penetrator/job/secret/ | ||
- --jobconf-path=/etc/superedge/penetrator/job/conf/ | ||
image: ccr.ccs.tencentyun.com/superedge/penetrator-job:v0.1.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tcr
resources: | ||
limits: | ||
cpu: 200m | ||
memory: 64Mi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please increase the memory limit to support high concurrency
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is no problem to specify the installation of 20 nodes in the task
``` | ||
|
||
* prefixName: 节点名前缀,节点名的格式: prefixName-随机字符串(6位) | ||
* secretName:存储SSH登录待添加的节点的密码(passwd)和私钥的secret(sshkey),密码文件的key值必须为passwd,私钥文件的key值必须为sshkey |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Be consistent in punctuation
``` | ||
|
||
* prefixName: 节点名前缀,节点名的格式: prefixName-随机字符串(6位) | ||
* secretName:存储SSH登录待添加的节点的密码(passwd)和私钥的secret(sshkey),密码文件的key值必须为passwd,私钥文件的key值必须为sshkey |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please describe or give an example for login-secret, thx
} | ||
} else { | ||
if node.Labels[constants.NodeLabel] == conf.JobConf.NodeLabel { | ||
return nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add log
"strings" | ||
) | ||
|
||
func SShConnectNode(ip string, port int, secret conf.JobSecret) (*ssh.Client, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SshConnectNode?
pkg/penetrator/util/ssh_util.go
Outdated
return ssh.Dial("tcp", ip+":"+strconv.Itoa(port), cfg) | ||
} | ||
|
||
func FtpUploadFile(ftpClient *sftp.Client, path, file string) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What the Ftp does?
## 安装节点 | ||
|
||
### 通过master节点安装节点 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More detailed information is expected, such as, working principle, preconditions, how to observe task's running state, exception handling
Signed-off-by: 00pf00 <feeli202012@gmail.com>
…b nodes Signed-off-by: 00pf00 <feeli202012@gmail.com>
Signed-off-by: 00pf00 <feeli202012@gmail.com>
Signed-off-by: 00pf00 <feeli202012@gmail.com>
Signed-off-by: 00pf00 <feeli202012@gmail.com>
Signed-off-by: 00pf00 <feeli202012@gmail.com>
Signed-off-by: 00pf00 <feeli202012@gmail.com>
# Conflicts: # pkg/util/kubeclient/client.go
Signed-off-by: 00pf00 <feeli202012@gmail.com>
Signed-off-by: 00pf00 <feeli202012@gmail.com>
Signed-off-by: 00pf00 <feeli202012@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
What type of PR is this?
/kind feature
What this PR does:
Add penetrator component to support batch adding nodes