主頁 >  其他 > 跨宿主機- 如何實作 Docker 容器的通訊?(Docker-Swarm)

跨宿主機- 如何實作 Docker 容器的通訊?(Docker-Swarm)

2021-07-29 06:49:50 其他

之前在 Docker篇(五):容器之間該如何通訊?中,講到了運行多個容器時的網路通信方式,但那些容器都是運行在同一臺物理機的

在實際專案中,我們往往需要部署多套軟體,比如組件需要使用集群化部署,或者一個專案程式本身就依賴了很多組件,為了存盤與運行效率等方面,往往需要跨主機部署,那么,該如何實作跨主機容器之間的網路通訊呢?

哎,你想到的,Docker 也想到啦,或者說本來就存在著一種通用的方案吧

一、理論:Docker 如何實作跨主機網路?

1、認識 Docker Overlay

Overlay 網路是為特定目的在物理(底層)網路之上創建的邏輯網路,Docker 可以創建容器之間的 Overlay 網路,從而實作跨主機的容器之間的溝通

也就是說,只要幾臺物理機之間本身是可以通信的,那么只要在這些機器上建立好一個 Overlay 網路把需要相互通訊的容器,直接部署在這個網路之上,最終的效果就類似于將這些容器部署在同一臺物理機一樣,進行任意通信

比如說我們需要實作一個 Elasticsearch 集群,那么我們只需要把各個節點部署在預先創建好的一個 Overlay 網路上就可以實作通信啦

2、稍微具體一點

你可能還會有疑惑,為什么 Overlay 網路就可以實作多臺物理機之間的網路互通呢?實際上它是在 Docker 集群節點間的加入了一層虛擬網路,它有獨立的虛擬網段,Docker 容器發送的請求,會先發送到虛擬子網,再由虛擬子網包裝為宿主機的真實網址進行發送

3、Swarm 是什么?

而今天要介紹的 Docker Swarm,則是 Docker Overlay 網路的一種簡易實作方式,它是 Docker 開發的容器集群管理工具, 與 Docker API 兼容性很好

并且 Linux 中安裝了 Docker,也默認會安裝 Swarm,因此,在這里,我們采用 Swarm 實作 集群間的網路通信

接下來,讓我們通過實戰真正了解一下使用Docker Swarm 如何實作Docker 容器的跨主機通信吧

二、實戰一:實作集群之間的通信

還是拿那個老例子來講一下

在文章Docker篇(五):容器之間該如何通訊?中,我們分別將 Spring Boot 后端程式 druid_demomariadb 分別運行在不同容器中,成功實作了他們之間的通訊

那么,接下來,我們將他們分別部署在兩臺機器上

機器配置如下:

序號節點角色ip地址容器名稱
1manager10.10.10.100druid_demo
2worker10.10.10.88mariadb

說明:使用 Swarm 建立跨主機的網路,實際上總共分為如下幾步:

  1. manager 創建一個 Swarm 集群

  2. 將其他集群分別加進來

  3. manager 創建一個 Overlay 網路

  4. 啟動各個容器時,指定這個 Overlay 網路

具體,往下看

1、在 manager 節點創建 Swarm 集群

執行命令:

docker swarm init --advertise-addr=10.10.10.100

效果如下:

docker swarm init --advertise-addr=10.10.10.100

[root@localhost ~]# docker swarm init --advertise-addr=10.10.10.100
Swarm initialized: current node (maw28ll7mlxuwp47z5c5vo2v1) is now a manager.
 
 
To add a worker to this swarm, run the following command:
 
docker swarm join --token SWMTKN-1-2bdwwlo8xvdskil05itg66l63dpi931oqnt5gvehlnf1it1auo-2uvypbiu0hpcn1e06hrhctbe8 10.10.10.100:2377
 
To add a manager to this swarm, run 'docker swarm join-token manager' and follow the instructions.

顯示了 worker節點加入到該集群的命令,只需要執行

docker swarm join --token SWMTKN-1-2bdwwlo8xvdskil05itg66l63dpi931oqnt5gvehlnf1it1auo-2uvypbiu0hpcn1e06hrhctbe8 10.10.10.100:2377

