- 浏览: 1481838 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (691)
- linux (207)
- shell (33)
- java (42)
- 其他 (22)
- javascript (33)
- cloud (16)
- python (33)
- c (48)
- sql (12)
- 工具 (6)
- 缓存 (16)
- ubuntu (7)
- perl (3)
- lua (2)
- 超级有用 (2)
- 服务器 (2)
- mac (22)
- nginx (34)
- php (2)
- 内核 (2)
- gdb (13)
- ICTCLAS (2)
- mac android (0)
- unix (1)
- android (1)
- vim (1)
- epoll (1)
- ios (21)
- mysql (3)
- systemtap (1)
- 算法 (2)
- 汇编 (2)
- arm (3)
- 我的数据结构 (8)
- websocket (12)
- hadoop (5)
- thrift (2)
- hbase (1)
- graphviz (1)
- redis (1)
- raspberry (2)
- qemu (31)
- opencv (4)
- socket (1)
- opengl (1)
- ibeacons (1)
- emacs (6)
- openstack (24)
- docker (1)
- webrtc (11)
- angularjs (2)
- neutron (23)
- jslinux (18)
- 网络 (13)
- tap (9)
- tensorflow (8)
- nlu (4)
- asm.js (5)
- sip (3)
- xl2tp (5)
- conda (1)
- emscripten (6)
- ffmpeg (10)
- srt (1)
- wasm (5)
- bert (3)
- kaldi (4)
- 知识图谱 (1)
最新评论
-
wahahachuang8:
我喜欢代码简洁易读,服务稳定的推送服务,前段时间研究了一下go ...
websocket的helloworld -
q114687576:
http://www.blue-zero.com/WebSoc ...
websocket的helloworld -
zhaoyanzimm:
感谢您的分享,给我提供了很大的帮助,在使用过程中发现了一个问题 ...
nginx的helloworld模块的helloworld -
haoningabc:
leebyte 写道太NB了,期待早日用上Killinux!么 ...
qemu+emacs+gdb调试内核 -
leebyte:
太NB了,期待早日用上Killinux!
qemu+emacs+gdb调试内核
参考
http://docs.openstack.org/mitaka/install-guide-rdo
三台机器同步时间
ntpdate cn.ntp.org.cn
两台机器controller节点mcon compute节点mcom
配置
vim /etc/hosts
######
192.168.139.251 mcon
192.168.139.252 mcom
#####
/etc/sysconfig/network-scripts/ifcfg-eth0
#############
NAME="eth0"
DEVICE="eth0"
ONBOOT="yes"
NM_CONTROLLED=yes
BOOTPROTO=static
IPADDR=192.168.139.251
NETMASK=255.255.240.0
GATEWAY=192.168.128.1
DNS1=114.114.114.114
#####################
systemctl stop firewalld.service
systemctl disable firewalld.service
vim /etc/hostname
vim /etc/selinux/config
########
SELINUX=disabled
########
yum install centos-release-openstack-mitaka -y
yum install https://rdoproject.org/repos/rdo-release.rpm -y
yum upgrade -y
yum install python-openstackclient -y
yum install openstack-selinux -y
yum install mariadb mariadb-server python2-PyMySQL -y
vim /etc/my.cnf.d/mariadb-server.cnf
###########################
[mysqld]
bind-address = 192.168.139.251
default-storage-engine = innodb
innodb_file_per_table
max_connections = 4096
collation-server = utf8_general_ci
character-set-server = utf8
############################
systemctl enable mariadb.service
systemctl start mariadb.service
mysql_secure_installation
配置密码
yum install mongodb-server mongodb -y
/etc/mongod.conf
########
bind_ip = 192.168.139.251
smallfiles = true
##########
systemctl enable mongod.service
systemctl start mongod.service
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 memcached python-memcached -y
systemctl enable memcached.service
systemctl start memcached.service
@@@@@@@@@@@@@@@@在controller节点安装keystone@@@@@@@@@@@@@@@@@@
mysql -u root -p
CREATE DATABASE keystone;
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'localhost' IDENTIFIED BY 'haoning';
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'%' IDENTIFIED BY 'haoning';
flush privileges;
openssl rand -hex 10 得到3b4cc857a2c7ba154ee3
yum install openstack-keystone httpd mod_wsgi -y
/etc/keystone/keystone.conf
##########
[DEFAULT]
admin_token = 3b4cc857a2c7ba154ee3
[database]
connection = mysql+pymysql://keystone:haoning@mcon/keystone
[token]
provider = fernet
#############
su -s /bin/sh -c "keystone-manage db_sync" keystone
keystone-manage fernet_setup --keystone-user keystone --keystone-group keystone
/etc/httpd/conf/httpd.conf
########################
ServerName mcon
########################
/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
ErrorLogFormat "%{cu}t %M"
ErrorLog /var/log/httpd/keystone-error.log
CustomLog /var/log/httpd/keystone-access.log combined
<Directory /usr/bin>
Require all granted
</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
ErrorLogFormat "%{cu}t %M"
ErrorLog /var/log/httpd/keystone-error.log
CustomLog /var/log/httpd/keystone-access.log combined
<Directory /usr/bin>
Require all granted
</Directory>
</VirtualHost>
#########################
systemctl enable httpd.service
systemctl start httpd.service
export OS_TOKEN=3b4cc857a2c7ba154ee3
export OS_URL=http://mcon: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://mcon:5000/v3
openstack endpoint create --region wuhan identity internal http://mcon:5000/v3
openstack endpoint create --region wuhan identity admin http://mcon:35357/v3
如果建错
openstack endpoint list
#openstack endpoint delete edc8611dda794bffb8221d4e794f214b
openstack domain create --description "Default Domain" default
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
openstack token issue
unset OS_TOKEN OS_URL
openstack --os-auth-url http://mcon:5000/v3 --os-project-domain-name default --os-user-domain-name default --os-project-name demo --os-username demo token issue
o_admin.sh
##########################
export OS_PROJECT_DOMAIN_NAME=default
export OS_USER_DOMAIN_NAME=default
export OS_PROJECT_NAME=admin
export OS_USERNAME=admin
export OS_PASSWORD=haoning
export OS_AUTH_URL=http://mcon:35357/v3
export OS_IDENTITY_API_VERSION=3
export OS_IMAGE_API_VERSION=2
##########################
demo.sh
##########################
export OS_PROJECT_DOMAIN_NAME=default
export OS_USER_DOMAIN_NAME=default
export OS_PROJECT_NAME=demo
export OS_USERNAME=demo
export OS_PASSWORD=haoning
export OS_AUTH_URL=http://mcon:5000/v3
export OS_IDENTITY_API_VERSION=3
export OS_IMAGE_API_VERSION=2
########################
. demo.sh
openstack token issue
@@@@@@@@@@@@@@@glance@@@@@@@@@@@@@@@@
mysql -u root -p
CREATE DATABASE glance;
GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'localhost' IDENTIFIED BY 'haoning';
GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'%' IDENTIFIED BY 'haoning';
flush PRIVILEGES;
openstack user create --domain default --password-prompt glance
openstack role add --project service --user glance admin
openstack service create --name glance --description "OpenStack Image" image
openstack endpoint create --region wuhan image public http://mcon:9292
openstack endpoint create --region wuhan image internal http://mcon:9292
openstack endpoint create --region wuhan image admin http://mcon:9292
yum install openstack-glance -y
/etc/glance/glance-api.conf
#########################
[database]
connection = mysql+pymysql://glance:haoning@mcon/glance
[keystone_authtoken]
auth_uri = http://mcon:5000
auth_url = http://mcon:35357
memcached_servers = mcon:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = glance
password = haoning
[paste_deploy]
flavor = keystone
[glance_store]
stores = file,http
default_store = file
filesystem_store_datadir = /var/lib/glance/images/
#########################
/etc/glance/glance-registry.conf
#####################
[database]
connection = mysql+pymysql://glance:haoning@mcon/glance
[keystone_authtoken]
auth_uri = http://mcon:5000
auth_url = http://mcon:35357
memcached_servers = mcon:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = glance
password = haoning
[paste_deploy]
flavor = keystone
####################
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
. o_admin.sh
wget http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img
openstack image create "cirros" --file cirros-0.3.4-x86_64-disk.img --disk-format qcow2 --container-format bare --public
openstack image list
@@@@@@@@@@@@@@@@@@@nova controller节点@@@@@@@@@@@@@
mysql -u root -p
CREATE DATABASE nova_api;
CREATE DATABASE nova;
GRANT ALL PRIVILEGES ON nova_api.* TO 'nova'@'localhost' IDENTIFIED BY 'haoning';
GRANT ALL PRIVILEGES ON nova_api.* TO 'nova'@'%' IDENTIFIED BY 'haoning';
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_api.* TO 'nova'@'localhost' IDENTIFIED BY 'zouhuiying';
#GRANT ALL PRIVILEGES ON nova_api.* TO 'nova'@'%' IDENTIFIED BY 'zouhuiying';
#GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'localhost' IDENTIFIED BY 'zouhuiying';
#GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'%' IDENTIFIED BY 'zouhuiying';
flush privileges;
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://mcon:8774/v2.1/%\(tenant_id\)s
openstack endpoint create --region wuhan compute internal http://mcon:8774/v2.1/%\(tenant_id\)s
openstack endpoint create --region wuhan compute admin http://mcon:8774/v2.1/%\(tenant_id\)s
yum install openstack-nova-api openstack-nova-conductor openstack-nova-console openstack-nova-novncproxy openstack-nova-scheduler -y
/etc/nova/nova.conf
api_database
database
都要配置,容易漏
######################
[DEFAULT]
enabled_apis = osapi_compute,metadata
rpc_backend = rabbit
auth_strategy = keystone
my_ip = 192.168.139.251
use_neutron = True
firewall_driver = nova.virt.firewall.NoopFirewallDriver
[oslo_messaging_rabbit]
rabbit_host = mcon
rabbit_userid = openstack
rabbit_password = haoning
[api_database]
connection = mysql+pymysql://nova:haoning@mcon/nova_api
[database]
connection = mysql+pymysql://nova:haoning@mcon/nova
[keystone_authtoken]
auth_uri = http://mcon:5000
auth_url = http://mcon:35357
memcached_servers = mcon:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = nova
password = haoning
#Comment out or remove any other options in the [keystone_authtoken] section.
[vnc]
vncserver_listen = $my_ip
vncserver_proxyclient_address = $my_ip
[glance]
api_servers = http://mcon:9292
[oslo_concurrency]
lock_path = /var/lib/nova/tmp
#####################
#其实还要配置【neutron】 ,后面继续配置
su -s /bin/sh -c "nova-manage api_db sync" nova
su -s /bin/sh -c "nova-manage db sync" nova
systemctl enable openstack-nova-api.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-consoleauth.service openstack-nova-scheduler.service openstack-nova-conductor.service openstack-nova-novncproxy.service
openstack service list
@@@@@@@@@@@@@@@nova compute节点@@@@@@@@@@@@@@@@@@@@@@@
yum install openstack-nova-compute -y
/etc/nova/nova.conf
################
[DEFAULT]
rpc_backend = rabbit
auth_strategy = keystone
my_ip = 192.168.139.252
use_neutron = True
firewall_driver = nova.virt.firewall.NoopFirewallDriver
[oslo_messaging_rabbit]
rabbit_host = mcon
rabbit_userid = openstack
rabbit_password = haoning
[keystone_authtoken]
auth_uri = http://mcon:5000
auth_url = http://mcon:35357
memcached_servers = mcon:11211
auth_type = password
project_domain_name = default
user_domain_name = 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://mcon:6080/vnc_auto.html
[glance]
api_servers = http://mcon:9292
[oslo_concurrency]
lock_path = /var/lib/nova/tmp
[libvirt]
virt_type = qemu
#####################
egrep -c '(vmx|svm)' /proc/cpuinfo
systemctl enable libvirtd.service openstack-nova-compute.service
systemctl start libvirtd.service openstack-nova-compute.service
. o_admin.sh
openstack service list
openstack compute service list
@@@@@@@@@@@@@@@@@@@@@@@@@@neutron controller@@@@@@
create database neutron;
GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'localhost' IDENTIFIED BY 'haoning';
GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'%' 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://mcon:9696
openstack endpoint create --region wuhan network internal http://mcon:9696
openstack endpoint create --region wuhan network admin http://mcon:9696
yum install openstack-neutron openstack-neutron-ml2 openstack-neutron-linuxbridge ebtables -y
/etc/neutron/neutron.conf
###########################
[DEFAULT]
rpc_backend = rabbit
auth_strategy = keystone
notify_nova_on_port_status_changes = True
notify_nova_on_port_data_changes = True
core_plugin = ml2
service_plugins = router
allow_overlapping_ips = True
[keystone_authtoken]
auth_uri = http://mcon:5000
auth_url = http://mcon:35357
memcached_servers = mcon:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = neutron
password = haoning
[oslo_messaging_rabbit]
rabbit_host = mcon
rabbit_userid = openstack
rabbit_password = haoning
[database]
connection = mysql+pymysql://neutron:haoning@mcon/neutron
[nova]
auth_url = http://mcon:35357
auth_type = password
project_domain_name = default
user_domain_name = 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,vxlan
tenant_network_types = vxlan
mechanism_drivers = linuxbridge,l2population
extension_drivers = port_security
[ml2_type_flat]
flat_networks = provider
[ml2_type_vxlan]
vni_ranges = 1:1000
[securitygroup]
enable_ipset = True
###################################
/etc/neutron/plugins/ml2/linuxbridge_agent.ini
#########################
[linux_bridge]
physical_interface_mappings = provider:eth0
[vxlan]
enable_vxlan = True
local_ip = 192.168.139.251
l2_population = True
[securitygroup]
enable_security_group = True
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
############################
/etc/neutron/l3_agent.ini
############################
[DEFAULT]
interface_driver = neutron.agent.linux.interface.BridgeInterfaceDriver
external_network_bridge =
############################
/etc/neutron/dhcp_agent.ini
#####################
[DEFAULT]
interface_driver = neutron.agent.linux.interface.BridgeInterfaceDriver
dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq
enable_isolated_metadata = True
###################
/etc/neutron/metadata_agent.ini
################
[DEFAULT]
nova_metadata_ip = mcon
metadata_proxy_shared_secret = METADATA_SECRET
#####################
/etc/nova/nova.conf
######################★★★★★★★★★★★★★★★★nova需要操作neutron,没有会报NoSuchOptError: no such option in group neutron: auth_plugin#####################
[neutron]
url = http://mcon:9696
auth_url = http://mcon:35357
auth_type = password
project_domain_name = default
user_domain_name = 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
systemctl enable neutron-l3-agent.service
systemctl start neutron-l3-agent.service
neutron agent-list
openstack service list
@@@@@@@@@@@@@@@@@@neutron compute节点@@@@@@@@@@@@@@@
yum install openstack-neutron-linuxbridge ebtables ipset -y
/etc/neutron/neutron.conf
##########################
[DEFAULT]
rpc_backend = rabbit
auth_strategy = keystone
[oslo_messaging_rabbit]
rabbit_host = mcon
rabbit_userid = openstack
rabbit_password = haoning
[keystone_authtoken]
auth_uri = http://mcon:5000
auth_url = http://mcon:35357
memcached_servers = mcon:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = neutron
password = haoning
[oslo_concurrency]
lock_path = /var/lib/neutron/tmp
############################
/etc/neutron/plugins/ml2/linuxbridge_agent.ini
########################
[linux_bridge]
physical_interface_mappings = provider:eth0
[vxlan]
enable_vxlan = True
local_ip = 192.168.139.252
l2_population = True
[securitygroup]
enable_security_group = True
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
############################
/etc/nova/nova.conf
######################
[neutron]
url = http://mcon:9696
auth_url = http://mcon:35357
auth_type = password
project_domain_name = default
user_domain_name = 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
neutron ext-list
neutron agent-list
openstack flavor list
openstack flavor create --id 0 --vcpus 1 --ram 64 --disk 1 m1.nano
ssh-keygen -q -N ""
openstack keypair create --public-key ~/.ssh/id_rsa.pub mykey
openstack keypair list
#openstack security group rule create --proto icmp default
#openstack security group rule list
#openstack security group rule create --proto tcp --dst-port 22 default
openstack image list
openstack network list
openstack security group list
nova service-list
neutron agent-list
neutron net-list
bridge fdb
http://docs.openstack.org/mitaka/install-guide-rdo
三台机器同步时间
ntpdate cn.ntp.org.cn
两台机器controller节点mcon compute节点mcom
配置
vim /etc/hosts
######
192.168.139.251 mcon
192.168.139.252 mcom
#####
/etc/sysconfig/network-scripts/ifcfg-eth0
#############
NAME="eth0"
DEVICE="eth0"
ONBOOT="yes"
NM_CONTROLLED=yes
BOOTPROTO=static
IPADDR=192.168.139.251
NETMASK=255.255.240.0
GATEWAY=192.168.128.1
DNS1=114.114.114.114
#####################
systemctl stop firewalld.service
systemctl disable firewalld.service
vim /etc/hostname
vim /etc/selinux/config
########
SELINUX=disabled
########
yum install centos-release-openstack-mitaka -y
yum install https://rdoproject.org/repos/rdo-release.rpm -y
yum upgrade -y
yum install python-openstackclient -y
yum install openstack-selinux -y
yum install mariadb mariadb-server python2-PyMySQL -y
vim /etc/my.cnf.d/mariadb-server.cnf
###########################
[mysqld]
bind-address = 192.168.139.251
default-storage-engine = innodb
innodb_file_per_table
max_connections = 4096
collation-server = utf8_general_ci
character-set-server = utf8
############################
systemctl enable mariadb.service
systemctl start mariadb.service
mysql_secure_installation
配置密码
yum install mongodb-server mongodb -y
/etc/mongod.conf
########
bind_ip = 192.168.139.251
smallfiles = true
##########
systemctl enable mongod.service
systemctl start mongod.service
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 memcached python-memcached -y
systemctl enable memcached.service
systemctl start memcached.service
@@@@@@@@@@@@@@@@在controller节点安装keystone@@@@@@@@@@@@@@@@@@
mysql -u root -p
CREATE DATABASE keystone;
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'localhost' IDENTIFIED BY 'haoning';
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'%' IDENTIFIED BY 'haoning';
flush privileges;
openssl rand -hex 10 得到3b4cc857a2c7ba154ee3
yum install openstack-keystone httpd mod_wsgi -y
/etc/keystone/keystone.conf
##########
[DEFAULT]
admin_token = 3b4cc857a2c7ba154ee3
[database]
connection = mysql+pymysql://keystone:haoning@mcon/keystone
[token]
provider = fernet
#############
su -s /bin/sh -c "keystone-manage db_sync" keystone
keystone-manage fernet_setup --keystone-user keystone --keystone-group keystone
/etc/httpd/conf/httpd.conf
########################
ServerName mcon
########################
/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
ErrorLogFormat "%{cu}t %M"
ErrorLog /var/log/httpd/keystone-error.log
CustomLog /var/log/httpd/keystone-access.log combined
<Directory /usr/bin>
Require all granted
</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
ErrorLogFormat "%{cu}t %M"
ErrorLog /var/log/httpd/keystone-error.log
CustomLog /var/log/httpd/keystone-access.log combined
<Directory /usr/bin>
Require all granted
</Directory>
</VirtualHost>
#########################
systemctl enable httpd.service
systemctl start httpd.service
export OS_TOKEN=3b4cc857a2c7ba154ee3
export OS_URL=http://mcon: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://mcon:5000/v3
openstack endpoint create --region wuhan identity internal http://mcon:5000/v3
openstack endpoint create --region wuhan identity admin http://mcon:35357/v3
如果建错
openstack endpoint list
#openstack endpoint delete edc8611dda794bffb8221d4e794f214b
openstack domain create --description "Default Domain" default
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
openstack token issue
unset OS_TOKEN OS_URL
openstack --os-auth-url http://mcon:5000/v3 --os-project-domain-name default --os-user-domain-name default --os-project-name demo --os-username demo token issue
o_admin.sh
##########################
export OS_PROJECT_DOMAIN_NAME=default
export OS_USER_DOMAIN_NAME=default
export OS_PROJECT_NAME=admin
export OS_USERNAME=admin
export OS_PASSWORD=haoning
export OS_AUTH_URL=http://mcon:35357/v3
export OS_IDENTITY_API_VERSION=3
export OS_IMAGE_API_VERSION=2
##########################
demo.sh
##########################
export OS_PROJECT_DOMAIN_NAME=default
export OS_USER_DOMAIN_NAME=default
export OS_PROJECT_NAME=demo
export OS_USERNAME=demo
export OS_PASSWORD=haoning
export OS_AUTH_URL=http://mcon:5000/v3
export OS_IDENTITY_API_VERSION=3
export OS_IMAGE_API_VERSION=2
########################
. demo.sh
openstack token issue
@@@@@@@@@@@@@@@glance@@@@@@@@@@@@@@@@
mysql -u root -p
CREATE DATABASE glance;
GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'localhost' IDENTIFIED BY 'haoning';
GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'%' IDENTIFIED BY 'haoning';
flush PRIVILEGES;
openstack user create --domain default --password-prompt glance
openstack role add --project service --user glance admin
openstack service create --name glance --description "OpenStack Image" image
openstack endpoint create --region wuhan image public http://mcon:9292
openstack endpoint create --region wuhan image internal http://mcon:9292
openstack endpoint create --region wuhan image admin http://mcon:9292
yum install openstack-glance -y
/etc/glance/glance-api.conf
#########################
[database]
connection = mysql+pymysql://glance:haoning@mcon/glance
[keystone_authtoken]
auth_uri = http://mcon:5000
auth_url = http://mcon:35357
memcached_servers = mcon:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = glance
password = haoning
[paste_deploy]
flavor = keystone
[glance_store]
stores = file,http
default_store = file
filesystem_store_datadir = /var/lib/glance/images/
#########################
/etc/glance/glance-registry.conf
#####################
[database]
connection = mysql+pymysql://glance:haoning@mcon/glance
[keystone_authtoken]
auth_uri = http://mcon:5000
auth_url = http://mcon:35357
memcached_servers = mcon:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = glance
password = haoning
[paste_deploy]
flavor = keystone
####################
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
. o_admin.sh
wget http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img
openstack image create "cirros" --file cirros-0.3.4-x86_64-disk.img --disk-format qcow2 --container-format bare --public
openstack image list
@@@@@@@@@@@@@@@@@@@nova controller节点@@@@@@@@@@@@@
mysql -u root -p
CREATE DATABASE nova_api;
CREATE DATABASE nova;
GRANT ALL PRIVILEGES ON nova_api.* TO 'nova'@'localhost' IDENTIFIED BY 'haoning';
GRANT ALL PRIVILEGES ON nova_api.* TO 'nova'@'%' IDENTIFIED BY 'haoning';
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_api.* TO 'nova'@'localhost' IDENTIFIED BY 'zouhuiying';
#GRANT ALL PRIVILEGES ON nova_api.* TO 'nova'@'%' IDENTIFIED BY 'zouhuiying';
#GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'localhost' IDENTIFIED BY 'zouhuiying';
#GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'%' IDENTIFIED BY 'zouhuiying';
flush privileges;
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://mcon:8774/v2.1/%\(tenant_id\)s
openstack endpoint create --region wuhan compute internal http://mcon:8774/v2.1/%\(tenant_id\)s
openstack endpoint create --region wuhan compute admin http://mcon:8774/v2.1/%\(tenant_id\)s
yum install openstack-nova-api openstack-nova-conductor openstack-nova-console openstack-nova-novncproxy openstack-nova-scheduler -y
/etc/nova/nova.conf
api_database
database
都要配置,容易漏
######################
[DEFAULT]
enabled_apis = osapi_compute,metadata
rpc_backend = rabbit
auth_strategy = keystone
my_ip = 192.168.139.251
use_neutron = True
firewall_driver = nova.virt.firewall.NoopFirewallDriver
[oslo_messaging_rabbit]
rabbit_host = mcon
rabbit_userid = openstack
rabbit_password = haoning
[api_database]
connection = mysql+pymysql://nova:haoning@mcon/nova_api
[database]
connection = mysql+pymysql://nova:haoning@mcon/nova
[keystone_authtoken]
auth_uri = http://mcon:5000
auth_url = http://mcon:35357
memcached_servers = mcon:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = nova
password = haoning
#Comment out or remove any other options in the [keystone_authtoken] section.
[vnc]
vncserver_listen = $my_ip
vncserver_proxyclient_address = $my_ip
[glance]
api_servers = http://mcon:9292
[oslo_concurrency]
lock_path = /var/lib/nova/tmp
#####################
#其实还要配置【neutron】 ,后面继续配置
su -s /bin/sh -c "nova-manage api_db sync" nova
su -s /bin/sh -c "nova-manage db sync" nova
systemctl enable openstack-nova-api.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-consoleauth.service openstack-nova-scheduler.service openstack-nova-conductor.service openstack-nova-novncproxy.service
openstack service list
@@@@@@@@@@@@@@@nova compute节点@@@@@@@@@@@@@@@@@@@@@@@
yum install openstack-nova-compute -y
/etc/nova/nova.conf
################
[DEFAULT]
rpc_backend = rabbit
auth_strategy = keystone
my_ip = 192.168.139.252
use_neutron = True
firewall_driver = nova.virt.firewall.NoopFirewallDriver
[oslo_messaging_rabbit]
rabbit_host = mcon
rabbit_userid = openstack
rabbit_password = haoning
[keystone_authtoken]
auth_uri = http://mcon:5000
auth_url = http://mcon:35357
memcached_servers = mcon:11211
auth_type = password
project_domain_name = default
user_domain_name = 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://mcon:6080/vnc_auto.html
[glance]
api_servers = http://mcon:9292
[oslo_concurrency]
lock_path = /var/lib/nova/tmp
[libvirt]
virt_type = qemu
#####################
egrep -c '(vmx|svm)' /proc/cpuinfo
systemctl enable libvirtd.service openstack-nova-compute.service
systemctl start libvirtd.service openstack-nova-compute.service
. o_admin.sh
openstack service list
openstack compute service list
@@@@@@@@@@@@@@@@@@@@@@@@@@neutron controller@@@@@@
create database neutron;
GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'localhost' IDENTIFIED BY 'haoning';
GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'%' 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://mcon:9696
openstack endpoint create --region wuhan network internal http://mcon:9696
openstack endpoint create --region wuhan network admin http://mcon:9696
yum install openstack-neutron openstack-neutron-ml2 openstack-neutron-linuxbridge ebtables -y
/etc/neutron/neutron.conf
###########################
[DEFAULT]
rpc_backend = rabbit
auth_strategy = keystone
notify_nova_on_port_status_changes = True
notify_nova_on_port_data_changes = True
core_plugin = ml2
service_plugins = router
allow_overlapping_ips = True
[keystone_authtoken]
auth_uri = http://mcon:5000
auth_url = http://mcon:35357
memcached_servers = mcon:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = neutron
password = haoning
[oslo_messaging_rabbit]
rabbit_host = mcon
rabbit_userid = openstack
rabbit_password = haoning
[database]
connection = mysql+pymysql://neutron:haoning@mcon/neutron
[nova]
auth_url = http://mcon:35357
auth_type = password
project_domain_name = default
user_domain_name = 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,vxlan
tenant_network_types = vxlan
mechanism_drivers = linuxbridge,l2population
extension_drivers = port_security
[ml2_type_flat]
flat_networks = provider
[ml2_type_vxlan]
vni_ranges = 1:1000
[securitygroup]
enable_ipset = True
###################################
/etc/neutron/plugins/ml2/linuxbridge_agent.ini
#########################
[linux_bridge]
physical_interface_mappings = provider:eth0
[vxlan]
enable_vxlan = True
local_ip = 192.168.139.251
l2_population = True
[securitygroup]
enable_security_group = True
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
############################
/etc/neutron/l3_agent.ini
############################
[DEFAULT]
interface_driver = neutron.agent.linux.interface.BridgeInterfaceDriver
external_network_bridge =
############################
/etc/neutron/dhcp_agent.ini
#####################
[DEFAULT]
interface_driver = neutron.agent.linux.interface.BridgeInterfaceDriver
dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq
enable_isolated_metadata = True
###################
/etc/neutron/metadata_agent.ini
################
[DEFAULT]
nova_metadata_ip = mcon
metadata_proxy_shared_secret = METADATA_SECRET
#####################
/etc/nova/nova.conf
######################★★★★★★★★★★★★★★★★nova需要操作neutron,没有会报NoSuchOptError: no such option in group neutron: auth_plugin#####################
[neutron]
url = http://mcon:9696
auth_url = http://mcon:35357
auth_type = password
project_domain_name = default
user_domain_name = 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
systemctl enable neutron-l3-agent.service
systemctl start neutron-l3-agent.service
neutron agent-list
openstack service list
@@@@@@@@@@@@@@@@@@neutron compute节点@@@@@@@@@@@@@@@
yum install openstack-neutron-linuxbridge ebtables ipset -y
/etc/neutron/neutron.conf
##########################
[DEFAULT]
rpc_backend = rabbit
auth_strategy = keystone
[oslo_messaging_rabbit]
rabbit_host = mcon
rabbit_userid = openstack
rabbit_password = haoning
[keystone_authtoken]
auth_uri = http://mcon:5000
auth_url = http://mcon:35357
memcached_servers = mcon:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = neutron
password = haoning
[oslo_concurrency]
lock_path = /var/lib/neutron/tmp
############################
/etc/neutron/plugins/ml2/linuxbridge_agent.ini
########################
[linux_bridge]
physical_interface_mappings = provider:eth0
[vxlan]
enable_vxlan = True
local_ip = 192.168.139.252
l2_population = True
[securitygroup]
enable_security_group = True
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
############################
/etc/nova/nova.conf
######################
[neutron]
url = http://mcon:9696
auth_url = http://mcon:35357
auth_type = password
project_domain_name = default
user_domain_name = 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
neutron ext-list
neutron agent-list
openstack flavor list
openstack flavor create --id 0 --vcpus 1 --ram 64 --disk 1 m1.nano
ssh-keygen -q -N ""
openstack keypair create --public-key ~/.ssh/id_rsa.pub mykey
openstack keypair list
#openstack security group rule create --proto icmp default
#openstack security group rule list
#openstack security group rule create --proto tcp --dst-port 22 default
openstack image list
openstack network list
openstack security group list
nova service-list
neutron agent-list
neutron net-list
bridge fdb
发表评论
-
br0和tap0的互相影响
2019-01-02 19:17 819转载 http://www.cnblogs.com/wlei/ ... -
M版openstack(ovs,dvr,动态迁移)
2017-06-09 10:30 1795主要内容 1.先搭建三个节点的环境,dvr模式 2.建一个vm ... -
M版本的openstack的例子(linuxbridge)
2017-05-23 15:05 560做两个节点控制节点和计算节点 mcontroller521 ... -
openstack的topo图
2016-09-07 14:07 637http://haoningabc.iteye.com/blo ... -
openstack的M版本的neutron的实验
2016-09-01 20:00 3142试验步骤: 1.创建内部 ... -
linux下TUN/TAP虚拟网卡的使用
2016-03-31 18:46 4894tun在网络层 tap在二层 ls ... -
openstack L版本(openvswitch的安装和应用)
2016-03-24 15:04 3024参考L版本的linuxbridge的安装方式 和k版本的ov ... -
openstack试验(linux vxlan)
2016-03-22 22:27 2734yum install centos-release-open ... -
backup a libvirt xml
2016-03-18 21:23 575<domain type='kvm' id='2'> ... -
neutron router试验
2016-03-17 20:41 969上接 http://haoningabc.iteye.com/ ... -
openstack L版本(使用linux bridge的vxlan)
2016-03-12 23:35 2380参考 http://docs.openstack.org/li ... -
openstack的L版本安装(flat网络)
2016-03-07 17:55 994参考http://docs.openstack.org ... -
openstack调试 数据库跟踪
2016-03-04 18:07 722查看openstack代码 openstack每个命令之后,数 ... -
使用devstack安装magnum
2015-11-18 21:22 1434在redhat6.5上建立个centos7的虚拟机,使用cen ... -
openstack 快速安装笔记
2015-07-19 15:21 1307前提是要配置好yum源 版本icehouse,操作系统redh ... -
openstack安装笔记 nova (未完成)(七)
2015-02-05 18:15 1166编辑 /etc/sysconfig/iptables ... -
openstack安装笔记 Neutron(未完成)(六)
2015-02-05 18:10 811验证 keystone role-list keysto ... -
openstack安装笔记 Horizon(五)
2015-02-04 16:08 2033适用的django 导入key cd /var/www/ht ... -
openstack安装笔记 swift(四)
2015-02-04 14:54 3044所有的安装都是yum 改配置 在keystone库中写serv ... -
openstack安装笔记 环境(零)
2015-02-04 12:18 1064在mac上用vmware rhel6.5 搭建openstac ...
相关推荐
手动安装openstack Mitaka版
### OpenStack M 版本离线搭建详解 #### 一、概述 OpenStack M 版本,即 OpenStack Mitaka 版本,是 OpenStack 的一个成熟版本之一,广泛应用于私有云建设和管理中。然而,在很多企业的环境中,出于安全考虑,内部...
以上就是关于OpenStack M版本搭建的相关知识点,包括环境准备、网络配置、时间同步、软件包安装、数据库配置以及消息队列服务等内容。在实际部署过程中,还需要根据具体的业务需求和技术栈进行调整和优化。
openstack-M资源包 |--cirros-0.3.4-x86_64-disk.img |--local_settings |--openstack_compute_install.sh |--openstack_rpm.tar.gz |--openstack-manuals_html.tar.gz |--openstack-mitaka-autoinstall.sh |--user_...
### OpenStack Essex 版本安装指南 #### 一、OpenStack Essex 概览 OpenStack Essex 是 OpenStack 发展过程中的一个里程碑版本,发布于2012年4月5日,它标志着 OpenStack 从早期阶段步入了一个相对成熟的阶段。...
### OpenStack学习及安装知识点概览 #### 一、OpenStack简介 - **定义与起源**:OpenStack是由NASA和Rackspace共同发起的一个开源云计算管理平台项目,以Apache许可证授权,旨在为用户提供一个自由、开放的云计算...
1.手动安装 liberty 版本 openstack 环境 2.手动安装 liberty 版本 openstack 环境(allinone)---安装数据库及 rabbitmq 3.手动安装liberty版本openstack环境(allinone)---安装keystone 4.手动安装 liberty 版本 ...
本文档是我自己参考官方文档搭建OpenStack Mitaka版本时整理总结的安装文档,希望对大家有用。
openstack-M版安装教程
详细介绍了Openstack对接FCSAN的设计,以及虚拟机连接FCSAN的流程,值得推荐。
OpenStack M版特指OpenStack的Mitaka版本,它于2016年发布,是OpenStack发展历史中的一个重要里程碑。Mitaka版本引入了许多新功能和改进,特别是在网络、存储、镜像和服务等方面进行了大量的优化。 #### 二、安装...
4-1 openstack 概述——local模式,M 版本安装【完成安装】 4-2 openstack 简单操作.pdf 4-3 fuel多节点方式安装openstack.pdf openstack 供应商Mirantis fuel概述 使用fuel安装多结点openstack.pdf 好东西就要分享...
fusionsphere openstack 云数据中心搭建36计-04.mp4,网盘文件,永久链接 fusionsphere openstack 云数据中心搭建36计-05.mp4 fusionsphere openstack...ManageOne ServiceCenter_V100R002C30SPC200_01_zh_YZF0118M.hdx
1. **基础环境准备**:首先,确保两台Ubuntu服务器已安装最新版本,并配置了静态IP地址。安装必要的包管理工具,如`apt`,并更新软件源。 2. **安装依赖**:OpenStack依赖于一系列库和服务,例如Keystone(身份服务...
官方离线安装包,测试可用。使用rpm -ivh [rpm完整包名] 进行安装
在这一阶段,主要任务是配置虚拟机的基础环境,包括网络设置、系统更新、安装必要的工具等,以确保OpenStack组件能够顺利安装和运行。 ### 第三章 yum源制作 在CentOS中,yum是默认的包管理器,用于安装、升级和...
用于Centos7的OpenstackMitaka版的包,全部下载到本地了,传进去设置好yum源就能用。
- **版本M**指的是**Mitaka**版本,发布于2016年4月6日。 - **CentOS 7**是基于Red Hat Enterprise Linux 7的一个免费且开源的Linux发行版。 #### 二、基础环境配置 ##### 2.1 节点硬件规划 - 使用**VMware ...
这份文档主要针对的是Kilo版本,并且特别提到了如何在openSUSE 13.2和SUSE Linux Enterprise Server 12上进行安装。下面我们将从架构、基本环境准备、添加身份服务等几个方面进行详细的解读。 ### 一、架构 #### ...