主頁 >  其他 > Docker consul的容器服務更新與發現(理論加案例)

Docker consul的容器服務更新與發現(理論加案例)

2020-09-25 23:41:38 其他

文章目錄

  • 前言
  • 一 :consul 理論介紹
    • 1.1consul具有如下特性:
    • 1.2:基于nginx和consul構建高可用及自動發現的Docker服務架構
  • 二 :Docker consul自動發現服務架構的構建
  • 三 . 具體配置:
    • 3.1 環境部署
      • 安裝環境
      • 設定阿里云鏡像
      • 優化
      • 加速優化 阿里云鏡像加速
      • 準備軟體包
      • 下載安裝docker
    • 3.2 代理服務器安裝相關軟體
      • 部署consul
      • consul常用操作查看命令
      • 關閉規則,不能關閉防火墻
    • 3.3節點服務器操作
      • 節點服務器安裝 registrator 容器
      • 在節點創建容器進行測驗:
    • 3.4 宿主機可訪問 192.168.100.8:8500 測驗
    • 3.5 代理服務器原始碼編譯安裝Nginx
    • 3.6 代理服務器安裝 consul-template
      • 代理服務器 安裝consul-template,準備模板檔案
      • 編輯 template nginx 模板檔案
      • 修改nginx 配置
      • 代理服務器 啟動 template
    • 3.7 這時開一臺終端 ,查看組態檔,發現配置以及自動寫入
    • 3.8 然后訪問測驗,檢查日志,發現在輪詢訪問容器節點
      • 訪問 192.168.100.8:83
      • 利用 docker logs -f test2 查看容器 test2 日志
    • 3.9 在 節點操作 新增一個容器,測驗 發現功能
      • 查看組態檔
  • 四 . 發散思維 ,如何 通過配置 將 apache 和 nginx 容器 一起進行輪詢訪問操作
    • 方案一 ,修改模板檔案
    • 方案二 (騷操作,慎用)

前言

一 :consul 理論介紹

consul是HashiCorp公司推出使用go語言撰寫的開源工具,用于實作分布式系統的服務發現與配置

1.1consul具有如下特性:

1、consul支持健康檢查,允許存盤鍵值對

2、一致性協議采用Raft演算法,用來保證服務的高可用

3、成員管理和訊息廣播采用GOSSIP協議,支持ACL訪問控制

4、方便部署,與Docker等輕量級容器可無縫配合

1.2:基于nginx和consul構建高可用及自動發現的Docker服務架構

在這里插入圖片描述
上方拓撲圖是基于Docker完成的,然后將consul、consul template、registrator和nginx組裝成一個值得信任且可擴展的服務框架,此架構可以靈活的、不需要重啟任何服務、不需要重寫任何配置的添加和移除服務

拓撲圖解釋

consul template:組態檔模板

registrator:注冊機制

consul server:consul服務

例如:當后方增加了一個容器時,容器會注冊registrator,registrator發現增加了一個容器的時候,會通知consul server要更新,consul server使用consul template模板更新

二 :Docker consul自動發現服務架構的構建

1、每個提供服務的節點上都要部署和運行consul的agent

2、consul agent有兩種運行模式:server和client

3、server和client只是consul集群層面的區分,與搭建在cluster之上的應用服務無關
4、兩個節點都安裝Docker-ce,注意防火墻不要關閉,
5、在代理服務器上部署consul

主機 IP地址 需要安裝的軟體

在這里插入圖片描述

三 . 具體配置:

3.1 環境部署

安裝環境

[root@server 11 ~]# yum install -y yum-utils device-mapper-persistent-data lvm2

設定阿里云鏡像

yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
已加載插件:fastestmirror, langpacks
adding repo from: https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
grabbing file https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo to /etc/yum.repos.d/docker-ce.repo
repo saved to /etc/yum.repos.d/docker-ce.repo


[root@server 11 ~]# vim /etc/sysctl/conf
net.ipv4.ip_forward=1

優化

開啟路由功能

 vim /etc/sysctl.conf
net.ipv4.ip_forward=1
[root@server 11 ~]# sysctl -p
net.ipv4.ip_forward = 1

加速優化 阿里云鏡像加速

sudo mkdir -p /etc/docker 
sudo tee /etc/docker/daemon.json <<-'EOF'
 { 
"registry-mirrors": ["https://******.mirror.aliyuncs.com"]
 } 
