IAAS基于开源openstack框架搭建云计算平台和各组件基础搭建内容包括mysql、keyston、Glance、Nova、Neutron、Dashboard、Heat、Trove等
1.根据平台安装步骤安装至数据库服务,使用一条命令安装提供的iaas-install-mysql.sh 脚本并查看脚本运行的时间,把命令和最后输出的时间信息提交到答题框。[root@controller ~]# time /usr/local/bin/xiandian-install-mysql.shreal0m41.158suser0m19.469ssys...
1.根据平台安装步骤安装至数据库服务,使用一条命令安装提供的
iaas-install-mysql.sh 脚本并查看脚本运行的时间,把命令和最后输出的时间信息
提交到答题框。
[root@controller ~]# time /usr/local/bin/xiandian-install-mysql.sh
real 0m41.158s
user 0m19.469s
sys 0m3.353s
[root@controller ~]#
2…使用 root 用户登录数据库,查询数据库列表信息,并提交操作命令和输出
结果以文本形式提交到答题框。
[root@controller ~]# mysql -uroot -p
Enter password:
MariaDB [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
+--------------------+
3 rows in set (0.01 sec)
3.使用 root 用户登录数据库,使用 mysql 数据库,查询所有表的信息,并提
交操作命令和输出结果以文本形式提交到答题框。
[root@controller ~]# mysql -uroot –p000000
MariaDB [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
+--------------------+
3 rows in set (0.00 sec)
MariaDB [(none)]> use mysql;
MariaDB [mysql]> show tables;
+---------------------------+
| Tables_in_mysql |
+---------------------------+
| column_stats |
| columns_priv |
| db |
| event |
| func |
| general_log |
| gtid_slave_pos |
| help_category |
| help_keyword |
| help_relation |
| help_topic |
| host |
| index_stats |
| innodb_index_stats |
| innodb_table_stats |
| plugin |
| proc |
| procs_priv |
| proxies_priv |
| roles_mapping |
| servers |
| slow_log |
| table_stats |
| tables_priv |
| time_zone |
| time_zone_leap_second |
| time_zone_name |
| time_zone_transition |
| time_zone_transition_type |
| user |
+---------------------------+
30 rows in set (0.00 sec)
4.使用 root 用户登录数据库,使用 mysql 数据库,查询所有表的信息,并查
询表 user 中的 host,user,paassword 信息,提交操作命令和输出结果以文本形
式提交到答题框
MariaDB [(none)]> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
MariaDB [mysql]>
MariaDB [mysql]> select host,user,password from user;
+------------+----------+-------------------------------------------+
| host | user | password |
+------------+----------+-------------------------------------------+
| localhost | root | *032197AE5731D4664921A6CCAC7CFCE6A0698693 |
| controller | root | *032197AE5731D4664921A6CCAC7CFCE6A0698693 |
| 127.0.0.1 | root | *032197AE5731D4664921A6CCAC7CFCE6A0698693 |
| ::1 | root | *032197AE5731D4664921A6CCAC7CFCE6A0698693 |
| localhost | keystone | *032197AE5731D4664921A6CCAC7CFCE6A0698693 |
| % | keystone | *032197AE5731D4664921A6CCAC7CFCE6A0698693 |
| localhost | glance | *032197AE5731D4664921A6CCAC7CFCE6A0698693 |
| % | glance | *032197AE5731D4664921A6CCAC7CFCE6A0698693 |
| localhost | nova | *032197AE5731D4664921A6CCAC7CFCE6A0698693 |
| % | nova | *032197AE5731D4664921A6CCAC7CFCE6A0698693 |
| localhost | neutron | *032197AE5731D4664921A6CCAC7CFCE6A0698693 |
| % | neutron | *032197AE5731D4664921A6CCAC7CFCE6A0698693 |
| localhost | cinder | *032197AE5731D4664921A6CCAC7CFCE6A0698693 |
| % | cinder | *032197AE5731D4664921A6CCAC7CFCE6A0698693 |
| localhost | trove | *032197AE5731D4664921A6CCAC7CFCE6A0698693 |
| % | trove | *032197AE5731D4664921A6CCAC7CFCE6A0698693 |
| localhost | heat | *032197AE5731D4664921A6CCAC7CFCE6A0698693 |
| % | heat | *032197AE5731D4664921A6CCAC7CFCE6A0698693 |
| localhost | aodh | *032197AE5731D4664921A6CCAC7CFCE6A0698693 |
| % | aodh | *032197AE5731D4664921A6CCAC7CFCE6A0698693 |
+------------+----------+-------------------------------------------+
20 rows in set (0.00 sec)
MariaDB [mysql]>
1.按要求安装完 keystone 脚本后,在数据库中查询 keystone 用户的远程访问
权限信息,将操作命令和返回结果以文本形式提交到答题框。
[root@controller bin]# iaas-install-keystone.sh
MariaDB [mysql]> use keystone
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
MariaDB [keystone]> show grants for 'keystone'@'%';
+---------------------------------------------------------------------------------------------------------+
| Grants for keystone@% |
+---------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'keystone'@'%' IDENTIFIED BY PASSWORD '*032197AE5731D4664921A6CCAC7CFCE6A0698693' |
| GRANT ALL PRIVILEGES ON `keystone`.* TO 'keystone'@'%' |
+---------------------------------------------------------------------------------------------------------+
2 rows in set (0.01 sec)
2.列出数据库 keystone 中的所有表,将操作命令和返回结果以文本形式提交
到答题框。
MariaDB [keystone]> show tables;
+------------------------+
| Tables_in_keystone |
+------------------------+
| access_token |
| assignment |
| config_register |
| consumer |
| credential |
| domain |
| endpoint |
| endpoint_group |
| federated_user |
| federation_protocol |
| group |
| id_mapping |
| identity_provider |
| idp_remote_ids |
| implied_role |
| local_user |
| mapping |
| migrate_version |
| password |
| policy |
| policy_association |
| project |
| project_endpoint |
| project_endpoint_group |
| region |
| request_token |
| revocation_event |
| role |
| sensitive_config |
| service |
| service_provider |
| token |
| trust |
| trust_role |
| user |
| user_group_membership |
| whitelisted_config |
+------------------------+
37 rows in set (0.00 sec)
3.使用 openstack 相关命令,查询角色列表信息,将操作命令和返回结果以
文本形式提交到答题框。
[root@controller ~]# openstack role list
+----------------------------------+------------------+
| ID | Name |
+----------------------------------+------------------+
| 1679c1badc5c4e768177748b0414c263 | admin |
| 54489f0161f54103bd98a9b2c83b244e | heat_stack_user |
| 7a529b7b3819494684ecc51e0faabcd7 | ResellerAdmin |
| 7edfa6301b5e4d78a8af33847114cd36 | heat_stack_owner |
| 8e125efaff5a4ab8813193b90cdaba64 | user |
+----------------------------------+------------------+
4.使用 openstack 相关命令,查询 admin 项目信息,将操作命令和返回结果 以文本形式提交到答题框。
[root@controller ~]# openstack project list
+----------------------------------+---------+
| ID | Name |
+----------------------------------+---------+
| 8b42e4168d4b488781f2b75e4740edef | demo |
| b829d85a7b9f47ed8919c0edcea35ca2 | admin |
| d4b795086a4c498086c7ae3a4518ae60 | service |
+----------------------------------+---------+
[root@controller ~]# openstack project show admin
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | Admin Project |
| domain_id | 5d5f367f551049eabb52bb3c19ffd25c |
| enabled | True |
| id | d1d35ea03fc04a49884980dc3ffe5083 |
| is_domain | False |
| name | admin |
| parent_id | 5d5f367f551049eabb52bb3c19ffd25c |
+-------------+----------------------------------+
5.使用 openstack 相关命令,查询用户列表信息,将操作命令和返回结果以 文本形式提交到答题框。
[root@controller ~]# openstack user list
+----------------------------------+-------+
| ID | Name |
+----------------------------------+-------+
| 3939908348e74480b209dfc9806309f6 | demo |
| d734fe7585934cf387bcb66deb897af1 | admin |
+----------------------------------+-------+
6.使用 openstack 相关命令,查询 admin 用户详细信息,将操作命令和返回 结果以文本形式提交到答题框
[root@controller ~]# openstack user show admin
+-----------+----------------------------------+
| Field | Value |
+-----------+----------------------------------+
| domain_id | 5d5f367f551049eabb52bb3c19ffd25c |
| enabled | True |
| id | d734fe7585934cf387bcb66deb897af1 |
| name | admin |
+-----------+----------------------------------+
7.使用 openstack 相关命令,查询服务列表信息,将操作命令和返回结果以 文本形式提交到答题框。
[root@controller ~]# openstack service list
+----------------------------------+----------+----------+
| ID | Name | Type |
+----------------------------------+----------+----------+
| 775606ace436436cb2b59a8694bc17cd | keystone | identity |
+----------------
8.使用一条命令将 keystone 的数据库导出为当前路径下的 keystone.sql 文件, 并使用命令查询文件 keystone.sql 的大小,将操作命令和返回结果以文本形式提 交到答题框
[root@controller ~]# mysqldump -uroot -p000000 keystone > keystone.sql
[root@controller ~]# du -h keystone.sql
36K keystone.sql
2.使用 glance 相关命令查询 glance 镜像列表,并查询 CentOS7.2 镜像的详 细信息,将操作命令和返回结果提交到答题框。
[root@controller images]# glance image-list
+--------------------------------------+-----------+
| ID | Name |
+--------------------------------------+-----------+
| 6e1e8ce1-4776-4829-86c1-56f8cf5bffcc | CentOS7.2 |
+--------------------------------------+-----------+
[root@controller images]# glance image-show 6e1e8ce1-4776-4829-86c1-56f8cf5bffcc
+------------------+--------------------------------------+
| Property | Value |
+------------------+--------------------------------------+
| checksum | ea197f4c679b8e1ce34c0aa70ae2a94a |
| container_format | bare |
| created_at | 2018-10-15T17:26:15Z |
| disk_format | qcow2 |
| id | 6e1e8ce1-4776-4829-86c1-56f8cf5bffcc |
| min_disk | 0 |
| min_ram | 0 |
| name | CentOS7.2 |
| owner | d1d35ea03fc04a49884980dc3ffe5083 |
| protected | False |
| size | 400752640 |
| status | active |
| tags | [] |
| updated_at | 2018-10-15T17:26:19Z |
| virtual_size | None |
| visibility | private |
+------------------+--------------------------------------+
3.使用 systemctl 相关命令,在一条命令中查询 glance 组件中所有服务的状 态信息,将操作命令和返回结果以文本形式提交到答题框.
[root@controller /]# systemctl status openstack-glance*
â— openstack-glance-registry.service - OpenStack Image Service (code-named Glance) Registry server
Loaded: loaded (/usr/lib/systemd/system/openstack-glance-registry.service; enabled; vendor preset: disabled)
Active: active (running) since Mon 2018-10-15 13:18:00 EDT; 1h 10min ago
Main PID: 5119 (glance-registry)
CGroup: /system.slice/openstack-glance-registry.service
├─5119 /usr/bin/python2 /usr/bin/glance-registr...
├─5138 /usr/bin/python2 /usr/bin/glance-registr...
└─5139 /usr/bin/python2 /usr/bin/glance-registr...
Oct 15 13:18:01 controller glance-registry[5119]: /usr/lib...
Oct 15 13:18:01 controller glance-registry[5119]: return p...
Oct 15 13:18:01 controller glance-registry[5119]: /usr/lib...
Oct 15 13:18:01 controller glance-registry[5119]: return p...
Oct 15 13:18:01 controller glance-registry[5119]: /usr/lib...
Oct 15 13:18:01 controller glance-registry[5119]: return p...
Oct 15 13:18:01 controller glance-registry[5119]: /usr/lib...
Oct 15 13:18:01 controller glance-registry[5119]: return p...
Oct 15 13:18:01 controller glance-registry[5119]: /usr/lib...
Oct 15 13:18:01 controller glance-registry[5119]: return p...
â— openstack-glance-api.service - OpenStack Image Service (code-named Glance) API server
Loaded: loaded (/usr/lib/systemd/system/openstack-glance-api.service; enabled; vendor preset: disabled)
Active: active (running) since Mon 2018-10-15 13:18:00 EDT; 1h 10min ago
Main PID: 5118 (glance-api)
CGroup: /system.slice/openstack-glance-api.service
├─5118 /usr/bin/python2 /usr/bin/glance-api
├─5140 /usr/bin/python2 /usr/bin/glance-api
└─5141 /usr/bin/python2 /usr/bin/glance-api
Oct 15 13:18:01 controller glance-api[5118]: /usr/lib/pyth...
Oct 15 13:18:01 controller glance-api[5118]: return pkg_re...
Oct 15 13:26:15 controller glance-api[5118]: /usr/lib/pyth...
Oct 15 13:26:15 controller glance-api[5118]: expire_on_com...
Oct 15 13:26:19 controller glance-api[5118]: /usr/lib/pyth...
Oct 15 13:26:19 controller glance-api[5118]: self._verify_...
Oct 15 13:26:19 controller glance-api[5118]: /usr/lib/pyth...
Oct 15 13:26:19 controller glance-api[5118]: self.image.ex...
Oct 15 13:35:54 controller glance-api[5118]: /usr/lib/pyth...
Oct 15 13:35:54 controller glance-api[5118]: expire_on_com...
Hint: Some lines were ellipsized, use -l to show in full.
[root@controller /]#
1.根据平台安装步骤安装至 nova 计算服务,在控制节点使用提供的脚本 iaas-install-nova-controller.sh、在计算节点使用提供的脚本iaas-install-nova-compute.sh,安装 nova 组件
[root@controller /]# iaas-install-nova-controller.sh
[root@compute ~]# iaas-install-nova-compute.sh
2.使用 nova 相关命令查询计算节点虚拟机监控器的状态,将操作命令和返 回结果以文本形式提交到答题框。
[root@controller ~]# nova hypervisor-stats
+----------------------+-------+
| Property | Value |
+----------------------+-------+
| count | 2 |
| current_workload | 0 |
| disk_available_least | 1895 |
| free_disk_gb | 1819 |
| free_ram_mb | 22202 |
| local_gb | 2048 |
| local_gb_used | 280 |
| memory_mb | 47802 |
| memory_mb_used | 25600 |
| running_vms | 4 |
| vcpus | 24 |
| vcpus_used | 12 |
+----------------------+-------+
3.使用 nova 相关命令查询 nova 服务状态列表,将操作命令和返回结果以文 本形式提交到答题框
[root@controller /]# nova service-list
+----+------------------+------------+----------+---------+-------+----------------------------+-----------------+
| Id | Binary | Host | Zone | Status | State | Updated_at | Disabled Reason |
+----+------------------+------------+----------+---------+-------+----------------------------+-----------------+
| 1 | nova-conductor | controller | internal | enabled | up | 2018-10-15T18:58:30.000000 | - |
| 2 | nova-consoleauth | controller | internal | enabled | up | 2018-10-15T18:58:31.000000 | - |
| 3 | nova-scheduler | controller | internal | enabled | up | 2018-10-15T18:58:31.000000 | - |
| 7 | nova-compute | compute | nova | enabled | up | 2018-10-15T18:58:31.000000 | - |
+----+------------------+------------+----------+---------+-------+----------------------------+-----------------+
4.使用 nova 相关命令查询网络的列表信息,将操作命令和返回结果以文本 形式提交到答题框。
[root@controller ~]# nova tenant-network-list
+--------------------------------------+-------+------+
| ID | Label | CIDR |
+--------------------------------------+-------+------+
| 6e051639-445e-4d36-852f-5e5c82b642ee | ext | None |
| bccc7871-2c25-4f36-9822-7e4b7c62a39b | int | None |
+--------------------------------------+-------+------+
[root@controller ~]#
5.使用 nova 相关命令查询 nova 资源使用情况的信息,将操作命令和返回结 果以文本形式提交到答题框
[root@controller ~]# nova usage-list
Usage from 2018-10-27 to 2018-11-25:
+----------------------------------+---------+--------------+-----------+---------------+
| Tenant ID | Servers | RAM MB-Hours | CPU Hours | Disk GB-Hours |
+----------------------------------+---------+--------------+-----------+---------------+
| 5e137fad79104537bfe1c07aeca294e4 | 2 | 425638.71 | 207.83 | 4156.63 |
+----------------------------------+---------+--------------+-----------+---------------+
>=======================Neutron 搭建:========================
- 根据平台安装步骤安装至 neutron 网络服务,在控制节点和计算节点通过 提供的 neutron 脚本,完成 neutron 服务在控制节点和计算节点的安装,并配置 为 GRE 网络。
[root@controller bin]# iaas-install-neutron-controller.sh
[root@compute bin]# iaas-install-neutron-compute.sh
[root@controller bin]# iaas-install-neutron-controller-gre.sh
[root@compute bin]# iaas-install-neutron-compute-gre.sh
- 根据平台安装步骤安装至 neutron 网络服务,在控制节点和计算节点通过 提供的 neutron 脚本,完成 neutron 服务在控制节点和计算节点的安装,并配置 为 VLAN 网络
[root@controller bin]# iaas-install-neutron-controller.sh
[root@compute bin]# iaas-install-neutron-compute.sh
[root@controller bin]# iaas-install-neutron-controller-vlan.sh
[root@compute bin]# iaas-install-neutron-compute-vlan.sh
3.使用 neutron 相关命令查询网络服务的列表信息,并以下图的形式打印出 来,将操作命令和返回结果以文本形式提交到答题框
[root@controller html]# neutron agent-list | cut -d"|" -f3,8,6
+--------------------------------------+--------------------+------------+-------------------+-------+----------------+---------------------------+
agent_type | alive | binary
+--------------------------------------+--------------------+------------+-------------------+-------+----------------+---------------------------+
DHCP agent | :-) | neutron-dhcp-agent
Open vSwitch agent | :-) | neutron-openvswitch-agent
Metadata agent | :-) | neutron-metadata-agent
Open vSwitch agent | :-) | neutron-openvswitch-agent
Loadbalancer agent | :-) | neutron-lbaas-agent
Metadata agent | :-) | neutron-metadata-agent
L3 agent | :-) | neutron-l3-agent
4 使用 neutron 相关命令查询网络服务的列表信息中的“binary”一列,将操作 命令和返回结果以文本形式提交到答题框
5.使用 neutron 相关命令查询网络服务 DHCP agent 的详细信息,将操作命令和返回结果以文本形式提交到答题框。
6.使用 ovs-vswitchd 管理工具的相关命令查询计算节点的网桥列表信息,将 操作命令和返回结果以文本形式提交到答题框。
root@controller ~]# ovs-vsctl list bridge
_uuid : 58d22c2d-3a58-46bb-9033-59dd2ecfe34e
auto_attach : []
controller : []
datapath_id : "00002e2cd258bb46"
datapath_type : system
datapath_version : "<unknown>"
external_ids : {}
fail_mode : secure
flood_vlans : []
flow_tables : {}
ipfix : []
mcast_snooping_enable: false
mirrors : []
name : br-tun
netflow : []
other_config : {}
ports : [5d7874b2-f66c-48c9-bfc9-adc729b6383a, adb35b53-9f33-4a97-9dda-f42c373da9ea, bf795c5e-6f3d-4d13-9744-bda58b854573]
protocols : ["OpenFlow10"]
rstp_enable : false
rstp_status : {}
sflow : []
status : {}
stp_enable : false
_uuid : 29358669-f1da-488e-b36f-7d8a3fd171f2
auto_attach : []
controller : []
datapath_id : "0000002590a99e21"
datapath_type : system
datapath_version : "<unknown>"
external_ids : {}
fail_mode : []
flood_vlans : []
flow_tables : {}
ipfix : []
mcast_snooping_enable: false
mirrors : []
name : br-ex
netflow : []
other_config : {}
ports : [15a287fd-3464-4582-9c09-5a02231a21f2, 2335b3e3-f3eb-4c98-ae53-e184765a0887, 5f8509da-3e60-4208-9bb6-109d99a6c31e, 9cc64996-f027-45de-ba65-f3f12e32c92a]
protocols : ["OpenFlow10"]
rstp_enable : false
rstp_status : {}
sflow : []
status : {}
stp_enable : false
_uuid : 6f625647-458a-490a-ae83-adb72a94b70f
auto_attach : []
controller : []
datapath_id : "00004656626f0a49"
datapath_type : system
datapath_version : "<unknown>"
external_ids : {}
fail_mode : secure
flood_vlans : []
flow_tables : {}
ipfix : []
mcast_snooping_enable: false
mirrors : []
name : br-int
netflow : []
other_config : {}
ports : [4b714a73-80ff-44ad-a5da-391c7762f3f5, 50ba4d65-ca88-4b47-94aa-de86e04e9380, 7e53277c-9fc7-412a-bde0-0a5b633f8552, 9c43ddc8-a68d-49b0-8bf2-fd33b096616f, c31e9a28-eef3-4b88-a425-74c1c977912b, fa83e8d6-7111-49d1-8dad-0e037049931b, fbb74652-6b88-4574-af50-39f574ac67be]
protocols : ["OpenFlow10"]
rstp_enable : false
rstp_status : {}
sflow : []
status : {}
stp_enable : false
[root@controller ~]#
7.使用 ovs-vswitchd 管理工具的相关命令查询控制节点的网桥 br-ex 的端口 列表信息,将操作命令和返回结果以文本形式提交到答题框。
[root@controller /]# ovs-vsctl list-ports br-ex
enp0s8
phy-br-ex
qg-f61345f8-2a
8.创建云主机外部网络 ext-net,子网为 ext-subnet,云主机浮动 IP 可用网段 为 192.168.200.100 ~ 192.168.200.200,网关为 192.168.200.1。创建云主机内部网 络 int-net1,子网为 int-subnet1,云主机子网 IP 可用网段为 10.0.0.100 ~ 10.0.0.200, 网关为 10.0.0.1;创建云主机内部网络 int-net2,子网为 int-subnet2,云主机子网 IP 可用网段为 10.0.1.100 ~ 10.0.1.200,网关为 10.0.1.1。添加名为 ext-router 的路 由器,添加网关在 ext-net 网络,添加内部端口到 int-net1 网络,完成内部网络 int-net1 和外部网络的连通。
[root@controller /]# neutron net-create --router:external=true ext-net
Created a new network:
+---------------------------+---------------------------+
| Field | Value |
+---------------------------+---------------------------+
| admin_state_up | True |
| availability_zone_hints | |
| availability_zones | |
| created_at | 2018-10-25T09:14:54 |
| description | |
| id | b4d22aa2-3bb4-4032-b19e- |
| | 8e5ce9f964d7 |
| ipv4_address_scope | |
| ipv6_address_scope | |
| is_default | False |
| mtu | 1458 |
| name | ext-net |
| port_security_enabled | True |
| provider:network_type | gre |
| provider:physical_network | |
| provider:segmentation_id | 29 |
| router:external | True |
| shared | False |
| status | ACTIVE |
| subnets | |
| tags | |
| tenant_id | 104bfea725504210919af3d3a |
| | 6633fbb |
| updated_at | 2018-10-25T09:14:54 |
+---------------------------+---------------------------+
[root@controller /]# neutron subnet-create --name ext-subnet --allocation-pool start=192.168.200.100,end=192.168.200.200 --gateway 192.168.200.1 --enable-dhcp --ip-version 4 ext-net 192.168.200.0/24
Created a new subnet:
+-------------------+--------------------------------------------------------+
| Field | Value |
+-------------------+--------------------------------------------------------+
| allocation_pools | {"start": "192.168.200.100", "end": "192.168.200.200"} |
| cidr | 192.168.200.0/24 |
| created_at | 2018-10-25T09:25:25 |
| description | |
| dns_nameservers | |
| enable_dhcp | True |
| gateway_ip | 192.168.200.1 |
| host_routes | |
| id | a94ae69a-6907-4e19-a7dc-c22fd4252a1e |
| ip_version | 4 |
| ipv6_address_mode | |
| ipv6_ra_mode | |
| name | ext-subnet |
| network_id | b4d22aa2-3bb4-4032-b19e-8e5ce9f964d7 |
| subnetpool_id | |
| tenant_id | 104bfea725504210919af3d3a6633fbb |
| updated_at | 2018-10-25T09:25:25 |
+-------------------+--------------------------------------------------------+
[root@controller /]# neutron subnet-create --name int-subnet1 --allocation-pool start=10.0.0.100,end=10.0.0.200 --gateway 10.0.0.1 --ip-version 4 int-net1 10.0.0.0/24
Created a new subnet:
+-------------------+----------------------------------------------+
| Field | Value |
+-------------------+----------------------------------------------+
| allocation_pools | {"start": "10.0.0.100", "end": "10.0.0.200"} |
| cidr | 10.0.0.0/24 |
| created_at | 2018-10-25T09:47:15 |
| description | |
| dns_nameservers | |
| enable_dhcp | True |
| gateway_ip | 10.0.0.1 |
| host_routes | |
| id | 1b3fd942-2074-4087-acd0-f20e72ba6f70 |
| ip_version | 4 |
| ipv6_address_mode | |
| ipv6_ra_mode | |
| name | int-subnet1 |
| network_id | eb1642c5-1616-4ba9-b463-be3cc0b2941f |
| subnetpool_id | |
| tenant_id | 104bfea725504210919af3d3a6633fbb |
| updated_at | 2018-10-25T09:47:15 |
+-------------------+----------------------------------------------+
[root@controller /]# neutron net-create int-net2
Created a new network:
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| admin_state_up | True |
| availability_zone_hints | |
| availability_zones | |
| created_at | 2018-10-25T09:48:43 |
| description | |
| id | 572cdb98-c4a9-4be0-ac6a-301e034a1fcb |
| ipv4_address_scope | |
| ipv6_address_scope | |
| mtu | 1458 |
| name | int-net2 |
| port_security_enabled | True |
| provider:network_type | gre |
| provider:physical_network | |
| provider:segmentation_id | 91 |
| router:external | False |
| shared | False |
| status | ACTIVE |
| subnets | |
| tags | |
| tenant_id | 104bfea725504210919af3d3a6633fbb |
| updated_at | 2018-10-25T09:48:43 |
+---------------------------+--------------------------------------+
[root@controller /]# neutron subnet-create --name int-subnet2 --allocation-pool start=10.0.1.100,end=10.0.1.200 --gateway 10.0.1.1 --ip-version 4 int-net2 10.0.1.0/24
Created a new subnet:
+-------------------+----------------------------------------------+
| Field | Value |
+-------------------+----------------------------------------------+
| allocation_pools | {"start": "10.0.1.100", "end": "10.0.1.200"} |
| cidr | 10.0.1.0/24 |
| created_at | 2018-10-25T09:52:42 |
| description | |
| dns_nameservers | |
| enable_dhcp | True |
| gateway_ip | 10.0.1.1 |
| host_routes | |
| id | b735fc77-f389-4665-bb3d-5932546f62bb |
| ip_version | 4 |
| ipv6_address_mode | |
| ipv6_ra_mode | |
| name | int-subnet2 |
| network_id | 572cdb98-c4a9-4be0-ac6a-301e034a1fcb |
| subnetpool_id | |
| tenant_id | 104bfea725504210919af3d3a6633fbb |
| updated_at | 2018-10-25T09:52:42 |
+-------------------+----------------------------------------------+
[root@controller /]# neutron router-create ext-router
Created a new router:
+-------------------------+--------------------------------------+
| Field | Value |
+-------------------------+--------------------------------------+
| admin_state_up | True |
| availability_zone_hints | |
| availability_zones | |
| description | |
| distributed | False |
| external_gateway_info | |
| ha | False |
| id | fbfb7792-85ab-48b7-badd-d135c741f2a0 |
| name | ext-router |
| routes | |
| status | ACTIVE |
| tenant_id | 104bfea725504210919af3d3a6633fbb |
+-------------------------+--------------------------------------+
[root@controller /]# neutron router-gateway-set fbfb7792-85ab-48b7-badd-d135c741f2a0 b4d22aa2-3bb4-4032-b19e-8e5ce9f964d7
Set gateway for router fbfb7792-85ab-48b7-badd-d135c741f2a0
[root@controller /]# neutron router-interface-add fbfb7792-85ab-48b7-badd-d135c741f2a0 1b3fd942-2074-4087-acd0-f20e72ba6f70
Added interface f699e9a1-4bcc-4122-8059-0348a0377009 to router fbfb7792-85ab-48b7-badd-d135c741f2a0.
10.使用 neutron 相关命令查询所创建子网的列表信息,并查看内网子网的详 细信息,将操作命令和返回结果以文本形式提交到答题框。
11.使用 neutron 相关命令查询所创建网络的列表信息,将操作命令和返回结 果以文本形式提交到答题框。
=================== Dashboard 搭建:=========================
1.通过脚本 iaas-install-dashboard.sh 安装 dashboard 组件,使用 curl 命令查询 网址 http://192.168.100.10/dashboard 并将查询结果以文本形式提交到答题框。
[root@controller ~]# iaas-install-dashboard.sh
[root@controller ~]# curl -L http://192.168.100.10/dashboard
2.通过脚本 iaas-install-dashboard.sh 安装 dashboard 组件,通过 chrome 浏览器使用 admin 账号登录云平台网页,进入管理员菜单中的系统信息页面,将该网 页的网址以及网页源代码完整内容以文本形式提交到答题框。
http://192.168.1.11/dashboard/admin/info/
1.在控制节点使用提供的脚本 iaas-install-heat.sh 安装 heat 组件。
[root@controller ~]# iaas-install-heat.sh
4.查询栈 mystack 状态为 CREATE_COMPLETE 的事件详细信息,将操作命 令和返回结果以文本形式提交到答题框。
[root@controller ~]# heat stack-list
[root@controller ~]# heat event-list
[root@controller ~]# heat event-show
5.查询栈 mystack 的事件列表信息,将操作命令和返回结果以文本形式提交 到答题框。
[root@controller ~]# heat stack-list
[root@controller ~]# heat event-list mystack
>========================Trove搭建=========================
1.在控制节点配置提供的脚本 iaas-install-trove.sh,使其连接的网络为 int-net1,安装数据库 trove 服务,完成 trove 服务在控制节点的安装。完成后查 询所有的数据库实例列表,将操作命令和返回结果以文本形式提交到答题框。
[root@controller ~]# iaas-install-trove.sh
2.在控制节点上传提供的 MySQL_5.6_XD.qcow2 到系统内,并创建 mysql 的数据库存储类型,使用上传的镜像更新该数据库类型的版本信息和镜像信息, 将操作命令和返回结果以文本形式提交到答题框。
[root@controller ~]# trove-manage datastore_update mysql ''
[root@controller ~]# glance_id=$(glance image-list | awk '/ mysql-5.6 / { print $2 }')
[root@controller ~]# trove-manage datastore_version_update mysql mysql-5.6 mysql ${glance_id} '' 1
- 3.在控制节点查创建名称为 mysql-1,大小为 5G,数据库名称为 myDB、远 程连接用户为 user,密码为 r00tme,类型为 m1.small 完成后查询 trove 列表信息, 并查询 mysql-1 的详细信息,将操作命令和返回结果以文本形式提交到答题框。
[root@controller ~]# FLAVOR_ID=$(openstack flavor list | awk '/ m1.small / { print $2 }')
[root@controller ~]# trove create mysql-1 ${FLAVOR_ID} --size 5 --databases myDB --users user:r00tme --datastore_version mysql-5.6 --datastore mysql
[root@controller ~]# trove list
4.在控制节点查询所有数据的版本信息,完成后查询 mysql 数据库的详细信 息,将操作命令和返回结果以文本形式提交到答题框。
[root@controller ~]# trove datastore-list
+--------------------------------------+-------+
| ID | Name |
+--------------------------------------+-------+
| dbe24941-1a61-43fd-a374-78d69c795e5e | mysql |
+--------------------------------------+-------+
[root@controller ~]# trove datastore-version-list mysql
+--------------------------------------+-----------+
| ID | Name |
+--------------------------------------+-----------+
| f50dbdb9-1041-4716-a737-ce12cc747807 | mysql-5.6 |
+--------------------------------------+-----------+
[root@controller ~]# trove datastore-version-show f50dbdb9-1041-4716-a737-ce12cc747807
+-----------+--------------------------------------+
| Property | Value |
+-----------+--------------------------------------+
| active | True |
| datastore | dbe24941-1a61-43fd-a374-78d69c795e5e |
| id | f50dbdb9-1041-4716-a737-ce12cc747807 |
| image | 50bffebd-63a5-4cc3-b76d-990ba6c0454f |
| name | mysql-5.6 |
| packages | |
+-----------+--------------------------------------+
更多推荐
所有评论(0)