adfasdf

配置控制节点

创建数据库
[[email protected] ~]# mysql -e "CREATE DATABASE neutron;"

授权用户
[[email protected] ~]# mysql -e "GRANT ALL PRIVILEGES ON neutron.* TO ‘neutron‘@‘localhost‘ IDENTIFIED BY ‘neutron‘;"
[[email protected] ~]# mysql -e "GRANT ALL PRIVILEGES ON neutron.* TO ‘neutron‘@‘%‘ IDENTIFIED BY ‘neutron‘;"

生效管理配置
[[email protected] ~]# source admin-openrc

在keystone当中创建一个用户 neutron
[[email protected] ~]# openstack user create --domain default neutron --password neutron
+-----------+----------------------------------+
| Field     | Value                            |
+-----------+----------------------------------+
| domain_id | 9a6c10205dba4952b1276b450c0a6c04 |
| enabled   | True                             |
| id        | f0a9e9b5eb5b402a9cf94ba113c82797 |
| name      | neutron                          |
+-----------+----------------------------------+

将neutron用户加入管理员组
[[email protected] ~]# openstack role add --project service --user neutron admin

创建一个网络服务
[[email protected] ~]# openstack service create --name neutron --description "OpenStack Networking" network
+-------------+----------------------------------+
| Field       | Value                            |
+-------------+----------------------------------+
| description | OpenStack Networking             |
| enabled     | True                             |
| id          | 184796ed39de4f06ada1a2b59b634259 |
| name        | neutron                          |
| type        | network                          |
+-------------+----------------------------------+

创建服务访问接口
[[email protected] ~]# openstack endpoint create --region RegionOne network public http://controller:9696
+--------------+----------------------------------+
| Field        | Value                            |
+--------------+----------------------------------+
| enabled      | True                             |
| id           | 76c6ef2dbe204f098c211ac16e6c6385 |
| interface    | public                           |
| region       | RegionOne                        |
| region_id    | RegionOne                        |
| service_id   | 184796ed39de4f06ada1a2b59b634259 |
| service_name | neutron                          |
| service_type | network                          |
| url          | http://controller:9696           |
+--------------+----------------------------------+
[[email protected] ~]# openstack endpoint create --region RegionOne network internal http://controller:9696
+--------------+----------------------------------+
| Field        | Value                            |
+--------------+----------------------------------+
| enabled      | True                             |
| id           | 78f0a254496143a68a730104fa290ebd |
| interface    | internal                         |
| region       | RegionOne                        |
| region_id    | RegionOne                        |
| service_id   | 184796ed39de4f06ada1a2b59b634259 |
| service_name | neutron                          |
| service_type | network                          |
| url          | http://controller:9696           |
+--------------+----------------------------------+
[[email protected] ~]# openstack endpoint create --region RegionOne network admin http://controller:9696
+--------------+----------------------------------+
| Field        | Value                            |
+--------------+----------------------------------+
| enabled      | True                             |
| id           | 7f35f435fd8b41448d4dc080b13466bc |
| interface    | admin                            |
| region       | RegionOne                        |
| region_id    | RegionOne                        |
| service_id   | 184796ed39de4f06ada1a2b59b634259 |
| service_name | neutron                          |
| service_type | network                          |
| url          | http://controller:9696           |
+--------------+----------------------------------+

[网络组件]

安装网络组件
[[email protected] ~]# yum install openstack-neutron openstack-neutron-ml2 openstack-neutron-linuxbridge ebtables openstack-utils -y

配置 /etc/neutron/neutron.conf 文件

#数据库配置
openstack-config --set /etc/neutron/neutron.conf database connection mysql+pymysql://neutron:[email protected]/neutron
grep "^connection" /etc/neutron/neutron.conf

#DEFAULT配置
openstack-config --set /etc/neutron/neutron.conf DEFAULT core_plugin ml2   					#核心插件 ml2
openstack-config --set /etc/neutron/neutron.conf DEFAULT service_plugins router   			#支持路由
openstack-config --set /etc/neutron/neutron.conf DEFAULT allow_overlapping_ips True 		#允许使用叠加网络
egrep "^core_plugin|^service_plugins|^allow_overlapping_ips" /etc/neutron/neutron.conf