即可

2、在 worker 節點上執行命令,將自己加入集群

docker swarm join --token SWMTKN-1-2bdwwlo8xvdskil05itg66l63dpi931oqnt5gvehlnf1it1auo-2uvypbiu0hpcn1e06hrhctbe8 10.10.10.100:2377

image.png

3、在 manager 節點,查看當前網路集群的節點情況

執行 docker node ls

image.png

4、在 manager 節點,創建 overlay 網路

docker network create -d overlay  --attachable  demo

說明:

--attachable 宣告當前創建的網路為:其他節點可以訪問的網路

5、在 worker 節點的網路串列,是否多了這個網路

docker network ls

說明:正常情況,執行完第4步之后,這里就會在原來的基礎上多一個 demo 網路

6、在 worker 節點啟動 mariadb 容器,指定該 overlay 網路

sudo docker run -itd  -v /usr/local/mysqldata:/var/lib/mysql -h mariadb --name=mariadb --net=demo --privileged=true mariadb:latest /sbin/init

說明:--net=demo :指定該集群間的網路(overlay ):demo

7、在 manager 節點,啟動 durid_demo 程式

接下來,在 manager 節點,啟動 Spring Boot 后端程式 druid_demo 的容器,并指定 demo 網路

docker run -it  -p 8888:8080 
-h druid_demo
--name druid_demo 
--net=demo 
--privileged=true druid_demo:0.0.1-SNAPSHOT /sbin/init

此時,請求介面,驗證網路是否互通

image.png

介面正常回傳,說明我們已經實作了 druid_demo 應用程式容器與 mariadb 容器之間的通訊

8、退出集群

執行 docker swarm leave,即可實作各節點退出集群網路的操作

那么,現在你知道 Docker 實作跨主機通訊的步驟了

接下來,趁熱打鐵,我們再一起來進行 Elasticsearch (后續簡稱為 ES)集群搭建,真正實踐一番

注意:

如果你之前沒怎么使用過 ES ,也沒有關系,我會推出相應的文章來介紹它,在這里,你只需要掌握 Docker 在多臺機器部署專案的方式以及實作跨主機通信的思想,我們的目的就達到啦

三、實戰二:Elasticsearch集群搭建

在進入集群搭建之前,我們先來看看如何啟動一個單機 ES

1、單機方式

docker run -itd --name elastic -v /usr/local/es/data:/var/lib/elasticsearch -v /usr/local/es/logs:/var/log/elasticsearch -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" --restart=always elasticsearch:v7.9.1

說明:

1)-v :指定掛載目錄(分別將 ES 的資料目錄和日志目錄映射到宿主機上,這樣即使容器掛掉了再重啟,日志也不會丟失)

其中,在容器目錄的 /etc/elasticsearch/elasticsearch.yml 中分別配置了 path.datapath.logs ,分別為

/var/lib/elasticsearch

/usr/local/es/logs

2)-p:指定映射埠(將容器中的埠映射到了宿主機上)

3)-e:指定配置(指定es當前是以單個節點的方式啟動)

4)--restart=alway:總是會自動重啟

啟動之后,登錄 Es-Head ,發現可以連接上,那么表示啟動成功

圖片

image.png

單機模式很簡單,只要分別配置好掛載目錄path.datapath.logs ,指定為單機模式啟動就好了

集群模式相應的也不復雜,配置與單機模式基本一致,除了需要部署多臺臺物理機以外,再注意一下各節點之間的相互關聯方式就好了,而這相互關聯方式,則包括:網路的互通確定集群的節點成員

2、集群方式

我們來搭建一個集群模式為 1 master + 3 data 節點,機器分配為:

序號節點角色ip地址
1elastic-master10.10.10.88
2elastic-data0110.10.10.76
3elastic-data0210.10.10.77
4elastic-data0310.10.10.78

1)配置集群網路 demo

對,就是參考第一步,為三臺機器配置集群網路

其中,網路節點角色如下:

序號節點角色ip地址
1manager10.10.10.88
2worker10.10.10.76
3worker10.10.10.77
4worker10.10.10.78

2)分別修改各節點的組態檔 elasticsearch.yml

a. elastic-master

vi /usr/local/es/config/elastic-master/elasticsearch.yml

# ======================== Elasticsearch Configuration =========================
#
# NOTE: Elasticsearch comes with reasonable defaults for most settings.
# Before you set out to tweak and tune the configuration, make sure you
# understand what are you trying to accomplish and the consequences.
#
# The primary way of configuring a node is via this file. This template lists
# the most important settings you may want to configure for a production cluster.
#
# Please consult the documentation for further information on configuration options:
# https://www.elastic.co/guide/en/elasticsearch/reference/index.html
#
# ---------------------------------- Cluster -----------------------------------
#
# Use a descriptive name for your cluster:
#
cluster.name: my-application
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
node.name: elastic-master
node.master: true
node.data: fasle
#
# Add custom attributes to the node:
#
#node.attr.rack: r1
#
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
path.data: /var/lib/elasticsearch
#
# Path to log files:
#
path.logs: /var/log/elasticsearch
#
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
#
#bootstrap.memory_lock: true
#
# Make sure that the heap size is set to about half the memory available
# on the system and that the owner of the process is allowed to use this
# limit.
#
# Elasticsearch performs poorly when the system is swapping the memory.
#
# ---------------------------------- Network -----------------------------------
#
# Set the bind address to a specific IP (IPv4 or IPv6):
#
network.host: 0.0.0.0
#
# Set a custom port for HTTP:
#
#http.port: 9200
#
# For more information, consult the network module documentation.
#
# --------------------------------- Discovery ----------------------------------
#
# Pass an initial list of hosts to perform discovery when this node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
discovery.seed_hosts: ["elastic-master", "elastic-data01","elastic-data02","elastic-data03"]
#
# Bootstrap the cluster using an initial set of master-eligible nodes:
#
cluster.initial_master_nodes: ["elastic-master"]
#
# For more information, consult the discovery and cluster formation module documentation.
#
# ---------------------------------- Gateway -----------------------------------
#
# Block initial recovery after a full cluster restart until N nodes are started:
#
#gateway.recover_after_nodes: 3
#
# For more information, consult the gateway module documentation.
#
# ---------------------------------- Various -----------------------------------
#
# Require explicit names when deleting indices:
#
#action.destructive_requi
http.cors.enabled: true
http.cors.allow-origin: "*"

說明:

  • cluster.name: my-application #集群名稱,各個節點保持一致即可

  • node.name: elastic-master #節點名稱,各個節點必須獨一無二

  • node.master: demo #是master節點

  • node.data: demo #不是data節點

  • path.data: /var/lib/elasticsearch #data存盤目錄(無特殊需求,直接使用默認的即可)

  • path.logs: /var/log/elasticsearch #日志存盤目錄(無特殊需求,直接使用默認的即可)

  • discovery.seed_hosts: ["elastic-master", "elastic-data01","elastic-data02","elastic-data03"]

#可發現的節點(配置四個節點的主機名稱或者ip即可,docker部署,建議直接配置主機名稱)

  • cluster.initial_master_nodes: ["elastic-master"] #初始化集群節點,直接配置master節點的主機名即可

b.elastic-data01

vi /usr/local/es/config/elastic-data01/elasticsearch.yml

