CloudStack4.1.0 installation explanation-1. the management node CloudStack is a powerful and UI-friendly open-source cloud (IaaS) computing solution. Since Ctrix donated CloudStack to apache, its community activity has been catching up with the limelight... cloudStack 4.1.0 installation explanation-1. the management node CloudStack is a powerful and UI-friendly open-source cloud (IaaS) computing solution. Since Ctrix donated CloudStack to apache, its community activity has gradually caught up with another open source cloud OpenStack platform.
CloudStack has the most user-friendly management interfaces for all open-source cloud platforms, and its inherent multilingual support makes Chinese users feel great. Today, we will detail how to install and deploy CloudStack 4.1.0 in CentOS 6.4. In view of the large copy of online articles, a lot of content is loaded to install a lot of things, and the readers will be dizzy soon. they do not know why these programs are installed and what they are doing. This time, I will explain each step in as much detail as possible, plus my experience and understanding (many of my experiences come after over 10 reinstalls), hoping that the future will be able to take less detours.
CloudStack can be divided into management node installation and controlled node installation. Management node installation has no special requirements and can be fully installed in a virtual machine environment.
To create virtual machines for controlled nodes, hardware virtualization is required. we recommend that you use an independent host for installation. CloudStack supports multiple virtualization solutions, including KVM, Xen, XenServer, and VMware. Because XenServer and VMware already have powerful virtual machine management functions, CloudStack can directly communicate with them to call their management interfaces. Therefore, there is no need to install any software in these two controlled machine environments. However, the KVM and Xen controlled machines must install CloudStack-Agent before they can be managed by CloudStack. This article describes how to set up a Management Node: 1. preparations 1. configure the NIC to ensure that the host can access the Internet, therefore, you must first ensure that your server can be connected to the Internet normally. 1. ping www. baidu. com2 and set the host name. when CloudStack is running, you must obtain the local name. if the host name cannot be obtained correctly, the service may fail to start properly and a lot of errors may be reported. Run the following command to check: 1 hostname -- fqdn if no normal response is returned, edit the/etc/hosts file and add the name corresponding to the host ip address. 1 for example: 2192.168.19.135 manage. cloudstack. comvi/etc/sysconfig/network. change HOSTNAME = to the same as you just set. It takes effect immediately after editing. If not, restart the server. 3. configuring the time synchronization management node will communicate with the controlled node through various protocols. to ensure security, the controlled node will perform a series of verification after receiving the command. if the time of the two machines is not synchronized, command execution is denied. The simplest way is to install ntp on all servers for automatic synchronization. 1yum install ntp4. modifying SELinux on the Linux security settings server intercepts some CloudStack commands, causing the CloudStack operation to fail. Therefore, you need to set SELinux before starting CloudStack. Vi/etc/selinux/config1SELINUX = permissive the above changes must be restarted to take effect. to make the settings take effect immediately, use the following command 1 setenforce permissive 2. update the yum repository by default, the latest version of CloudStack is not included in the CentOS software source. to ensure smooth installation, we need to manually specify the software source. Create the/etc/yum. repos. d/cloudstack. repo file with the following content: 1 [cloudstack] 2 name = cloudstack3baseurl = http://cloudstack.apt-get.eu/rhel/4.1/4enabled=15gpgcheck=0 3. after installing the management node and setting the source, we can directly use yum for installation, which is very simple and convenient. Run the following command to install the management node: 1yum install cloud-client. if your CentOS installation is minimal, you will need to install something above 160 MB. please wait... 4. configure the database CloudStack to use mysql to manage data, but the cloud-client does not contain mysql. in this case, we need to manually install and import data. This is understandable, because the database can be installed on other machines. 1yum install mysql-server by default. mysql has a limit on the number of connections, which cannot meet the requirements of CloudStack Management nodes and must be set manually. Vi/etc/my. cnf added the following content: 1innodb_rollback_on_timeout = 12innodb_lock_wait_timeout = 6003max_connections = 3504log-bin = mysql-bin5binlog-format = 'row' note: if not modified, what will happen I did not try, but it is recommended to modify as required. The max_connections parameter should be set to 350 multiplied by the number of management nodes you are about to deploy. Only one management node is installed. Now, start mysql service: 1 service mysqld start the default installed mysql security level is relatively low, you need to manually set the mysql password, disable remote access, delete useless accounts and test the database. The method is also very simple. use the following command to follow the wizard prompts step by step: After the 1mysql_secure_installation database is ready, you need to import the table and basic data of CloudStack so that the cloud platform can use: 1cloudstack-setup-databases cloud normally: 123456 @ localhost -- deploy-as = root: if the set root password is not unexpected, the words "CloudStack has successfully initialized database" will be output, indicating that the database is ready. 5. login to the WEB-UI so far, although there is still a lot of work to do, but now you can actually log on to the CloudStack console. Start the CloudStack service first: 1 server cloudstack-management restart it takes some time to start the CloudStack service. during this period, you can view its logs to ensure that it starts properly: 1 tail-100f/var/log/cloudstack/management/catalina. in general, it starts normally. If a Permission error is reported during startup, it is generally because the cloud user does not have the/var/log/cloudstack/management/write permission. 1 chown cloud/var/log/cloudstack/-R after successful startup, you can now access the management node using Google or Firefox: http: // management node ip: 8080/client note: There may be compatibility issues with IE access. Cloudstack provides web services based on tomcat. Port 8080 is used by default. If you want to use another port, you can modify the/etc/tomcat6/server. xml file for configuration. Cloudstack is installed in the/etc/cloudstack/management directory by default. you can adjust the log output level and path by modifying the log4j-cloud.xml file. CloudStack native supports Chinese characters. how can this problem be solved? The default user name is admin and the password is password. The Wizard page is displayed when you log on to the console for the first time. At present, our preparations have not been completed and cannot be correctly added. Therefore, skip this step first. After logging in, click "infrastructure". all CloudStack resource management functions are under "infrastructure. The "region" can be understood as an equipment room; the "provisioning point" can be understood as a rack; the "cluster" is the group management of hosts in the rack; and the "primary storage" is network storage, it is mainly used to store virtual machine hard disks. of course, you can also use local storage. "level-2 storage" is also used for network storage, which is mainly used to store virtual machine templates and snapshots. "System VM" is a dedicated virtual machine that comes with CloudStack to manage level 2 storage and remote terminals. The second-level storage VM must enable the template and other functions. After the remote terminal VM is started normally, you can directly access the VM console on the WEB page. The "virtual router" is also a dedicated virtual machine that comes with CloudStack. It is mainly used for network functions such as network isolation and port forwarding. According to the above introduction, to add a new "region", you must also rely on the support of Network Storage and system virtual machines. Therefore, you must continue to work hard. 6. install the primary network storage because you can use local storage, you can not add it, but the secondary storage can only use network storage. CloudStack supports multiple network storage protocols, such as iSCSI, NFS, and VMFS. Because NFS is easy to use, we recommend that you use NFS to set up network storage. Install NFS: 1yum install nfs-utils edit the/etc/export file and set the path of the primary and secondary storage # vi/etc/exports in the file, add the following content: 1/export * (rw, async, no_root_squash) create the actual folder 1 mkdir-p/export/secondary2mkdir-p/export/primary and modify/etc/sysconfig/nfs to open all the port numbers in the folder 1LOCKD_TCPPORT = 328032LOCKD_UDPPORT = bytes = 8755STATD_PORT 6626STATD_OUTGOING_PORT = 2020 then open the iptables Port: vi/etc/sysconfig/iptables01-A INPUT-p tcp-m tcp -- dp Ort 111-j ACCEPT02-A INPUT-p udp-m udp -- dport 111-j ACCEPT03-A INPUT-p tcp-m tcp -- dport 2049-j ACCEPT04-A INPUT-p tcp-m tcp -- dport 32803-j ACCEPT05-A INPUT-p udp-m udp -- dport 32769-j ACCEPT06-A INPUT-p tcp-m tcp -- dport 892-j ACCEPT07-A INPUT-p udp-m udp -- dport 892 -j ACCEPT08-A INPUT-p tcp-m tcp -- dport 875-j ACCEPT09-A INPUT-p udp-m udp -- dport 875-j ACCEPT10-A INPUT -P tcp-m tcp -- dport 662-j ACCEPT11-A INPUT-p udp-m udp -- dport 662-j ACCEPTservice iptables restart start NFS service: 1 service nfs start2service rpcbind start set the service to automatically restart 1 chkconfig nfs on2chkconfig rpcbind onCloudStack has a global attribute to control the network segment of the secondary storage. If this CIDR block is not configured or is incorrectly configured, it may fail to be added to level 2 storage. Log onto the CloudStack Management page, select "Global Settings", and enter sites search in the search box on the top right. Modify secstorage. allowed. internal. sites is the current network segment of level-2 storage. for example, search for local in 192.168.0.0/24 and modify system. vm. use. local. storage is true, which allows the system VM to use local storage. After modification, restart CloudStack to take effect. 1. server cloudstack-management restart 7. import system virtual machine template system virtual machine plays an important role in CloudStack. if the system virtual machine is not correctly imported, CloudStack cannot manage level 2 storage, you cannot import templates or create new virtual machines. The system VM file is large and is not included in the CloudStack installer. you need to download and import it manually. Because the system VM needs to be stored in level 2 storage, you must first mount level 2 storage to the local hard disk 1 mkdir/tmp/iso-p2mount-t nfs 127.0.0.1: /export/secondary/tmp/iso3cd/usr/share/cloudstack-common/scripts/storage/secondary/different virtual machine implementation schemes system VM Templates are also different if your controlled machine uses KVM, use the following command: 1. /cloud-install-sys-tmplt-m/tmp/iso/-u http://download.cloud.com/templates/acton/acton-systemvm-02062012.qcow2.bz2 -H kvm-F if your controlled machine uses XenServer, use the following command: 1./cloud-install-sys-tmplt-m/tmp/iso/-u http://download.cloud.com/templates/acton/acton-systemvm-02062012.vhd.bz2 -H xenserver-F if your controlled machine uses vCenter, use the following command: 1./cloud-install-sys-tmplt-m/tmp/iso/-u http://download.cloud.com/templates/burbank/burbank-systemvm-08012012.ova -H the vmware-F file is large and you need to wait patiently ....... Of course, you can also download the file to your local computer and then import it using the-f parameter. Example: 1. /cloud-install-sys-tmplt-m/tmp/iso/-f/var/acton-systemvm-02062012.qcow2.bz2-h kvm-F 8. add "infrastructure, now all preparations for the CloudStack Management node have been completed. Next, you can add your first "region. In this step, CloudStack provides a friendly wizard to help you complete the addition correctly. In addition, there are a lot of articles on the Internet that I will not elaborate on. I will introduce the functions and adding methods of CloudStack advanced network domains when I have the opportunity in the future. Appendix, possible problems: 1. the webui of the management node cannot be accessed. check whether iptables blocks port 8080. Check whether the cloudstack-management service is properly started. 1 server cloudstack-management status if the startup status is abnormal, check the log. The log is located in/var/log/cloudstack/management/catalina. out. According to the error prompts in the log, most problems can be solved. If the log information is not detailed enough, you can modify/etc/cloudstack/management/log4j-cloud.xml to adjust the log output level. 2. the system prompts that the user name and password are incorrect during login. The default logon username is admin and password is password. If the error message is incorrect during login, it may be a problem when importing the basic database. Re-import the basic database: 1cloudstack-setup-databases cloud: 123456 @ localhost -- deploy-as = root: if the root password does not work, refer to 5. delete the database and re-import it. 3. CloudStack cannot add primary or secondary storage. check whether the/etc/sysconfig/nfs configuration file opens the ports. Check whether iptables is blocked. Check whether the "Global Settings" and secstorage. allowed. internal. sites attributes of CloudStack are correctly set. 4. CloudStack cannot import IOS or virtual machine templates. after creating an "infrastructure", you can import ISO files or virtual machine templates to prepare for creating virtual machines. If you find that when you register an ISO or registration template, the status field remains unchanged and is always no when you are ready, it is generally because of problems with level 2 Storage or Secondary Storage VM. Select "control panel"> system capacity to check whether the second-level storage capacity is correct. Check whether the Secondary Storage VM in the system VM is properly started. 5. how to reinstall and install CloudStack? after CloudStack is installed, we often conduct various experiments, which may make the system messy. It is very troublesome to delete them because they often have hierarchical relationships and must be deleted from the bottom layer. Is there a simple way to reverse it? The answer is yes. you only need to reset the database. Stop the CloudStack service first: service cloudstack-management stop log on to the mysql console and delete the database: mysql-u root-p1drop database cloud; 2 drop database cloud_usage; 3 drop database cloudbridge; 4 quit; re-import basic data: 1cloudstack-setup-databases cloud: 123456 @ localhost -- deploy-as = root: root password re-import system VM: 1 mount-t nfs 127.0.0.1: /export/secondary/tmp/iso2rm-rf/tmp/iso/3cd/usr/share/cloudstack-common/scripts/storage/secondary/refer to section 7th, import the corresponding system VM template. Restart cloudstack service 1 service cloudstack-management start. then, you can log on to a new CloudStack. 6. the regions and endpoints of CloudStack cannot be named in Chinese. in versions earlier than 4.1, regions and endpoints can be named in Chinese, however, in version 4.1, I do not know why it is so restrictive. If you care about this function, use a version earlier than 4.1. 4.0.2 is recommended.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.