EOF
 sudo systemctl daemon-reload 

準備軟體包

在這里插入圖片描述

下載安裝docker

[root@server 11 ~]# yum install -y docker-ce

sudo systemctl restart docker

3.2 代理服務器安裝相關軟體

安裝 軟體   docker-compose 
 chmod +x docker-compose
cp -p docker-compose  /usr/local/bin/
[root@docker2 compose_nginx]# yum install tree -y

部署consul

[root@pc-8 dockersoft]# ls
consul_0.9.2_linux_amd64.zip            debian-7.0-x86-minimal.tar.gz
consul-template_0.19.3_linux_amd64.zip  docker-compose
mkdir -r /root/consul
cp consul_0.9.2_linux_amd64.zip /root/consul/
cd /root/consul/
unzip consul_0.9.2_linux_amd64.zip
mv consul /usr/bin

安裝consul
[root@pc-8 bin]#
 consul agent \
-server \          //服務功能'
-bootstrap \      //參與選舉'
-ui \                      //提供web界面'
-data-dir=/var/lib/consul-data \              //提供一個代理存盤資料目錄'
-bind=192.168.100.8 \            //系結本地地址'
-client=0.0.0.0 \       監控的地址,所有網段
-node=consul-server01 &> /var/log/consul.log &    //定義節點名稱,日志混合輸出到log,并且放到后臺運行'
[1] 77128

consul常用操作查看命令

consul members	'//查看集群資訊'

consul info |grep leader	'//查看管理資訊'
curl 127.0.0.1:8500/v1/status/peers '/查看集群server成員'

curl 127.0.0.1:8500/v1/status/leaders '//查看集群Raf leader'

curl 127.0.0.1:8500/v1/catalog/services '//查看注冊的所有服務'

curl 127.0.0.1:8500/v1/catalog/nginx '//查看nginx服務的資訊'

curl 127.0.0.1:8500/v1/catalog/nodes   '//集群節點詳細資訊'

關閉規則,不能關閉防火墻

setenforce 0
iptables -F 清空規則

3.3節點服務器操作

節點服務器安裝 registrator 容器

docker run -d \
--name=registrator \      '//定義容器名稱'
--net=host \                                    '定義網路'
-v /var/run/docker.sock:/tmp/docker.sock \     '指定資料卷,存盤資訊' 
--restart=always \                                 
gliderlabs/registrator:latest \                          '定義鏡像'
-ip=192.168.100.9 \                                      '指定本地地址
 consul://192.168.100.8:8500                          '指定consul管理節點地址、埠'   

在節點創建容器進行測驗:

docker run -itd -p:83:80 --name test-01 -h test01 nginx
docker run -itd -p:84:80 --name  test-02 -h test02  nginx
docker run -itd -p:88:80 --name test-03  -h test03 httpd
docker run -itd -p:89:80 --name test-04 -h test04 httpd

3.4 宿主機可訪問 192.168.100.8:8500 測驗

在這里插入圖片描述


3.5 代理服務器原始碼編譯安裝Nginx


yum -y install gcc \
gcc-c++ \
make \
pcre-devel \
expat-devel \
perl \
zlib-devel \
pcre
[root@localhost nginx-1.12.2]# tar -zxvf nginx-1.12.2.tar.gz
[root@localhost LNMP]# cd nginx-1.12.2/
[root@localhost nginx-1.12.2]# useradd -M -s /sbin/nologin nginx
./configure \
--prefix=/usr/local/nginx \
--user=nginx \
--group=nginx \
--with-http_stub_status_module

[root@localhost nginx-1.12.2]# make && make install
[root@localhost nginx-1.12.2]# ln -s /usr/local/nginx/sbin/nginx /usr/local/sbin/

3.6 代理服務器安裝 consul-template

compose-template介紹

compose-template是一個守護行程,用于實時查詢consul集群資訊
并且運維人員可以在consul服務器上,定制任意的模板,生成組態檔
compose可以查詢consul中的服務目錄、key、key-values等
這種強大的抽象功能和查詢語言模板使得consul-template特別適合動態的創建組態檔,也就是自動化增加服務

例如:創建apache/nginx proxy balacers、haproxy backends

代理服務器 安裝consul-template,準備模板檔案

