当前位置: 首页 > news >正文

kubernetes存储类迁移-备份恢复

背景介绍

kubernetes集群最开始使用了nfs作为存储,随着后续使用过程中数据量逐渐增加,nfs存储性能逐步出现不足,现增加了基于csi的分布式块存储后,需要对原有基于nfs存储类下的pv迁移到新的存储类下。

测试环境

  • k8s集群版本:1.25.12
  • 节点数:4
  • 旧存储类:nfs-storage
  • 新存储类:rook-ceph-block
  • 测试应用:mysql
  • 备份恢复工具:velero
  • 需求:集群管理权限、S3存储

测试方法

  1. 安装minio
apiVersion: v1
kind: PersistentVolumeClaim
metadata:name: miniolabels:app.kubernetes.io/name: minio
spec:accessModes:- ReadWriteOnceresources:requests:storage: 20Gi
---
apiVersion: v1
kind: Service
metadata:name: "minio"labels:app.kubernetes.io/name: "minio"
spec:type: NodePortports:- name: tcpport: 9000targetPort: 9000- name: httpport: 9001targetPort: 9001selector:app.kubernetes.io/name: "minio"
---
apiVersion: apps/v1
kind: Deployment
metadata:name: "minio"labels:app.kubernetes.io/name: "minio"
spec:replicas: 1selector:matchLabels:app.kubernetes.io/name: "minio"template:metadata:labels:app.kubernetes.io/name: "minio"spec:containers:- name: minioimage: harbor.gistack.cn/gistack/minio:2023-07-21env:- name: MINIO_ROOT_USERvalue: minioadmin- name: MINIO_ROOT_PASSWORDvalue: minio2023args:- server- /data- --console-address- :9001ports:- name: tcpcontainerPort: 9000protocol: TCP- name: httpcontainerPort: 9001protocol: TCPvolumeMounts:- name: datamountPath: /datavolumes:- name: datapersistentVolumeClaim:claimName: minio
  1. 安装velero