# ======================== Elasticsearch Configuration =========================
#
# NOTE: Elasticsearch comes with reasonable defaults for most settings.
# Before you set out to tweak and tune the configuration, make sure you
# understand what are you trying to accomplish and the consequences.
#
# The primary way of configuring a node is via this file. This template lists
# the most important settings you may want to configure for a production cluster.
#
# Please consult the documentation for further information on configuration options:
# https://www.elastic.co/guide/en/elasticsearch/reference/index.html
#
# ---------------------------------- Cluster -----------------------------------
#
# Use a descriptive name for your cluster:
#
cluster.name: my-application
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
node.name: elastic-data01
node.master: false
node.data: true
#
# Add custom attributes to the node:
#
#node.attr.rack: r1
#
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
path.data: /var/lib/elasticsearch
#
# Path to log files:
#
path.logs: /var/log/elasticsearch
#
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
#
#bootstrap.memory_lock: true
#
# Make sure that the heap size is set to about half the memory available
# on the system and that the owner of the process is allowed to use this
# limit.
#
# Elasticsearch performs poorly when the system is swapping the memory.
#
# ---------------------------------- Network -----------------------------------
#
# Set the bind address to a specific IP (IPv4 or IPv6):
#
network.host: 0.0.0.0
#
# Set a custom port for HTTP:
#
#http.port: 9200
#
# For more information, consult the network module documentation.
#
# --------------------------------- Discovery ----------------------------------
#
# Pass an initial list of hosts to perform discovery when this node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
discovery.seed_hosts: ["elastic-master", "elastic-data01","elastic-data02","elastic-data03"]
#
# Bootstrap the cluster using an initial set of master-eligible nodes:
#
cluster.initial_master_nodes: ["elastic-master"]
#
# For more information, consult the discovery and cluster formation module documentation.
#
# ---------------------------------- Gateway -----------------------------------
#
# Block initial recovery after a full cluster restart until N nodes are started:
#
#gateway.recover_after_nodes: 3
#
# For more information, consult the gateway module documentation.
#
# ---------------------------------- Various -----------------------------------
#
# Require explicit names when deleting indices:
#
#action.destructive_requi
http.cors.enabled: true
http.cors.allow-origin: "*"

說明:

a. elastic-data01 的組態檔,與 elastic-master 的組態檔中,只有以下三項內容不同,其余均相同

node.name: elastic-data01 #節點名稱,各個節點必須獨一無二

node.master: false #不是master節點

node.data: true #是data節點

b. elastic-data02elastic-data03 的配置,與 elastic-data01 的配置,除了 node.name 的值不一致以外,其余均相同

3)啟動

分別在各個主機上,執行 docker 啟動命令,進行各個節點的啟動

docker run -itd --name elastic-master -h elastic-master --net=demo -v /usr/local/es/data:/var/lib/elasticsearch -v /usr/local/es/logs:/var/log/elasticsearch -v /usr/local/es/plugins:/usr/share/elasticsearch/plugins -v /usr/local/es/config/elastic-master/elasticsearch.yml:/etc/elasticsearch/elasticsearch.yml:ro -p 9200:9200 -p 9300:9300 -e cluster.initial_master_nodes=elastic-master --restart=always elasticsearch:v7.9.1 /sbin/init
docker run -itd --name elastic-data01 -h elastic-data01 --net=demo -v /usr/local/es/data:/var/lib/elasticsearch -v /usr/local/es/logs:/var/log/elasticsearch -v /usr/local/es/plugins:/usr/share/elasticsearch/plugins -v /usr/local/es/config/elastic-data01/elasticsearch.yml:/etc/elasticsearch/elasticsearch.yml:ro -p 9200:9200 -p 9300:9300 -e cluster.initial_master_nodes=elastic-master --restart=always elasticsearch:v7.9.1 /sbin/init
docker run -itd --name elastic-data02 -h elastic-data02 --net=demo -v /usr/local/es/data:/var/lib/elasticsearch -v /usr/local/es/logs:/var/log/elasticsearch -v /usr/local/es/plugins:/usr/share/elasticsearch/plugins -v /usr/local/es/config/elastic-data02/elasticsearch.yml:/etc/elasticsearch/elasticsearch.yml:ro -p 9200:9200 -p 9300:9300 -e cluster.initial_master_nodes=elastic-master --restart=always elasticsearch:v7.9.1 /sbin/init
docker run -itd --name elastic-data03 -h elastic-data03 --net=demo -v /usr/local/es/data:/var/lib/elasticsearch -v /usr/local/es/logs:/var/log/elasticsearch -v /usr/local/es/plugins:/usr/share/elasticsearch/plugins -v /usr/local/es/config/elastic-data03/elasticsearch.yml:/etc/elasticsearch/elasticsearch.yml:ro -p 9200:9200 -p 9300:9300 -e cluster.initial_master_nodes=elastic-master --restart=always relasticsearch:v7.9.1 /sbin/init