#RabbitMQ消息队列配置
openstack-config --set /etc/neutron/neutron.conf DEFAULT rpc_backend rabbit
openstack-config --set /etc/neutron/neutron.conf oslo_messaging_rabbit rabbit_host controller     #RabbitMQ服务器IP地址
openstack-config --set /etc/neutron/neutron.conf oslo_messaging_rabbit rabbit_userid openstack    #RabbitMQ认证用户名
openstack-config --set /etc/neutron/neutron.conf oslo_messaging_rabbit rabbit_password 123456     #RabbitMQ密码
egrep "^rpc_backend|^rabbit_host|^rabbit_userid|^rabbit_password" /etc/neutron/neutron.conf

#Keystone认证配置
openstack-config --set /etc/neutron/neutron.conf DEFAULT auth_strategy keystone
openstack-config --set /etc/neutron/neutron.conf keystone_authtoken auth_uri http://controller:5000
openstack-config --set /etc/neutron/neutron.conf keystone_authtoken auth_url http://controller:35357
openstack-config --set /etc/neutron/neutron.conf keystone_authtoken memcached_servers controller:11211
openstack-config --set /etc/neutron/neutron.conf keystone_authtoken auth_type password 
openstack-config --set /etc/neutron/neutron.conf keystone_authtoken project_domain_name default
openstack-config --set /etc/neutron/neutron.conf keystone_authtoken user_domain_name default
openstack-config --set /etc/neutron/neutron.conf keystone_authtoken project_name service
openstack-config --set /etc/neutron/neutron.conf keystone_authtoken username neutron
openstack-config --set /etc/neutron/neutron.conf keystone_authtoken password neutron
egrep "^auth_strategy|^auth_uri|^auth_url|^memcached_servers|^auth_type|^project_domain_name|^user_domain_name|^project_name|^username|^password" /etc/neutron/neutron.conf

#不知道意思 官网就是要这样子配置
openstack-config --set /etc/neutron/neutron.conf DEFAULT notify_nova_on_port_status_changes True
openstack-config --set /etc/neutron/neutron.conf DEFAULT notify_nova_on_port_data_changes True
egrep "^notify_nova_on_por" /etc/neutron/neutron.conf

#nova配置
openstack-config --set /etc/neutron/neutron.conf nova auth_url http://controller:35357
openstack-config --set /etc/neutron/neutron.conf nova auth_type password
openstack-config --set /etc/neutron/neutron.conf nova project_domain_name default
openstack-config --set /etc/neutron/neutron.conf nova user_domain_name default
openstack-config --set /etc/neutron/neutron.conf nova region_name RegionOne
openstack-config --set /etc/neutron/neutron.conf nova project_name service
openstack-config --set /etc/neutron/neutron.conf nova username nova
openstack-config --set /etc/neutron/neutron.conf nova password nova
egrep "^auth_url|^auth_type|^project_domain_name|^user_domain_name|^region_name|^project_name|^username|^password" /etc/neutron/neutron.conf

#最后一个也不知道干嘛用的
openstack-config --set /etc/neutron/neutron.conf oslo_concurrency lock_path /var/lib/neutron/tmp
grep "^lock_path" /etc/neutron/neutron.conf

配置二层模块插件
openstack-config --set /etc/neutron/plugins/ml2/ml2_conf.ini ml2 type_drivers flat,vlan,vxlan   				#支持平面网络  vlan子网划分   vxlan
openstack-config --set /etc/neutron/plugins/ml2/ml2_conf.ini ml2 tenant_network_types vxlan     				#现在采用vxlan模式
openstack-config --set /etc/neutron/plugins/ml2/ml2_conf.ini ml2 mechanism_drivers linuxbridge,l2population     #采用Linux自身提供的网桥
openstack-config --set /etc/neutron/plugins/ml2/ml2_conf.ini ml2 extension_drivers port_security
openstack-config --set /etc/neutron/plugins/ml2/ml2_conf.ini ml2_type_flat flat_networks provider
openstack-config --set /etc/neutron/plugins/ml2/ml2_conf.ini ml2_type_vxlan vni_ranges 1:1000                   #地址范围
openstack-config --set /etc/neutron/plugins/ml2/ml2_conf.ini securitygroup enable_ipset True      
egrep "^type_drivers|^tenant_network_types|^mechanism_drivers|^extension_drivers|^ml2_type_flat|^ml2_type_vxlan|^securitygroup" /etc/neutron/plugins/ml2/ml2_conf.ini

