DevStack 部署 OpenStack 多节点_devstack多节点部署
为了做好运维面试路上的助攻手,特整理了上百道 【运维技术栈面试题集锦】 ,让你面试不慌心不跳,高薪offer怀里抱!这次整理的面试题,小到shell、MySQL,大到K8s等云原生技术栈,不仅适合运维新人入行面试需要,还适用于想提升进阶跳槽加薪的运维朋友。本份面试集锦涵盖了总计 1000+ 道面试题, 内容 又全含金量又高网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深
为了做好运维面试路上的助攻手,特整理了上百道 【运维技术栈面试题集锦】 ,让你面试不慌心不跳,高薪offer怀里抱!
这次整理的面试题,小到shell、MySQL,大到K8s等云原生技术栈,不仅适合运维新人入行面试需要,还适用于想提升进阶跳槽加薪的运维朋友。
本份面试集锦涵盖了
- 174 道运维工程师面试题
- 128道k8s面试题
- 108道shell脚本面试题
- 200道Linux面试题
- 51道docker面试题
- 35道Jenkis面试题
- 78道MongoDB面试题
- 17道ansible面试题
- 60道dubbo面试题
- 53道kafka面试
- 18道mysql面试题
- 40道nginx面试题
- 77道redis面试题
- 28道zookeeper
总计 1000+ 道面试题, 内容 又全含金量又高
- 174道运维工程师面试题
1、什么是运维?
2、在工作中,运维人员经常需要跟运营人员打交道,请问运营人员是做什么工作的?
3、现在给你三百台服务器,你怎么对他们进行管理?
4、简述raid0 raid1raid5二种工作模式的工作原理及特点
5、LVS、Nginx、HAproxy有什么区别?工作中你怎么选择?
6、Squid、Varinsh和Nginx有什么区别,工作中你怎么选择?
7、Tomcat和Resin有什么区别,工作中你怎么选择?
8、什么是中间件?什么是jdk?
9、讲述一下Tomcat8005、8009、8080三个端口的含义?
10、什么叫CDN?
11、什么叫网站灰度发布?
12、简述DNS进行域名解析的过程?
13、RabbitMQ是什么东西?
14、讲一下Keepalived的工作原理?
15、讲述一下LVS三种模式的工作过程?
16、mysql的innodb如何定位锁问题,mysql如何减少主从复制延迟?
17、如何重置mysql root密码?
网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。
一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!
=========================
DevStack Component Timing
(times are in seconds)
wait_for_service 12
async_wait 102
osc 180
apt-get 71
test_with_retry 5
dbsync 7
pip_install 128
apt-get-update 1
run_process 27
git_timed 85
Unaccounted time 184
Total runtime 802
=================
Async summary
Time spent in the background minus waits: 322 sec
Elapsed time: 802 sec
Time if we did everything serially: 1124 sec
Speedup: 1.4015
Post-stack database query stats:
±-----------±----------±------+
| db | op | count |
±-----------±----------±------+
| keystone | SELECT | 31269 |
| keystone | INSERT | 82 |
| neutron | SELECT | 4482 |
| neutron | CREATE | 1 |
| neutron | SHOW | 4 |
| neutron | INSERT | 4113 |
| neutron | DELETE | 27 |
| neutron | UPDATE | 116 |
| placement | SELECT | 38 |
| placement | INSERT | 55 |
| placement | SET | 1 |
| nova_api | SELECT | 305 |
| nova_cell0 | SELECT | 65 |
| nova_cell1 | SELECT | 317 |
| nova_cell0 | INSERT | 5 |
| nova_cell0 | UPDATE | 3 |
| nova_cell1 | INSERT | 4 |
| nova_cell1 | UPDATE | 20 |
| placement | UPDATE | 3 |
| glance | SELECT | 57 |
| glance | INSERT | 14 |
| glance | UPDATE | 2 |
| nova_api | INSERT | 23 |
| nova_api | SAVEPOINT | 11 |
| nova_api | RELEASE | 11 |
±-----------±----------±------+
This is your host IP address: 192.168.93.21
This is your host IPv6 address: ::1
Horizon is now available at http://192.168.93.21/dashboard
Keystone is serving at http://192.168.93.21/identity/
The default users are: admin and demo
The password: secret
Services are running under systemd unit files.
For more information see:
https://docs.openstack.org/devstack/latest/systemd.html
DevStack Version: 2024.1
Change: f4f09416ca8de09820b52599c7bcd2911b407466 Merge “Drop unused environments for TripleO and heat agents” 2024-03-19 18:55:14 +0000
OS Version: Ubuntu 22.04 jammy
修改网卡配置,增加`bridges`部分,使网桥开机自动启动
stack@devstack21:~/devstack$ sudo vim /etc/netplan/00-installer-config.yaml
This is the network config written by ‘subiquity’
network:
ethernets:
ens33:
addresses:
- 192.168.93.21/24
nameservers:
addresses:
- 223.5.5.5
- 223.6.6.6
search: []
routes:
- to: default
via: 192.168.93.2
ens37:
dhcp4: false
bridges:
br-ex:
openvswitch: {}
dhcp4: false
version: 2
应用网卡配置
stack@devstack21:~/devstack$ sudo netplan apply
stack@devstack21:~/devstack$
查看网卡信息
stack@devstack21:~/devstack$ ip a
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: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 00:0c:29:b0:da:db brd ff:ff:ff:ff:ff:ff
altname enp2s1
inet 192.168.93.21/24 brd 192.168.93.255 scope global ens33
valid_lft forever preferred_lft forever
inet6 fe80::20c:29ff:feb0:dadb/64 scope link
valid_lft forever preferred_lft forever
3: ens37: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel master ovs-system state UP group default qlen 1000
link/ether 00:0c:29:b0:da:e5 brd ff:ff:ff:ff:ff:ff
altname enp2s5
inet6 fe80::20c:29ff:feb0:dae5/64 scope link
valid_lft forever preferred_lft forever
4: ovs-system: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 22:0d:02:9f:90:1d brd ff:ff:ff:ff:ff:ff
5: br-int: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether f2:ad:f1:af:54:9a brd ff:ff:ff:ff:ff:ff
6: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
link/ether 52:54:00:f2:bf:a4 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
7: br-ex: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
link/ether 00:0c:29:b0:da:e5 brd ff:ff:ff:ff:ff:ff
inet6 fe80::20c:29ff:feb0:dae5/64 scope link
valid_lft forever preferred_lft forever
查看网桥信息
stack@devstack21:~/devstack$ sudo ovs-vsctl show
8fc32620-e49f-4e8a-87a1-675d4185e1aa
Manager “ptcp:6640:127.0.0.1”
is_connected: true
Bridge br-int
fail_mode: secure
datapath_type: system
Port br-int
Interface br-int
type: internal
Port patch-br-int-to-provnet-4ff27886-1c19-4ba4-bd52-05e6c6524575
Interface patch-br-int-to-provnet-4ff27886-1c19-4ba4-bd52-05e6c6524575
type: patch
options: {peer=patch-provnet-4ff27886-1c19-4ba4-bd52-05e6c6524575-to-br-int}
Bridge br-ex
fail_mode: standalone
Port br-ex
Interface br-ex
type: internal
Port ens37
Interface ens37
Port patch-provnet-4ff27886-1c19-4ba4-bd52-05e6c6524575-to-br-int
Interface patch-provnet-4ff27886-1c19-4ba4-bd52-05e6c6524575-to-br-int
type: patch
options: {peer=patch-br-int-to-provnet-4ff27886-1c19-4ba4-bd52-05e6c6524575}
ovs_version: “2.17.9”
此时已经可以登录dashboard,并创建虚拟机,默认账号为`admin/secret`。
http://192.168.93.21/
#### 安装计算节点
以下操作在计算节点执行。
从neutron文件夹下复制计算节点示例配置文件
stack@devstack22:~$ pwd
/opt/stack
stack@devstack22:~$ cd devstack
stack@devstack22:~$ egrep -v “#|$” …/neutron/devstack/ovn-compute-local.conf.sample > ./local.conf
配置文件修改后如下:
cat >local.conf<<‘EOF’
[[local|localrc]]
git_base
GIT_BASE=“https://github.com”
#GIT_BASE=https://opendev.org
#GIT_BASE=http://git.trystack.cn
password
ADMIN_PASSWORD=secret
DATABASE_PASSWORD=
A
D
M
I
N
P
A
S
S
W
O
R
D
R
A
B
B
I
T
P
A
S
S
W
O
R
D
=
ADMIN_PASSWORD RABBIT_PASSWORD=
ADMINPASSWORDRABBITPASSWORD=ADMIN_PASSWORD
SERVICE_PASSWORD=
A
D
M
I
N
P
A
S
S
W
O
R
D
S
E
R
V
I
C
E
T
O
K
E
N
=
ADMIN_PASSWORD SERVICE_TOKEN=
ADMINPASSWORDSERVICETOKEN=ADMIN_PASSWORD
OVN
Q_AGENT=ovn
NEUTRON_AGENT=
Q
A
G
E
N
T
Q
M
L
2
P
L
U
G
I
N
M
E
C
H
A
N
I
S
M
D
R
I
V
E
R
S
=
o
v
n
,
l
o
g
g
e
r
Q
M
L
2
P
L
U
G
I
N
T
Y
P
E
D
R
I
V
E
R
S
=
l
o
c
a
l
,
f
l
a
t
,
v
l
a
n
,
g
e
n
e
v
e
Q
M
L
2
T
E
N
A
N
T
N
E
T
W
O
R
K
T
Y
P
E
=
"
g
e
n
e
v
e
"
L
O
G
F
I
L
E
=
Q_AGENT Q_ML2_PLUGIN_MECHANISM_DRIVERS=ovn,logger Q_ML2_PLUGIN_TYPE_DRIVERS=local,flat,vlan,geneve Q_ML2_TENANT_NETWORK_TYPE="geneve" LOGFILE=
QAGENTQML2PLUGINMECHANISMDRIVERS=ovn,loggerQML2PLUGINTYPEDRIVERS=local,flat,vlan,geneveQML2TENANTNETWORKTYPE="geneve"LOGFILE=DEST/logs/stack.sh.log
enable_plugin neutron https://opendev.org/openstack/neutron
disable_all_services
enable_service n-cpu
enable_service placement-client
enable_service ovn-controller
enable_service q-ovn-metadata-agent
SERVICE_HOST=192.168.93.21
RABBIT_HOST=
S
E
R
V
I
C
E
H
O
S
T
Q
H
O
S
T
=
SERVICE_HOST Q_HOST=
SERVICEHOSTQHOST=SERVICE_HOST
OVN_SB_REMOTE=tcp:
S
E
R
V
I
C
E
H
O
S
T
:
6642
O
V
N
B
U
I
L
D
M
O
D
U
L
E
S
=
T
r
u
e
H
O
S
T
I
P
=
192.168.93.22
N
O
V
A
V
N
C
E
N
A
B
L
E
D
=
T
r
u
e
N
O
V
N
C
P
R
O
X
Y
U
R
L
=
h
t
t
p
:
/
/
SERVICE_HOST:6642 OVN_BUILD_MODULES=True HOST_IP=192.168.93.22 NOVA_VNC_ENABLED=True NOVNCPROXY_URL=http://
SERVICEHOST:6642OVNBUILDMODULES=TrueHOSTIP=192.168.93.22NOVAVNCENABLED=TrueNOVNCPROXYURL=http://SERVICE_HOST:6080/vnc_lite.html
VNCSERVER_LISTEN=
H
O
S
T
I
P
V
N
C
S
E
R
V
E
R
P
R
O
X
Y
C
L
I
E
N
T
A
D
D
R
E
S
S
=
HOST_IP VNCSERVER_PROXYCLIENT_ADDRESS=
HOSTIPVNCSERVERPROXYCLIENTADDRESS=VNCSERVER_LISTEN
Neutron options
Q_USE_SECGROUP=True
FLOATING_RANGE=“192.168.72.0/24”
Q_FLOATING_ALLOCATION_POOL=start=192.168.72.110,end=192.168.72.120
PUBLIC_NETWORK_GATEWAY=“192.168.72.8”
PUBLIC_INTERFACE=ens37
Open vSwitch provider networking configuration
Q_USE_PROVIDERNET_FOR_PUBLIC=True
OVS_PHYSICAL_BRIDGE=br-ex
PUBLIC_BRIDGE=br-ex
OVS_BRIDGE_MAPPINGS=public:br-ex
EOF
主要配置参数说明:
* `HOST_IP`: 本机IP地址
* `SERVICE_HOST`:必须是控制节点IP地址
安装计算节点
$ ./stack.sh
确认安装完成
…
DevStack Component Timing
(times are in seconds)
wait_for_service 7
async_wait 0
osc 0
apt-get 264
pip_install 103
apt-get-update 1
run_process 4
git_timed 45
Unaccounted time 100
Total runtime 524
=================
Async summary
Time spent in the background minus waits: 1 sec
Elapsed time: 524 sec
Time if we did everything serially: 525 sec
Speedup: 1.00191
This is your host IP address: 192.168.93.22
This is your host IPv6 address: ::1
Services are running under systemd unit files.
For more information see:
https://docs.openstack.org/devstack/latest/systemd.html
DevStack Version: 2024.1
Change: f4f09416ca8de09820b52599c7bcd2911b407466 Merge “Drop unused environments for TripleO and heat agents” 2024-03-19 18:55:14 +0000
OS Version: Ubuntu 22.04 jammy
修改网卡配置,增加`bridges`部分,使网桥开机自动启动
stack@devstack22:~/devstack$ sudo vim /etc/netplan/00-installer-config.yaml
This is the network config written by ‘subiquity’
network:
ethernets:
ens33:
addresses:
- 192.168.93.22/24
nameservers:
addresses:
- 223.5.5.5
- 223.6.6.6
search: []
routes:
- to: default
via: 192.168.93.2
ens37:
dhcp4: false
bridges:
br-ex:
openvswitch: {}
dhcp4: false
version: 2
应用网卡配置
stack@devstack22:~/devstack$ sudo netplan apply
stack@devstack22:~/devstack$
查看网卡信息
stack@devstack22:~/devstack$ ip a
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: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 00:0c:29:31:a7:2c brd ff:ff:ff:ff:ff:ff
altname enp2s1
inet 192.168.93.22/24 brd 192.168.93.255 scope global ens33
valid_lft forever preferred_lft forever
inet6 fe80::20c:29ff:fe31:a72c/64 scope link
valid_lft forever preferred_lft forever
3: ens37: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel master ovs-system state UP group default qlen 1000
link/ether 00:0c:29:31:a7:36 brd ff:ff:ff:ff:ff:ff
altname enp2s5
inet6 fe80::20c:29ff:fe31:a736/64 scope link
valid_lft forever preferred_lft forever
4: ovs-system: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 22:0d:02:9f:90:1d brd ff:ff:ff:ff:ff:ff
5: br-int: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 06:0d:1b:71:58:0e brd ff:ff:ff:ff:ff:ff
6: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
link/ether 52:54:00:42:16:35 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
7: br-ex: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
link/ether 00:0c:29:31:a7:36 brd ff:ff:ff:ff:ff:ff
inet6 fe80::20c:29ff:fe31:a736/64 scope link
valid_lft forever preferred_lft forever
8: genev_sys_6081: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 65000 qdisc noqueue master ovs-system state UNKNOWN group default qlen 1000
link/ether 1e:dd:eb:ff:7a:66 brd ff:ff:ff:ff:ff:ff
inet6 fe80::f4be:3fff:fe9b:6d89/64 scope link
valid_lft forever preferred_lft forever
查看网桥信息
stack@devstack22:~/devstack$ sudo ovs-vsctl show
15b21aff-829b-4c9f-8ef6-1fa372eddb3a
Manager “ptcp:6640:127.0.0.1”
is_connected: true
Bridge br-ex
fail_mode: standalone
Port br-ex
Interface br-ex
type: internal
Port ens37
Interface ens37
Port patch-provnet-4ff27886-1c19-4ba4-bd52-05e6c6524575-to-br-int
Interface patch-provnet-4ff27886-1c19-4ba4-bd52-05e6c6524575-to-br-int
type: patch
options: {peer=patch-br-int-to-provnet-4ff27886-1c19-4ba4-bd52-05e6c6524575}
Bridge br-int
fail_mode: secure
datapath_type: system
Port patch-br-int-to-provnet-4ff27886-1c19-4ba4-bd52-05e6c6524575
Interface patch-br-int-to-provnet-4ff27886-1c19-4ba4-bd52-05e6c6524575
type: patch
options: {peer=patch-provnet-4ff27886-1c19-4ba4-bd52-05e6c6524575-to-br-int}
Port ovn-2018dc-0
Interface ovn-2018dc-0
type: geneve
options: {csum=“true”, key=flow, remote_ip=“192.168.93.21”}
bfd_status: {diagnostic=“No Diagnostic”, flap_count=“1”, forwarding=“true”, remote_diagnostic=“Neighbor Signaled Session Down”, remote_state=up, state=up}
Port br-int
Interface br-int
type: internal
ovs_version: “2.17.9”
#### 节点发现
以下操作在控制节点执行。
切换到管理员用户
stack@devstack21:~/devstack$ . openrc admin admin
WARNING: setting legacy OS_TENANT_NAME to support cli tools.
stack@devstack21:~/devstack$
执行节点发现脚本
stack@devstack21:~/devstack$ pwd
/opt/stack/devstack
stack@devstack21:~/devstack$ ./tools/discover_hosts.sh
执行结果如下
stack@devstack21:~/devstack$ ./tools/discover_hosts.sh
INFO dbcounter [None req-1bb45b78-fd14-4fda-bd70-8cb20326bb8e None None] Registered counter for database nova_api
DEBUG dbcounter [-] [131423] Writer thread running {{(pid=131423) stat_writer /opt/stack/data/venv/lib/python3.10/site-packages/dbcounter.py:102}}
Found 2 cell mappings.
Skipping cell0 since it does not contain hosts.
Getting computes from cell ‘cell1’: ac941876-1395-4846-befe-ee823eb14d5e
INFO dbcounter [None req-1bb45b78-fd14-4fda-bd70-8cb20326bb8e None None] Registered counter for database nova_cell1
DEBUG dbcounter [-] [131423] Writer thread running {{(pid=131423) stat_writer /opt/stack/data/venv/lib/python3.10/site-packages/dbcounter.py:102}}
Found 0 unmapped computes in cell: ac941876-1395-4846-befe-ee823eb14d5e
stack@devstack21:~/devstack$
查看新发现的hypervisor
stack@devstack21:~/devstack$ openstack hypervisor list
±-------------------------------------±--------------------±----------------±--------------±------+
| ID | Hypervisor Hostname | Hypervisor Type | Host IP | State |
±-------------------------------------±--------------------±----------------±--------------±------+
| be439833-6735-4f3e-9ddd-3e37f768e18d | devstack21 | QEMU | 192.168.93.21 | up |
| a2b491c5-8124-4c49-b279-e327d98bb412 | devstack22 | QEMU | 192.168.93.22 | up |
±-------------------------------------±--------------------±----------------±--------------±------+
stack@devstack21:~/devstack$
还可以查看 OVN 和 OVS 以查看第二个主机已出现。例如,OVN\_Southbound 数据库的 Chassis 表中将有第二个条目。可以使用 ovn-sbctl 实用程序列出chassis、其配置以及绑定到每个chassis的端口:
stack@devstack21:~/devstack$ sudo ovn-sbctl show
Chassis “2018dc69-862f-45d9-ad7d-0fc4dc5d08c4”
hostname: devstack21
Encap geneve
ip: “192.168.93.21”
options: {csum=“true”}
Port_Binding cr-lrp-7ff9bc36-6877-44c2-aee9-d9d8eb22c8e0
Chassis “1e889c0c-2509-4cc5-ad6e-f9d3bdfb5c40”
hostname: devstack22
Encap geneve
ip: “192.168.93.22”
options: {csum=“true”}
还可以看到创建到另一个计算节点的隧道:
stack@devstack21:~/devstack$ sudo ovs-vsctl show
…
Bridge br-int
fail_mode: secure
datapath_type: system
Port br-int
Interface br-int
type: internal
Port ovn-1e889c-0
Interface ovn-1e889c-0
type: geneve
options: {csum=“true”, key=flow, remote_ip=“192.168.93.22”}
…
两节点openstack已经部署完成,你可以通过openstack CLI或登录dashboard创建虚拟机实例进一步测试。
### 创建虚拟机
在本节中,我们将使用openstack CLI逐步完成创建两个虚拟机的步骤,这些虚拟机具有连接到 `private` Neutron 网络的虚拟 NIC。
DevStack 默认使用 libvirt 作为 Nova 后端。如果 KVM 可用,则会使用它。否则,它只会运行 qemu 模拟来宾。这对于我们的测试来说非常合适,因为我们只需要这些虚拟机能够发送和接收少量流量,因此性能并不是很重要。
#### 虚拟机创建流程
1、切换到demo用户
stack@devstack21:~/devstack$ pwd
/opt/stack/devstack
stack@devstack21:~/devstack$ . openrc demo demo
WARNING: setting legacy OS_TENANT_NAME to support cli tools.
stack@devstack21:~/devstack$
2、获取网络 UUID。
查看可用的网络,devstack默认为我们创建了三个网络,我们将使用 `private` 租户网络创建虚拟机
stack@devstack21:~/devstack$ openstack network list
±-------------------------------------±--------±---------------------------------------------------------------------------+
| ID | Name | Subnets |
±-------------------------------------±--------±---------------------------------------------------------------------------+
| 6211312f-ab8e-4346-bc58-aed8a63d4f62 | public | 0cf53da9-2c68-4b7d-8043-8d682fe34b23, 8a1dbf88-3caa-4a88-afa4-6fb6823cb224 |
| 8b8cdb32-c009-49e1-88d4-3d58198e6d6c | private | 24bfad1c-46ab-45a8-b607-da0ed8ea0b3c, 912dae4c-691a-44be-afb1-252c19ebfe24 |
| 98a54015-c7ac-4825-80a8-b3364d41db43 | shared | 0e754263-61ee-496a-8187-3103af900846 |
±-------------------------------------±--------±---------------------------------------------------------------------------+
首先从之前的 `openstack network list` 输出中获取 `private` 网络的 UUID 并将其保存:
PRIVATE_NET_ID=$(openstack network show private -c id -f value)
3、创建 SSH 密钥对。
接下来在 Nova 中创建 SSH 密钥对。稍后,当我们启动虚拟机时,我们会要求将公钥放入虚拟机中,以便我们可以通过 SSH 访问它。
openstack keypair create demo > id_rsa_demo
chmod 600 id_rsa_demo
查看我们创建的keypair
stack@devstack21:~/devstack$ openstack keypair list
±-----±------------------------------------------------±-----+
| Name | Fingerprint | Type |
±-----±------------------------------------------------±-----+
| demo | dc:8b:e9:ce:37:c9:bd:16:57:df:c0:20:dc:8c:64:d0 | ssh |
±-----±------------------------------------------------±-----+
stack@devstack21:~/devstack$
3、选择一种flavor,devstack默认为我们创建了多种flavor。
我们需要为这些测试虚拟机提供最少的资源,因此 `m1.nano` 风格就足够了。
stack@devstack21:~/devstack$ openstack flavor list
±—±----------±------±-----±----------±------±----------+
| ID | Name | RAM | Disk | Ephemeral | VCPUs | Is Public |
±—±----------±------±-----±----------±------±----------+
| 1 | m1.tiny | 512 | 1 | 0 | 1 | True |
| 2 | m1.small | 2048 | 20 | 0 | 1 | True |
| 3 | m1.medium | 4096 | 40 | 0 | 2 | True |
| 4 | m1.large | 8192 | 80 | 0 | 4 | True |
| 42 | m1.nano | 128 | 1 | 0 | 1 | True |
| 5 | m1.xlarge | 16384 | 160 | 0 | 8 | True |
| 84 | m1.micro | 192 | 1 | 0 | 1 | True |
| c1 | cirros256 | 256 | 1 | 0 | 1 | True |
| d1 | ds512M | 512 | 5 | 0 | 1 | True |
| d2 | ds1G | 1024 | 10 | 0 | 1 | True |
| d3 | ds2G | 2048 | 10 | 0 | 2 | True |
| d4 | ds4G | 4096 | 20 | 0 | 4 | True |
±—±----------±------±-----±----------±------±----------+
$ FLAVOR_ID=$(openstack flavor show m1.nano -c id -f value)
4、 选择一个镜像,devstack 默认已经为我们创建了一个cirros镜像
DevStack 默认导入 CirrOS 镜像,这非常适合我们的测试。这是一个非常小的测试图像。
stack@devstack21:~/devstack$ openstack image list
±-------------------------------------±-------------------------±-------+
| ID | Name | Status |
±-------------------------------------±-------------------------±-------+
| df855e1f-4752-4d3c-a81b-6dc5ebfa96ab | cirros-0.6.2-x86_64-disk | active |
±-------------------------------------±-------------------------±-------+
$ IMAGE_ID=$(openstack image list -c ID -f value)
5、设置安全规则,以便我们可以访问接下来要启动的虚拟机。
默认情况下,DevStack 不允许用户访问虚拟机,要启用它,我们需要添加一条规则。我们将允许 ICMP 和 SSH。
openstack security group rule create --ingress --ethertype IPv4 --dst-port 22 --protocol tcp default
openstack security group rule create --ingress --ethertype IPv4 --protocol ICMP default
查看创建的安全组规则
$ openstack security group rule list
±-------------------------------------±------------±----------±-----------±-------------------------------------±-------------------------------------+
| ID | IP Protocol | IP Range | Port Range | Remote Security Group | Security Group |
±-------------------------------------±------------±----------±-----------±-------------------------------------±-------------------------------------+
…
| ade97198-db44-429e-9b30-24693d86d9b1 | tcp | 0.0.0.0/0 | 22:22 | None | a47b14da-5607-404a-8de4-3a0f1ad3649c |
| d0861a98-f90e-4d1a-abfb-827b416bc2f6 | icmp | 0.0.0.0/0 | | None | a47b14da-5607-404a-8de4-3a0f1ad3649c |
…
±-------------------------------------±------------±----------±-----------±-------------------------------------±-------------------------------------+
6、启动一些虚拟机。
现在我们将启动两个虚拟机。我们将它们命名为 `test1` 和 `test2` 。
stack@devstack21:~/devstack$ openstack server create --nic net-id=$PRIVATE_NET_ID --flavor $FLAVOR_ID --image I M A G E _ I D − − k e y − n a m e d e m o t e s t 1 + − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − + − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − + ∣ F i e l d ∣ V a l u e ∣ + − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − + − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − + ∣ O S − D C F : d i s k C o n f i g ∣ M A N U A L ∣ ∣ O S − E X T − A Z : a v a i l a b i l i t y z o n e ∣ ∣ ∣ O S − E X T − S T S : p o w e r s t a t e ∣ N O S T A T E ∣ ∣ O S − E X T − S T S : t a s k s t a t e ∣ s c h e d u l i n g ∣ ∣ O S − E X T − S T S : v m s t a t e ∣ b u i l d i n g ∣ ∣ O S − S R V − U S G : l a u n c h e d a t ∣ N o n e ∣ ∣ O S − S R V − U S G : t e r m i n a t e d a t ∣ N o n e ∣ ∣ a c c e s s I P v 4 ∣ ∣ ∣ a c c e s s I P v 6 ∣ ∣ ∣ a d d r e s s e s ∣ ∣ ∣ a d m i n P a s s ∣ Y 5 j 83 P E L i Y K s ∣ ∣ c o n f i g d r i v e ∣ ∣ ∣ c r e a t e d ∣ 2024 − 03 − 24 T 04 : 42 : 57 Z ∣ ∣ f l a v o r ∣ m 1. n a n o ( 42 ) ∣ ∣ h o s t I d ∣ ∣ ∣ i d ∣ 88 e a 2 c 47 − 7 f e 9 − 460 b − b 98 a − 0 e 4 e b f 773 c 98 ∣ ∣ i m a g e ∣ c i r r o s − 0.6.2 − x 8 6 6 4 − d i s k ( d f 855 e 1 f − 4752 − 4 d 3 c − a 81 b − 6 d c 5 e b f a 96 a b ) ∣ ∣ k e y n a m e ∣ d e m o ∣ ∣ n a m e ∣ t e s t 1 ∣ ∣ o s − e x t e n d e d − v o l u m e s : v o l u m e s a t t a c h e d ∣ [ ] ∣ ∣ p r o g r e s s ∣ 0 ∣ ∣ p r o j e c t i d ∣ 6525123 a 5 d 8 d 4 f 048 d 51 e d f 1 e d 18 f 06 b ∣ ∣ p r o p e r t i e s ∣ ∣ ∣ s e c u r i t y g r o u p s ∣ n a m e = ′ d e f a u l t ′ ∣ ∣ s t a t u s ∣ B U I L D ∣ ∣ u p d a t e d ∣ 2024 − 03 − 24 T 04 : 42 : 57 Z ∣ ∣ u s e r i d ∣ 55 e 4 c f 4 e e c 0 f 48 e f a 3 f f a 182046 a f 847 ∣ + − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − + − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − + s t a c k @ d e v s t a c k 21 : / d e v s t a c k IMAGE\_ID --key-name demo test1 +--------------------------------------+-----------------------------------------------------------------+ | Field | Value | +--------------------------------------+-----------------------------------------------------------------+ | OS-DCF:diskConfig | MANUAL | | OS-EXT-AZ:availability_zone | | | OS-EXT-STS:power_state | NOSTATE | | OS-EXT-STS:task_state | scheduling | | OS-EXT-STS:vm_state | building | | OS-SRV-USG:launched_at | None | | OS-SRV-USG:terminated_at | None | | accessIPv4 | | | accessIPv6 | | | addresses | | | adminPass | Y5j83PELiYKs | | config_drive | | | created | 2024-03-24T04:42:57Z | | flavor | m1.nano (42) | | hostId | | | id | 88ea2c47-7fe9-460b-b98a-0e4ebf773c98 | | image | cirros-0.6.2-x86_64-disk (df855e1f-4752-4d3c-a81b-6dc5ebfa96ab) | | key_name | demo | | name | test1 | | os-extended-volumes:volumes_attached | [] | | progress | 0 | | project_id | 6525123a5d8d4f048d51edf1ed18f06b | | properties | | | security_groups | name='default' | | status | BUILD | | updated | 2024-03-24T04:42:57Z | | user_id | 55e4cf4eec0f48efa3ffa182046af847 | +--------------------------------------+-----------------------------------------------------------------+ stack@devstack21:~/devstack IMAGE_ID−−key−namedemotest1+−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−+−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−+∣Field∣Value∣+−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−+−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−+∣OS−DCF:diskConfig∣MANUAL∣∣OS−EXT−AZ:availabilityzone∣∣∣OS−EXT−STS:powerstate∣NOSTATE∣∣OS−EXT−STS:taskstate∣scheduling∣∣OS−EXT−STS:vmstate∣building∣∣OS−SRV−USG:launchedat∣None∣∣OS−SRV−USG:terminatedat∣None∣∣accessIPv4∣∣∣accessIPv6∣∣∣addresses∣∣∣adminPass∣Y5j83PELiYKs∣∣configdrive∣∣∣created∣2024−03−24T04:42:57Z∣∣flavor∣m1.nano(42)∣∣hostId∣∣∣id∣88ea2c47−7fe9−460b−b98a−0e4ebf773c98∣∣image∣cirros−0.6.2−x8664−disk(df855e1f−4752−4d3c−a81b−6dc5ebfa96ab)∣∣keyname∣demo∣∣name∣test1∣∣os−extended−volumes:volumesattached∣[]∣∣progress∣0∣∣projectid∣6525123a5d8d4f048d51edf1ed18f06b∣∣properties∣∣∣securitygroups∣name=′default′∣∣status∣BUILD∣∣updated∣2024−03−24T04:42:57Z∣∣userid∣55e4cf4eec0f48efa3ffa182046af847∣+−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−+−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−+stack@devstack21: /devstack
stack@devstack21:~/devstack$ openstack server create --nic net-id=$PRIVATE_NET_ID --flavor $FLAVOR_ID --image $IMAGE_ID --key-name demo test2
±-------------------------------------±----------------------------------------------------------------+
| Field | Value |
±-------------------------------------±----------------------------------------------------------------+
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-AZ:availability_zone | |
| OS-EXT-STS:power_state | NOSTATE |
| OS-EXT-STS:task_state | scheduling |
| OS-EXT-STS:vm_state | building |
| OS-SRV-USG:launched_at | None |
| OS-SRV-USG:terminated_at | None |
| accessIPv4 | |
| accessIPv6 | |
| addresses | |
| adminPass | m3dhpx8meFHh |
| config_drive | |
| created | 2024-03-24T04:43:35Z |
| flavor | m1.nano (42) |
| hostId | |
| id | 8a32e126-7f97-4e1a-9a06-059867643785 |
| image | cirros-0.6.2-x86_64-disk (df855e1f-4752-4d3c-a81b-6dc5ebfa96ab) |
| key_name | demo |
| name | test2 |
| os-extended-volumes:volumes_attached | [] |
| progress | 0 |
| project_id | 6525123a5d8d4f048d51edf1ed18f06b |
| properties | |
| security_groups | name=‘default’ |
| status | BUILD |
| updated | 2024-03-24T04:43:34Z |
| user_id | 55e4cf4eec0f48efa3ffa182046af847 |
±-------------------------------------±----------------------------------------------------------------+
两个虚拟机启动后,它们的状态将为 `ACTIVE` :
stack@devstack22:~/devstack$ openstack server list
±-------------------------------------±------±-------±-------------------------------------------------------±-------------------------±--------+
| ID | Name | Status | Networks | Image | Flavor |
±-------------------------------------±------±-------±-------------------------------------------------------±-------------------------±--------+
| 8a32e126-7f97-4e1a-9a06-059867643785 | test2 | ACTIVE | private=10.0.0.54, fd66:a9a:3259:0:f816:3eff:fe5e:4f23 | cirros-0.6.2-x86_64-disk | m1.nano |
| 88ea2c47-7fe9-460b-b98a-0e4ebf773c98 | test1 | ACTIVE | private=10.0.0.36, fd66:a9a:3259:0:f816:3eff:fe6f:4b92 | cirros-0.6.2-x86_64-disk | m1.nano |
±-------------------------------------±------±-------±-------------------------------------------------------±-------------------------±--------+
stack@devstack22:~/devstack$
#### 虚拟机连接
我们可以通过关联公共网络中的浮动 IP 地址来连接到我们的虚拟机。
stack@devstack22:~/devstack$ TEST1_PORT_ID= ( o p e n s t a c k p o r t l i s t − − s e r v e r t e s t 1 − c i d − f v a l u e ) s t a c k @ d e v s t a c k 22 : / d e v s t a c k (openstack port list --server test1 -c id -f value) stack@devstack22:~/devstack (openstackportlist−−servertest1−cid−fvalue)stack@devstack22: /devstack openstack floating ip create --port T E S T 1 _ P O R T _ I D p u b l i c + − − − − − − − − − − − − − − − − − − − − − + − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − + ∣ F i e l d ∣ V a l u e ∣ + − − − − − − − − − − − − − − − − − − − − − + − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − + ∣ c r e a t e d a t ∣ 2024 − 03 − 24 T 05 : 26 : 11 Z ∣ ∣ d e s c r i p t i o n ∣ ∣ ∣ d n s d o m a i n ∣ ∣ ∣ d n s n a m e ∣ ∣ ∣ f i x e d i p a d d r e s s ∣ 10.0.0.36 ∣ ∣ f l o a t i n g i p a d d r e s s ∣ 192.168.72.119 ∣ ∣ f l o a t i n g n e t w o r k i d ∣ 6211312 f − a b 8 e − 4346 − b c 58 − a e d 8 a 63 d 4 f 62 ∣ ∣ i d ∣ 8 b 830932 − 5 b 79 − 4445 − 8730 − 2143 e 1779 e 54 ∣ ∣ n a m e ∣ 192.168.72.119 ∣ ∣ p o r t d e t a i l s ∣ ′ n a m e ′ : ′ ′ , ′ n e t w o r k _ i d ′ : ′ 8 b 8 c d b 32 − c 009 − 49 e 1 − 88 d 4 − 3 d 58198 e 6 d 6 c ′ , ′ m a c _ a d d r e s s ′ : ′ f a : 16 : 3 e : 6 f : 4 b : 9 2 ′ , ′ a d m i n _ s t a t e _ u p ′ : T r u e , ′ s t a t u s ′ : ′ A C T I V E ′ , ′ d e v i c e _ i d ′ : ∣ ∣ ∣ ′ 88 e a 2 c 47 − 7 f e 9 − 460 b − b 98 a − 0 e 4 e b f 773 c 9 8 ′ , ′ d e v i c e _ o w n e r ′ : ′ c o m p u t e : n o v a ′ ∣ ∣ p o r t f o r w a r d i n g s ∣ [ ] ∣ ∣ p o r t i d ∣ 5 f c 6 a 820 − 8 b 4 e − 404 b − 899 d − b 57090708 e f d ∣ ∣ p r o j e c t i d ∣ 6525123 a 5 d 8 d 4 f 048 d 51 e d f 1 e d 18 f 06 b ∣ ∣ q o s p o l i c y i d ∣ N o n e ∣ ∣ r e v i s i o n n u m b e r ∣ 0 ∣ ∣ r o u t e r i d ∣ c 0 e 52 c 09 − 8791 − 4 a 4 e − 9 c 82 − 9 c d 40 d 27 a 65 e ∣ ∣ s t a t u s ∣ D O W N ∣ ∣ s u b n e t i d ∣ N o n e ∣ ∣ t a g s ∣ [ ] ∣ ∣ u p d a t e d a t ∣ 2024 − 03 − 24 T 05 : 26 : 11 Z ∣ + − − − − − − − − − − − − − − − − − − − − − + − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − + s t a c k @ d e v s t a c k 22 : / d e v s t a c k TEST1\_PORT\_ID public +---------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Field | Value | +---------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | created_at | 2024-03-24T05:26:11Z | | description | | | dns_domain | | | dns_name | | | fixed_ip_address | 10.0.0.36 | | floating_ip_address | 192.168.72.119 | | floating_network_id | 6211312f-ab8e-4346-bc58-aed8a63d4f62 | | id | 8b830932-5b79-4445-8730-2143e1779e54 | | name | 192.168.72.119 | | port_details | {'name': '', 'network\_id': '8b8cdb32-c009-49e1-88d4-3d58198e6d6c', 'mac\_address': 'fa:16:3e:6f:4b:92', 'admin\_state\_up': True, 'status': 'ACTIVE', 'device\_id': | | | '88ea2c47-7fe9-460b-b98a-0e4ebf773c98', 'device\_owner': 'compute:nova'} | | port_forwardings | [] | | port_id | 5fc6a820-8b4e-404b-899d-b57090708efd | | project_id | 6525123a5d8d4f048d51edf1ed18f06b | | qos_policy_id | None | | revision_number | 0 | | router_id | c0e52c09-8791-4a4e-9c82-9cd40d27a65e | | status | DOWN | | subnet_id | None | | tags | [] | | updated_at | 2024-03-24T05:26:11Z | +---------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ stack@devstack22:~/devstack TEST1_PORT_IDpublic+−−−−−−−−−−−−−−−−−−−−−+−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−+∣Field∣Value∣+−−−−−−−−−−−−−−−−−−−−−+−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−+∣createdat∣2024−03−24T05:26:11Z∣∣description∣∣∣dnsdomain∣∣∣dnsname∣∣∣fixedipaddress∣10.0.0.36∣∣floatingipaddress∣192.168.72.119∣∣floatingnetworkid∣6211312f−ab8e−4346−bc58−aed8a63d4f62∣∣id∣8b830932−5b79−4445−8730−2143e1779e54∣∣name∣192.168.72.119∣∣portdetails∣′name′:′′,′network_id′:′8b8cdb32−c009−49e1−88d4−3d58198e6d6c′,′mac_address′:′fa:16:3e:6f:4b:92′,′admin_state_up′:True,′status′:′ACTIVE′,′device_id′:∣∣∣′88ea2c47−7fe9−460b−b98a−0e4ebf773c98′,′device_owner′:′compute:nova′∣∣portforwardings∣[]∣∣portid∣5fc6a820−8b4e−404b−899d−b57090708efd∣∣projectid∣6525123a5d8d4f048d51edf1ed18f06b∣∣qospolicyid∣None∣∣revisionnumber∣0∣∣routerid∣c0e52c09−8791−4a4e−9c82−9cd40d27a65e∣∣status∣DOWN∣∣subnetid∣None∣∣tags∣[]∣∣updatedat∣2024−03−24T05:26:11Z∣+−−−−−−−−−−−−−−−−−−−−−+−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−+stack@devstack22: /devstack
现在应该能够通过其浮动 IP 地址连接到虚拟机。首先,ping 地址。
stack@devstack21:~/devstack$ ping 192.168.72.119 -c 3
PING 192.168.72.119 (192.168.72.119) 56(84) bytes of data.
64 bytes from 192.168.72.119: icmp_seq=1 ttl=128 time=2.43 ms
64 bytes from 192.168.72.119: icmp_seq=2 ttl=128 time=1.75 ms
64 bytes from 192.168.72.119: icmp_seq=3 ttl=128 time=1.03 ms
— 192.168.72.119 ping statistics —
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 1.031/1.735/2.425/0.569 ms
stack@devstack21:~/devstack$
现在通过 SSH 连接到虚拟机:
stack@devstack21:~/devstack$ ssh -i id_rsa_demo cirros@192.168.72.119 hostname
test1
stack@devstack21:~/devstack$
#### 登录dashboard
切换到demo项目,查看虚拟机管理器
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/4122b1b873db0c3d53c9abd36c43d339.png)
查看test1实例位于devstack22节点上
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/dd11b3c001aa9a0bf3bbcd424256c559.png)
查看test2实例位于devstack21节点上
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/75c16347dd475dfdf39202eb629ef356.png)
**网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。**
**[需要这份系统化的资料的朋友,可以点击这里获取!](https://bbs.csdn.net/topics/618635766)**
**一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!**
3 ms
--- 192.168.72.119 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 1.031/1.735/2.425/0.569 ms
stack@devstack21:~/devstack$
现在通过 SSH 连接到虚拟机:
stack@devstack21:~/devstack$ ssh -i id_rsa_demo cirros@192.168.72.119 hostname
test1
stack@devstack21:~/devstack$
登录dashboard
切换到demo项目,查看虚拟机管理器
查看test1实例位于devstack22节点上
查看test2实例位于devstack21节点上
网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。
一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!
更多推荐
所有评论(0)