[root@pc-8 dockersoft]# ls
consul_0.9.2_linux_amd64.zip            debian-7.0-x86-minimal.tar.gz
consul-template_0.19.3_linux_amd64.zip  docker-compose
[root@pc-8 dockersoft]# unzip consul-template_0.19.3_linux_amd64.zip
Archive:  consul-template_0.19.3_linux_amd64.zip
  inflating: consul-template
[root@pc-8 dockersoft]# ls
consul_0.9.2_linux_amd64.zip  consul-template_0.19.3_linux_amd64.zip  docker-compose
consul-template               debian-7.0-x86-minimal.tar.gz
[root@pc-8 dockersoft]# cp -p consul
consul_0.9.2_linux_amd64.zip            consul-template_0.19.3_linux_amd64.zip
consul-template
[root@pc-8 dockersoft]# cp -p consul
consul_0.9.2_linux_amd64.zip            consul-template_0.19.3_linux_amd64.zip
consul-template
[root@pc-8 dockersoft]# cp -p consul-template /usr/local/bin/

編輯 template nginx 模板檔案

此模板用于nginx反向代理模板

nginx.ctmpl跟nginx沒有直接關系,

consul是docker的一種自動管理機制

nginx.ctmpl中的引數以變數的形式寫入


[root@pc-8 dockersoft]# vim /root/consul/nginx.ctmpl
upstream http_backend {
  {{range service "nginx"}}               // 根據鏡像名過濾包含nginx 的 地址和埠
   server {{.Address}}:{{.Port}};
   {{end}}
}
server {                                          // 反向代理
  listen 83;
  server_name localhost 192.168.100.8;
  access_log /var/log/nginx/nginx-access.log;
  index index.html index.php;
  location / {
    proxy_set_header HOST $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header Client-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_pass http://http_backend;
   }
}

修改nginx 配置