配置Linux网桥配置
openstack-config --set /etc/neutron/plugins/ml2/linuxbridge_agent.ini linux_bridge physical_interface_mappings provider:eno16777728  #采用哪块网卡连接到网桥上面
grep "^physical_interface_mappings" /etc/neutron/plugins/ml2/linuxbridge_agent.ini

叠加网络配置
openstack-config --set /etc/neutron/plugins/ml2/linuxbridge_agent.ini vxlan enable_vxlan True
openstack-config --set /etc/neutron/plugins/ml2/linuxbridge_agent.ini vxlan local_ip 192.168.188.128     #定义管理接口的IP地址 
openstack-config --set /etc/neutron/plugins/ml2/linuxbridge_agent.ini vxlan l2_population True
egrep "^enable_vxlan|^local_ip|^l2_population" /etc/neutron/plugins/ml2/linuxbridge_agent.ini

openstack-config --set /etc/neutron/plugins/ml2/linuxbridge_agent.ini securitygroup enable_security_group True
openstack-config --set /etc/neutron/plugins/ml2/linuxbridge_agent.ini securitygroup firewall_driver neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
egrep "^enable_security_group|^firewall_driver" /etc/neutron/plugins/ml2/linuxbridge_agent.ini

配置三层插件
openstack-config --set /etc/neutron/l3_agent.ini DEFAULT interface_driver neutron.agent.linux.interface.BridgeInterfaceDriver
openstack-config --set /etc/neutron/l3_agent.ini DEFAULT external_network_bridge   #设置为空 必须要这么干嘛
egrep "^interface_driver|^external_network_bridge" /etc/neutron/l3_agent.ini

配置DHCP分配IP服务
openstack-config --set /etc/neutron/dhcp_agent.ini DEFAULT interface_driver neutron.agent.linux.interface.BridgeInterfaceDriver
openstack-config --set /etc/neutron/dhcp_agent.ini DEFAULT dhcp_driver neutron.agent.linux.dhcp.Dnsmasq
openstack-config --set /etc/neutron/dhcp_agent.ini DEFAULT enable_isolated_metadata True
egrep "^interface_driver|^dhcp_driver|^enable_isolated_metadata" /etc/neutron/dhcp_agent.ini

Return to Networking controller node configuration返回上一步

配置元数据
openstack-config --set /etc/neutron/metadata_agent.ini DEFAULT nova_metadata_ip controller
openstack-config --set /etc/neutron/metadata_agent.ini DEFAULT metadata_proxy_shared_secret METADATA_SECRET   #共享的密码  后面会用到  我们可以生成一个随机码 
egrep "^nova_metadata_ip|^metadata_proxy_shared_secret" /etc/neutron/metadata_agent.ini

[配置Nova项]
openstack-config --set /etc/nova/nova.conf neutron url http://controller:9696
openstack-config --set /etc/nova/nova.conf neutron auth_url http://controller:35357
openstack-config --set /etc/nova/nova.conf neutron auth_type password
openstack-config --set /etc/nova/nova.conf neutron project_domain_name default
openstack-config --set /etc/nova/nova.conf neutron user_domain_name default
openstack-config --set /etc/nova/nova.conf neutron region_name RegionOne
openstack-config --set /etc/nova/nova.conf neutron project_name service
openstack-config --set /etc/nova/nova.conf neutron username neutron
openstack-config --set /etc/nova/nova.conf neutron password neutron
openstack-config --set /etc/nova/nova.conf neutron service_metadata_proxy True
openstack-config --set /etc/nova/nova.conf neutron metadata_proxy_shared_secret METADATA_SECRET
egrep "^url|^auth_url|^auth_type|^project_domain_name|^user_domain_name|^region_name|^project_name|^username|^password|^service_metadata_proxy|^metadata_proxy_shared_secret" /etc/nova/nova.conf

创建一个软链接
ln -s /etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugin.ini

同步数据库
su -s /bin/sh -c "neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head" neutron

重启nova-api服务
systemctl restart openstack-nova-api.service

设置neutron开机启动服务
systemctl enable neutron-server.service neutron-linuxbridge-agent.service neutron-dhcp-agent.service neutron-metadata-agent.service
systemctl start  neutron-server.service neutron-linuxbridge-agent.service neutron-dhcp-agent.service neutron-metadata-agent.service

