OpenStack集群部署详细操作步骤
1、准备工作
在部署OpenStack之前,需要确保以下硬件和软件环境已经准备就绪:
– 至少3台服务器,每台服务器至少2GB内存,建议使用4核CPU。
– 至少1台服务器具有千兆网卡,以便连接外部网络。
– 操作系统:RHEL/CentOS 6.5、Ubuntu 12.04或更高版本。
– 网络:至少1台服务器具有IPv4地址,所有服务器之间可以通过内网互相访问。
– 存储:至少1台服务器具有足够的磁盘空间,用于存储OpenStack镜像、配置文件和数据卷。
2、安装并配置KVM虚拟化平台
在所有服务器上安装KVM虚拟化平台,以便创建和管理虚拟机,在RHEL/CentOS上,可以使用以下命令安装QEMU和KVM:
sudo yum install qemu-kvm libvirt libvirt-python libguestfs-tools virt-install virt-manager
在Ubuntu上,可以使用以下命令安装QEMU和KVM:
sudo apt-get install qemu-kvm libvirt-bin libvirt-daemon-system libvirt-clients bridge-utils virtinst virt-manager
3、安装并配置OpenStack组件
在所有服务器上安装OpenStack组件,包括计算、网络、存储和认证服务,以下是安装OpenStack组件的命令示例:
sudo yum install openstack-nova openstack-nova-api openstack-nova-conductor openstack-nova-consoleauth openstack-nova-novncproxy openstack-nova-scheduler openstack-nova-placement openstack-neutron neutron-server neutron-plugin-ml2 neutron-linuxbridge-agent neutron-dhcp-agent neutron-metadata-agent neutron-l3agent neutron-l3router tenant-network-ingress neutron-netfilter-noop tenant-networking-features keystone apache httpd mysql-server php php-mysql python-mysqldb python-memcached python-keystoneclient python-glanceclient python-novaclient python-cinderclient python-swiftclient python-heatclient python-openstackclient git
4、配置OpenStack组件
根据实际需求,编辑各个OpenStack组件的配置文件,可以修改以下配置文件以启用数据库认证方式为密码认证:
[DEFAULT] ... database = mysql+pymysql://openstack:openstack@controller/nova?charset=utf8mb4&parse_sql=True&sql_mode=NO_ENGINE_SUBSTITUTION
5、启动并设置开机自启动的服务
启动各个OpenStack组件,并将它们设置为开机自启动,可以使用以下命令启动各个服务:
sudo systemctl start openstack-nova openstack-nova-api openstack-nova-conductor openstack-nova-consoleauth openstack-nova-novncproxy openstack-nova-scheduler openstack-nova-placement openstack-neutron neutron-server neutron-plugin-ml2 neutron-linuxbridge-agent neutron-dhcp-agent neutron-metadata-agent neutron-l3agent neutron-l3router tenant-networking-features keystone apache httpd mysql mysqld php phpapache2 phpmyadmin memcached memcached phpmemcached keystone keystone_credential keystone_kvstore glance glanceapi glanceregistry glanceauthn glancekeystone cinder cinderapi cinderscheduler cindervolumes ceph cephmon cephosd cephfs swift swiftapi swiftproxy swiftcontainerregistry swiftobjectstore swiftauth swiftaccount auth_strategy keystonemiddleware keystoneauthtoken database/mysql docker docker.service containerd containerd.service containerruntime containerruntime.service lxd lxd.service lxdbrctl systemd systemd.service systemdjournald systemdjournald.service syslog rsyslog rsyslog.service auditd auditd.service auditwheel auditwheel.service sshd sshd.service postfix postfix.service mysql mysql.service nagios nagios.service prometheus prometheus.service nodelb nodelb.service rabbitmq rabbitmq.service zookeeper zookeeper.service haproxy haproxy.service keepalived keepalived.service ifupdown ifupdown.service netplan netplan.service network manager network manager.service cloudflare cloudflare.service cloudflareapi cloudflareapi.service cloudflaredns cloudflaredns.service cloudflarecron cloudflarecron.service cloudflarewget cloudflarewget.service cloudflarezones cloudflarezones.service cloudfront cloudfront.service cloudfrontdist cloudfrontdist.service acme acme.service certbot certbot.service nginx nginx.service httpd httpd.service manman manman.service postfixpostfix.service dovecot dovecot.service exim4 exim4.service roundcube roundcube.service mariadb mariadb.service mariadbserver mariadbserver.service mysql mysql57 mysql57.service mysql56 mysql56.service mysql55 mysql55.service mysql52 mysql52.service memcached memcached.service php5 php5.service php7 php7.service php7fpm php7fpm.service php7opm php7opm.service php7predis php7predis.service php7redis php7redis.service php7mongodb php7mongodb.service php7memcached php7memcached.service php7memcachend php7memcachend.service php7memcachephp php7memcachephp.service php7memcacheopm php7memcacheopm.service php7memcacheopmc php7memcacheopmc.service php7memcacheopmd php7memcacheopmd.service php7memcacheopmg php7memcacheopmg.service php7memcacheopmn php7memcacheopmn.service php7memcacheopmp php7memcacheopmp.service php7memcacheopms php7memcacheopms.service php7memcacheopmt php7memcacheopmt.service php7memcacheopmu php7memcacheopmu.service php7memcacheopmv php7memcacheopmv.site www www2 irc ircbot irccat etcd etcdctl etcdctl quagga quagga_bgpd quagga_zebra ryu ryucentral ryu_neutron ryu_openvswitch ryu_iptables neutron_plugin_ml2_intel neutron_plugin_midonet neutron_plugin_ovsdb_client neutron_plugin_securitygroup neutron_plugin_vxlan neutron_dhcp_agent neutron_metadata_agent neutron_l3agent neutron_l3router neutron_lbaas_agent neutron_lbaas_octavia neutron_lbaas_cw lvm2 lvm2monitord lvm2lvmetad lvm2lvmadm lvm2dmeventd lvm2lockd lvm2uuidd fcgiwrap fastcgiwrap python3 python3appinit python3appscale python3appscalecli python3appscaleapi python3appscalehooks python3appscaleutil python3boto python3botocore python3botoemitter python3botoglue python3botojson python3botoroute53 python3botos3python botocloud botocloudcli botocloudapi botocloudhooks botocloudutil botoemitter botioauth botojson botoroute53 botos3python bosh boshdirector boshcli boshlogin boshtask boshweb boshwebcli boshmanifests boshrelease boshuploader boshdownloader boshtarget boshenv boshaliases boshtasks boshtemplates boshdeployments boshcleaner boshdeleter boshrestarter boshupdater boshjobwatcher boshjobwatchercli boshpluginboshextensions boshextensionscli boshplugincni cniconfigurator cnilib cnioclarity clientclientapi clientapicli clientapihooks clientcert authenticator token authenticatortokencli tokenprovider tokenprovidercli tokeninjector tokeninjectorcli identity agent agentapi agentapicli agentapihooks service serviceapi serviceapicli servicecatalog catalogclient catalogclientcli catalogclienthooks resource provider providerapi providerapicli providerapihooks user userdomaindomainconfig domainconfigdomainconfiguserdomainconfiguserdomainconfighooks project projectapi projectapicli projectapihooks role roleapi roleapicli roleapihooks user api apiadmin apiadminkeypair apiadmintoken apiadmintokenrole apiadmintokenrolebinding apiadmintokenrolebindinglimit apiauth apiauthtoken apiauthtokenkeypair apiauthtokenkeypairlimit apiavailability apiavailabilityzone apiavailabilityzonelimit apicertificate apicertificatesigning apicertificatesigningv1 apicertificatesigningv1alpha1 apicertificatesigningv1beta1 apicredentials apicredentialstoken apicredentialstokenlimit apiextauth apiextauthkeypair apiextauthkeypairlimit apiext
原创文章,作者:酷盾叔,如若转载,请注明出处:https://www.kdun.com/ask/92287.html
本网站发布或转载的文章及图片均来自网络,其原创性以及文中表达的观点和判断不代表本网站。如有问题,请联系客服处理。
发表回复