4)驗證

請求地址:http://10.10.10.88:9200/_cat/nodes 查看節點串列

image.png

可以看到,集群中,如期展示了 4 個節點,其中 1master 節點和 3data 節點(帶 * 號的為 master 節點)

集群成功搭建完畢!可喜可賀!

5)專案中集成 ES 配置

經測驗,只需要配置一個 master 節點的地址即可

spring.elasticsearch.rest.uris=http://10.10.10.88:9200

注:這里只是說明了如何搭建一個 ES 集群,實作集群間網路通信的方式,后面會專門有文章,介紹 ES 的理論知識,與具體實戰知識,敬請期待

四、總結

好了,總得來說,Docker 是通過搭建 Overlay 網橋,然后把各個主機的容器都統一放在這個網橋上就實作了 Docker 容器的跨主機通訊

恭喜你又掌握了一個新技能,當然,如果想要真正掌握的話,也建議大家真正實戰一次,畢竟實戰與理解是不同階段,對于知識的掌握程度也是不同級別的哦

轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/290599.html

標籤:其他

上一篇:新書交稿了!!!!!!!!!!!!!!!!

下一篇:Zookeeper學習----客戶端初始化原始碼決議

標籤雲
其他(157675) Python(38076) JavaScript(25376) Java(17977) C(15215) 區塊鏈(8255) C#(7972) AI(7469) 爪哇(7425) MySQL(7132) html(6777) 基礎類(6313) sql(6102) 熊猫(6058) PHP(5869) 数组(5741) R(5409) Linux(5327) 反应(5209) 腳本語言(PerlPython)(5129) 非技術區(4971) Android(4554) 数据框(4311) css(4259) 节点.js(4032) C語言(3288) json(3245) 列表(3129) 扑(3119) C++語言(3117) 安卓(2998) 打字稿(2995) VBA(2789) Java相關(2746) 疑難問題(2699) 细绳(2522) 單片機工控(2479) iOS(2429) ASP.NET(2402) MongoDB(2323) 麻木的(2285) 正则表达式(2254) 字典(2211) 循环(2198) 迅速(2185) 擅长(2169) 镖(2155) 功能(1967) .NET技术(1958) Web開發(1951) python-3.x(1918) HtmlCss(1915) 弹簧靴(1913) C++(1909) xml(1889) PostgreSQL(1872) .NETCore(1853) 谷歌表格(1846) Unity3D(1843) for循环(1842)