启动三层服务 开机自动启动
systemctl enable neutron-l3-agent.service
systemctl start neutron-l3-agent.service

#############################################################################################################################################################################################
#############################################################################################################################################################################################
#############################################################################################################################################################################################
#############################################################################################################################################################################################
#############################################################################################################################################################################################
#############################################################################################################################################################################################
#############################################################################################################################################################################################
#############################################################################################################################################################################################

开始配置compute计算节点的网络服务

[安装网络组件]
yum install openstack-neutron-linuxbridge ebtables ipset openstack-utils -y

[编辑配置]
openstack-config --set /etc/neutron/neutron.conf DEFAULT rpc_backend rabbit
openstack-config --set /etc/neutron/neutron.conf oslo_messaging_rabbit rabbit_host controller
openstack-config --set /etc/neutron/neutron.conf oslo_messaging_rabbit rabbit_userid openstack
openstack-config --set /etc/neutron/neutron.conf oslo_messaging_rabbit rabbit_password 123456

openstack-config --set /etc/neutron/neutron.conf DEFAULT auth_strategy keystone
openstack-config --set /etc/neutron/neutron.conf keystone_authtoken auth_uri http://controller:5000
openstack-config --set /etc/neutron/neutron.conf keystone_authtoken auth_url http://controller:35357
openstack-config --set /etc/neutron/neutron.conf keystone_authtoken memcached_servers controller:11211
openstack-config --set /etc/neutron/neutron.conf keystone_authtoken auth_type password
openstack-config --set /etc/neutron/neutron.conf keystone_authtoken project_domain_name default
openstack-config --set /etc/neutron/neutron.conf keystone_authtoken user_domain_name default
openstack-config --set /etc/neutron/neutron.conf keystone_authtoken project_name service
openstack-config --set /etc/neutron/neutron.conf keystone_authtoken username neutron
openstack-config --set /etc/neutron/neutron.conf keystone_authtoken password neutron
openstack-config --set /etc/neutron/neutron.conf oslo_concurrency lock_path /var/lib/neutron/tmp

[配置网桥]
openstack-config --set /etc/neutron/plugins/ml2/linuxbridge_agent.ini linux_bridge physical_interface_mappings provider:eno16777728
openstack-config --set /etc/neutron/plugins/ml2/linuxbridge_agent.ini vxlan enable_vxlan True
openstack-config --set /etc/neutron/plugins/ml2/linuxbridge_agent.ini vxlan local_ip 192.168.188.129
openstack-config --set /etc/neutron/plugins/ml2/linuxbridge_agent.ini vxlan l2_population True
openstack-config --set /etc/neutron/plugins/ml2/linuxbridge_agent.ini securitygroup enable_security_group True
openstack-config --set /etc/neutron/plugins/ml2/linuxbridge_agent.ini securitygroup firewall_driver neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
grep "^local_ip" /etc/neutron/plugins/ml2/linuxbridge_agent.ini

[配置nova文件]
openstack-config --set /etc/nova/nova.conf neutron url http://controller:9696
openstack-config --set /etc/nova/nova.conf neutron auth_url http://controller:35357
openstack-config --set /etc/nova/nova.conf neutron auth_type password
openstack-config --set /etc/nova/nova.conf neutron project_domain_name default
openstack-config --set /etc/nova/nova.conf neutron user_domain_name default
openstack-config --set /etc/nova/nova.conf neutron region_name RegionOne 
openstack-config --set /etc/nova/nova.conf neutron project_name service
openstack-config --set /etc/nova/nova.conf neutron username neutron
openstack-config --set /etc/nova/nova.conf neutron password neutron

[重新启动nova-compute服务]
systemctl restart openstack-nova-compute.service

[启用Linux网桥服务]
systemctl enable neutron-linuxbridge-agent.service
systemctl start neutron-linuxbridge-agent.service

切入到控制节点
source admin-openrc
neutron ext-list
neutron agent-list   此命令一共有5个组件启动  up  并且是笑脸  ok....

进入后期网络配置工作

第一步:创建一个虚拟网络 provider模型

[生成管理配置]
[[email protected] ~]# source admin-openrc

