Skip to content
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

Merged
merged 24 commits into from Jun 15, 2021
Merged

Conversation

00pf00
Copy link
Member

@00pf00 00pf00 commented May 20, 2021

What type of PR is this?
/kind feature
What this PR does:
Add penetrator component to support batch adding nodes

00pf00 added 12 commits May 20, 2021 16:45
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>
@neweyes neweyes added the kind/feature Categorizes issue or PR as related to a new feature. label May 20, 2021

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
Copy link
Member

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

fieldRef:
apiVersion: v1
fieldPath: metadata.name
image: ccr.ccs.tencentyun.com/superedge/penetrator-controller:v0.1.2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use tcr

- 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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tcr

- 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
Copy link
Member

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
Copy link
Member

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

Copy link
Member Author

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
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SshConnectNode?

return ssh.Dial("tcp", ip+":"+strconv.Itoa(port), cfg)
}

func FtpUploadFile(ftpClient *sftp.Client, path, file string) error {
Copy link
Member

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节点安装节点

Copy link
Member

@neweyes neweyes May 27, 2021

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

00pf00 added 11 commits May 27, 2021 19:10
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>
Copy link
Member

@neweyes neweyes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@neweyes neweyes merged commit 9f8b84b into superedge:main Jun 15, 2021
@neweyes neweyes added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Jun 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants