Red Hat安装Red Hat OpenShift Local

news2024/9/21 16:23:32

文章目录

  • 环境
  • 安装
    • 需求
      • 硬件
      • 操作系统
      • 软件包
    • 安装
  • 使用Red Hat OpenShift Local
    • 预设置
    • 设置Red Hat OpenShift Local
    • 启动实例
    • 访问OpenShift集群
      • 访问OpenShift web console
      • 使用OpenShift CLI访问OpenShift集群
      • 访问内部 OpenShift registry
    • 使用odo部署示例应用
      • 安装odo
    • 停止实例
    • 删除实例
  • 参考

环境

  • RHEL 9.3
  • Red Hat OpenShift Local 2.32

安装

Red Hat OpenShift Local将最小的OpenShift Container Platform(OCP)4集群和Podman容器运行时引入到本地计算机。这些运行时为开发和测试提供了最小环境。Red Hat OpenShift Local主要用于在开发者的桌面上运行。

Red Hat OpenShift Local包含 crc 命令行界面(CLI),使用所需的容器运行时来与Red Hat OpenShift Local实例交互。

需求

硬件

  • 4个物理CPU核
  • 9 GB内存
  • 35 GB存储

注:9 GB内存貌似不够,我后来扩展到了16 GB内存。35 GB存储也不够, /home 至少需要50 GB存储。

操作系统

  • 最新的两个RHEL/CentOS 8和9 release,以及最新的两个稳定Fedora release。
  • 若使用RHEL,必须已在Red Hat Customer Portal注册。
  • 不支持Ubuntu 18.04 LTS或更高版本,以及Debian 10或更高版本,需要手工搭建。

软件包

需要 libvirtNetworkManager

  • Fedora/Red Hat Enterprise Linux/CentOS: sudo dnf install NetworkManager
  • Debian/Ubuntu: sudo apt install qemu-kvm libvirt-daemon libvirt-daemon-system network-manager

安装

https://console.redhat.com/openshift/create/local 处,下载最新的Red Hat OpenShift Local。

在这里插入图片描述

我下载的文件是 crc-linux-amd64.tar.xz

解压:

tar xvf crc-linux-amd64.tar.xz

解压后,生成了 crc 文件。为了方便,将其加入PATH。修改 ~/.bashrc 文件,添加如下内容:

export PATH=/home/ding/Downloads/crc-linux-2.32.0-amd64:$PATH

然后source一下:

. ~/.bashrc

注:本例中使用的是bash,如果使用其它shell,则要做相应的调整。

查看版本:

$ crc version
CRC version: 2.32.0+54a6f9
OpenShift version: 4.14.8
Podman version: 4.4.4

搭建环境:

crc setup

报错说 You need to enable virtualization in BIOS 。这是因为我使用了VMWare Workstation,默认没有开启虚拟机的虚拟化。说白了就是需要虚拟嵌套虚拟。

在虚拟机设置里,勾选“虚拟化Intel VT-x/EPT或AMD-V/RVI”,如下图所示:

在这里插入图片描述
注:需要关闭虚拟机才能修改该选项。

然后再次运行 crc setup 搭建环境,这次成功了:

$ crc setup
INFO Using bundle path /home/ding/.crc/cache/crc_libvirt_4.14.8_amd64.crcbundle 
INFO Checking if running as non-root              
INFO Checking if running inside WSL2              
INFO Checking if crc-admin-helper executable is cached 
INFO Checking if running on a supported CPU architecture 
INFO Checking if crc executable symlink exists    
INFO Checking minimum RAM requirements            
INFO Checking if Virtualization is enabled        
INFO Checking if KVM is enabled                   
INFO Checking if libvirt is installed             
INFO Installing libvirt service and dependencies  
INFO Using root access: Installing virtualization packages 
[sudo] password for ding: 
INFO Checking if user is part of libvirt group    
INFO Adding user to libvirt group                 
INFO Using root access: Adding user to the libvirt group 
INFO Checking if active user/process is currently part of the libvirt group 
INFO Checking if libvirt daemon is running        
WARN No active (running) libvirtd systemd unit could be found - make sure one of libvirt systemd units is enabled so that it's autostarted at boot time. 
INFO Starting libvirt service                     
INFO Using root access: Executing systemctl daemon-reload command 
INFO Using root access: Executing systemctl start libvirtd 
INFO Checking if a supported libvirt version is installed 
INFO Checking if crc-driver-libvirt is installed  
INFO Installing crc-driver-libvirt                
INFO Checking crc daemon systemd service          
INFO Setting up crc daemon systemd service        
INFO Checking crc daemon systemd socket units     
INFO Setting up crc daemon systemd socket units   
INFO Checking if systemd-networkd is running      
INFO Checking if NetworkManager is installed      
INFO Checking if NetworkManager service is running 
INFO Checking if /etc/NetworkManager/conf.d/crc-nm-dnsmasq.conf exists 
INFO Writing Network Manager config for crc       
INFO Using root access: Writing NetworkManager configuration to /etc/NetworkManager/conf.d/crc-nm-dnsmasq.conf 
INFO Using root access: Changing permissions for /etc/NetworkManager/conf.d/crc-nm-dnsmasq.conf to 644  
INFO Using root access: Executing systemctl daemon-reload command 
INFO Using root access: Executing systemctl reload NetworkManager 
INFO Checking if /etc/NetworkManager/dnsmasq.d/crc.conf exists 
INFO Writing dnsmasq config for crc               
INFO Using root access: Writing NetworkManager configuration to /etc/NetworkManager/dnsmasq.d/crc.conf 
INFO Using root access: Changing permissions for /etc/NetworkManager/dnsmasq.d/crc.conf to 644  
INFO Using root access: Executing systemctl daemon-reload command 
INFO Using root access: Executing systemctl reload NetworkManager 
INFO Checking if libvirt 'crc' network is available 
INFO Setting up libvirt 'crc' network             
INFO Checking if libvirt 'crc' network is active  
INFO Starting libvirt 'crc' network               
INFO Checking if CRC bundle is extracted in '$HOME/.crc' 
INFO Checking if /home/ding/.crc/cache/crc_libvirt_4.14.8_amd64.crcbundle exists 
INFO Getting bundle for the CRC executable        
INFO Downloading bundle: /home/ding/.crc/cache/crc_libvirt_4.14.8_amd64.crcbundle... 
4.36 GiB / 4.36 GiB [----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------] 100.00% 1.33 MiB/s
INFO Uncompressing /home/ding/.crc/cache/crc_libvirt_4.14.8_amd64.crcbundle 
crc.qcow2:  17.12 GiB / 17.12 GiB [-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------] 100.00%
oc:  145.59 MiB / 145.59 MiB [------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------] 100.00%
Your system is correctly setup for using CRC. Use 'crc start' to start the instance

注:下载bundle那一步特别慢,bundle有4.36 GiB,下载了半个多小时。

接下来,启动crc:

$ crc start
INFO Using bundle path /home/ding/.crc/cache/crc_libvirt_4.14.8_amd64.crcbundle 
INFO Checking if running as non-root              
INFO Checking if running inside WSL2              
INFO Checking if crc-admin-helper executable is cached 
INFO Checking if running on a supported CPU architecture 
INFO Checking if crc executable symlink exists    
INFO Checking minimum RAM requirements            
INFO Checking if Virtualization is enabled        
INFO Checking if KVM is enabled                   
INFO Checking if libvirt is installed             
INFO Checking if user is part of libvirt group    
INFO Checking if active user/process is currently part of the libvirt group 
INFO Checking if libvirt daemon is running        
INFO Checking if a supported libvirt version is installed 
INFO Checking if crc-driver-libvirt is installed  
INFO Checking crc daemon systemd socket units     
INFO Checking if systemd-networkd is running      
INFO Checking if NetworkManager is installed      
INFO Checking if NetworkManager service is running 
INFO Checking if /etc/NetworkManager/conf.d/crc-nm-dnsmasq.conf exists 
INFO Checking if /etc/NetworkManager/dnsmasq.d/crc.conf exists 
INFO Checking if libvirt 'crc' network is available 
INFO Checking if libvirt 'crc' network is active  
INFO Loading bundle: crc_libvirt_4.14.8_amd64...  
CRC requires a pull secret to download content from Red Hat.
You can copy it from the Pull Secret section of https://console.redhat.com/openshift/create/local.
? Please enter the pull secret 

此处需要输入pull secret,在下载页面可以获取:

在这里插入图片描述

复制pull secret,并回车:

......
? Please enter the pull secret **************************************************************************************************************************************************************************************************************INFO Creating CRC VM for OpenShift 4.14.8...      
INFO Generating new SSH key pair...               
INFO Generating new password for the kubeadmin user 
INFO Starting CRC VM for openshift 4.14.8...      
INFO CRC instance is running with IP 192.168.130.11 
INFO CRC VM is running                            
INFO Updating authorized keys...                  
INFO Configuring shared directories               
INFO Check internal and public DNS query...       
INFO Check DNS query from host...                 
INFO Verifying validity of the kubelet certificates... 
INFO Starting kubelet service                     
INFO Waiting for kube-apiserver availability... [takes around 2min] 
INFO Adding user's pull secret to the cluster...  
INFO Updating SSH key to machine config resource... 
INFO Waiting until the user's pull secret is written to the instance disk... 
INFO Changing the password for the kubeadmin user 
INFO Updating cluster ID...                       
INFO Updating root CA cert to admin-kubeconfig-client-ca configmap... 
INFO Starting openshift instance... [waiting for the cluster to stabilize] 
INFO 6 operators are progressing: image-registry, ingress, kube-storage-version-migrator, network, openshift-controller-manager, ... 
INFO 4 operators are progressing: image-registry, ingress, openshift-controller-manager, operator-lifecycle-manager-packageserver 
INFO 3 operators are progressing: image-registry, ingress, openshift-controller-manager 
INFO 3 operators are progressing: image-registry, ingress, openshift-controller-manager 
INFO 3 operators are progressing: image-registry, ingress, openshift-controller-manager 
INFO 3 operators are progressing: image-registry, ingress, openshift-controller-manager 
INFO Operator ingress is progressing              
INFO All operators are available. Ensuring stability... 
INFO Operators are stable (2/3)...                
INFO Operators are stable (3/3)...                
INFO Adding crc-admin and crc-developer contexts to kubeconfig... 
Started the OpenShift cluster.

The server is accessible via web console at:
  https://console-openshift-console.apps-crc.testing

Log in as administrator:
  Username: kubeadmin
  Password: MGYZW-7CR7e-JSAoF-3oNH3

Log in as user:
  Username: developer
  Password: developer

Use the 'oc' command line interface:
  $ eval $(crc oc-env)
  $ oc login -u developer https://api.crc.testing:6443

从输出可见,有两种使用方式:

  • web console: https://console-openshift-console.apps-crc.testingkubeadmin/MGYZW-7CR7e-JSAoF-3oNH3 developer/developer
  • 命令行:先用 eval $(crc oc-env) ,然后就可以使用 oc 命令了。

注: crc oc-env 的结果如下:

$ crc oc-env
export PATH="/home/ding/.crc/bin/oc:$PATH"
# Run this command to configure your shell:
# eval $(crc oc-env)

eval 表示运行命令,本例中也就是运行export命令。

如果嫌麻烦,也可以把该export命令放到 ~/.bashrc 里,以后就不用每次都运行 eval $(crc oc-env) 了。具体方法参见前面。

查看 oc 版本:

$ oc version
Client Version: 4.14.8
Kustomize Version: v5.0.1
Server Version: 4.14.8
Kubernetes Version: v1.27.8+4fab27b

使用Red Hat OpenShift Local

预设置

Red Hat OpenShift Local预设置代表一个托管的容器运行时,以及运行它的实例所需的系统资源绑定。Red Hat OpenShift Local提供以下预设置:

  • openshift:最小的预配置的OCP 4.14集群
  • microshift:MicroShift
  • podman:podman容器运行时

设置Red Hat OpenShift Local

crc setup

crc setup 命令为Red Hat OpenShift Local实例搭建主机环境。

crc setup 命令会创建 ~/.crc 目录(如果该目录不存在)。

注意:不要以 root 用户或管理员运行 crc ,而要使用user帐户。

启动实例

crc start

访问OpenShift集群

访问OpenShift web console

$ crc console
Opening the OpenShift Web Console in the default browser...

自动打开浏览器,如下:

在这里插入图片描述

其地址为: https://console-openshift-console.apps-crc.testing

要想查看用户名和密码,使用如下命令:

$ crc console --credentials
To login as a regular user, run 'oc login -u developer -p developer https://api.crc.testing:6443'.
To login as an admin, run 'oc login -u kubeadmin -p wYUUp-aWcy7-3z27T-jSjQH https://api.crc.testing:6443'

