`
haoningabc
  • 浏览: 1475140 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

openstack的L版本安装(flat网络)

阅读更多
参考http://docs.openstack.org/liberty/install-guide-rdo/keystone-install.html
最终结果:


基础:
yum install centos-release-openstack-liberty
yum upgrade -y
yum install python-openstackclient openstack-selinux -y

rm -f /etc/localtime
cp -f /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
ntpdate ntp.ubuntu.com

配置/etc/hostname
/etc/hosts
192.168.139.126 controller
192.168.139.62  compute
#192.168.139.79  net

systemctl stop firewalld.service
systemctl disable firewalld.service

yum install mariadb mariadb-server MySQL-python -y
vim /etc/my.cnf.d/mariadb_openstack.cnf
[mysqld]
bind-address = 10.0.0.11
default-storage-engine = innodb
innodb_file_per_table
collation-server = utf8_general_ci
init-connect = 'SET NAMES utf8'
character-set-server = utf8


GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY 'haoning';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'  IDENTIFIED BY 'haoning';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'ocontrol'  IDENTIFIED BY 'haoning';
flush privileges;

yum install rabbitmq-server -y
systemctl enable rabbitmq-server.service
systemctl start rabbitmq-server.service
rabbitmqctl add_user openstack haoning
rabbitmqctl set_permissions openstack ".*" ".*" ".*"

yum install mongodb-server mongodb -y
vim /etc/mongod.conf
bind_ip = 192.168.139.159

systemctl enable mongod.service
systemctl start mongod.service

一下密码全都设置成haoning

----------------------------------------------------------------------
■■■■■■■■■■■■■■■■■■keystone begin■■■■■■■■■■■■■■■■■■
keystone:


CREATE DATABASE keystone;
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'localhost' IDENTIFIED BY 'haoning';
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'%'  IDENTIFIED BY 'haoning';
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'ocontrol'  IDENTIFIED BY 'haoning';
flush privileges;

$ openssl rand -hex 10
06a0afd32e5265a9eba8

yum install openstack-keystone httpd mod_wsgi  memcached python-memcached -y

systemctl enable memcached.service
systemctl start memcached.service

修改配置文件后得到
sed -i '/^#/d'  /etc/keystone/keystone.conf
sed -i '/^$/d' /etc/keystone/keystone.conf
---------------------------
/etc/keystone/keystone.conf
[DEFAULT]
admin_token = 06a0afd32e5265a9eba8
verbose = True
[assignment]
[auth]
[cache]
[catalog]
[cors]
[cors.subdomain]
[credential]
[database]
connection = mysql://keystone:haoning@ocontrol/keystone
[domain_config]
[endpoint_filter]
[endpoint_policy]
[eventlet_server]
[eventlet_server_ssl]
[federation]
[fernet_tokens]
[identity]
[identity_mapping]
[kvs]
[ldap]
[matchmaker_redis]
[matchmaker_ring]
[memcache]
servers = localhost:11211
[oauth1]
[os_inherit]
[oslo_messaging_amqp]
[oslo_messaging_qpid]
[oslo_messaging_rabbit]
[oslo_middleware]
[oslo_policy]
[paste_deploy]
[policy]
[resource]
[revoke]
driver = sql
[role]
[saml]
[signing]
[ssl]
[token]
provider = uuid
driver = memcache
[tokenless_auth]
[trust]

su -s /bin/sh -c "keystone-manage db_sync" keystone

-------------------------
/etc/httpd/conf/httpd.conf
ServerName ocontrol


/etc/httpd/conf.d/wsgi-keystone.conf
Listen 5000
Listen 35357

<VirtualHost *:5000>
    WSGIDaemonProcess keystone-public processes=5 threads=1 user=keystone group=keystone display-name=%{GROUP}
    WSGIProcessGroup keystone-public
    WSGIScriptAlias / /usr/bin/keystone-wsgi-public
    WSGIApplicationGroup %{GLOBAL}
    WSGIPassAuthorization On
    <IfVersion >= 2.4>
      ErrorLogFormat "%{cu}t %M"
    </IfVersion>
    ErrorLog /var/log/httpd/keystone-error.log
    CustomLog /var/log/httpd/keystone-access.log combined

    <Directory /usr/bin>
        <IfVersion >= 2.4>
            Require all granted
        </IfVersion>
        <IfVersion < 2.4>
            Order allow,deny
            Allow from all
        </IfVersion>
    </Directory>
</VirtualHost>

<VirtualHost *:35357>
    WSGIDaemonProcess keystone-admin processes=5 threads=1 user=keystone group=keystone display-name=%{GROUP}
    WSGIProcessGroup keystone-admin
    WSGIScriptAlias / /usr/bin/keystone-wsgi-admin
    WSGIApplicationGroup %{GLOBAL}
    WSGIPassAuthorization On
    <IfVersion >= 2.4>
      ErrorLogFormat "%{cu}t %M"
    </IfVersion>
    ErrorLog /var/log/httpd/keystone-error.log
    CustomLog /var/log/httpd/keystone-access.log combined

    <Directory /usr/bin>
        <IfVersion >= 2.4>
            Require all granted
        </IfVersion>
        <IfVersion < 2.4>
            Order allow,deny
            Allow from all
        </IfVersion>
    </Directory>
</VirtualHost>

systemctl enable httpd.service
systemctl start httpd.service


###创建服务:
export OS_TOKEN=06a0afd32e5265a9eba8
export OS_URL=http://ocontrol:35357/v3
export OS_IDENTITY_API_VERSION=3

openstack service create  --name keystone --description "OpenStack Identity" identity

openstack endpoint create --region wuhan  identity public http://ocontrol:5000/v2.0
openstack endpoint create --region wuhan  identity internal http://ocontrol:5000/v2.0
openstack endpoint create --region wuhan identity admin http://ocontrol:35357/v2.0

###创建用户角色等 projects, users, and roles
openstack project create --domain default --description "Admin Project" admin
openstack user create --domain default  --password-prompt admin
openstack role create admin
openstack role add --project admin --user admin admin


openstack project create --domain default  --description "Service Project" service
openstack project create --domain default  --description "Demo Project" demo
openstack user create --domain default --password-prompt demo
openstack role create user
openstack role add --project demo --user demo user

###Verify operation
Edit the /usr/share/keystone/keystone-dist-paste.ini file and remove admin_token_auth from the [pipeline:public_api], [pipeline:admin_api], and [pipeline:api_v3] sections


#unset OS_TOKEN OS_URL
openstack --os-auth-url http://ocontrol:35357/v3  --os-project-domain-id default --os-user-domain-id default --os-project-name admin --os-username admin --os-auth-type password  token issue
openstack --os-auth-url http://ocontrol:5000/v3  --os-project-domain-id default --os-user-domain-id default --os-project-name demo --os-username demo --os-auth-type password token issue

###Create OpenStack client environment scripts
unset OS_TOKEN OS_URL
[root@ocontrol ~]# cat admin-openrc.sh
export OS_PROJECT_DOMAIN_ID=default
export OS_USER_DOMAIN_ID=default
export OS_PROJECT_NAME=admin
export OS_TENANT_NAME=admin
export OS_USERNAME=admin
export OS_PASSWORD=haoning
export OS_AUTH_URL=http://ocontrol:35357/v3
export OS_IDENTITY_API_VERSION=3
export OS_IMAGE_API_VERSION=2
export PS1='[\u@\h \W(keystone_admin_v3)]\$ '

[root@ocontrol ~]# cat demo-openrc.sh
export OS_PROJECT_DOMAIN_ID=default
export OS_USER_DOMAIN_ID=default
export OS_PROJECT_NAME=demo
export OS_TENANT_NAME=demo
export OS_USERNAME=demo
export OS_PASSWORD=haoning
export OS_AUTH_URL=http://ocontrol:5000/v3
export OS_IMAGE_API_VERSION=2
export OS_IDENTITY_API_VERSION=3
export PS1='[\u@\h \W(keystone_demo_v3)]\$ '

source admin-openrc.sh
openstack token issue




■■■■■■■■■■■■■■■■■■keystone end■■■■■■■■■■■■■■■■■■
■■■■■■■■■■■■■■■■■■glance begin■■■■■■■■■■■■■■■■■■
CREATE DATABASE glance;
GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'localhost' IDENTIFIED BY 'haoning';
GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'%' IDENTIFIED BY 'haoning';
GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'ocontrol' IDENTIFIED BY 'haoning';
flush privileges;

source admin-openrc.sh

openstack user create --domain default --password-prompt glance
openstack role add --project service --user glance admin
openstack service create --name glance --description "OpenStack Image service" image

openstack endpoint create --region wuhan image public http://ocontrol:9292
openstack endpoint create --region wuhan image internal http://ocontrol:9292
openstack endpoint create --region wuhan image admin http://ocontrol:9292

yum install openstack-glance python-glance python-glanceclient -y

---------------------------
/etc/glance/glance-api.conf
[DEFAULT]
notification_driver = noop
verbose = True
[database]
connection = mysql://glance:haoning@ocontrol/glance
[keystone_authtoken]
auth_uri = http://ocontrol:5000
auth_url = http://ocontrol:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
project_name = service
username = glance
password = haoning
#Comment out or remove any other options in the [keystone_authtoken] section.
[paste_deploy]
flavor = keystone
[glance_store]
default_store = file
filesystem_store_datadir = /var/lib/glance/images/
#暂时没有这个目录

------------------------------------
/etc/glance/glance-registry.conf
[DEFAULT]
notification_driver = noop
verbose = True
[database]
connection =  mysql://glance:haoning@ocontrol/glance
[keystone_authtoken]
auth_uri = http://ocontrol:5000
auth_url = http://ocontrol:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
project_name = service
username = glance
password = haoning
[paste_deploy]
flavor = keystone
#Comment out or remove any other options in the [keystone_authtoken] section


su -s /bin/sh -c "glance-manage db_sync" glance

systemctl enable openstack-glance-api.service openstack-glance-registry.service
systemctl start openstack-glance-api.service openstack-glance-registry.service

#Verify operation

echo "export OS_IMAGE_API_VERSION=2"  | tee -a admin-openrc.sh demo-openrc.sh

wget http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img

glance image-create --name "cirros"  --file cirros-0.3.4-x86_64-disk.img --disk-format qcow2 --container-format bare --visibility public --progress
glance image-list
■■■■■■■■■■■■■■■■■■glance end■■■■■■■■■■■■■■■■■■
■■■■■■■■■■■■■■■■■■nova begin■■■■■■■■■■■■■■■■■■
#★★★★在ocontrol节点
CREATE DATABASE nova;
GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'localhost' IDENTIFIED BY 'haoning';
GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'%'  IDENTIFIED BY 'haoning';
GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'ocontrol'  IDENTIFIED BY 'haoning';
flush privileges;

source admin-openrc.sh
openstack user create --domain default --password-prompt nova
openstack role add --project service --user nova admin
openstack service create --name nova --description "OpenStack Compute" compute
openstack endpoint create --region wuhan compute public http://ocontrol:8774/v2/%\(tenant_id\)s
openstack endpoint create --region wuhan compute internal http://ocontrol:8774/v2/%\(tenant_id\)s
openstack endpoint create --region wuhan compute admin http://ocontrol:8774/v2/%\(tenant_id\)s

yum install openstack-nova-api openstack-nova-cert openstack-nova-conductor openstack-nova-console openstack-nova-novncproxy openstack-nova-scheduler python-novaclient -y

-------------
/etc/nova/nova.conf
[DEFAULT]
rpc_backend = rabbit
auth_strategy = keystone
################
my_ip = 192.168.139.159
################
network_api_class = nova.network.neutronv2.api.API
security_group_api = neutron
linuxnet_interface_driver = nova.network.linux_net.NeutronLinuxBridgeInterfaceDriver
firewall_driver = nova.virt.firewall.NoopFirewallDriver
#disable the EC2 API:
enabled_apis=osapi_compute,metadata
verbose = True
[database]
connection = mysql://nova:haoning@ocontrol/nova
[oslo_messaging_rabbit]
rabbit_host = ocontrol
rabbit_userid = openstack
rabbit_password = haoning
[keystone_authtoken]
auth_uri = http://ocontrol:5000
auth_url = http://ocontrol:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
project_name = service
username = nova
password = haoning
[vnc]
vncserver_listen = $my_ip
vncserver_proxyclient_address = $my_ip
[glance]
host = ocontrol
[oslo_concurrency]
lock_path = /var/lib/nova/tmp

su -s /bin/sh -c "nova-manage db sync" nova
#/var/log/nova 检查log是否成功
systemctl enable openstack-nova-api.service openstack-nova-cert.service openstack-nova-consoleauth.service openstack-nova-scheduler.service openstack-nova-conductor.service openstack-nova-novncproxy.service
systemctl start openstack-nova-api.service openstack-nova-cert.service openstack-nova-consoleauth.service openstack-nova-scheduler.service openstack-nova-conductor.service openstack-nova-novncproxy.service

#★★★在ocompute节点
yum install openstack-nova-compute sysfsutils -y

---------------------
/etc/nova/nova.conf
[DEFAULT]
rpc_backend = rabbit
auth_strategy = keystone
#################
my_ip = 192.168.139.160
##############
network_api_class = nova.network.neutronv2.api.API
security_group_api = neutron
linuxnet_interface_driver = nova.network.linux_net.NeutronLinuxBridgeInterfaceDriver
firewall_driver = nova.virt.firewall.NoopFirewallDriver
#By default, Compute uses an internal firewall service. Since Networking includes a firewall service, you must disable the Compute firewall service by using the nova.virt.firewall.NoopFirewallDriver firewall driver.
verbose = True
[oslo_messaging_rabbit]
rabbit_host = ocontrol
rabbit_userid = openstack
rabbit_password = haoning
[keystone_authtoken]
auth_uri = http://ocontrol:5000
auth_url = http://ocontrol:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
project_name = service
username = nova
password = haoning
[vnc]
enabled = True
vncserver_listen = 0.0.0.0
vncserver_proxyclient_address = $my_ip
novncproxy_base_url = http://ocontrol:6080/vnc_auto.html
[glance]
host = ocontrol
[oslo_concurrency]
lock_path = /var/lib/nova/tmp
[libvirt]
#egrep -c '(vmx|svm)' /proc/cpuinfo
#virt_type = qemu

systemctl enable libvirtd.service openstack-nova-compute.service
systemctl start libvirtd.service openstack-nova-compute.service

#Verify operation
source admin-openrc.sh
nova service-list
nova endpoints
nova image-list
■■■■■■■■■■■■■■■■■■nova end■■■■■■■■■■■■■■■■■■
■■■■■■■■■■■■■■■■■■neutron begin■■■■■■■■■■■■■■■■■■
CREATE DATABASE neutron;
GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'localhost' IDENTIFIED BY 'haoning';
GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'%' IDENTIFIED BY 'haoning';
GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'ocontrol' IDENTIFIED BY 'haoning';
flush privileges;

openstack user create --domain default --password-prompt neutron
openstack role add --project service --user neutron admin

openstack service create --name neutron --description "OpenStack Networking" network
openstack endpoint create --region wuhan network public http://ocontrol:9696
openstack endpoint create --region wuhan network internal http://ocontrol:9696
openstack endpoint create --region wuhan network admin http://ocontrol:9696

###★★★★★★★★Networking Option 1: Provider networks----------begin★★★★★★★★
yum install openstack-neutron openstack-neutron-ml2 openstack-neutron-linuxbridge python-neutronclient ebtables ipset
-------------------------------
/etc/neutron/neutron.conf
[DEFAULT]
core_plugin = ml2
service_plugins =
rpc_backend = rabbit
auth_strategy = keystone

notify_nova_on_port_status_changes = True
notify_nova_on_port_data_changes = True
nova_url = http://ocontrol:8774/v2

verbose = True
[database]
connection = mysql://neutron:haoning@ocontrol/neutron
[oslo_messaging_rabbit]
rabbit_host = ocontrol
rabbit_userid = openstack
rabbit_password = haoning
[keystone_authtoken]
auth_uri = http://ocontrol:5000
auth_url = http://ocontrol:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
project_name = service
username = neutron
password = haoning
####???????????这里不一样########★★★★★★★★★★★★★★★★★
[nova]
auth_url = http://ocontrol:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
region_name = wuhan
project_name = service
username = nova
password = haoning
[oslo_concurrency]
lock_path = /var/lib/neutron/tmp

----------------
/etc/neutron/plugins/ml2/ml2_conf.ini
[ml2]
type_drivers = flat,vlan
tenant_network_types =
mechanism_drivers = linuxbridge
extension_drivers = port_security
[ml2_type_flat]
flat_networks = public
[securitygroup]
enable_ipset = True

----------------
/etc/neutron/plugins/ml2/linuxbridge_agent.ini
[linux_bridge]
########
physical_interface_mappings = public:eth0
##########
[vxlan]
enable_vxlan = False
[agent]
prevent_arp_spoofing = True
[securitygroup]
enable_security_group = True
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver

--------------------------------
/etc/neutron/dhcp_agent.ini
[DEFAULT]
interface_driver = neutron.agent.linux.interface.BridgeInterfaceDriver
dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq
enable_isolated_metadata = True

verbose = True

###★★★★★★★★Networking Option 1: Provider networks----------end★★★★★★★★
###★★★★★Networking Option 2: Self-service networks-------begin★★★★★★★★
yum install openstack-neutron openstack-neutron-ml2 openstack-neutron-linuxbridge python-neutronclient ebtables ipset
###★★★★★Networking Option 2: Self-service networks------end★★★★★★★★



-------------------------------?????______
/etc/neutron/metadata_agent.ini
[DEFAULT]
auth_uri = http://ocontrol:5000
auth_url = http://ocontrol:35357
auth_region = wuhan
auth_plugin = password
project_domain_id = default
user_domain_id = default
project_name = service
username = neutron
password = haoning

nova_metadata_ip = ocontrol

#########??????########
metadata_proxy_shared_secret = METADATA_SECRET
#########????###############

verbose = True

-------------------------------
/etc/nova/nova.conf
[neutron]
url = http://ocontrol:9696
auth_url = http://ocontrol:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
region_name = wuhan
project_name = service
username = neutron
password = haoning

service_metadata_proxy = True
#########没关系不报错,先这么写########
metadata_proxy_shared_secret = METADATA_SECRET
#################

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

systemctl restart openstack-nova-api.service

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


##########For networking option 2, also enable and start the layer-3 service:
systemctl enable neutron-l3-agent.service
systemctl start neutron-l3-agent.service


检查错误:
cd /var/log/neutron
grep ERROR *



systemctl start neutron-server.service
systemctl start neutron-linuxbridge-agent.service
systemctl start neutron-dhcp-agent.service
systemctl stop neutron-metadata-agent.service



★★★★★★★★★★★★★★★compute 节点★☆★★★★★★★★★★★★★
yum install openstack-neutron openstack-neutron-linuxbridge ebtables ipset -y
-------------------------------------
/etc/neutron/neutron.conf
[DEFAULT]
rpc_backend = rabbit
auth_strategy = keystone
verbose = True

[oslo_messaging_rabbit]
rabbit_host = ocontrol
rabbit_userid = openstack
rabbit_password = haoning
[keystone_authtoken]
auth_uri = http://ocontrol:5000
auth_url = http://ocontrol:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
project_name = service
username = neutron
password = haoning

[oslo_concurrency]
lock_path = /var/lib/neutron/tmp

###★★★★★Networking Option 1: Provider networks-------begin★★★★★★★★
----------------------------
/etc/neutron/plugins/ml2/linuxbridge_agent.ini
[linux_bridge]
physical_interface_mappings = public:eth0
#the name of the underlying physical public network interface.
[vxlan]
enable_vxlan = False
[agent]
prevent_arp_spoofing = True
[securitygroup]
enable_security_group = True
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver


#可以比较一下,是一样的
vimdiff scp://root@192.168.139.159//etc/neutron/plugins/ml2/linuxbridge_agent.ini /etc/neutron/plugins/ml2/linuxbridge_agent.ini

###★★★★★Networking Option 1: Provider networks------end★★★★★★★★
###★★★★★Networking Option 2: Self-service networks-------begin★★★★★★★★

###★★★★★Networking Option 2: Self-service networks------end★★★★★★★★


-------------------------------
/etc/nova/nova.conf
[neutron]
url = http://ocontrol:9696
auth_url = http://ocontrol:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
region_name = wuhan
project_name = service
username = neutron
password = haoning

systemctl restart openstack-nova-compute.service

systemctl enable neutron-linuxbridge-agent.service
systemctl start neutron-linuxbridge-agent.service


###Verify operation

[root@ocontrol neutron(keystone_admin_v3)]# neutron ext-list
+-----------------------+--------------------------+
| alias                 | name                     |
+-----------------------+--------------------------+
| flavors               | Neutron Service Flavors  |
| security-group        | security-group           |
| dns-integration       | DNS Integration          |
| net-mtu               | Network MTU              |
| port-security         | Port Security            |
| binding               | Port Binding             |
| provider              | Provider Network         |
| agent                 | agent                    |
| quotas                | Quota management support |
| subnet_allocation     | Subnet Allocation        |
| dhcp_agent_scheduler  | DHCP Agent Scheduler     |
| rbac-policies         | RBAC Policies            |
| external-net          | Neutron external network |
| multi-provider        | Multi Provider Network   |
| allowed-address-pairs | Allowed Address Pairs    |
| extra_dhcp_opt        | Neutron Extra DHCP opts  |
+-----------------------+--------------------------+

###★★★★★Networking Option 1: Provider networks------begin★★★★★★★★
neutron agent-list
+--------------------------------------+--------------------+----------+-------+----------------+---------------------------+
| id                                   | agent_type         | host     | alive | admin_state_up | binary                    |
+--------------------------------------+--------------------+----------+-------+----------------+---------------------------+
| 1f7dd1e9-ef38-471e-a486-43e6c7c1c854 | Metadata agent     | ocontrol | :-)   | True           | neutron-metadata-agent    |
| a14b5ccc-60e0-4a85-9ce9-10ba6cb6a82e | Linux bridge agent | ocontrol | :-)   | True           | neutron-linuxbridge-agent |
| ba07f36d-ec0e-4a98-959f-72eabbdca0cc | Linux bridge agent | ocompute | :-)   | True           | neutron-linuxbridge-agent |
| bc7c2622-0887-4504-8928-dd12be23371a | DHCP agent         | ocontrol | :-)   | True           | neutron-dhcp-agent        |
+--------------------------------------+--------------------+----------+-------+----------------+---------------------------+

#新建个vm

neutron net-create public --shared --provider:physical_network public  --provider:network_type flat

-----------------------------------
/etc/neutron/plugins/ml2/ml2_conf.ini
[ml2_type_flat]
flat_networks = public
------------------------------
/etc/neutron/plugins/ml2/linuxbridge_agent.ini
[linux_bridge]
physical_interface_mappings = public:eth0

#neutron subnet-create public PUBLIC_NETWORK_CIDR --name public --allocation-pool start=START_IP_ADDRESS,end=END_IP_ADDRESS --dns-nameserver DNS_RESOLVER --gateway PUBLIC_NETWORK_GATEWAY
neutron subnet-create public 192.168.139.0/20 --name public --allocation-pool start=192.168.139.181,end=192.168.139.200 --dns-nameserver 8.8.4.4 --gateway 192.168.128.1
Created a new subnet:
+-------------------+--------------------------------------------------------+
| Field             | Value                                                  |
+-------------------+--------------------------------------------------------+
| allocation_pools  | {"start": "192.168.139.181", "end": "192.168.139.200"} |
| cidr              | 192.168.128.0/20                                       |
| dns_nameservers   | 8.8.4.4                                                |
| enable_dhcp       | True                                                   |
| gateway_ip        | 192.168.128.1                                          |
| host_routes       |                                                        |
| id                | fb2ec451-b2f6-4407-865e-5c4e657e9d59                   |
| ip_version        | 4                                                      |
| ipv6_address_mode |                                                        |
| ipv6_ra_mode      |                                                        |
| name              | public                                                 |
| network_id        | 386b0ac1-3cdf-4be7-94c7-b52e6b46063e                   |
| subnetpool_id     |                                                        |
| tenant_id         | 261db0ad41984bd1b113e19c92aa4174                       |
+-------------------+--------------------------------------------------------+

source admin-openrc.sh
#demo的不好使
ssh-keygen -q -N ""
nova keypair-add --pub-key ~/.ssh/id_rsa.pub mykey
nova keypair-list

nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0
nova secgroup-add-rule default tcp 22 22 0.0.0.0/0

nova flavor-list
nova image-list
[root@ocontrol ~(keystone_admin_v3)]# neutron net-list
+--------------------------------------+--------+-------------------------------------------------------+
| id                                   | name   | subnets                                               |
+--------------------------------------+--------+-------------------------------------------------------+
| 386b0ac1-3cdf-4be7-94c7-b52e6b46063e | public | fb2ec451-b2f6-4407-865e-5c4e657e9d59 192.168.128.0/20 |
+--------------------------------------+--------+-------------------------------------------------------+

#Replace PUBLIC_NET_ID with the ID of the public provider network
#nova boot --flavor m1.tiny --image cirros --nic net-id=PUBLIC_NET_ID --security-group default --key-name mykey public-instance
nova boot --flavor m1.tiny --image cirros --nic net-id=386b0ac1-3cdf-4be7-94c7-b52e6b46063e --security-group default --key-name mykey public-instance
+--------------------------------------+-----------------------------------------------+
| Property                             | Value                                         |
+--------------------------------------+-----------------------------------------------+
| OS-DCF:diskConfig                    | MANUAL                                        |
| OS-EXT-AZ:availability_zone          |                                               |
| OS-EXT-SRV-ATTR:host                 | -                                             |
| OS-EXT-SRV-ATTR:hypervisor_hostname  | -                                             |
| OS-EXT-SRV-ATTR:instance_name        | instance-00000001                             |
| OS-EXT-STS:power_state               | 0                                             |
| OS-EXT-STS:task_state                | scheduling                                    |
| OS-EXT-STS:vm_state                  | building                                      |
| OS-SRV-USG:launched_at               | -                                             |
| OS-SRV-USG:terminated_at             | -                                             |
| accessIPv4                           |                                               |
| accessIPv6                           |                                               |
| adminPass                            | JgCpGqbkPpA3                                  |
| config_drive                         |                                               |
| created                              | 2016-03-09T13:47:48Z                          |
| flavor                               | m1.tiny (1)                                   |
| hostId                               |                                               |
| id                                   | ea7129c7-18e1-44bf-a17b-ef8a167a8b4b          |
| image                                | cirros (10e9295e-aa88-4cc5-a91e-11ccf0cc5764) |
| key_name                             | mykey                                         |
| metadata                             | {}                                            |
| name                                 | public-instance                               |
| os-extended-volumes:volumes_attached | []                                            |
| progress                             | 0                                             |
| security_groups                      | default                                       |
| status                               | BUILD                                         |
| tenant_id                            | 261db0ad41984bd1b113e19c92aa4174              |
| updated                              | 2016-03-09T13:47:48Z                          |
| user_id                              | 606788646f2b474a9157c7c86c91faab              |
+--------------------------------------+-----------------------------------------------+

nova list
+--------------------------------------+-----------------+--------+------------+-------------+------------------------+
| ID                                   | Name            | Status | Task State | Power State | Networks               |
+--------------------------------------+-----------------+--------+------------+-------------+------------------------+
| ea7129c7-18e1-44bf-a17b-ef8a167a8b4b | public-instance | ACTIVE | -          | Running     | public=192.168.139.182 |
+--------------------------------------+-----------------+--------+------------+-------------+------------------------+

[root@ocontrol ~(keystone_admin_v3)]# nova get-vnc-console public-instance novnc
+-------+-------------------------------------------------------------------------------+
| Type  | Url                                                                           |
+-------+-------------------------------------------------------------------------------+
| novnc | http://ocontrol:6080/vnc_auto.html?token=ec2013e8-7cad-458e-82dd-ae4153f2190c |
+-------+-------------------------------------------------------------------------------+

#ping 网关
#ping 192.168.128.1
#ping www.baidu.com

ssh cirros@192.168.139.182

###★★★★★Networking Option 1: Provider networks------end★★★★★★★★
###★★★★★Networking Option 2: Self-service networks-------begin★★★★★★★★

###★★★★★Networking Option 2: Self-service networks-------end★★★★★★★★






■■■■■■■■■■■■■■■■■■neutron end■■■■■■■■■■■■■■■■■■
■■■■■■■■■■■■■■■■■■horizon begin■■■■■■■■■■■■■■■■■■



■■■■■■■■■■■■■■■■■■horizon end■■■■■■■■■■■■■■■■■■









  • 大小: 46.4 KB
分享到:
评论

相关推荐

    Openstack Icehouse版本安装指南

    OpenStack Icehouse版本安装指南是一份指导性文档,它详细描述了如何在Ubuntu 12.04或Ubuntu 14.04 LTS(长期支持版)操作系统上安装OpenStack Icehouse版本的步骤和配置要求。OpenStack Icehouse是OpenStack项目的...

    OpenStack Essex版本安装

    总之,OpenStack Essex版本的安装是一个涉及多步骤的过程,需要对网络、存储和系统管理有深入理解。每个节点的网络配置、NTP服务的同步、iSCSI和块存储的设置,以及Linux桥接网络的构建都是成功部署的关键环节。在...

    OpenStack Victoria版安装部署实例教程

    OpenStack Victoria版安装部署教程详细地涵盖了在CentOS 8.4系统上建立OpenStack云环境的全过程。这个教程由17个章节组成,旨在帮助读者理解并实践OpenStack组件的配置和安装。 首先,安装环境准备阶段,你需要至少...

    Openstack M版安装

    手动安装openstack Mitaka版

    Openstack M版本离线搭建

    ### OpenStack M 版本离线搭建详解 #### 一、概述 OpenStack M 版本,即 OpenStack Mitaka 版本,是 OpenStack 的一个成熟版本之一,广泛应用于私有云建设和管理中。然而,在很多企业的环境中,出于安全考虑,内部...

    Openstack F版本源码安装

    9. **集成测试**:安装完成后,进行基本的功能验证,如创建虚拟机、网络连接和存储操作,确保OpenStack F版本的各个组件能够协同工作。 10. **持续监控与维护**:安装OpenStack后,定期监控系统的性能和稳定性,...

    openstack train 版本安装记录文件.txt

    openstack train 版本安装记录文件.txt 从0安装的一份记录,参考官网安装,也记录了一些官网文档的坑!

    openstack一体化安装的详细完整步骤

    总之,OpenStack一体化安装是一个涉及多步骤、多组件的过程,需要对Linux系统、网络配置和OpenStack架构有深入理解。遵循上述步骤,结合实际情况进行调整,可以成功地在VMware Workstation上搭建一个功能齐全的...

    openstack--L版本

    1.手动安装 liberty 版本 openstack 环境 2.手动安装 liberty 版本 openstack 环境(allinone)---安装数据库及 rabbitmq 3.手动安装liberty版本openstack环境(allinone)---安装keystone 4.手动安装 liberty 版本 ...

    openstack m 版本搭建

    以上就是关于OpenStack M版本搭建的相关知识点,包括环境准备、网络配置、时间同步、软件包安装、数据库配置以及消息队列服务等内容。在实际部署过程中,还需要根据具体的业务需求和技术栈进行调整和优化。

    openstack安装N版本

    根据提供的文档内容,本文将详细解析OpenStack Newton版本的安装步骤及所需进行的前期准备活动。OpenStack是一款开源的云计算管理平台项目,旨在为公共云和私有云提供可扩展的弹性计算服务。Newton版本是OpenStack的...

    基于centos7的单实例openstack安装

    单实例 OpenStack 安装将所有基本功能(如计算、网络、存储和仪表板)安装在同一台机器上。 标签: OpenStack 安装 部分内容: 单实例 OpenStack 安装测试环境准备 在本次部署演示中,我们采用 CentOS 7 来部署一个...

    openstack的essex安装

    ### OpenStack Essex 版本安装指南 #### 一、OpenStack Essex 概览 OpenStack Essex 是 OpenStack 发展过程中的一个里程碑版本,发布于2012年4月5日,它标志着 OpenStack 从早期阶段步入了一个相对成熟的阶段。...

    Ubuntu 14.04一步一步安装Openstack Kilo版本

    在Ubuntu 14.04上安装Openstack Kilo版本,是云计算领域工程师的一个重要实践,有助于了解并掌握Openstack这个开源云计算平台的搭建和使用。下面将详细介绍从系统安装到Openstack各个组件配置的全过程。 1. 安装...

    openstack kilo 中文安装文档

    以上内容为OpenStack Kilo版本的安装指南,涵盖了从准备环境到安装、配置、验证各个关键组件的完整流程。文档还提及了各个项目的官方安装手册,对于任何有兴趣深入学习OpenStack的初学者而言,这份安装文档有着重要...

    openstack ocata版本安装完全上手指南(openvswitch+vlan)

    根据提供的文件信息,本文将对OpenStack Ocata版本的安装进行全面深入地介绍,重点涵盖环境配置、公共服务安装、网络设置及必要的系统优化等关键步骤。 ### 环境综述 #### 控制端公共服务的准备 1. **DNS解析推荐...

    openstack安装

    里面详细讲述了openstack的安装过程,但是这个版本是关于openstack icehouse的安装

    openstack_queens安装

    OpenStack Queens是OpenStack开源云平台的一个版本,发布于2018年,它提供了丰富的云计算功能和服务,包括计算、存储、网络等基础设施服务。在本文中,我们将深入探讨如何在CentOS 7环境下安装OpenStack Queens,...

    openstack的k版安装

    openstack的k版安装,完整版英文版。

Global site tag (gtag.js) - Google Analytics