openstack项目搭建:
一、环境布署
二、配置keystone服务
三、配置glance服务
四、配置placement服务
五、配置nova服务控制节点
六、配置nova服务计算节点
七、配置neutron服务控制节点
八、配置neutron服务计算节点
九、建立实例
十、配置dashboard服务python
图中数字,如10,表示ip:192.168.99.10mysql
控制端:
内存:5G
vcpu:4
计算节点:
内存:2G
vcpu:2linux
/etc/yum.repos.d/openstack.repo
yum -y install centos-release-openstack-stein
yum -y install python-openstackclient openstack-selinux
yum -y install python2-PyMySQL mariadb
yum -y install mariadb mariadb-server
/etc/my.cnf.d/openstack.cnf
[mysqld] bind-address = 192.168.99.116 default-storage-engine = innodb innodb_file_per_table = on max_connections = 4096 collation-server = utf8_general_ci character-set-server = utf8
systemctl enable mariadb.service
systemctl start mariadb.service
mysql_secure_installation
yum -y install memcached python-memcached
/etc/sysconfig/memcached
文件OPTIONS="-l 192.168.99.116"
systemctl enable memcached.service
systemctl start memcached.service
ha_1和ha_2都要配置web
yum -y install keepalived haproxy
vrrp_instance VI_1 { state MASTER interface eth0 virtual_router_id 51 priority 100 advert_int 1 unicast_src_ip 192.168.99.112 unicast_peer { 192.168.99.113 } authentication { auth_type PASS auth_pass 1111 } virtual_ipaddress { 192.168.99.100 dev eth0 label eth0:1 } }
systemctl start keepalived
systemctl enable keepalived
global log 127.0.0.1 local2 chroot /var/lib/haproxy pidfile /var/run/haproxy.pid maxconn 4000 user haproxy group haproxy daemon stats socket /var/lib/haproxy/stats defaults mode http log global option httplog option dontlognull option http-server-close option forwardfor except 127.0.0.0/8 option redispatch retries 3 timeout http-request 10s timeout queue 1m timeout connect 10s timeout client 1m timeout server 1m timeout http-keep-alive 10s timeout check 10s maxconn 3000 listen stats mode http bind :9999 stats enable log global stats uri /haproxy-status stats auth admin:123 listen dashboard bind :80 mode http balance source server dashboard 192.168.99.116:80 check inter 2000 fall 3 rise 5 listen mysql bind :3306 mode tcp balance source server mysql 192.168.99.116:3306 check inter 2000 fall 3 rise 5 listen memcached bind :11211 mode tcp balance source server memcached 192.168.99.116:11211 inter 2000 fall 3 rise 5 listen rabbit bind :5672 mode tcp balance source server rabbit 192.168.99.116:5672 inter 2000 fall 3 rise 5 listen rabbit_web bind :15672 mode http server rabbit_web 192.168.99.116:15672 inter 2000 fall 3 rise 5
启动redis
systemctl restart haproxy
systemctl enable haproxy
echo "net.ipv4.ip_nonlocal_bind=1" >> /etc/sysctl.conf echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf sysctl -p
567二、15672端口
7. 安装sql
yum -y install rabbitmq-server
systemctl enable rabbitmq-server
systemctl start rabbitmq-server
rabbitmqctl add_user openstack 123
rabbitmqctl set_permissions openstack ".*" ".*" ".*"
rabbitmq-plugins enable rabbitmq_management
rabbitmq-plugins list
[mysql]$ rabbitmqctl list_users Listing users openstack [] guest [administrator]
一、环境布署
二、配置keystone服务
三、配置glance服务
四、配置placement服务
五、配置nova服务控制节点
六、配置nova服务计算节点
七、配置neutron服务控制节点
八、配置neutron服务计算节点
九、建立实例
十、配置dashboard服务数据库