使用 developer/developer 登录console,如下:

在这里插入图片描述

注意图片上有个报错信息,与网络有关,稍后会提到。

使用OpenShift CLI访问OpenShift集群

使用OpenShift CLI( oc )访问由Red Hat OpenShift Local管理的OCP集群。

$ oc login -u developer https://api.crc.testing:6443
error: dial tcp 192.168.130.11:6443: connect: no route to host - verify you have provided the correct host and port and that the server is currently running.

报错说 no route to host 。其实访问web console时,从截图上可以看到,也报错了。

$ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: ens160: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:0c:29:16:52:eb brd ff:ff:ff:ff:ff:ff
    altname enp3s0
    inet 192.168.1.12/24 brd 192.168.1.255 scope global dynamic noprefixroute ens160
       valid_lft 82326sec preferred_lft 82326sec
    inet6 2408:8207:18b0:e4c0:20c:29ff:fe16:52eb/64 scope global dynamic noprefixroute 
       valid_lft 199309sec preferred_lft 112909sec
    inet6 fe80::20c:29ff:fe16:52eb/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
3: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    link/ether 52:54:00:54:2d:98 brd ff:ff:ff:ff:ff:ff
    inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
       valid_lft forever preferred_lft forever
4: crc: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    link/ether 52:54:00:fd:be:d0 brd ff:ff:ff:ff:ff:ff
    inet 192.168.130.1/24 brd 192.168.130.255 scope global crc
       valid_lft forever preferred_lft forever

可见,并没有 192.168.130.11 这个IP地址。这是从哪来的呢?

查看 /etc/NetworkManager/dnsmasq.d/crc.conf

server=/apps-crc.testing/192.168.130.11
server=/crc.testing/192.168.130.11

查看 /etc/hosts

127.0.0.1        localhost localhost.localdomain localhost4 localhost4.localdomain4
::1              localhost localhost.localdomain localhost6 localhost6.localdomain6

# Added by CRC
192.168.130.11   api.crc.testing canary-openshift-ingress-canary.apps-crc.testing console-openshift-console.apps-crc.testing default-route-openshift-image-registry.apps-crc.testing downloads-openshift-console.apps-crc.testing oauth-openshift.apps-crc.testing
# End of CRC section

可见,是CRC添加的这个IP地址。

我在网上google了一下,搜到这个issue:https://github.com/crc-org/crc/issues/695 。

里面提到,要修改 /etc/resolv.conf ,添加:

nameserver 192.168.130.11 # IP address of the crc vm

完整内容如下:

# Generated by NetworkManager
nameserver 192.168.130.11 # IP address of the crc vm
nameserver 127.0.0.1
options edns0 trust-ad

然后重新搭建crc:

crc delete -f && crc setup && crc start

这次OK了。

$ oc login -u developer https://api.crc.testing:6443
Logged into "https://api.crc.testing:6443" as "developer" using existing credentials.

You don't have any projects. You can try to create a new project, by running

    oc new-project <projectname>

但是,没过一会儿,又开始报错了。

注:貌似和修改 /etc/resolv.conf 无关,暂时OK是因为重启了crc。

真正的原因我也没搞明白,可能是因为内存不够用?参见下面。

由于crc启动特别慢,占的内存非常大,所以我给虚拟机增大了内存,由10240MB增大到了16384MB。然后重启虚拟机,再重新搭建crc环境,这次貌似好了,而且 /etc/resolv.conf 被自动恢复成原来的内容了。看来之前报错不是 /etc/resolv.conf 的问题,难道是因为内存不够用?

访问内部 OpenShift registry

在Red Hat OpenShift Local实例中运行的OCP集群默认包含一个内部容器image registry,可用作本地开发的容器image的发布目标。要访问内部的OCP registry,操作如下:

查看当前用户:

$ oc whoami
kubeadmin

登录registry:

$ oc registry login --insecure=true
info: Using registry public hostname default-route-openshift-image-registry.apps-crc.testing
Saved credentials for default-route-openshift-image-registry.apps-crc.testing into /run/user/1000/containers/auth.json

创建一个project:

$ oc new-project demo
Now using project "demo" on server "https://api.crc.testing:6443".

You can add applications to this project with the 'new-app' command. For example, try:

    oc new-app rails-postgresql-example