[添加网络模型]
[[email protected] ~]# neutron net-create --shared --provider:physical_network provider --provider:network_type flat provider
Created a new network:
+---------------------------+--------------------------------------+
| Field                     | Value                                |
+---------------------------+--------------------------------------+
| admin_state_up            | True                                 |
| availability_zone_hints   |                                      |
| availability_zones        |                                      |
| created_at                | 2016-09-23T08:42:59                  |
| description               |                                      |
| id                        | d70272cf-237e-418d-852a-e20fbea9fd3c |
| ipv4_address_scope        |                                      |
| ipv6_address_scope        |                                      |
| mtu                       | 1500                                 |
| name                      | provider                             |
| port_security_enabled     | True                                 |
| provider:network_type     | flat                                 |
| provider:physical_network | provider                             |
| provider:segmentation_id  |                                      |
| router:external           | False                                |
| shared                    | True                                 |
| status                    | ACTIVE                               |
| subnets                   |                                      |
| tags                      |                                      |
| tenant_id                 | b3e92847775042adad06934826e323be     |
| updated_at                | 2016-09-23T08:42:59                  |
+---------------------------+--------------------------------------+

注意以下配置
[[email protected] ~]# grep "^flat_networks" /etc/neutron/plugins/ml2/ml2_conf.ini
flat_networks = provider
[[email protected] ~]# grep "^physical_interface_mappings" /etc/neutron/plugins/ml2/linuxbridge_agent.ini
physical_interface_mappings = provider:eno16777728

[配置provider子网]
[[email protected] ~]# neutron subnet-create --name provider --allocation-pool start=172.16.10.200,end=172.16.10.250 \--dns-nameserver 202.96.128.166 --gateway 172.16.10.1 provider 172.16.10.0/16
Created a new subnet:
+-------------------+----------------------------------------------------+
| Field             | Value                                              |
+-------------------+----------------------------------------------------+
| allocation_pools  | {"start": "172.16.10.200", "end": "172.16.10.250"} |
| cidr              | 172.16.0.0/16                                      |
| created_at        | 2016-09-23T08:46:59                                |
| description       |                                                    |
| dns_nameservers   | 202.96.128.166                                     |
| enable_dhcp       | True                                               |
| gateway_ip        | 172.16.10.1                                        |
| host_routes       |                                                    |
| id                | 8e3cb8f1-426c-43c5-93cc-8eb4eb303010               |
| ip_version        | 4                                                  |
| ipv6_address_mode |                                                    |
| ipv6_ra_mode      |                                                    |
| name              | provider                                           |
| network_id        | d70272cf-237e-418d-852a-e20fbea9fd3c               |
| subnetpool_id     |                                                    |
| tenant_id         | b3e92847775042adad06934826e323be                   |
| updated_at        | 2016-09-23T08:46:59                                |
+-------------------+----------------------------------------------------+

[创建一个模板]
[[email protected] ~]# openstack flavor create --id 0 --vcpus 1 --ram 64 --disk 1 m1.nano
+----------------------------+---------+
| Field                      | Value   |
+----------------------------+---------+
| OS-FLV-DISABLED:disabled   | False   |
| OS-FLV-EXT-DATA:ephemeral  | 0       |
| disk                       | 1       |
| id                         | 0       |
| name                       | m1.nano |
| os-flavor-access:is_public | True    |
| ram                        | 64      |
| rxtx_factor                | 1.0     |
| swap                       |         |
| vcpus                      | 1       |
+----------------------------+---------+

[为demo用户生成秘钥对]
[[email protected] ~]# . demo-openrc
[[email protected] ~]# ssh-keygen -q -N ""
Enter file in which to save the key (/root/.ssh/id_rsa): 
[[email protected] ~]# openstack keypair create --public-key ~/.ssh/id_rsa.pub mykey
+-------------+-------------------------------------------------+
| Field       | Value                                           |
+-------------+-------------------------------------------------+
| fingerprint | 40:16:d3:a3:c4:9e:f8:0f:62:19:d6:ce:0e:82:ac:1a |
| name        | mykey                                           |
| user_id     | 432de9a61ef34faaac80f00e3df02543                |
+-------------+-------------------------------------------------+
[[email protected] ~]# openstack keypair list
+-------+-------------------------------------------------+
| Name  | Fingerprint                                     |
+-------+-------------------------------------------------+
| mykey | 40:16:d3:a3:c4:9e:f8:0f:62:19:d6:ce:0e:82:ac:1a |
+-------+-------------------------------------------------+