[root@rocky8 ~]# wget https://github.com/vmware-tanzu/velero/releases/download/v1.12.2/velero-v1.12.2-linux-amd64.tar.gz
[root@rocky8 ~]# tar xvf velero-v1.12.2-linux-amd64.tar.gz 
velero-v1.12.2-linux-amd64/LICENSE
velero-v1.12.2-linux-amd64/examples/minio/00-minio-deployment.yaml
velero-v1.12.2-linux-amd64/examples/nginx-app/README.md
velero-v1.12.2-linux-amd64/examples/nginx-app/base.yaml
velero-v1.12.2-linux-amd64/examples/nginx-app/with-pv.yaml
velero-v1.12.2-linux-amd64/velero
[root@rocky8 ~]# cd velero-v1.12.2-linux-amd64/
[root@rocky8 velero-v1.12.2-linux-amd64]# ls
LICENSE  examples  velero
[root@rocky8 velero-v1.12.2-linux-amd64]# echo "[default]
> aws_access_key_id = minioadmin
> aws_secret_access_key = minio2023
> " > credentials-minio
[root@rocky8 velero-v1.12.2-linux-amd64]# ./velero install \
>   --provider aws \
>   --plugins velero/velero-plugin-for-aws:v1.8.0 \
>   --bucket velero \
>   --secret-file ./credentials-minio \
>   --use-node-agent \
>   --use-volume-snapshots=false \
>   --backup-location-config region=cn-beijing,s3ForcePathStyle="true",s3Url=http://192.168.121.2:32432
CustomResourceDefinition/backuprepositories.velero.io: attempting to create resource
CustomResourceDefinition/backuprepositories.velero.io: attempting to create resource client
CustomResourceDefinition/backuprepositories.velero.io: created
CustomResourceDefinition/backups.velero.io: attempting to create resource
CustomResourceDefinition/backups.velero.io: attempting to create resource client
CustomResourceDefinition/backups.velero.io: created
CustomResourceDefinition/backupstoragelocations.velero.io: attempting to create resource
CustomResourceDefinition/backupstoragelocations.velero.io: attempting to create resource client
CustomResourceDefinition/backupstoragelocations.velero.io: created
CustomResourceDefinition/deletebackuprequests.velero.io: attempting to create resource
CustomResourceDefinition/deletebackuprequests.velero.io: attempting to create resource client
CustomResourceDefinition/deletebackuprequests.velero.io: created
CustomResourceDefinition/downloadrequests.velero.io: attempting to create resource
CustomResourceDefinition/downloadrequests.velero.io: attempting to create resource client
CustomResourceDefinition/downloadrequests.velero.io: created
CustomResourceDefinition/podvolumebackups.velero.io: attempting to create resource
CustomResourceDefinition/podvolumebackups.velero.io: attempting to create resource client
CustomResourceDefinition/podvolumebackups.velero.io: created
CustomResourceDefinition/podvolumerestores.velero.io: attempting to create resource
CustomResourceDefinition/podvolumerestores.velero.io: attempting to create resource client
CustomResourceDefinition/podvolumerestores.velero.io: created
CustomResourceDefinition/restores.velero.io: attempting to create resource
CustomResourceDefinition/restores.velero.io: attempting to create resource client
CustomResourceDefinition/restores.velero.io: created
CustomResourceDefinition/schedules.velero.io: attempting to create resource
CustomResourceDefinition/schedules.velero.io: attempting to create resource client
CustomResourceDefinition/schedules.velero.io: created
CustomResourceDefinition/serverstatusrequests.velero.io: attempting to create resource
CustomResourceDefinition/serverstatusrequests.velero.io: attempting to create resource client
CustomResourceDefinition/serverstatusrequests.velero.io: created
CustomResourceDefinition/volumesnapshotlocations.velero.io: attempting to create resource
CustomResourceDefinition/volumesnapshotlocations.velero.io: attempting to create resource client
CustomResourceDefinition/volumesnapshotlocations.velero.io: created
CustomResourceDefinition/datadownloads.velero.io: attempting to create resource
CustomResourceDefinition/datadownloads.velero.io: attempting to create resource client
CustomResourceDefinition/datadownloads.velero.io: created
CustomResourceDefinition/datauploads.velero.io: attempting to create resource
CustomResourceDefinition/datauploads.velero.io: attempting to create resource client
CustomResourceDefinition/datauploads.velero.io: created
Waiting for resources to be ready in cluster...
Namespace/velero: attempting to create resource
Namespace/velero: attempting to create resource client
Namespace/velero: created
ClusterRoleBinding/velero: attempting to create resource
ClusterRoleBinding/velero: attempting to create resource client
ClusterRoleBinding/velero: created
ServiceAccount/velero: attempting to create resource
ServiceAccount/velero: attempting to create resource client
ServiceAccount/velero: created
Secret/cloud-credentials: attempting to create resource
Secret/cloud-credentials: attempting to create resource client
Secret/cloud-credentials: created
BackupStorageLocation/default: attempting to create resource
BackupStorageLocation/default: attempting to create resource client
BackupStorageLocation/default: created
Deployment/velero: attempting to create resource
Deployment/velero: attempting to create resource client
Deployment/velero: created
DaemonSet/node-agent: attempting to create resource
DaemonSet/node-agent: attempting to create resource client
DaemonSet/node-agent: created
Velero is installed! ⛵ Use 'kubectl logs deployment/velero -n velero' to view the status.
[root@rocky8 velero-v1.12.2-linux-amd64]# 
  1. 验证velero备份仓库和设置备份策略
[root@rocky8 velero-v1.12.2-linux-amd64]# ./velero backup-location get
NAME      PROVIDER   BUCKET/PREFIX   PHASE       LAST VALIDATED                  ACCESS MODE   DEFAULT
default   aws        velero          Available   2023-12-29 02:52:26 +0000 UTC   ReadWrite     true
[root@rocky8 velero-v1.12.2-linux-amd64]#cat velero-cm.yaml
apiVersion: v1
kind: ConfigMap
metadata:name: change-storage-class-confignamespace: velerolabels:velero.io/plugin-config: ""velero.io/change-storage-class: RestoreItemAction
data:nfs-storage: rook-ceph-block
  1. 安装示例服务mysql