to build a new example application in Ruby. Or use kubectl to deploy a simple Kubernetes application:

    kubectl create deployment hello-node --image=registry.k8s.io/e2e-test-images/agnhost:2.43 -- /agnhost serve-hostname

注:OCP里的project类似于Kubernetes里的namespace。

镜像一个容器image例子:

$ oc image mirror registry.access.redhat.com/ubi8/ubi:latest=default-route-openshift-image-registry.apps-crc.testing/demo/ubi8:latest --insecure=true --filter-by-os=linux/amd64
default-route-openshift-image-registry.apps-crc.testing/
  demo/ubi8
    blobs:
      registry.access.redhat.com/ubi8/ubi sha256:179275e28757e902d242e99738cd114c81b0ed29ff316bb4a894520ff0d1788f 6.271KiB
      registry.access.redhat.com/ubi8/ubi sha256:e5dd65eaa63224754368dcdbf2fea59a5ac3226ace1879d2899343d46d7fffa0 75.11MiB
    manifests:
      sha256:1a6f007562e41dae23fb3a573664d48018d094ec3cd01c96474cbbf7aef54572 -> latest
  stats: shared=0 unique=2 size=75.12MiB ratio=1.00

phase 0:
  default-route-openshift-image-registry.apps-crc.testing demo/ubi8 blobs=2 mounts=0 manifests=1 shared=0

info: Planning completed in 2.22s
uploading: default-route-openshift-image-registry.apps-crc.testing/demo/ubi8 sha256:e5dd65eaa63224754368dcdbf2fea59a5ac3226ace1879d2899343d46d7fffa0 75.11MiB
sha256:1a6f007562e41dae23fb3a573664d48018d094ec3cd01c96474cbbf7aef54572 default-route-openshift-image-registry.apps-crc.testing/demo/ubi8:latest
info: Mirroring completed in 3.84s (20.47MB/s)

查看imagestream:

$ oc get is
NAME   IMAGE REPOSITORY                                                    TAGS     UPDATED
ubi8   default-route-openshift-image-registry.apps-crc.testing/demo/ubi8   latest   About a minute ago

在imagestream中启用image查找:

$ oc set image-lookup ubi8
imagestream.image.openshift.io/ubi8 image lookup updated

该设置允许imagestream作为image源,而无需提供内部registry的完整URL。

使用刚刚push的image创建pod:

$ oc run demo --image=ubi8 --command -- sleep 600s
Warning: would violate PodSecurity "restricted:v1.24": allowPrivilegeEscalation != false (container "demo" must set securityContext.allowPrivilegeEscalation=false), unrestricted capabilities (container "demo" must set securityContext.capabilities.drop=["ALL"]), runAsNonRoot != true (pod or container "demo" must set securityContext.runAsNonRoot=true), seccompProfile (pod or container "demo" must set securityContext.seccompProfile.type to "RuntimeDefault" or "Localhost")
pod/demo created

查看pod:

$ oc get pod
NAME   READY   STATUS    RESTARTS   AGE
demo   1/1     Running   0          50s

使用odo部署示例应用

可以使用 odo 来创建OpenShift project和应用。本例将一个示例应用部署到Red Hat OpenShift Local实例中运行的OCP集群。

安装odo

参见 https://odo.dev/docs/overview/installation

下载:

curl -L https://developers.redhat.com/content-gateway/rest/mirror/pub/openshift-v4/clients/odo/v3.15.0/odo-linux-amd64 -o odo

安装:

sudo install -o root -g root -m 0755 odo /usr/local/bin/odo

查看版本:

$ odo version
odo v3.15.0 (10b5e8a8f)

Server: https://api.crc.testing:6443
Kubernetes: v1.27.8+4fab27b
Podman Client: 4.6.1

登录:

$ odo login -u developer -p developer
? Help odo improve by allowing it to collect usage data. Read about our privacy statement: https://developers.redhat.com/article/tool-data-collection. You can change your preference later by changing the ConsentTelemetry preference. (Y/n? Help odo improve by allowing it to collect usage data. Read about our privacy statement: https://developers.redhat.com/article/tool-data-collection. You can change your preference later by changing the ConsentTelemetry preference. Yes
Connecting to the OpenShift cluster

Login successful.

You don't have any projects. You can try to create a new project, by running

    odo create project <projectname>

注:官网上的odo貌似是v2,而我下载的odo是v3,二者不太兼容,参见 https://odo.dev/docs/user-guides/v3-migration-guide

