To prepare the installation node:
1. Install Ubuntu server image to VMware; (Openssh,virtual machine Host)
2. Modify APT Source
sudo chmod +x/etc/apt/sources.list
sudo vim/etc/apt/sources.list
%s/us\.archive\.ubuntu/mirrors\.aliyun/g
3. sudo apt-get update
4. sudo apt-get install ubuntu-cloud-keyring
5. Sudo vi/etc/apt/sources.list.d/cloudarchive-juno.list
Deb Http://ubuntu-cloud.archive.canonical.com/ubuntu Trusty-updates/juno Main
6. sudo apt-get update
7. Sudo apt-get dist-upgrade
To install the OpenStack Support service:
Datebase:
MySQL, PostgreSQL (PG), SQLite, MariaDB
sudo apt-get install-y mariadb-server
sudo apt-get install Python-mysqldb
Vim/etc/mysql/my.cnf
Bind-address = xx.xx.xx.xx
Default-storage-engine = InnoDB
Innodb_file_per_table
Collation-server = Utf8_general_ci
Init-connect = ' SET NAMES UTF8 '
Character-set-server = UTF8
sudo service MySQL restart
Mysql_secure_installation
Amqp
RabbitMQ, Qpid, ZeroMQ
sudo apt-get install Rabbitmq-server
sudo rabbitmqctl Change_password guest 1
Install Keystone:
sudo apt-get install Keystone Python-keystoneclient
Mysql-u root-p
Create DATABASE Keystone;
Grant all privileges the keystone.* to ' keystone ' @ ' localhost ' identified by ' 1 ';
Grant all privileges the keystone.* to ' Keystone ' @ ' percent ' identified by ' 1 ';
Exit
sudo vim/etc/keystone/keystone.conf
Admin_token=admin
[Database]
Connection=mysql://keystone:[email Protected]/keystone
[Token]
Provider=keystone.token.providers. [Pkiz|pki|uuid]. Provider #uuid
Driver=keystone.token.persistence.backends.sql.token
Verbose=true
sudo cat/etc/passwd
sudo keystone-manage db_sync
sudo rm-f/var/lib/keystone/keystone.db
sudo service Keystone restart
Export os_service_endpoint=http://xx.xx.xx.xx:35357/v2.0
# Create a Tenant
Keystone Tenant-create-name Admin (no token)
Export Os_service_token=admin
Keystone Tenant-creat-name Admin
# Create User
Keystone User-create-name admin-tenant Admin-pass 1
Keystone Role-create-name Admin
Keystone User-role-add-tenant admin-user admin-role admin
Keystone User-role-list-tenant Admin-user Admin
Keystone Tenant-create-name Service
Keystone Service-create-name keystone-type=identity
Keystone endpoint-create-service-id=xxxxxx-publicurl=http://xx.xx.xx.xx:5000/v2.0-internalurl=http:// xx.xx.xx.xx:5000/v2.0-adminurl=http://xx.xx.xx.xx:35357/v2.0
Keystone Help Endpoint-create
unset Os_service_token Os_service_endpoint
Keystone-os-auth-url=http://xx.xx.xx.xx:35357/v2.0-os-username=admin-os-password=1-os-tenant-name=admin Tenant-create-name Demo
# Create an environment variable file to simplify command parameters
VI ADMINRC
Export os_auth_url=http://xx.xx.xx.xx:35357/v2.0
Export Os_username=admin
Export os_password=1
Export Os_tenant_name=admin
SOURCE ADMINRC
sudo vi/etc/keystone/keystone.conf
#admin_token =admin (commented out)
sudo service Keystone restart
Keystone Tenant-list
Keystone User-role-list-user=admin-tenant=admin
Install glance:
Mysql-uroot-p
CREATE DATABASE glance;
Grant all privileges the glance.* to ' glance ' @ ' localhost ' identified by ' 1 ';
Grant all privileges the glance.* to ' glance ' @ ' percent ' identified by ' 1 ';
Exit
Keystone User-create-name Glance-pass 1
Keystone User-role-add-user glance-tenant service-role admin
Keystone User-role-list-user glance-tenant Service
Keystone Service-create-name Glance-type Image
Keystone Endpoint-create-service-id xxxxxxx \
-publicurl http://xx.xx.xx.xx:9292 \
-internalurl http://xx.xx.xx.xx:9292 \
-adminurl http://xx.xx.xx.xx:9292 \
-region Regionone
sudo apt-get install glance python-glanceclient
sudo vi/etc/glance/glance-api.conf
Connection = Mysql://glance:[email Protected]/glance
[Keystone_authtoken]
Auth_url = http://xx.xx.xx.xx:5000/v2.0
Identity_uri = http://xx.xx.xx.xx.xx:35357
Admin_tenant_name = Service
Admin_user = glance
Admin_password = 1
Flavor = Keystone
verbose = True
Default_store = File
sudo vi/etc/glance-registry.conf
verbose = True
[Database]
Connection = Mysql://glance:[email Protected]/glance
[Keystone_authtoken]
Auth_url = http://xx.xx.xx.xx:5000/v2.0
Identity_uri = http://xx.xx.xx.xx.xx:35357
Admin_tenant_name = Service
Admin_user = glance
Admin_password = 1
Flavor=keystone
sudo glance-manage db_sync
sudo service glance-registry restart
sudo service Glance-api restart
# Upload Image
Glance Image-create-copy-from Http://cdn.download.cirros-cloud.net/0.3.3/cirros-0.3.3-x86_64-disk.img-name Cirrus-0.3.3-disk-format Qcow2-container-format Bare
Glance Image-list
Install Nova:
Mysql-uroot-p
Create Database Nova;
Grant all privileges the nova.* to [email protected] ' localhost ' identified by ' 1 ';
Grant all privileges the nova.* to [email protected] '% ' identified by ' 1 ';
Keystone User-create-name Nova-pass 1
Keystone User-role-add-user nova-tenant service-role admin
Keystone User-role-list-user nova-tenant Service
Keystone Service-create-name Nova-type Compute
Keystone Endpoint-create-service-id XXXX \
-publicurl http://192.168.114.169:8774/v2/%\ (tenant_id\) s \
-internalurl http://192.168.114.169:8774/v2/%\ (tenant_id\) s \
-adminurl http://192.168.114.169:8774/v2/%\ (tenant_id\) s
sudo apt-get install nova-api nova-scheduler nova-conductor nova-cert Nova-Consoleauth Nova-novncproxy Nova-compute sysfsutils python-novaclient
sudo vi/etc/nova/nova.conf
Rpc_backend=rabbit
rabbit_host=192.168.114.169
Rabbit_password=1
Auth_strategy=keystone
my_ip=192.168.114.169
Vnc_enabled=true
vncserver_listen= 192.168.114.169
vncserver_proxyclient_address= 192.168.114.169
novncproxy_base_url=http:// 192.168.114.169:6080/vnc_auto.html
Verbose=true
[Database]
Connection=mysql://nova:[email Protected]/nova
[Keystone_authtoken]
auth_uri=http://192.168.114.169:5000/v2.0
IDENTITY_URI=HTTP://1 92.168.114.169:35357
Admin_tenant_name=service
Admin_user=nova
Admin_password=1
[Glance]
host=192.168.114.169
: Wq
Cat/proc/cpuinfo |grep-e "VMX|SVM" (Intel | amd) hardware-assisted virtualization technology
sudo nova-manage db sync
Mysql-uroot-proot
Use Nova
Show tables;
VI nova_services_restart.sh
sudo service Nova-api restart
sudo service Nova-scheduler restart
sudo service nova-conductor restart
sudo service nova-compute restart
sudo service Nova-cert restart
sudo service Nova-consoleauth restart
sudo service nova-novncproxy restart
sudo chmod +x nova_services_restart.sh
./ nova_services_restart.sh
Nova Servcie-list
Verify
Nova Flavor-list (Specifies how large the virtual machine is)
Nova Image-list
Shutdown
sudo halt
VMware adds a NIC
Modify VMware Configuration
sudo vim/library/preferences/vmware\ fusion/vmnet8/dhcpd.conf
Host Ubuntuosallinone {
Hardware Ethernet 00:0c:29:44:bc:0d;
Fixed-address 192.168.22.142;
}
sudo vim/library/preferences/vmware\ fusion/vmnet1/dhcpd.conf
Ditto
Restarting the vmware& virtual machine
DMESG |grep ETH
sudo vim/etc/network/interfaces
Auto Eth1
Iface eth1 inet DHCP
Start eth1
sudo ifup eth1
Restart the virtual machine again
sudo reboot
After reboot, Ifconfig can see eth1.
Implementation of OpenStack network environment based on Nova-network
sudo vi/etc/nova/nova.conf
[Default]
Control node, network settings
Network_api_class = Nova.network.api.API
Security_group_api = Nova
COMPUTE nodes
Firewall_driver = Nova.virt.libvirt.firewall.IptablesFirewallDriver
Network_manager = Nova.network.manager.FlatDHCPManager Tenant Network
Network_size = 254
Allow_same_net_traffic = False
Multi-node, highly available deployment
Multi_host = True
Send_arp_for_ha = True
Share_dhcp_address = True
Force_dhcp_release = True
Flat_network_bridge = br100
Flat_interface = eth1
Public_interface = eth0
SOURCE ADMINRC
Nova Service-list
sudo apt-get install Nova-network
Nova network-create--fixed-range-v4 192.168.0.0/24--bridge br100--multi-host T Net1
Nova Network-list
Nova Flavor-list
Nova Image-list
Nova boot--flavor m1.tiny--image cirrus-0.3.3--nic net-id=708664b5-3d5f-4801-a75e-7ea63b3a62a8 Instance1
Nova 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 Secgroup-list-rules Default
Nova Get-vnc-console Instance1 Novnc
SSH [email protected] ("Cubswin:)")
OpenStack all in one virtual machine environment manually installed (Ubuntu)