apiVersion: v1
kind: Service
metadata:name: mysqlnamespace: testlabels:app: mysql
spec:ports:- port: 3306selector:app: mysqlclusterIP: None
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:name: mysql-pv-claimnamespace: testlabels:app: mysql
spec:storageClassName: nfs-storageaccessModes:- ReadWriteOnceresources:requests:storage: 1Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:name: mysqlnamespace: testlabels:app: mysql
spec:selector:matchLabels:app: mysqlstrategy:type: Recreatetemplate:metadata:labels:app: mysqlspec:containers:- image: mysql:5.7name: mysqlenv:- name: MYSQL_ROOT_PASSWORDvalue: Passw0rd#1ports:- containerPort: 3306name: mysqlvolumeMounts:- name: mysql-persistent-storagemountPath: /var/lib/mysqlvolumes:- name: mysql-persistent-storagepersistentVolumeClaim:claimName: mysql-pv-claim
  1. mysql创建库表并插入数据
mysql> create database test;
Query OK, 1 row affected (0.00 sec)mysql> use test;
Database changed
mysql> create table newtb (id int);
Query OK, 0 rows affected (0.02 sec)mysql> insert into newtb (id) values (1);
Query OK, 1 row affected (0.00 sec)mysql> insert into newtb (id) values (2);
Query OK, 1 row affected (0.00 sec)mysql> insert into newtb (id) values (3);
Query OK, 1 row affected (0.00 sec)mysql> select id from newtb;
+------+
| id   |
+------+
|    1 |
|    2 |
|    3 |
+------+
3 rows in set (0.00 sec)mysql> 
  1. 创建备份
[root@rocky8 velero-v1.12.2-linux-amd64]# ./velero backup create backup-test --include-namespaces test --include-resources pod,pv,pvc,deploy --default-volumes-to-fs-backup
Backup request "backup-test" submitted successfully.
Run `velero backup describe backup-test` or `velero backup logs backup-test` for more details.
[root@rocky8 velero-v1.12.2-linux-amd64]# ./velero backup get 
NAME          STATUS       ERRORS   WARNINGS   CREATED                         EXPIRES   STORAGE LOCATION   SELECTOR
backup-test   InProgress   0        0          2023-12-29 03:47:30 +0000 UTC   29d       default            <none>
[root@rocky8 velero-v1.12.2-linux-amd64]#
[root@rocky8 velero-v1.12.2-linux-amd64]# ./velero backup describe backup-test --details
Name:         backup-test
Namespace:    velero
Labels:       velero.io/storage-location=default
Annotations:  velero.io/resource-timeout=10m0svelero.io/source-cluster-k8s-gitversion=v1.25.12velero.io/source-cluster-k8s-major-version=1velero.io/source-cluster-k8s-minor-version=25Phase:  CompletedNamespaces:Included:  testExcluded:  <none>Resources:Included:        *Excluded:        <none>Cluster-scoped:  autoLabel selector:  <none>Or label selector:  <none>Storage Location:  defaultVelero-Native Snapshot PVs:  auto
Snapshot Move Data:          false
Data Mover:                  veleroTTL:  720h0m0sCSISnapshotTimeout:    10m0s
ItemOperationTimeout:  4h0m0sHooks:  <none>Backup Format Version:  1.1.0Started:    2023-12-29 03:47:30 +0000 UTC
Completed:  2023-12-29 03:47:37 +0000 UTCExpiration:  2024-01-28 03:47:30 +0000 UTCTotal items to be backed up:  21
Items backed up:              21Resource List:apps/v1/Deployment:- test/mysqlapps/v1/ReplicaSet:- test/mysql-6d4cc78fd9discovery.k8s.io/v1/EndpointSlice:- test/mysql-hrqs2v1/ConfigMap:- test/kube-root-ca.crtv1/Endpoints:- test/mysqlv1/Event:- test/mysql-6d4cc78fd9-cz54t.17a5306f98ae52c3- test/mysql-6d4cc78fd9-cz54t.17a5306ff9652d00- test/mysql-6d4cc78fd9-cz54t.17a530701c33cf38- test/mysql-6d4cc78fd9-cz54t.17a530701e2834e8- test/mysql-6d4cc78fd9-cz54t.17a5307025673793- test/mysql-6d4cc78fd9.17a5306f98a6f5fd- test/mysql-pv-claim.17a5306fa1d09254- test/mysql-pv-claim.17a5306fa209c18c- test/mysql-pv-claim.17a5306fa30e0e24- test/mysql.17a5306f97c72f22v1/Namespace:- testv1/PersistentVolume:- pvc-54c44a11-77f3-4504-bea4-bb91e3f774acv1/PersistentVolumeClaim:- test/mysql-pv-claimv1/Pod:- test/mysql-6d4cc78fd9-cz54tv1/Service:- test/mysqlv1/ServiceAccount:- test/defaultVelero-Native Snapshots: <none included>kopia Backups:Completed:test/mysql-6d4cc78fd9-cz54t: mysql-persistent-storage
[root@rocky8 velero-v1.12.2-linux-amd64]# 
  1. 查看minio中数据