关于odo,后面的例子我没再继续做。

停止实例

$ crc stop
INFO Stopping kubelet and all containers...       
INFO Stopping the instance, this may take a few minutes... 
Stopped the instance

删除实例

$ crc delete
Do you want to delete the instance? [y/N]: y
Deleted the instance

注意:该命令会导致Red Hat OpenShift Local实例中存储的数据丢失。

参考

  • https://access.redhat.com/documentation/en-us/red_hat_openshift_local/2.32/html-single/getting_started_guide/index
  • https://developers.redhat.com/products/openshift-local/overview
  • https://console.redhat.com/openshift/create/local
  • https://github.com/crc-org/crc/issues/695
  • https://odo.dev/docs/overview/installation

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1441263.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

PointBeV:A Sparse Approach to BeV Predictions

参考代码&#xff1a;PointBeV 动机与出发点 常见显式构建BEV特征的算法会稠密设置BEV网格&#xff0c;这样就会引入背景像素上的无效计算&#xff0c;对应内存与计算资源使用也会变大。这篇文章通过前景点筛选、由粗到精细化、窗口时序融合方式构建一种稀疏化表达的BEV特征表…

陪诊系统|陪诊小程序|陪诊服务让就医更容易

陪诊系统已经出现了好几年。尤其是这两年&#xff0c;它得到了人们的广泛认可。陪诊行业的快速发展主要是因为人们对这个行业的需求非常大。目前&#xff0c;我国面临着严重的老龄化问题&#xff0c;生活节奏也越来越快&#xff0c;有时候无法亲自陪伴在老人的身边。陪诊工作人…

Web课程学习笔记--CSS-Sprite的应用

雪碧图CSS Sprite的应用 CSS雪碧&#xff0c;即CSS Sprite&#xff0c;也有人叫它CSS精灵&#xff0c;是一种CSS图像合并技术&#xff0c;该方法是将小图标和背景图像合并到一张图片上&#xff0c;然后利用css的背景定位来显示需要显示的图片部分。例如常见的商品分类导航其实所…

使用深度学习对视频进行分类

目录 加载预训练卷积网络 加载数据 将帧转换为特征向量 准备训练数据 创建 LSTM 网络 指定训练选项 训练 LSTM 网络 组合视频分类网络 使用新数据进行分类 辅助函数 此示例说明如何通过将预训练图像分类模型和 LSTM 网络相结合来创建视频分类网络。 要为视频…

【Vue】Vue基础入门

&#x1f4dd;个人主页&#xff1a;五敷有你 &#x1f525;系列专栏&#xff1a;Vue ⛺️稳重求进&#xff0c;晒太阳 Vue概念 是一个用于构建用户界面的渐进式框架优点&#xff1a;大大提高开发效率缺点&#xff1a;需要理解记忆规则 创建Vue实例 步骤&#xff1a; …

Spinnaker多云持续交付平台: 部署Minio存储服务

目录 一、实验 1.环境 2.K8S storage节点部署NFS 3.K8S 动态创建PV 4.K8S master节点部署HELM3 4.K8S master节点部署Minio存储服务&#xff08;第一种方式安装&#xff09; 5.Minio客户端安装MC命令 6.K8S master节点使用Docker 部署Minio存储服务&#xff08;第二种方…

雨云宿迁云服务器测评

我本打算趁着暑假买台云服务器开mc服务器&#xff0c;但由于没有试用且直接完结导致白废20块钱。 在此提醒大家&#xff0c;买用于开mc服务器的云服务器前能试用一定要试用&#xff01;不然鬼知道它性能够不够用&#xff01; 服务器配置如下: cpu:2v gold61332.5Ghz ram:2GiB…

Unity学习笔记之【IK反向动力学操作】

反向动力学Inverse Kinematics 反向动力学&#xff0c;简称IK。相较于正向动力学&#xff0c;反向动力学旨在子级对父级产生的影响。 使用IK&#xff0c;可以实现根据目标位置或方向来计算并调整角色的关节&#xff08;骨骼&#xff09;链&#xff0c;以使角色的末端&#xff…

C++基础知识点预览

一.绪论&#xff1a; 1.1 C简史&#xff1a; 与C的关系&#xff1a; 被设计为C语言的继任者&#xff0c;C语言是一种过程型语言&#xff0c;程序员使用它定义执行特定操作的函数&#xff0c;而C是一种面向对象的语言&#xff0c;实现了继承、抽象、多态和封装等概念。C支持类&…