熱門瀏覽
  • 網閘典型架構簡述

    網閘架構一般分為兩種:三主機的三系統架構網閘和雙主機的2+1架構網閘。 三主機架構分別為內端機、外端機和仲裁機。三機無論從軟體和硬體上均各自獨立。首先從硬體上來看,三機都用各自獨立的主板、記憶體及存盤設備。從軟體上來看,三機有各自獨立的作業系統。這樣能達到完全的三機獨立。對于“2+1”系統,“2”分為 ......

    uj5u.com 2020-09-10 02:00:44 more
  • 如何從xshell上傳檔案到centos linux虛擬機里

    如何從xshell上傳檔案到centos linux虛擬機里及:虛擬機CentOs下執行 yum -y install lrzsz命令,出現錯誤:鏡像無法找到軟體包 前言 一、安裝lrzsz步驟 二、上傳檔案 三、遇到的問題及解決方案 總結 前言 提示:其實很簡單,往虛擬機上安裝一個上傳檔案的工具 ......

    uj5u.com 2020-09-10 02:00:47 more
  • 一、SQLMAP入門

    一、SQLMAP入門 1、判斷是否存在注入 sqlmap.py -u 網址/id=1 id=1不可缺少。當注入點后面的引數大于兩個時。需要加雙引號, sqlmap.py -u "網址/id=1&uid=1" 2、判斷文本中的請求是否存在注入 從文本中加載http請求,SQLMAP可以從一個文本檔案中 ......

    uj5u.com 2020-09-10 02:00:50 more
  • Metasploit 簡單使用教程

    metasploit 簡單使用教程 浩先生, 2020-08-28 16:18:25 分類專欄: kail 網路安全 linux 文章標簽: linux資訊安全 編輯 著作權 metasploit 使用教程 前言 一、Metasploit是什么? 二、準備作業 三、具體步驟 前言 Msfconsole ......

    uj5u.com 2020-09-10 02:00:53 more
  • 游戲逆向之驅動層與用戶層通訊

    驅動層代碼: #pragma once #include <ntifs.h> #define add_code CTL_CODE(FILE_DEVICE_UNKNOWN,0x800,METHOD_BUFFERED,FILE_ANY_ACCESS) /* 更多游戲逆向視頻www.yxfzedu.com ......

    uj5u.com 2020-09-10 02:00:56 more
  • 北斗電力時鐘(北斗授時服務器)讓網路資料更精準

    北斗電力時鐘(北斗授時服務器)讓網路資料更精準 北斗電力時鐘(北斗授時服務器)讓網路資料更精準 京準電子科技官微——ahjzsz 近幾年,資訊技術的得了快速發展,互聯網在逐漸普及,其在人們生活和生產中都得到了廣泛應用,并且取得了不錯的應用效果。計算機網路資訊在電力系統中的應用,一方面使電力系統的運行 ......

    uj5u.com 2020-09-10 02:01:03 more
  • 【CTF】CTFHub 技能樹 彩蛋 writeup

    ?碎碎念 CTFHub:https://www.ctfhub.com/ 筆者入門CTF時時剛開始刷的是bugku的舊平臺,后來才有了CTFHub。 感覺不論是網頁UI設計,還是題目質量,賽事跟蹤,工具軟體都做得很不錯。 而且因為獨到的金幣制度的確讓人有一種想去刷題賺金幣的感覺。 個人還是非常喜歡這個 ......

    uj5u.com 2020-09-10 02:04:05 more
  • 02windows基礎操作

    我學到了一下幾點 Windows系統目錄結構與滲透的作用 常見Windows的服務詳解 Windows埠詳解 常用的Windows注冊表詳解 hacker DOS命令詳解(net user / type /md /rd/ dir /cd /net use copy、批處理 等) 利用dos命令制作 ......

    uj5u.com 2020-09-10 02:04:18 more
  • 03.Linux基礎操作

    我學到了以下幾點 01Linux系統介紹02系統安裝,密碼啊破解03Linux常用命令04LAMP 01LINUX windows: win03 8 12 16 19 配置不繁瑣 Linux:redhat,centos(紅帽社區版),Ubuntu server,suse unix:金融機構,證券,銀 ......

    uj5u.com 2020-09-10 02:04:30 more
  • 05HTML

    01HTML介紹 02頭部標簽講解03基礎標簽講解04表單標簽講解 HTML前段語言 js1.了解代碼2.根據代碼 懂得挖掘漏洞 (POST注入/XSS漏洞上傳)3.黑帽seo 白帽seo 客戶網站被黑帽植入劫持代碼如何處理4.熟悉html表單 <html><head><title>TDK標題,描述 ......

    uj5u.com 2020-09-10 02:04:36 more