image.png
image.png

  1. 修改旧pv的删除策略,保证为Retain
[root@rocky8 velero-v1.12.2-linux-amd64]# kubectl get pvc -n test
NAME             STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS   AGE
mysql-pv-claim   Bound    pvc-54c44a11-77f3-4504-bea4-bb91e3f774ac   1Gi        RWO            nfs-storage    13m
[root@rocky8 velero-v1.12.2-linux-amd64]# kubectl edit pv pvc-54c44a11-77f3-4504-bea4-bb91e3f774ac -n test
persistentvolume/pvc-54c44a11-77f3-4504-bea4-bb91e3f774ac edited
[root@rocky8 velero-v1.12.2-linux-amd64]# kubectl scale --replicas=0 deploy mysql -n test
deployment.apps/mysql scaled
[root@rocky8 velero-v1.12.2-linux-amd64]# kubectl delete pvc mysql-pv-claim -n test
persistentvolumeclaim "mysql-pv-claim" deleted
[root@rocky8 velero-v1.12.2-linux-amd64]#
[root@rocky8 velero-v1.12.2-linux-amd64]# kubectl get pv -n test
NAME                                       CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS     CLAIM                 STORAGECLASS   REASON   AGE
pvc-23a440af-5c6e-4cb5-85b7-964f043b0379   20Gi       RWO            Delete           Bound      default/minio         standard                17m
pvc-54c44a11-77f3-4504-bea4-bb91e3f774ac   1Gi        RWO            Retain           Released   test/mysql-pv-claim   nfs-storage             16m
[root@rocky8 velero-v1.12.2-linux-amd64]# 
  1. 使用velero恢复备份
[root@rocky8 velero-v1.12.2-linux-amd64]# velero backup get 
NAME          STATUS      ERRORS   WARNINGS   CREATED                         EXPIRES   STORAGE LOCATION   SELECTOR
backup-test   Completed   0        0          2023-12-29 03:47:30 +0000 UTC   29d       default            <none>
[root@rocky8 velero-v1.12.2-linux-amd64]# velero restore create --from-backup backup-test
Restore request "backup-test-20231229035910" submitted successfully.
Run `velero restore describe backup-test-20231229035910` or `velero restore logs backup-test-20231229035910` for more details.
[root@rocky8 velero-v1.12.2-linux-amd64]# ./velero restore get 
NAME                         BACKUP        STATUS       STARTED                         COMPLETED   ERRORS   WARNINGS   CREATED                         SELECTOR
backup-test-20231229035910   backup-test   InProgress   2023-12-29 03:59:10 +0000 UTC   <nil>       0        0          2023-12-29 03:59:10 +0000 UTC   <none>
[root@rocky8 velero-v1.12.2-linux-amd64]# velero restore get 
NAME                  BACKUP   STATUS      STARTED                         COMPLETED                       ERRORS   WARNINGS   CREATED                         SELECTOR
backup-test-20231229035910   backup-test    Completed   2023-12-29 03:59:10 +0000 UTC   2023-12-29 04:06:10 +0000 UTC   0        0          2023-12-29 03:59:10 +0000 UTC   <none>
[root@rocky8 velero-v1.12.2-linux-amd64]#
  1. 验证mysql数据恢复
