Geicloudstack 1. Background
The private cloud environment of gei adopts the Apache open-source project cloudstack4.0.1 to be set up and used on centos6.3. Currently, three Dell machines are used as servers in the cloud environment. The login usernames and passwords of the three machines are root/geikrp.
Machines with IP address 192.168.7.33 are used as the Management Server of cloudstack, IP addresses 192.168.7.31 and 192.168.7.32 are used as computing resource nodes, and hypervisor is selected as KVM.
Ii. Installation (1) Steps for managing Server Installation
1. hostname-FQDN hostname -- FQDN: Check whether the host name meets the format requirements.
Eg: managament1.lab.example.org otherwise, perform the following operations:
Setting Method: Add IP hostname to the top line of VI/etc/hosts to save and exit.
2. Set SELinux
View the SELinux value. CAT/etc/SELinux/enforce will display 1
Setenforce 0 (this setting is invalid after the system restarts)
Set SELinux = permissive through VI/etc/SELinux/config -- à
3. Install the machine synchronization clock NTP service
Yum install NTP
VI/etc/NTP. conf -- à change server 127.0.0.1 # Remove local clock #
Service ntpd restart
4. configure the firewall (it is better to disable or enable the firewall temporarily)
Service iptables stop
Chkconfig iptables off (firewall permanently disabled)
5. Install NFS server
Yum install NTF-utils
Mkdir-P/export/secondary
VI/etc/exports
Add the following row
/Export * (RW, async, no_root_squash)
Exportfs-
Change NFS file configuration
VI/etc/sysconfig/nfs
Un-Comment thefollowing lines:
Mountd_nfs_v3 = "yes"
Lockd_tcpport = 32803
Lockd_udpport = 32769
Mountd_port = 892
Rquotad_port = 875
Statd_port = 662
Statd_outgoing_port = 2020
Set to start these services at startup
Chkconfig rpcbind on
Chkconfig NFS on
Service rpcbind start
Service NFS start
7. Upload the downloaded cloudstack4.0.1 (http://jenkins.cloudstack.org/view/4.0.1/ license file is cloudstack-non-oss-140.tar.bz2 to the management server host, decompress and install
Run./install. Sh in the directory.
Select cloudmanagementserver and Database Server
Select m first, and then perform the following steps:
You need to set boot to start some other services
Chkconfig rpcbind on
Chkconfig NFS on
Service rpcbind start
Service NFS start
Next, run./install. Sh.
Install MySQL
Select d
After installation, modify the my. CNF file.
VI/etc/My. CNF
Add [mysqld] onthe first line of the file
Innodb_rollback_on_timeout = 1
Innodb_lock_wait_timeout = 600
Max_connections = 350
Log-bin = mysql-bin
BINLOG-format = 'row'
Service mysqld restart
8. initialize the database
Cloud-setup-databasescloud: <dbpassword> @ localhost-deploy-as = root: <password> (example: cloud-setup-databases cloud: cloud @ localhost-deploy-as = root: password1)
9. Start the cloud-Management Service
Cloud-setup-Management
10. Prepare the system VM Template
First download, and then local upload better http://download.cloud.com/templates/acton/acton-systemvm-02062012.qcow2.bz2
Download the acton-systemvm-02062012.qcow2.bz2 File
Mkdircloudstackinpkg
Copy your acton-systemvm-02062012.qcow2.bz2} To cloudstackinpkg
Upload the template to Level 2 Storage
First as a mount Mount point
Mkdir/secondarymount
Mount-t nfs 192.168.7.33:/export/secondary/secondarymount
/Usr/lib64/cloud/common/scripts/storage/secondary/cloud-install-sys-tmplt-M/secondarymount-F/cloudstackinpkg/acton-systemvm-02062012.qcow2.bz2-h kvm-F
After the upload is successful, remember umount/secondarymount.
11. Restart service cloudstack Management
Service cloud-management restart
12 after the startup is successful, we can use cloudstack with the browser.
(2) Installation Steps on computing Resource Nodes
Steps 1-4 are the same as those on the management server.
5. After NFS is installed, you only need to create a shared directory of the primary storage.
Example: mkdir-P/export/primary
VI/etc/exports
Add the following row
/Export * (RW, async, no_root_squash)
Exportfs-
6. Install KVM
Rpm-Qa | grep KVM
If no information is displayed, you need to install KVM.
Yum install KVM
7. Install libvirt
Rpm-Qa | grep libvirt
If no information is displayed, you need to install libvirt.
Yum install libvirt
Configure libvirt VI/etc/libvirt/qemu. conf
Make sure vnc_listen = 0.0.0.0
Not commented out
VI/etc/libvirt/lib1_d. conf
Set the following information:
Listen_tls = 0
Listen_tcp = 1
Auth_tcp = 16059
Mdns_adv = 0
Service lib1_restart
8. Install cloudstack agent
Copy the cloudstack-non-oss-140.tar.bz2 downloaded from the Management Server to the machine, decompress the package, and run it in the directory.
./Install. Sh
Select
Install cloud-agent
Start cloud-agent service cloud-Agent start
So far, all installation is complete.
3. Admin manages cloudstack
Finally, use the Firefox browser, ie and Google
Chrome compatibility is not very good.
Enter http: // 192.168.7.33: 8080/client/in the address bar of the browser to enter the cloudstack interface (the user name and password are both admin and admin)
1. Global settings
Management ---- à management. Network. CIDR
Set to 192.168.7.0/24
Site --- à secstorage. Allowed. Internal. sites is set to 192.168.7.0/24
Restart service cloud-management restart
2. Infrastructure-a zone-a pods -- a host -- a primary storage -- a secondary storage ----- launch
Zone
3. In a mature environment, you only need to create a VM.
Click "instance"-"add instance"-"select IOS template"-"select the required IOS template as required-" select a service solution ", and then start to install the system.
For details about cloudstack, see the official documentation: http://cloudstack.apache.org/