[root@pc-8 dockersoft]# vim /usr/local/nginx/conf/nginx.conf
http {
    include       mime.types;
    include   vhost/*.conf;     添加組態檔路徑可識別
    default_type  application/octet-stream;


創建虛擬主機目錄
[root@pc-8 dockersoft]# mkdir /usr/local/nginx/conf/vhost
創建日志檔案目錄
[root@pc-8 dockersoft]# mkdir /var/log/nginx


[root@pc-8 dockersoft]# /usr/local/nginx/sbin/nginx
[root@pc-8 dockersoft]# netstat -ntap

代理服務器 啟動 template

//指定模板路徑,/consul/nginx.ctmpl,生成到/usr/locla/nginx/conf/vhost/sha.conf,然后多載nginx -s reload'
接下來會進入監控狀態
consul-template -consul-addr 192.168.100.8:8500 \
-template "/root/consul/nginx.ctmpl:/usr/local/nginx/conf/vhost/sha.conf:/usr/local/nginx/sbin/nginx -s reload" \
--log-level=info

3.7 這時開一臺終端 ,查看組態檔,發現配置以及自動寫入

[root@pc-8 vhost]# cat sha.conf
upstream http_backend {

   server 192.168.100.9:83;

   server 192.168.100.9:84;

}

server {
  listen 83;
  server_name localhost 192.168.100.8;
  access_log /var/log/nginx/nginx-access.log;
  index index.html index.php;
  location / {
    proxy_set_header HOST $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header Client-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_pass http://http_backend;
   }
}

3.8 然后訪問測驗,檢查日志,發現在輪詢訪問容器節點

在這里插入圖片描述

訪問 192.168.100.8:83

在這里插入圖片描述

利用 docker logs -f test2 查看容器 test2 日志

在這里插入圖片描述

3.9 在 節點操作 新增一個容器,測驗 發現功能

docker run -itd --name test-05 -p 85:80 -h test05 nginx
在這里插入圖片描述

查看組態檔

在這里插入圖片描述

四 . 發散思維 ,如何 通過配置 將 apache 和 nginx 容器 一起進行輪詢訪問操作

這里有兩個實作方案

方案一 ,修改模板檔案

實作同時輪詢的方法,設定兩個upstream 進行分別匹配 nginx 和 httpd

[root@docker vhost]# vim /root/consul/nginx.ctmpl 

upstream http_backend {
   {{range service "nginx"}}
    server {{.Address}}:{{.Port}};
     {{end}}
}

upstream http_httpd {
   {{range service "httpd"}}
    server {{.Address}}:{{.Port}};
     {{end}}
}

server {
  listen 1111;
  server_name localhost 192.168.100.8;
  access_log /var/log/nginx/cllt.cn-access.log;
upstream http_backend {
   {{range service "nginx"}}
    server {{.Address}}:{{.Port}};
     {{end}}
}

upstream http_httpd {
   {{range service "httpd"}}
    server {{.Address}}:{{.Port}};
     {{end}}
}

server {
  listen 1111;
  server_name localhost 192.168.100.8;
  access_log /var/log/nginx/cllt.cn-access.log;
  index index.html index.php;
  location / {
    proxy_set_header HOST $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header Client-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_pass http://http_backend;
  }
}
server {
  listen 2222;
  server_name localhost 192.168.100.8;
  access_log /var/log/httpd/cllt.cn-access.log;
  index index.html index.php;
  location / {
    proxy_set_header HOST $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header Client-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_pass http://http_httpd;
  }
}

結果可自行嘗試

方案二 (騷操作,慎用)

將httpd像匯出,重命名為 nginx:new ,因為 它的過濾是 基于鏡像名來進行的,所以很有效果,
然后基于此鏡像創建容器,即可達到目的,

[root@server-9 opt]# docker run -itd -p 91:80  --name test-08 -h test08 nginx:new
cce37a01c5cd1bf1fa7b665eade83c78c7ee00574e118fe9a618c0f9ce26e582
[root@server-9 opt]# docker ps -a
CONTAINER ID        IMAGE                           COMMAND                  CREATED             STATUS              PORTS                NAMES
cce37a01c5cd        nginx:new                       "httpd-foreground"       5 seconds ago       Up 5 seconds        0.0.0.0:91->80/tcp   test-08
6d9c14e57792        nginx                           "/docker-entrypoint.…"   50 minutes ago      Up 50 minutes       0.0.0.0:85->80/tcp   test-05
19f647594be7        nginx                           "/docker-entrypoint.…"   2 hours ago         Up 2 hours          0.0.0.0:84->80/tcp   test-02
c7704ab68f10        httpd                           "httpd-foreground"       2 hours ago         Up 2 hours          0.0.0.0:89->80/tcp   test-04
d0fdaa6ae1f0        httpd                           "httpd-foreground"       2 hours ago         Up 2 hours          0.0.0.0:88->80/tcp   test-03
9b7dd5493a95        nginx                           "/docker-entrypoint.…"   2 hours ago         Up 2 hours          0.0.0.0:83->80/tcp   test-01
16f497d3290b        gliderlabs/registrator:latest   "/bin/registrator -i…"   4 hours ago         Up 4 hours                               registrator
[root@server-9 opt]#

查看日志檔案

[root@server-9 ~]# docker logs -f test-08
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 172.17.0.7. Set the 'ServerName' directive globally to suppress this message
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 172.17.0.7. Set the 'ServerName' directive globally to suppress this message
[Wed Sep 23 11:50:23.484954 2020] [mpm_event:notice] [pid 1:tid 139876988019840] AH00489: Apache/2.4.46 (Unix) configured -- resuming normal operations
[Wed Sep 23 11:50:23.485102 2020] [core:notice] [pid 1:tid 139876988019840] AH00094: Command line: 'httpd -D FOREGROUND'
192.168.100.8 - - [23/Sep/2020:11:51:18 +0000] "GET / HTTP/1.0" 200 45
192.168.100.8 - - [23/Sep/2020:11:51:19 +0000] "GET / HTTP/1.0" 200 45
192.168.100.8 - - [23/Sep/2020:11:52:02 +0000] "GET / HTTP/1.0" 200 45
192.168.100.8 - - [23/Sep/2020:11:52:02 +0000] "GET / HTTP/1.0" 200 45
192.168.100.8 - - [23/Sep/2020:11:52:03 +0000] "GET / HTTP/1.0" 200 45
192.168.100.8 - - [23/Sep/2020:11:52:04 +0000] "GET / HTTP/1.0" 200 45

在這里插入圖片描述

在這里插入圖片描述

在這里插入圖片描述

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

標籤:其他

上一篇:求infragistics原始碼,哪位大神有?小弟不勝感激!謝謝啊!

下一篇:常用的FTP軟體及優缺點分析

標籤雲
其他(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