最新发布
  • 2023年最新微信小程式抓包教程

    01 開門見山 隔一個月發一篇文章,不過分。 首先回顧一下《微信系結手機號資料庫被脫庫事件》,我也是第一時間得知了這個訊息,然后跟蹤了整件事情的經過。下面是這起事件的相關截圖以及近日流出的一萬條資料樣本: 個人認為這件事也沒什么,還不如關注一下之前45億快遞資料查詢渠道疑似在近日復活的訊息。 訊息是 ......

    uj5u.com 2023-04-20 08:48:24 more
  • web3 產品介紹:metamask 錢包 使用最多的瀏覽器插件錢包

    Metamask錢包是一種基于區塊鏈技術的數字貨幣錢包,它允許用戶在安全、便捷的環境下管理自己的加密資產。Metamask錢包是以太坊生態系統中最流行的錢包之一,它具有易于使用、安全性高和功能強大等優點。 本文將詳細介紹Metamask錢包的功能和使用方法。 一、 Metamask錢包的功能 數字資 ......

    uj5u.com 2023-04-20 08:47:46 more
  • vulnhub_Earth

    前言 靶機地址->>>vulnhub_Earth 攻擊機ip:192.168.20.121 靶機ip:192.168.20.122 參考文章 https://www.cnblogs.com/Jing-X/archive/2022/04/03/16097695.html https://www.cnb ......

    uj5u.com 2023-04-20 07:46:20 more
  • 從4k到42k,軟體測驗工程師的漲薪史,給我看哭了

    清明節一過,盲猜大家已經無心上班,在數著日子準備過五一,但一想到銀行卡里的余額……瞬間心情就不美麗了。最近,2023年高校畢業生就業調查顯示,本科畢業月平均起薪為5825元。調查一出,便有很多同學表示自己又被平均了。看著這一資料,不免讓人想到前不久中國青年報的一項調查:近六成大學生認為畢業10年內會 ......

    uj5u.com 2023-04-20 07:44:00 more
  • 最新版本 Stable Diffusion 開源 AI 繪畫工具之中文自動提詞篇

    🎈 標簽生成器 由于輸入正向提示詞 prompt 和反向提示詞 negative prompt 都是使用英文,所以對學習母語的我們非常不友好 使用網址:https://tinygeeker.github.io/p/ai-prompt-generator 這個網址是為了讓大家在使用 AI 繪畫的時候 ......

    uj5u.com 2023-04-20 07:43:36 more
  • 漫談前端自動化測驗演進之路及測驗工具分析

    隨著前端技術的不斷發展和應用程式的日益復雜,前端自動化測驗也在不斷演進。隨著 Web 應用程式變得越來越復雜,自動化測驗的需求也越來越高。如今,自動化測驗已經成為 Web 應用程式開發程序中不可或缺的一部分,它們可以幫助開發人員更快地發現和修復錯誤,提高應用程式的性能和可靠性。 ......

    uj5u.com 2023-04-20 07:43:16 more
  • CANN開發實踐:4個DVPP記憶體問題的典型案例解讀

    摘要:由于DVPP媒體資料處理功能對存放輸入、輸出資料的記憶體有更高的要求(例如,記憶體首地址128位元組對齊),因此需呼叫專用的記憶體申請介面,那么本期就分享幾個關于DVPP記憶體問題的典型案例,并給出原因分析及解決方法。 本文分享自華為云社區《FAQ_DVPP記憶體問題案例》,作者:昇騰CANN。 DVPP ......

    uj5u.com 2023-04-20 07:43:03 more
  • msf學習

    msf學習 以kali自帶的msf為例 一、msf核心模塊與功能 msf模塊都放在/usr/share/metasploit-framework/modules目錄下 1、auxiliary 輔助模塊,輔助滲透(埠掃描、登錄密碼爆破、漏洞驗證等) 2、encoders 編碼器模塊,主要包含各種編碼 ......

    uj5u.com 2023-04-20 07:42:59 more
  • Halcon軟體安裝與界面簡介

    1. 下載Halcon17版本到到本地 2. 雙擊安裝包后 3. 步驟如下 1.2 Halcon軟體安裝 界面分為四大塊 1. Halcon的五個助手 1) 影像采集助手:與相機連接,設定相機引數,采集影像 2) 標定助手:九點標定或是其它的標定,生成標定檔案及內參外參,可以將像素單位轉換為長度單位 ......

    uj5u.com 2023-04-20 07:42:17 more
  • 在MacOS下使用Unity3D開發游戲

    第一次發博客,先發一下我的游戲開發環境吧。 去年2月份買了一臺MacBookPro2021 M1pro(以下簡稱mbp),這一年來一直在用mbp開發游戲。我大致分享一下我的開發工具以及使用體驗。 1、Unity 官網鏈接: https://unity.cn/releases 我一般使用的Apple ......

    uj5u.com 2023-04-20 07:40:19 more