forked from TencentBlueKing/bk-nodeman
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature: 提供 2.0 Agent & Proxy 安装包制作能力 (closed TencentBlueKing#1176)
- Loading branch information
1 parent
1b7691d
commit e05aadd
Showing
54 changed files
with
1,636 additions
and
323 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# -*- coding: utf-8 -*- | ||
""" | ||
TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-节点管理(BlueKing-BK-NODEMAN) available. | ||
Copyright (C) 2017-2022 THL A29 Limited, a Tencent company. All rights reserved. | ||
Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at https://opensource.org/licenses/MIT | ||
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on | ||
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the | ||
specific language governing permissions and limitations under the License. | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# -*- coding: utf-8 -*- | ||
""" | ||
TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-节点管理(BlueKing-BK-NODEMAN) available. | ||
Copyright (C) 2017-2022 THL A29 Limited, a Tencent company. All rights reserved. | ||
Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at https://opensource.org/licenses/MIT | ||
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on | ||
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the | ||
specific language governing permissions and limitations under the License. | ||
""" | ||
import logging | ||
import os | ||
import tarfile | ||
import typing | ||
|
||
from apps.node_man import constants | ||
|
||
from . import base | ||
|
||
logger = logging.getLogger("app") | ||
|
||
|
||
class AgentArtifactBuilder(base.BaseArtifactBuilder): | ||
|
||
NAME = constants.GsePackageCode.AGENT.value | ||
PKG_DIR = constants.GsePackageDir.AGENT.value | ||
CERT_FILENAMES = [constants.GseCert.CA.value, constants.GseCert.AGENT_CERT.value, constants.GseCert.AGENT_KEY.value] | ||
|
||
def extract_initial_artifact(self, initial_artifact_local_path: str, extract_dir: str): | ||
with tarfile.open(name=initial_artifact_local_path) as tf: | ||
tf.extractall(path=extract_dir) | ||
extract_dir: str = os.path.join(extract_dir, self.BASE_PKG_DIR) | ||
self._inject_dependencies(extract_dir) | ||
return extract_dir | ||
|
||
def _get_support_files_info(self, extract_dir: str) -> typing.Dict[str, typing.Any]: | ||
# Agent 包管理实现 | ||
pass |
Oops, something went wrong.