[设置安全访问组 相当于网络防火墙]
[[email protected] ~]# openstack security group rule create --proto icmp default
+-----------------------+--------------------------------------+
| Field                 | Value                                |
+-----------------------+--------------------------------------+
| id                    | 7cce9c91-9eb4-497e-a63f-deb37b67123c |
| ip_protocol           | icmp                                 |
| ip_range              | 0.0.0.0/0                            |
| parent_group_id       | f62f1007-7279-446f-9669-2595ea4acf97 |
| port_range            |                                      |
| remote_security_group |                                      |
+-----------------------+--------------------------------------+
[[email protected] ~]# openstack security group rule create --proto tcp --dst-port 22 default
+-----------------------+--------------------------------------+
| Field                 | Value                                |
+-----------------------+--------------------------------------+
| id                    | be8d4d22-10f2-4463-9fc0-2ba1ec5c3c89 |
| ip_protocol           | tcp                                  |
| ip_range              | 0.0.0.0/0                            |
| parent_group_id       | f62f1007-7279-446f-9669-2595ea4acf97 |
| port_range            | 22:22                                |
| remote_security_group |                                      |
+-----------------------+--------------------------------------+

**********************************************************************************************
**********************************************************************************************
**********************************************************************************************
**********************************************************************************************
**********************************************************************************************
**********************************************************************************************
**********************************************************************************************
**********************************************************************************************
**********************************************************************************************
**********************************************************************************************

运行实例
[[email protected] ~]# . demo-openrc
[[email protected] ~]# openstack flavor list
+----+-----------+-------+------+-----------+-------+-----------+
| ID | Name      |   RAM | Disk | Ephemeral | VCPUs | Is Public |
+----+-----------+-------+------+-----------+-------+-----------+
| 0  | m1.nano   |    64 |    1 |         0 |     1 | True      |
| 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      |
| 5  | m1.xlarge | 16384 |  160 |         0 |     8 | True      |
+----+-----------+-------+------+-----------+-------+-----------+
[[email protected] ~]# openstack image list
+--------------------------------------+-------------------+--------+
| ID                                   | Name              | Status |
+--------------------------------------+-------------------+--------+
| 6cdaacdf-b968-4361-b39a-00a161b7952b | CentOS-6.4-x84_64 | active |
| e8f9ee93-910d-4eb7-b516-a3052b8bbc47 | cirros            | active |
+--------------------------------------+-------------------+--------+
[[email protected] ~]# openstack network list
+--------------------------------------+----------+--------------------------------------+
| ID                                   | Name     | Subnets                              |
+--------------------------------------+----------+--------------------------------------+
| d70272cf-237e-418d-852a-e20fbea9fd3c | provider | 8e3cb8f1-426c-43c5-93cc-8eb4eb303010 |
+--------------------------------------+----------+--------------------------------------+
[[email protected] ~]# openstack security group list
+--------------------------------------+---------+------------------------+----------------------------------+
| ID                                   | Name    | Description            | Project                          |
+--------------------------------------+---------+------------------------+----------------------------------+
| f62f1007-7279-446f-9669-2595ea4acf97 | default | Default security group | 2b4fb8c8cb29478c9e65c6f555df2bd7 |
+--------------------------------------+---------+------------------------+----------------------------------+

[[email protected] ~]# openstack server create --flavor m1.nano --image cirros    --nic net-id=d70272cf-237e-418d-852a-e20fbea9fd3c --security-group default    --key-name mykey provider-instance
   
[[email protected] ~]# openstack server list
+--------------------------------------+-------------------+--------+------------------------+
| ID                                   | Name              | Status | Networks               |
+--------------------------------------+-------------------+--------+------------------------+
| dc1acea9-00ef-42d3-b724-fc4ebef7e371 | provider-instance | ACTIVE | provider=172.16.10.201 |
+--------------------------------------+-------------------+--------+------------------------+

[[email protected] ~]# openstack console url show provider-instance
+-------+---------------------------------------------------------------------------------+
| Field | Value                                                                           |
+-------+---------------------------------------------------------------------------------+
| type  | novnc                                                                           |
| url   | http://controller:6080/vnc_auto.html?token=5fdedd6d-f0c3-4cc7-96e2-efcb48a49c3f |
+-------+---------------------------------------------------------------------------------+
时间: 2024-10-08 10:27:46