[root@rocky8 velero-v1.12.2-linux-amd64]# kubectl get pvc -n test 
NAME             STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS      AGE
mysql-pv-claim   Bound    pvc-dc3f6b8c-53ba-4933-bf46-f8e00a956d7d   1Gi        RWO            rook-ceph-block   9m2s
[root@rocky8 velero-v1.12.2-linux-amd64]#
[root@rocky8 velero-v1.12.2-linux-amd64]# kubectl exec -it -n test deploy/mysql -- bash 
Defaulted container "mysql" out of: mysql, restore-wait (init)
bash-4.2# mysql -uroot -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 6
Server version: 5.7.44 MySQL Community Server (GPL)Copyright (c) 2000, 2023, Oracle and/or its affiliates.Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql>
mysql> use test;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -ADatabase changed
mysql> select * from newtb;
+------+
| id   |
+------+
|    1 |
|    2 |
|    3 |
+------+
3 rows in set (0.00 sec)mysql>

相关文章:

kubernetes存储类迁移-备份恢复

背景介绍 kubernetes集群最开始使用了nfs作为存储&#xff0c;随着后续使用过程中数据量逐渐增加&#xff0c;nfs存储性能逐步出现不足&#xff0c;现增加了基于csi的分布式块存储后&#xff0c;需要对原有基于nfs存储类下的pv迁移到新的存储类下。 测试环境 k8s集群版本&am…...

python智能手机芯片

在未来&#xff0c;python智能手机芯片的发展方向可能包括以下几个方面&#xff1a; 强化处理能力&#xff1a;随着智能手机功能的不断扩展和用户需求的增加&#xff0c;处理器的性能需求也在不断提升。未来的python智能手机芯片可能会加强处理器的核心数量和频率&#xff0c;以…...

混淆技术概论

混淆技术概论 引言 在逆向工程领域&#xff0c;混淆技术是一种非常重要的技术手段&#xff0c;通过打破人们的思维惯性&#xff0c;使得逆向分析变得更加困难。本文将会介绍混淆技术的概念、分类及其应用&#xff0c;以及如何使用IPA Guard进行iOS IPA重签名。 混淆技术概述…...

pytest安装失败,报错Could not find a version that satisfies the requirement pytest

问题 安装pytest失败&#xff0c;尝试使用的命令有 pip install pytest pip3 install pytest pip install -U pytest pip install pytest -i https://pypi.tuna.tsinghua.edu.cn/simple但是都会报同样的错&#xff1a; 解决方案 发现可能是挂了梯子的原因&#xff0c;关掉…...

使用 Maven 的 dependencyManagement 管理项目依赖项

使用 Maven 的 dependencyManagement 管理项目依赖项 介绍 在开发 Java 项目时&#xff0c;管理和协调依赖项的版本号是一项重要而繁琐的任务。 而 Maven 提供了 <dependencyManagement> 元素&#xff0c;用于定义项目中所有依赖项的版本。它允许您指定项目中每个依赖…...

三英战吕布web3游戏项目启动全流程

项目是一个学习相关的很好的例子并且开源&#xff0c;原本的项目是连接goerli网络&#xff0c;但我把它修改为可连接ganache网络的项目了&#xff0c;更方便启动。 智能合约部分 进入文件 hardhat.config.js &#xff0c;增加一个钱包私钥 2.执行npm install 3.测试合约 npx ha…...

TS中的类

目录 ES6的类 类的概念 类的构成 类的创建 声明 构造函数 定义内容 创建实例 TS中的类 类声明 构造函数 属性和方法 实例化类 继承 访问修饰符 public private protected 成员访问修饰符的使用原则 访问器 只读成员与静态成员 readonly static 修饰符总…...

