In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you how to install vmware openstack and install mysql,keyston glance,nova, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
Create three virtual machines with vmware, and name them: controller, compute, network. On the controller node: 1.sudo nano / etc/hostname 2. Changing ubuntu to controller # ubuntu is the default hostname 3.ifconfig to view the IP address on the controller node and remember the IP address
On the compute node: 1.sudo nano / etc/hostname 2. Changing ubuntu to compute # ubuntu is the default hostname 3.ifconfig to view the IP address on the compute node and remember the IP address
On the network node: 1.sudo nano / etc/hostname 2. Changing ubuntu to network # ubuntu is the default hostname 3.ifconfig to view the IP address on the network node and remember the IP address
Three nodes execute reboot after modifying hostname
Do the same on three nodes: 1.sudo nano / etc/hosts 2. Add three IP addresses, as recorded just now: 192.168.40.142 controller 192.168.40.141 compute 192.168.40.143 network
Sudo service networking restart is executed on all three nodes
After execution, each executes the ping command, and ping the hostname of the other two to see if it can communicate with ping.
After configuring the nodes of the three virtual machines.
On the controller node: 1.sudo apt-get update updates 2.sudo apt-get install python-mysqldb mariadb-server mysql-server after installing mysql 3.sudo vim / etc/mysql/my.cnf 4. Modify the IP default-storage-engine = innodb innodb_file_per_table collation-server = utf8_general_ci init-connect = 'SET NAMES utf8' character-set-server = utf8 of the [mysqld] bind-address = xxx.xxx.xxx.xx # controller node
5.sudo service mysql restart 6.sudo mysql_install_db 7.sudo mysql_secure_installation # * Enter yes for all 8. Sudo apt-get install rabbitmq-server 9.sudo rabbitmqctl change_password guest openstack # openstack is the password 10.sudo apt-get install keystone 11.sudo nano / etc/keystone/keystone.conf of rabbitmq server
[sql]
The SQLAlchemy connection string used to connect to the database
Connection = mysql://keystone:openstack@controller/keystone...
The openstack here is the keystone database password controller is the hostname 12.sudo rm-f / var/lib/keystone/keystone.db of the current worker node
$mysql-u root-p mysql > CREATE DATABASE keystone; mysql > GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'localhost' IDENTIFIED BY' openstack'; mysql > GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'%' IDENTIFIED BY' openstack'
The openstack here is the keystone database password
$sudo keystone-manage db_sync
$sudo nano / etc/keystone/keystone.conf
[DEFAULT] # A "shared secret" between keystone and other openstack services admin_token = openstack... # openstack > admin token password
$sudo service keystone restart
$export OS_SERVICE_TOKEN=openstack $export OS_SERVICE_ENDPOINT= http://controller:35357/v2.0
# openstack > admin token
$keystone tenant-create-name=admin-description= "Admin Tenant" $keystone tenant-create-name=service-description= "Service Tenant"
$keystone user-create-name=admin-pass=openstack-email=admin@controller
# openstack > admin password
$keystone role-create-name=admin
$keystone user-role-add-user=admin-tenant=admin-role=admin
$keystone tenant-create-name demo-description "Demo Tenant"
$keystone user-create-name demo-tenant demo-pass DEMO_PASS-email demo@example.com
$keystone service-create-name=keystone-type=identity-description= "Keystone Identity Service"
Keystone endpoint-create-- service-id=the_service_id_ above [a0f5eb172e104a67847bac8f8578fa2a]-- publicurl= http://controller:5000/v2.0-- internalurl= http://controller:5000/v2.0-- adminurl= http://controller:35357/v2.0
* enter above displayed service id in place of
$unset OS_SERVICE_TOKEN OS_SERVICE_ENDPOINT
$keystone-- os-username=admin-- os-password=openstack-- os-auth-url= http://controller:35357/v2.0 token-get
* openstack > admin password
$keystone-os-username=admin-os-password=openstack-os-tenant-name=admin-os-auth-url= http://controller:35357/v2.0 token-get
* openstack > admin password
$touch openrc.sh
Export OS_USERNAME=admin export OS_PASSWORD=openstack export OS_TENANT_NAME=admin export OS_AUTH_URL= http://controller:35357/v2.0
$touch demo-openrc.sh export OS_TENANT_NAME=demo export OS_USERNAME=demo export OS_PASSWORD=DEMO_PASS export OS_AUTH_URL= http://controller:5000/v2.0
$source openrc.sh
$keystone token-get
$keystone user-list
$mysql-u root-p
CREATE DATABASE glance; GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'localhost' IDENTIFIED BY' openstack'; GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'%' IDENTIFIED BY' openstack'; exit
$source openrc.sh $keystone user-create-- name glance-- pass openstack $keystone user-role-add-- user glance-- tenant service--role admin $keystone service-create-- name glance-- type image-- description "OpenStack Image Service" $keystone endpoint-create-- service-id $(keystone service-list | awk'/ image / {print $2}')-publicurl http://controller:9292-internalurl http://controller:9292-adminurl http://controller:9292-region regionOne
$apt-get install glance
$apt-get install python-glanceclient
$nano / etc/glance/glance-api.conf
[DEFAULT]... Verbose = True [database]... Cancel sqlite_db = .connection = mysql://glance:openstack@controller/glance
[keystone_authtoken]... Auth_host = controller auth_port = 35357 auth_protocol = http admin_tenant_name = service admin_user = glance admin_password = openstack
[paste_deploy]... Flavor = keystone. Notifier_strategy = default notification_driver = noop
$nano / etc/glance/glance-registry.conf [DEFAULT] verbose = True.... [database] delete sqlite_db = / var/lib/glance/glance.sqlite connection = mysql://glance:openstack@controller/glance
[keystone_authtoken] auth_host = controller auth_port = 35357 auth_protocol = http admin_tenant_name = service admin_user = glance admin_password = openstack
[paste_deploy]... flavor = keystone
Notification_driver = noop
$glance-manage db_sync
When an error occurs: Tables "migrate_version" have non utf8 collation, please make sure all tables are CHARSET=utf8 execute: mysql-u root-p mysql > alter table migrate_version convert to character set utf8 collate utf8_unicode_ci; mysql > flush privileges; mysql > quit
$rm-f / var/lib/glance/glance.sqlite $service glance-registry restart $service glance-api restart $mkdir / tmp/images $cd / tmp/images $wget http://cdn.download.cirros-cloud.net/0.3.3/cirros-0.3.3-x86_64-disk.img $source openrc.sh $glance image-create-name "cirros"-file cirros-0.3.3-x86_64-disk.img-disk-format qcow2-container-format bare-is-public True-progress $glance image-list
$mysql-u root-p
$CREATE DATABASE nova
$GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'localhost' IDENTIFIED BY' openstack'
$GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'%' IDENTIFIED BY' openstack'
$exit
$source openrc.sh
$keystone user-create-name nova-pass openstack
$keystone user-role-add-user nova-tenant service-role admin
$keystone service-create-name nova-type compute-description "OpenStack Compute"
Keystone endpoint-create-- service-id $(keystone service-list | awk'/ compute / {print $2}')-- publicurl http://controller:8774/v2/%(tenant_id)s-- internalurl http://controller:8774/v2/%(tenant_id)s-- adminurl http://controller:8774/v2/%(tenant_id)s-- region regionOne
$apt-get install nova-api $apt-get install nova-cert $apt-get install nova-conductor $apt-get install nova-consoleauth $apt-get install nova-novncproxy $apt-get install nova-scheduler $apt-get install python-novaclient
$sudo nano / etc/nova/nova.conf [DEFAULT]. Rpc_backend = rabbit rabbit_host = controller rabbit_password = openstack
Auth_strategy = keystone
My_ip = 192.168.40.142 vncserver_listen = 192.168.40.142 vncserver_proxyclient_address = 192.168.40.142
[database] connection = mysql://nova:openstack@controller/nova
[keystone_authtoken] auth_host = controller auth_port = 35357 auth_protocol = http admin_tenant_name = service admin_user = glance admin_password = openstack
[glance] host = controller
$sudo nova-manage db sync
$sudo rm-f / var/lib/nova/nova.sqlite
$service nova-api restart $service nova-cert restart $service nova-consoleauth restart $service nova-scheduler restart $service nova-conductor restart $service nova-novncproxy restart
On the Compute node: $apt-get install nova-compute sysfsutils $nano / etc/nova/nova.conf [DEFAULT] .rpc_backend = rabbit rabbit_host = controller rabbit_password = openstack
Auth_strategy = keystone
My_ip = 192.168.40.141
Vnc_enabled = True vncserver_listen = 0.0.0.0 vncserver_proxyclient_address = 192.168.40.141 novncproxy_base_url = http://controller:6080/vnc_auto.html
[keystone_authtoken]... Auth_host = controller auth_port = 35357 auth_protocol = http admin_tenant_name = service admin_user = glance admin_password = openstack
[glance]... Host = controller
$egrep-c'(vmx | svm)'/ proc/cpuinfo
If you execute this command with a value of 0 and your compute node does not support hard-ware acceleration, you must modify the libvirt configuration and replace KVM with QEMU
$nano / etc/nova/nova-compute.conf [libvirt]. Virt_type = qemu
$service nova-compute restart $rm-f / var/lib/nova/nova.sqlite
On the Controller node: $source openrc.sh $nova service-list $nova image-list
The above is all the contents of the article "how to install openstack and install mysql,keyston glance,nova in vmware". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.