WiFi 6 和WiFi 6e 的核心要点

目录 WiFi 6 是什么&#xff1f; WiFi 6/6e 的主要feature功能&#xff1a; 80Mhz and 160Mhz channel 1K QAM WiFi6 支持2.4G band OFDMA&#xff1a;Orthogonal frequency division multiple access OFDMA先把频段分为&#xff1a;Resource Units (RUs) Subcarriers …

51单片机编程应用(C语言):篮球比赛计分器

设计思路 1.LCD1602显示A 000:B 000 右下角显示24的数字&#xff0c;显示一节时间12&#xff1a;00. 2.规定矩阵键盘每一位表示的含义 s1按下&#xff0c;A队加一分 s2按下&#xff0c;A队加两分 s3按下&#xff0c;A队加三分 s4按下&#xff0c;A队减一分 如…

政安晨:快速学会~机器学习的Pandas数据技能(五)(分组和排序)

提升您的洞察力水平&#xff0c;数据集越复杂&#xff0c;这一点就越重要。 概述 映射允许我们逐个值地转换DataFrame或Series中的数据&#xff0c;针对整个列进行操作。然而&#xff0c;通常我们希望对数据进行分组&#xff0c;然后对所在组进行特定操作。 正如你将学到的&a…

Java stream 流的基本使用

Java stream 的基本使用 package com.zhong.streamdemo.usestreamdemo;import jdk.jfr.DataAmount; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor;import java.util.ArrayList; import java.util.Comparator; import java.util.Li…

Flink Checkpoint过程

Checkpoint 使用了 Chandy-Lamport 算法 流程 1. 正常流式处理&#xff08;尚未Checkpoint&#xff09; 如下图&#xff0c;Topic 有两个分区&#xff0c;并行度也为 2&#xff0c;根据奇偶数 我们假设任务从 Kafka 的某个 Topic 中读取数据&#xff0c;该Topic 有 2 个 Pa…

js手写Promise(下)

目录 resolve与reject的调用时机封装优化 回调返回PromiseisPromise手动调用then 微队列catchresolverejectall传入的序列为空传入的值非Promise race完整的Promise代码 如果没有看过上半部分的铁铁可以看看这篇文章 js手写Promise&#xff08;上&#xff09; resolve与reject…

FastAdmin西陆招聘SAAS

应用介绍 基于ThinkPHP和微信小程序开发的招聘平台系统&#xff0c;包含微信小程序求职者端、微信小程序企业招聘端、PC企业招聘端、PC管理平台端 招聘系统是一种利用计算机和网络技术建立起来的具有完整的信息管理、分析和查询功能的人才招聘平台。它主要用于企业、单位、机构…

Python爬虫http基本原理#2

Python爬虫逆向系列&#xff08;更新中&#xff09;&#xff1a;http://t.csdnimg.cn/5gvI3 HTTP 基本原理 在本节中&#xff0c;我们会详细了解 HTTP 的基本原理&#xff0c;了解在浏览器中敲入 URL 到获取网页内容之间发生了什么。了解了这些内容&#xff0c;有助于我们进一…

pytorch入门第一天

今天作为入门pytorch的第一天。打算记录每天学习pytorch的一些理解和笔记&#xff0c;以用来后面回顾。当然如果能帮到和我一样的初学者&#xff0c;那也是不胜荣幸。作为一名初学者&#xff0c;难免有些地方会现错误&#xff0c;欢迎各位大佬指出 预备知识 这里主要介绍pyto…

从0开始学Docker ---Docker安装教程

Docker安装教程 本安装教程参考Docker官方文档&#xff0c;地址如下&#xff1a; https://docs.docker.com/engine/install/centos/ 1.卸载旧版 首先如果系统中已经存在旧的Docker&#xff0c;则先卸载&#xff1a; yum remove docker \docker-client \docker-client-latest…

MySQL篇之索引

一、定义 索引&#xff08;index&#xff09;是帮助MySQL高效获取数据的数据结构(有序)。在数据之外&#xff0c;数据库系统还维护着满足特定查找算法的数据结构&#xff08;B树&#xff09;&#xff0c;这些数据结构以某种方式引用&#xff08;指向&#xff09;数据&#xff0…