玩转硬件之玩改朗逸中控设备

这是一个有关一件被拆卸的朗逸中控设备的故事。这个设备已经闲置多年&#xff0c;但是它的命运发生了转变。它被改装成了一台收音机和MP3播放器。 这个设备曾经是一辆朗逸的中控屏幕&#xff0c;就是因为它没有倒车影像&#xff0c;它就被拆了下来&#xff0c;被扔在了一个角落…...

根据MySql的表名,自动生成实体类,模仿ORM框架

ORM框架可以根据数据库的表自动生成实体类&#xff0c;以及相应CRUD操作 本文是一个自动生成实体类的工具&#xff0c;用于生成Mysql表对应的实体类。 新建Winform窗体应用程序AutoGenerateForm&#xff0c;框架(.net framework 4.5)&#xff0c; 添加对System.Configuration的…...

Mac上安装tensorflow介绍留存

此预版本为 macOS 11.0 提供了硬件加速的 TensorFlow 和 TensorFlow 插件。M1 Mac 和基于 Intel 的 Mac 通过 Apple 的 ML 计算框架支持本机硬件加速。 TensorFlow r2.4rc0TensorFlow Addons 0.11.2 TensorFlow 插件 0.11.2 REQUIREMENTS 要求 macOS 11.0Python 3.8 (requir…...

【赠书第16期】码上行动:用ChatGPT学会Python编程

文章目录 前言 1 ChatGPT简介 2 Python编程简介 3 使用ChatGPT学习Python编程 4 如何使用ChatGPT学习Python编程 5 推荐图书 6 粉丝福利 前言 随着人工智能技术的不断发展&#xff0c;聊天机器人已经成为我们日常生活和工作中不可或缺的一部分。其中&#xff0c;ChatGP…...

LeetCode 每日一题 2024/1/1-2024/1/7

记录了初步解题思路 以及本地实现代码&#xff1b;并不一定为最优 也希望大家能一起探讨 一起进步 目录 1/1 1599. 经营摩天轮的最大利润1/2 466. 统计重复个数1/3 2487. 从链表中移除节点1/4 2397. 被列覆盖的最多行数1/5 1944. 队列中可以看到的人数1/6 2807. 在链表中插入最…...

7+单细胞+空转+实验验证,如何根据内容开展相关经验给你启发

导语 今天给同学们分享一篇生信文章“CD8 tissue-resident memory T cells induce oral lichen planus erosion via cytokine network”&#xff0c;这篇文章发表在Elife期刊上&#xff0c;影响因子为7.7。 结果解读&#xff1a; 单细胞RNA测序揭示了具有不同临床亚型的OLP的细…...

Verifiable Credentials可验证证书 2023 终极指南

1. 引言 Dock公司为去中心化数字身份领域的先驱者&#xff0c;其自2017年以来&#xff0c;已知专注于构建前沿的可验证证书&#xff08;Verifiable Credentials&#xff09;技术。本文将阐述何为电子证书、电子证书工作原理、以及其对组合和个人的重要性。 伪造实物证书和数字…...

R语言【sp】——SpatialPoints():创建类SpatialPoints或SpatialPointsDataFrame的对象

Package sp version 1.5-0 Description 从坐标或数据帧的坐标创建类 SpatialPoints-class 或 SpatialPointsDataFrame-class 的对象。 Usage SpatialPoints(coords, proj4stringCRS(as.character(NA)), bbox NULL)SpatialPointsDataFrame(coords, data, coords.nrs numeric…...

【Verilog】期末复习——简要说明仿真时阻塞赋值和非阻塞赋值的区别。always语句和initial语句的关键区别是什么?能否相互嵌套?

系列文章 数值&#xff08;整数&#xff0c;实数&#xff0c;字符串&#xff09;与数据类型&#xff08;wire、reg、mem、parameter&#xff09; 运算符 数据流建模 行为级建模 结构化建模 组合电路的设计和时序电路的设计 有限状态机的定义和分类 期末复习——数字逻辑电路分…...

分享一个idea插件MyBatisX的Bug

分享一个idea插件MyBatisX的Bug The plugin com.baomidou.plugin.idea. mybatisx failed to save settings and has been disabled. Please restart IntelliJ IDEAjava.lang.Throwableat com.intellij.openapi.project.DumbServiceImpl.queueTask(DumbServiceImpl.java:293)at…...

Linux网络

一、Linux网络 查看基础的网络配置 网关、路由&#xff1a;route —n 网关、路由route —nIP地址ifconfig ip aDNS 服务器cat /etc/resolv.conf主机名hostname网络连接状态ss、netstat、syn—sent域名解析nalookup、host 1.1 ifconfig 网络接口配置 临时性修改网卡 …...

Copilot 插件的使用介绍:如何快速上手

GitHub Copilot 本文主要介绍如何通过脚本工具激活 GitHub Copilot 插件&#xff0c;提供安装及激活图文教程&#xff0c;大家按下面操作即可激活GitHub Copilot插件&#xff0c;免费使用Ai编码工具 一、GitHub Copilot 介绍 GitHub Copilot 是由 GitHub 和 OpenAI 共同开发的…...

kubesphere和k8s的使用分享

文章目录 什么是kubernetesKubernetes的部分核心概念互式可视化管理平台与kubernetes的关系市面是常见的kubernetes管理平台 什么是kubesphereKubesphere默认安装的组件Kubesphere涉及的服务组件kubesphere的安装Kubesphere相关的内容 什么是kubernetes 就在这场因“容器”而起…...

macos m1如何安装指定版本的redis

安装指定版本的Redis在macOS M1上可以通过Homebrew进行操作。Homebrew是一个在macOS上管理软件包的常用工具。 要安装特定版本的Redis&#xff0c;请首先确保已经安装了Homebrew。然后&#xff0c;可以通过以下步骤安装指定版本的Redis&#xff1a; 步骤&#xff1a; 查找可用…...

python 多线程 守护线程

daemon线程&#xff1a;守护线程&#xff0c;优先级别最低&#xff0c;一般为其它线程提供服务。通常&#xff0c;daemon线程体是一个无限循环。如果所有的非daemon线程(主线程以及子线程&#xff09;都结束了&#xff0c;daemon线程自动就会终止。t.daemon 属性&#xff0c;设…...

以unity技术开发视角对android权限的讲解

目录 前言 Android权限分类 普通权限 普通权限定义 普通权限有哪些 危险权限 危险权限的定义 危险权限有哪些 动态申请权限实例 申请单个权限实例 第一步&#xff1a;在清单文件中声明权限 第二步&#xff1a;在代码中进行动态申请权限 申请多个权限实例 第一步&am…...

910b上跑Chatglm3-6b进行流式输出【pytorch框架】

文章目录 准备阶段避坑阶段添加代码结果展示 准备阶段 配套软件包Ascend-cann-toolkit和Ascend-cann-nnae适配昇腾的Pytorch适配昇腾的Torchvision Adapter下载ChatGLM3代码下载chatglm3-6b模型&#xff0c;或在modelscope里下载 避坑阶段 每个人的服务器都不一样&#xff0…...

2024年江苏省职业院校技能大赛高职学生组软件测试—任务五接口测试题目

2024年江苏省职业院校技能大赛高职学生组软件测试任务五 接口测试 任务要求 题目1&#xff1a;登录接口脚本编写和执行测试。 1、登录接口描述如下&#xff1a; 接口功能&#xff1a;提供用户登录功能处理&#xff0c;根据传入的用户名和密码判断登录状态。 接口地址&…...

螺旋数字矩阵 - 华为OD统一考试

OD统一考试&#xff08;C卷&#xff09; 分值&#xff1a; 100分 题解&#xff1a; Java / Python / C 题目描述 疫情期间&#xff0c;小明隔离在家&#xff0c;百无聊赖&#xff0c;在纸上写数字玩。他发明了一种写法: 给出数字个数n和行数m (0 < n < 999&#xff0c;…...

更改ERPNEXT源

更改ERPNEXT源 一&#xff0c; 更改源 针对已经安装了erpnext的&#xff0c;需要更改源的情况&#xff1a; 1, 更改为官方默认源, 进入frapp-bench的目录&#xff0c; 然后执行: bench remote-reset-url frappe //重设frappe的源为官方github地址。 bench remote-reset-url…...

配置基本QinQ示例

QinQ简介 定义 QinQ&#xff08;802.1Q-in-802.1Q&#xff09;技术是一项扩展VLAN空间的技术&#xff0c;通过在802.1Q标签报文的基础上再增加一层802.1Q的Tag来达到扩展VLAN空间的功能&#xff0c;可以使私网VLAN透传公网。由于在骨干网中传递的报文有两层802.1Q Tag&#x…...

界面控件DevExpress Blazor Grid v23.2 - 支持全新的单元格编辑模式

DevExpress Blazor UI组件使用了C#为Blazor Server和Blazor WebAssembly创建高影响力的用户体验&#xff0c;这个UI自建库提供了一套全面的原生Blazor UI组件&#xff08;包括Pivot Grid、调度程序、图表、数据编辑器和报表等&#xff09;。 在这篇文章中&#xff0c;我们将介…...

深入剖析pcap中的网络异常:TTL过期攻击、ARP中毒、TCP重传与重叠碎片等

网络流量数据包捕获是网络安全领域的重要部分&#xff0c;而pcap文件则是这一过程的常见载体。为了深入解析pcap文件中潜在的可疑网络流量&#xff0c;我们需要运用强大的网络安全威胁评估与审计工具。这些工具能够帮助我们捕捉、记录、检测和诊断网络中的数据传输问题&#xf…...

博客系统做网站/深圳网站seo优化公司

现在Java相关的岗位薪资越来越高、而且涨幅也是越来越大的。这两天通过职友的数据可以看到&#xff0c;我们现以Java相关的岗位为例&#xff0c;其中【20k-30k】薪酬的Java程序员&#xff0c;占到了整体从业的30.8%&#xff01;这个是北京 Java 工程师「工资收入水平 」如果你在…...

信计专业动态网站开发技术/天津网站建设公司

numpy库 一、numpy库中的数组对象&#xff1a;N维数组类型&#xff1a;ndarray 1) ndarray的作用&#xff1a; a) 数组对象性可以去掉元素间运算所需的循环&#xff0c;使一维向量更像单个数据。 b) 设置专门的数组对象&#xff0c;经过优化&#xff0c;可以提升这类应用的运算…...

中国建设银行网站客户注册码/查排名

C 递归 递归指的是在函数的定义中使用函数自身的方法。 举个例子&#xff1a; 从前有座山&#xff0c;山里有座庙&#xff0c;庙里有个老和尚&#xff0c;正在给小和尚讲故事呢&#xff01;故事是什么呢&#xff1f;"从前有座山&#xff0c;山里有座庙&#xff0c;庙里有…...

企业域名申请流程/seo谷歌

前言&#xff1a;TCP/IP是一个四层协议系统&#xff0c;每层负责不同的功能。TCP/IP协议族是一组由不同协议组合 在一起构成的协议族。TCP/IP协议族TCP/IP 主要协议 主要功能应用层HTTP、Telnet、FTP、SMTP等负责把数据传输到传输层或者接…...

网站建设的建议例子/百度收录链接

学习设计模式不光要学习设计模式的思想&#xff0c;还要去深入理解&#xff0c;为什么要用这个设计模式。 如何深入理解&#xff1f;读优秀的框架代码&#xff0c;看别人代码&#xff0c;了解它们的使用场景。 - - - 博主老师&#xff08;感谢他&#xff09; 本文先介绍了迭代器…...

长宁房产网站建设/合肥关键词排名推广

学 号&#xff1a;201421440036 中国人民公安大学 Chinese people’ public security university 网络对抗技术 实验报告 实验四 恶意代码技术 学生姓名 喀依拉 年级 2014 区队 四区 指导教师 高见 信息技术与网络安全学院 2016年11月7日 实验任务总纲 2016—20…...