adfasdf的相关文章

C#_集合

新建集合:    ArrayList n = new ArrayList(); 添加内容:    n.Add(1);                   n.Add(“ren”); 输出第几个数:  Console.WriteLine(n[1]); 在第四个位置插入wo : n.Insert(4 ,"wo"); 输出n[4]的数据:Console.WriteLine(n[4]); 判断是否含ss:   Console.WriteLine(n.Contains("ss"

11-IO多路复用-paramiko-MySQL

1. IO多路复用 2. paramiko 3. MySQL - SQL语句 - Python操作MySQL - pymysql模块 今日内容: 1. IO多路复用 - 监听多个socket变化 - socket服务端 IO多路复用 + socket 来实现Web服务器 a. 服务端优先运行 b. 浏览器: http://...... socket + send('协议..') c. 获取客户端发来的url,根据URL不同响应数据 d. 断开链接 产出: a. 浏览器发送数据:按照指定规则 b.

Linux基础命令(三)

重定向及管道 linux下一切皆文件.文件又可分为:普通文件.目录文件.链接文件和设备文件 Linux系统中使用文件来描述各种硬件,设备资源等 例如:硬盘和分区,光盘等设备文件 brw-rw----+ 1 root cdrom    11,   0 6月  24 16:53 sr0 重定向的含义 文件描述符定义: 是内核为了高效管理已被打开的文件所创建的索引,用于指向被打开的文件,所有执行I/O操作的系统调用都通过文件描述符:文件描述符是一个简单的非负整数,用以标明每一个被进程所打开的文件,程序

Block与代理的使用

本人其实是比较喜欢用Block的,因为用block写出来的代码,让我感觉代码要紧凑一些,看起来的时候,思路要清晰些,所以这估计也就是现在block将要代替代理的原因所在吧! 下面,直接进入主题: 一.block block的书写看起来有点怪,其实你只要是懂了其思路,那就非常简单了!我这里就介绍一种初学者最容易记住的使用方法! 写block的时候,1.2.3.4步骤,都是在要传出只的对象中处理,只有最后一步,就是在接收传值的地方处理! 1.在我们传出事件类的.h中,对block进行定义: 2.我们

Linux下基础命令(三)

本次发这篇博客比较晚,晚上快12点才发的,到今天一直没有,所以又发了一遍,这个篇文章主要有重定向和管道 | tee  find 等实战操作,还有一些命令参数详解等. 重定向及管道 linux下一切皆文件.文件又可分为:普通文件.目录文件.链接文件和设备文件 Linux系统中使用文件来描述各种硬件,设备资源等 例如:硬盘和分区,光盘等设备文件 brw-rw----+ 1 root cdrom    11,   0 6月  24 16:53 sr0 重定向的含义 文件描述符定义: 是内核为了高效管理

dddd<script>ab " /> onclick="alert(123);" % # _

#3# ### <script>aler t(1234);</script> <basbd   llll ### wer adfasdf tttttttttttt dddd<script>ab " /> onclick="alert(123);" % # _,布布扣,bubuko.com

linux下支持伪静态和rewrite的实例

虽然很多域名提供商均支持url转发,但是有时我们需要自己实现转发,以下为自己工作中遇到的问题,特别上 : 1,用.htaccess来实现 在apache配置文件内或虚拟主机配置文件内 开启AllowOverride(all) <Directory /www/users/xxx> AllowOverride all </Directory> 在/www/users/xxx目录下创建.htaccess文件 写入 Redirect permanent / http://www.baidu

ARC机制集合内存管理

// //  main.m //  13-ARC机制集合内存管理 // //  Created by apple on 14-3-21. //  Copyright (c) 2014年 apple. All rights reserved. // #import <Foundation/Foundation.h> #import "Person.h" //ARC机制,是否需要担心内存溢出呢 //谁告诉你不用的心得啊:道理就是下面的示 int main(int argc, c

sql with as 语句使用

WITH ac AS (     --通过id查询父类信息     SELECT s_ParentID FROM dbo.MYWHERE S_id=109     UNION ALL     --通过父类id找出信息(此处是通过父类id找出父类的父类)     SELECT ob.s_ParentID FROM ac INNER JOIN dbo.MYob ON ob.S_id=ac.s_ParentID ) --递归完成 读取集合中信息 SELECT * FROM dbo.MY WHERE S