{"id":364011,"date":"2024-05-21T02:08:10","date_gmt":"2024-05-21T02:08:10","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=364011"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=364011","title":{"rendered":"<span>Open Source Cloud Computing<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h2>Intro<\/h2>\n<p>\u041d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043f\u043e \u043c\u043e\u0442\u0438\u0432\u0430\u043c \u043d\u0435\u0434\u0430\u0432\u043d\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0438: <a href=\"https:\/\/habr.com\/ru\/companies\/Linx\/articles\/783134\" rel=\"noopener noreferrer nofollow\">\u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043d\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 SharxBase<\/a><br \/> \u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/763890\" rel=\"noopener noreferrer nofollow\">\u0411\u043e\u043b\u044c\u0448\u043e\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u043e\u0441\u0441\u0438\u0439\u0441\u043a\u0438\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438<\/a><\/p>\n<p>\u041e\u0441\u0442\u0430\u0432\u0438\u043c \u043a\u0440\u0438\u0442\u0438\u043a\u0443 \u044d\u0442\u0438\u0445 \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432 \u0434\u043b\u044f \u0442\u0435\u0445 \u043a\u043e\u043c\u0443 \u0441 \u043d\u0438\u043c\u0438 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c. \u0420\u0435\u0431\u044f\u0442\u0430 \u0441\u0442\u0430\u0440\u0430\u044e\u0442\u0441\u044f \u0438 \u044d\u0442\u043e \u0443\u0436\u0435 \u043d\u0435 \u043f\u043b\u043e\u0445\u043e.<\/p>\n<p>\u0422\u0430\u043a\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u044b \u043a\u0430\u043a OpenStack \u0441\u0442\u043e\u044f\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u043e\u0440\u043e\u0433\u043e \u0432 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u0438, \u0435\u0441\u043b\u0438 \u0432\u0430\u0448\u0430 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f \u043d\u0435 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0439 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440 \u0438\u043b\u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0442\u043e\u0440, \u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 Proxmox \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u0434\u043b\u044f \u0441\u0442\u0440\u043e\u0438\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430 IaaS.<\/p>\n<p>\u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e \u0435\u0441\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u043a\u0430\u043a <a href=\"https:\/\/docs.cloudstack.apache.org\" rel=\"noopener noreferrer nofollow\">\u0421loudstack<\/a> \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0432\u0441\u0435\u043c \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c: API, \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 terraform \u0438 ansible, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 Kubernetes \u0438 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433.<\/p>\n<p>\u041a\u043e\u0433\u0434\u0430-\u0442\u043e \u044d\u0442\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0430\u043b\u0430 Citrix, \u043d\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u043a\u043e\u0434\u043e\u0432\u0430\u044f \u0431\u0430\u0437\u0430 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e. <a href=\"https:\/\/ya.ru\/search\/?text=habr+cloudstack&amp;lr=2\" rel=\"noopener noreferrer nofollow\">\u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u043e\u0441\u0441\u0438\u0439\u0441\u043a\u0438\u0435 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0435\u0433\u043e \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0445 \u0443\u0441\u043b\u0443\u0433<\/a>.<\/p>\n<p>\u0412\u0430\u0436\u043d\u043e\u0435 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u2013 \u044d\u0442\u043e \u043d\u0435 \u0433\u0438\u043f\u0435\u0440\u0432\u0438\u0437\u043e\u0440, \u0430 \u00abmanagment panel\u00bb: middleware \u0438 frontend \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0445\u043e\u0441\u0442\u0430\u043c\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438. \u0412\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0435 \u0445\u043e\u0441\u0442\u044b \u0441 \u0432\u0438\u0440\u0442\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u043d\u0430 \u0431\u0430\u0437\u0435 QEMU\/KVM, Xen \u0438 ESXI \u043a control plane \u0438 \u0434\u0430\u043b\u044c\u0448\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0435 \u0438\u043c\u0438 \u0447\u0435\u0440\u0435\u0437 CloudStack. \u041d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u0438\u043b\u043b\u0438\u043d\u0433\u0430, \u043d\u043e \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c.<\/p>\n<p>\u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0430 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043f\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 control plane CloudStack \u043d\u0430 centos.<\/p>\n<p><em>\u042d\u0442\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u2013 \u0434\u043b\u044f \u043f\u0440\u043e\u0434\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0448\u0430\u0433\u0438.<\/em><\/p>\n<h3>\u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u0443:<\/h3>\n<pre><code>yum -y upgrade <\/code><\/pre>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u0440\u0438\u0440\u0435\u043a\u0432\u0438\u0437\u0438\u0442\u044b:<\/p>\n<pre><code>yum install bridge-utils net-tools -y <\/code><\/pre>\n<h3>SELINUX<\/h3>\n<p>\u041e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u043c SELINUX:<\/p>\n<pre><code>sed -i 's\/^[[:blank:]]*SELINUX=enforcing\/SELINUX=disabled\/g' \/etc\/selinux\/config  cat \/etc\/selinux\/config  setenforce 0 <\/code><\/pre>\n<h3>chrony<\/h3>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c chrony:<\/p>\n<pre><code>yum install chrony <\/code><\/pre>\n<p>\u0423\u0431\u0435\u0434\u0438\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0441\u043b\u0443\u0436\u0431\u0430 chrony \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442:<\/p>\n<pre><code>systemctl start chronyd systemctl enable chronyd <\/code><\/pre>\n<p>\u0420\u0430\u0437\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u043e\u0447\u043a\u0443 \u0432 \u0444\u0430\u0439\u043b\u0435 <code>\/etc\/chrony.conf<\/code>:<\/p>\n<pre><code>#local stratum 10 <\/code><\/pre>\n<p>\u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u043b\u0443\u0436\u0431\u0443 chrony:<\/p>\n<pre><code>systemctl restart chronyd <\/code><\/pre>\n<h3>Repo<\/h3>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 Cloudstack:<br \/> <code>\/etc\/yum.repos.d\/cloudstack.repo<\/code>:<\/p>\n<pre><code>[cloudstack] name=cloudstack baseurl=http:\/\/download.cloudstack.org\/centos\/$releasever\/4.18\/ enabled=1 gpgcheck=0 <\/code><\/pre>\n<h3>NFS<\/h3>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c NFS:<\/p>\n<pre><code>yum -y install nfs-utils <\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0434\u0432\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0434\u043b\u044f NFS \u0448\u0430\u0440:<\/p>\n<pre><code>mkdir -p \/export\/primary mkdir \/export\/secondary <\/code><\/pre>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 <code>\/etc\/exports<\/code>:<\/p>\n<pre><code>\/export\/primary 185.149.240.25(rw,sync,no_root_squash,no_subtree_check) \/export\/secondary 185.149.240.25(rw,sync,no_root_squash,no_subtree_check) <\/code><\/pre>\n<pre><code>exportfs -r <\/code><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u0430 \u043b\u0438 \u0441\u043b\u0443\u0436\u0431\u0430 NFS \u0441\u0435\u0440\u0432\u0435\u0440\u0430:<\/p>\n<pre><code>systemctl status rpcbind nfs-server <\/code><\/pre>\n<p>\u041f\u0440\u043e\u0435\u0440\u044f\u0435\u043c \u0448\u0430\u0440\u044b NFS:<\/p>\n<pre><code> exportfs \/export\/primary 185.149.240.25 \/export\/secondary 185.149.240.25 <\/code><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u0430 \u043b\u0438 \u0441\u043b\u0443\u0436\u0431\u0430 rpcbind:<\/p>\n<pre><code>systemctl start rpcbind systemctl enable rpcbind <\/code><\/pre>\n<h3>firewalld<\/h3>\n<p>\u0412\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u0435 firewalld:<\/p>\n<pre><code>systemctl stop firewalld systemctl disable firewalld <\/code><\/pre>\n<h3>\u0421\u0435\u0440\u0432\u0438\u0441\u044b<\/h3>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u0435 \u0432 \u0430\u0432\u0442\u043e\u0437\u0430\u043f\u0443\u0441\u043a \u0438 \u0441\u0442\u0430\u0440\u0442\u0443\u0439\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u043b\u0443\u0436\u0431\u044b:<\/p>\n<pre><code>systemctl enable rpcbind systemctl enable nfs-server systemctl start nfs-server systemctl start rpcbind <\/code><\/pre>\n<pre><code>systemctl daemon-reload <\/code><\/pre>\n<h3>MySQL<\/h3>\n<p>\u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 mysql:<\/p>\n<pre><code>https:\/\/dev.mysql.com\/downloads\/repo\/yum <\/code><\/pre>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439:<\/p>\n<pre><code>rpm -Uvh mysql80-community-release-el9-1.noarch.rpm <\/code><\/pre>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c mysql:<\/p>\n<pre><code>yum install mysql-community-server <\/code><\/pre>\n<p>\u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0430 <code>\/etc\/my.cnf<\/code>:<\/p>\n<pre><code>innodb_rollback_on_timeout=1 innodb_lock_wait_timeout=600 max_connections=350 log-bin=mysql-bin binlog-format = 'ROW' <\/code><\/pre>\n<pre><code>systemctl enable mysqld systemctl start mysqld <\/code><\/pre>\n<pre><code>systemctl status mysqld \u25cf mysqld.service - MySQL Server      Loaded: loaded (\/usr\/lib\/systemd\/system\/mysqld.service; enabled; preset: disabled)      Active: active (running) since Sat 2023-07-01 15:26:14 MSK; 7s ago        Docs: man:mysqld(8)              http:\/\/dev.mysql.com\/doc\/refman\/en\/using-systemd.html     Process: 36794 ExecStartPre=\/usr\/bin\/mysqld_pre_systemd (code=exited, status=0\/SUCCESS)    Main PID: 36873 (mysqld)      Status: \"Server is operational\"       Tasks: 38 (limit: 306975)      Memory: 487.8M         CPU: 9.679s      CGroup: \/system.slice\/mysqld.service              \u2514\u250036873 \/usr\/sbin\/mysqld  Jul 01 15:24:58 Pythagoras systemd[1]: Starting MySQL Server... Jul 01 15:26:14 Pythagoras systemd[1]: Started MySQL Server. <\/code><\/pre>\n<p>\u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u043b\u0443\u0436\u0431\u0443 mysql:<\/p>\n<pre><code>systemctl stop mysqld systemctl start mysqld <\/code><\/pre>\n<p>\u0412\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u043f\u0430\u0440\u043e\u043b\u044c mysql:<\/p>\n<pre><code>grep 'temporary password' \/var\/log\/mysqld.log <\/code><\/pre>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0441\u043a\u0440\u0438\u043f\u0442 mysql:<\/p>\n<pre><code>mysql_secure_installation <\/code><\/pre>\n<p>\u0414\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0437\u0430\u043f\u0440\u043e\u0441:<\/p>\n<pre><code>Estimated strength of the password: 100 Change the password for root ? (Press y|Y for Yes, any other key for No) : <\/code><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f:<\/p>\n<pre><code>mysqladmin -u root -p version <\/code><\/pre>\n<h3>MySQL connector<\/h3>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043a\u043e\u043d\u043d\u0435\u043a\u0442\u043e\u0440 \u0434\u043b\u044f mysql:<\/p>\n<pre><code>yum install mysql-connector-python3 <\/code><\/pre>\n<h3>Cloudstack-management<\/h3>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u0430\u043d\u0435\u043b\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f Cloudstack:<\/p>\n<pre><code>yum install cloudstack-management <\/code><\/pre>\n<h3>Cloudstack-agent<\/h3>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c Agent Cloudstack:<\/p>\n<pre><code>yum install cloudstack-agent <\/code><\/pre>\n<h3>QEMU &amp; Libvirt<\/h3>\n<p>\u041d\u0430 \u0445\u043e\u0441\u0442\u0435 \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c QEMU \u0438 Libvirt.<\/p>\n<p>QEMU VNC \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0441\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c <code>\/etc\/libvirt\/qemu.conf<\/code>:<\/p>\n<pre><code>#vnc_listen = \"0.0.0.0\" <\/code><\/pre>\n<h3>Libvirt<\/h3>\n<p>\u0412 \u043a\u043e\u043d\u0444\u0438\u0433 Libvirt \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u0442\u0440\u043e\u0447\u043a\u0438 <code>\/etc\/libvirt\/libvirtd.conf<\/code>:<\/p>\n<pre><code>listen_tls = 0 listen_tcp = 1 tcp_port = \"16509\" auth_tcp = \"none\" mdns_adv = 0 <\/code><\/pre>\n<p>\u042e\u043d\u0438\u0442-\u0444\u0430\u0439\u043b systemd Libvirt <code>\/usr\/lib\/systemd\/system\/libvirtd.service<\/code><\/p>\n<pre><code>systemctl mask libvirtd.socket libvirtd-ro.socket libvirtd-admin.socket libvirtd-tls.socket libvirtd-tcp.socket <\/code><\/pre>\n<p>\u0414\u043b\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 cloudstack-agent \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0443\u0441\u0442\u043e\u0439 \u0444\u0430\u0439\u043b \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 <code>\/etc\/sysconfig\/<\/code>:<\/p>\n<pre><code>touch \/etc\/sysconfig\/libvirtd <\/code><\/pre>\n<p>\u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0434\u0435\u043c\u043e\u043d libvirt:<\/p>\n<pre><code>systemctl restart libvirtd <\/code><\/pre>\n<p>\u0421\u0441\u044b\u043b\u043a\u0438:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/libvirt.org\/manpages\/libvirtd.html#system-socket-activation\" rel=\"noopener noreferrer nofollow\">https:\/\/libvirt.org\/manpages\/libvirtd.html#system-socket-activation<\/a><\/p>\n<\/li>\n<\/ul>\n<h3>Networking<\/h3>\n<h4>\u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c IP Forwarding<\/h4>\n<p>\u041d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043d\u0430 \u0445\u043e\u0441\u0442\u0435 (\u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u043e\u0434\u043d\u0430 \u043c\u0430\u0448\u0438\u043d\u0430) IP Forwarding.<\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0444\u0430\u0439\u043b \/etc\/sysctl.d\/cloudstack.conf \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u0442\u0440\u043e\u0447\u043a\u0438:<\/p>\n<pre><code>net.ipv4.ip_forward=1 <\/code><\/pre>\n<p>\u0423\u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u0438\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e IP Forwarding \u0432\u043a\u043b\u044e\u0447\u0435\u043d:<\/p>\n<pre><code>sysctl net.ipv4.ip_forward <\/code><\/pre>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c eth0 <code>\/etc\/sysconfig\/network-scripts\/ifcfg-eth0<\/code>:<\/p>\n<pre><code>DEVICE=eth0 HWADDR=00:04:xx:xx:xx:xx ONBOOT=yes HOTPLUG=no BOOTPROTO=none TYPE=Ethernet BRIDGE=cloudbr0 <\/code><\/pre>\n<p>\u0418 \u0437\u0430\u0442\u0435\u043c \u0434\u0432\u0430 \u0431\u0440\u0438\u0434\u0436\u0430 &#8212; cloudbr0:<\/p>\n<pre><code>DEVICE=cloudbr0 TYPE=Bridge ONBOOT=yes BOOTPROTO=none IPV6INIT=no IPV6_AUTOCONF=no DELAY=5 IPADDR=192.168.42.11 GATEWAY=192.168.42.1 NETMASK=255.255.255.0 STP=yes <\/code><\/pre>\n<p>cloudbr1 <code>\/etc\/sysconfig\/network-scripts\/ifcfg-cloudbr1<\/code>:<\/p>\n<pre><code>DEVICE=cloudbr1 TYPE=Bridge ONBOOT=yes BOOTPROTO=none IPV6INIT=no IPV6_AUTOCONF=no DELAY=5 STP=yes <\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u043a\u0440\u0438\u043f\u0442 cloudstack-setup-databases:<\/p>\n<pre><code>cloudstack-setup-databases cloud:&lt;PASSWORD>@localhost --deploy-as=root <\/code><\/pre>\n<p>\u041f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<pre><code>Mysql user name:cloud                                                           [ OK ] Mysql user password:******                                                      [ OK ] Mysql server ip:localhost                                                       [ OK ] Mysql server port:3306                                                          [ OK ] Mysql root user name:root                                                       [ OK ] Mysql root user password:******                                                 [ OK ] Checking Cloud database files ...                                               [ OK ] Checking local machine hostname ...                                             [ OK ] Checking SELinux setup ...                                                      [ OK ] Detected local IP address as 185.149.240.25, will use as cluster management server node IP[ OK ] Preparing \/etc\/cloudstack\/management\/db.properties                              [ OK ] Applying \/usr\/share\/cloudstack-management\/setup\/create-database.sql             [ OK ] Applying \/usr\/share\/cloudstack-management\/setup\/create-schema.sql               [ OK ] Applying \/usr\/share\/cloudstack-management\/setup\/create-database-premium.sql     [ OK ] Applying \/usr\/share\/cloudstack-management\/setup\/create-schema-premium.sql       [ OK ] Applying \/usr\/share\/cloudstack-management\/setup\/server-setup.sql                [ OK ] Applying \/usr\/share\/cloudstack-management\/setup\/templates.sql                   [ OK ] Processing encryption ...                                                       [ OK ] Finalizing setup ...                                                            [ OK ]  CloudStack has successfully initialized database, you can check your database configuration in \/etc\/cloudstack\/management\/db.properties <\/code><\/pre>\n<h3>sudoers<\/h3>\n<p>\u0414\u043b\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 cloudstack-agent \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u0442\u0440\u043e\u0447\u043a\u0438 \u0432 <code>\/etc\/sudoers<\/code>:<\/p>\n<pre><code>cloudstack ALL=NOPASSWD: \/usr\/bin\/cloudstack-setup-agent defaults:cloudstack !requiretty <\/code><\/pre>\n<h3>End<\/h3>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a cloudstack-setup-management:<\/p>\n<pre><code>Starting to configure CloudStack Management Server: Configure CloudStack Management Server ...[OK] CloudStack Management Server setup is Done! Please ensure ports 8080, 8250, 8443, and 9090 are opened and not firewalled for the management server and not in use by other processes on this host. <\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a \u0430\u0433\u0435\u043d\u0442\u0430 Cloudstack:<\/p>\n<pre><code>systemctl enable cloudstack-agent systemctl start cloudstack-agent systemctl status cloudstack-agent <\/code><\/pre>\n<h3>UI<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c WebUI CloudStack:<br \/> http:\/\/:8080\/client<\/p>\n<p>\u0423\u0447\u0435\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e:<\/p>\n<pre><code>admin password <\/code><\/pre>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/post_images\/cf7\/9ad\/ccd\/cf79adccd79ddae0f3904cecfca4195b.jpg\" alt=\"Login\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/cf7\/9ad\/ccd\/cf79adccd79ddae0f3904cecfca4195b.jpg\" data-blurred=\"true\"\/><\/p>\n<div><figcaption>Login<\/figcaption><\/div>\n<\/figure>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/post_images\/35f\/ce6\/8c6\/35fce68c6d3085b407c4e9a744afc0a7.jpg\" alt=\"UI\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/35f\/ce6\/8c6\/35fce68c6d3085b407c4e9a744afc0a7.jpg\" data-blurred=\"true\"\/><\/p>\n<div><figcaption>UI<\/figcaption><\/div>\n<\/figure>\n<ul>\n<li>\n<p><a href=\"https:\/\/cloudstack.apache.org\/kubernetes.html\" rel=\"noopener noreferrer nofollow\">https:\/\/cloudstack.apache.org\/kubernetes.html<\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/783220\/\"> https:\/\/habr.com\/ru\/articles\/783220\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h2>Intro<\/h2>\n<p>\u041d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043f\u043e \u043c\u043e\u0442\u0438\u0432\u0430\u043c \u043d\u0435\u0434\u0430\u0432\u043d\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0438: <a href=\"https:\/\/habr.com\/ru\/companies\/Linx\/articles\/783134\" rel=\"noopener noreferrer nofollow\">\u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043d\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 SharxBase<\/a><br \/> \u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/763890\" rel=\"noopener noreferrer nofollow\">\u0411\u043e\u043b\u044c\u0448\u043e\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u043e\u0441\u0441\u0438\u0439\u0441\u043a\u0438\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438<\/a><\/p>\n<p>\u041e\u0441\u0442\u0430\u0432\u0438\u043c \u043a\u0440\u0438\u0442\u0438\u043a\u0443 \u044d\u0442\u0438\u0445 \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432 \u0434\u043b\u044f \u0442\u0435\u0445 \u043a\u043e\u043c\u0443 \u0441 \u043d\u0438\u043c\u0438 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c. \u0420\u0435\u0431\u044f\u0442\u0430 \u0441\u0442\u0430\u0440\u0430\u044e\u0442\u0441\u044f \u0438 \u044d\u0442\u043e \u0443\u0436\u0435 \u043d\u0435 \u043f\u043b\u043e\u0445\u043e.<\/p>\n<p>\u0422\u0430\u043a\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u044b \u043a\u0430\u043a OpenStack \u0441\u0442\u043e\u044f\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u043e\u0440\u043e\u0433\u043e \u0432 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u0438, \u0435\u0441\u043b\u0438 \u0432\u0430\u0448\u0430 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f \u043d\u0435 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0439 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440 \u0438\u043b\u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0442\u043e\u0440, \u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 Proxmox \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u0434\u043b\u044f \u0441\u0442\u0440\u043e\u0438\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430 IaaS.<\/p>\n<p>\u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e \u0435\u0441\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u043a\u0430\u043a <a href=\"https:\/\/docs.cloudstack.apache.org\" rel=\"noopener noreferrer nofollow\">\u0421loudstack<\/a> \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0432\u0441\u0435\u043c \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c: API, \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 terraform \u0438 ansible, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 Kubernetes \u0438 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433.<\/p>\n<p>\u041a\u043e\u0433\u0434\u0430-\u0442\u043e \u044d\u0442\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0430\u043b\u0430 Citrix, \u043d\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u043a\u043e\u0434\u043e\u0432\u0430\u044f \u0431\u0430\u0437\u0430 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e. <a href=\"https:\/\/ya.ru\/search\/?text=habr+cloudstack&amp;lr=2\" rel=\"noopener noreferrer nofollow\">\u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u043e\u0441\u0441\u0438\u0439\u0441\u043a\u0438\u0435 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0435\u0433\u043e \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0445 \u0443\u0441\u043b\u0443\u0433<\/a>.<\/p>\n<p>\u0412\u0430\u0436\u043d\u043e\u0435 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u2013 \u044d\u0442\u043e \u043d\u0435 \u0433\u0438\u043f\u0435\u0440\u0432\u0438\u0437\u043e\u0440, \u0430 \u00abmanagment panel\u00bb: middleware \u0438 frontend \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0445\u043e\u0441\u0442\u0430\u043c\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438. \u0412\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0435 \u0445\u043e\u0441\u0442\u044b \u0441 \u0432\u0438\u0440\u0442\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u043d\u0430 \u0431\u0430\u0437\u0435 QEMU\/KVM, Xen \u0438 ESXI \u043a control plane \u0438 \u0434\u0430\u043b\u044c\u0448\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0435 \u0438\u043c\u0438 \u0447\u0435\u0440\u0435\u0437 CloudStack. \u041d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u0438\u043b\u043b\u0438\u043d\u0433\u0430, \u043d\u043e \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c.<\/p>\n<p>\u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0430 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043f\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 control plane CloudStack \u043d\u0430 centos.<\/p>\n<p><em>\u042d\u0442\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u2013 \u0434\u043b\u044f \u043f\u0440\u043e\u0434\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0448\u0430\u0433\u0438.<\/em><\/p>\n<h3>\u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u0443:<\/h3>\n<pre><code>yum -y upgrade <\/code><\/pre>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u0440\u0438\u0440\u0435\u043a\u0432\u0438\u0437\u0438\u0442\u044b:<\/p>\n<pre><code>yum install bridge-utils net-tools -y <\/code><\/pre>\n<h3>SELINUX<\/h3>\n<p>\u041e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u043c SELINUX:<\/p>\n<pre><code>sed -i 's\/^[[:blank:]]*SELINUX=enforcing\/SELINUX=disabled\/g' \/etc\/selinux\/config  cat \/etc\/selinux\/config  setenforce 0 <\/code><\/pre>\n<h3>chrony<\/h3>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c chrony:<\/p>\n<pre><code>yum install chrony <\/code><\/pre>\n<p>\u0423\u0431\u0435\u0434\u0438\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0441\u043b\u0443\u0436\u0431\u0430 chrony \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442:<\/p>\n<pre><code>systemctl start chronyd systemctl enable chronyd <\/code><\/pre>\n<p>\u0420\u0430\u0437\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u043e\u0447\u043a\u0443 \u0432 \u0444\u0430\u0439\u043b\u0435 <code>\/etc\/chrony.conf<\/code>:<\/p>\n<pre><code>#local stratum 10 <\/code><\/pre>\n<p>\u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u043b\u0443\u0436\u0431\u0443 chrony:<\/p>\n<pre><code>systemctl restart chronyd <\/code><\/pre>\n<h3>Repo<\/h3>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 Cloudstack:<br \/> <code>\/etc\/yum.repos.d\/cloudstack.repo<\/code>:<\/p>\n<pre><code>[cloudstack] name=cloudstack baseurl=http:\/\/download.cloudstack.org\/centos\/$releasever\/4.18\/ enabled=1 gpgcheck=0 <\/code><\/pre>\n<h3>NFS<\/h3>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c NFS:<\/p>\n<pre><code>yum -y install nfs-utils <\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0434\u0432\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0434\u043b\u044f NFS \u0448\u0430\u0440:<\/p>\n<pre><code>mkdir -p \/export\/primary mkdir \/export\/secondary <\/code><\/pre>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 <code>\/etc\/exports<\/code>:<\/p>\n<pre><code>\/export\/primary 185.149.240.25(rw,sync,no_root_squash,no_subtree_check) \/export\/secondary 185.149.240.25(rw,sync,no_root_squash,no_subtree_check) <\/code><\/pre>\n<pre><code>exportfs -r <\/code><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u0430 \u043b\u0438 \u0441\u043b\u0443\u0436\u0431\u0430 NFS \u0441\u0435\u0440\u0432\u0435\u0440\u0430:<\/p>\n<pre><code>systemctl status rpcbind nfs-server <\/code><\/pre>\n<p>\u041f\u0440\u043e\u0435\u0440\u044f\u0435\u043c \u0448\u0430\u0440\u044b NFS:<\/p>\n<pre><code> exportfs \/export\/primary 185.149.240.25 \/export\/secondary 185.149.240.25 <\/code><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u0430 \u043b\u0438 \u0441\u043b\u0443\u0436\u0431\u0430 rpcbind:<\/p>\n<pre><code>systemctl start rpcbind systemctl enable rpcbind <\/code><\/pre>\n<h3>firewalld<\/h3>\n<p>\u0412\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u0435 firewalld:<\/p>\n<pre><code>systemctl stop firewalld systemctl disable firewalld <\/code><\/pre>\n<h3>\u0421\u0435\u0440\u0432\u0438\u0441\u044b<\/h3>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u0435 \u0432 \u0430\u0432\u0442\u043e\u0437\u0430\u043f\u0443\u0441\u043a \u0438 \u0441\u0442\u0430\u0440\u0442\u0443\u0439\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u043b\u0443\u0436\u0431\u044b:<\/p>\n<pre><code>systemctl enable rpcbind systemctl enable nfs-server systemctl start nfs-server systemctl start rpcbind <\/code><\/pre>\n<pre><code>systemctl daemon-reload <\/code><\/pre>\n<h3>MySQL<\/h3>\n<p>\u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 mysql:<\/p>\n<pre><code>https:\/\/dev.mysql.com\/downloads\/repo\/yum <\/code><\/pre>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439:<\/p>\n<pre><code>rpm -Uvh mysql80-community-release-el9-1.noarch.rpm <\/code><\/pre>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c mysql:<\/p>\n<pre><code>yum install mysql-community-server <\/code><\/pre>\n<p>\u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0430 <code>\/etc\/my.cnf<\/code>:<\/p>\n<pre><code>innodb_rollback_on_timeout=1 innodb_lock_wait_timeout=600 max_connections=350 log-bin=mysql-bin binlog-format = 'ROW' <\/code><\/pre>\n<pre><code>systemctl enable mysqld systemctl start mysqld <\/code><\/pre>\n<pre><code>systemctl status mysqld \u25cf mysqld.service - MySQL Server      Loaded: loaded (\/usr\/lib\/systemd\/system\/mysqld.service; enabled; preset: disabled)      Active: active (running) since Sat 2023-07-01 15:26:14 MSK; 7s ago        Docs: man:mysqld(8)              http:\/\/dev.mysql.com\/doc\/refman\/en\/using-systemd.html     Process: 36794 ExecStartPre=\/usr\/bin\/mysqld_pre_systemd (code=exited, status=0\/SUCCESS)    Main PID: 36873 (mysqld)      Status: \"Server is operational\"       Tasks: 38 (limit: 306975)      Memory: 487.8M         CPU: 9.679s      CGroup: \/system.slice\/mysqld.service              \u2514\u250036873 \/usr\/sbin\/mysqld  Jul 01 15:24:58 Pythagoras systemd[1]: Starting MySQL Server... Jul 01 15:26:14 Pythagoras systemd[1]: Started MySQL Server. <\/code><\/pre>\n<p>\u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u043b\u0443\u0436\u0431\u0443 mysql:<\/p>\n<pre><code>systemctl stop mysqld systemctl start mysqld <\/code><\/pre>\n<p>\u0412\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u043f\u0430\u0440\u043e\u043b\u044c mysql:<\/p>\n<pre><code>grep 'temporary password' \/var\/log\/mysqld.log <\/code><\/pre>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0441\u043a\u0440\u0438\u043f\u0442 mysql:<\/p>\n<pre><code>mysql_secure_installation <\/code><\/pre>\n<p>\u0414\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0437\u0430\u043f\u0440\u043e\u0441:<\/p>\n<pre><code>Estimated strength of the password: 100 Change the password for root ? (Press y|Y for Yes, any other key for No) : <\/code><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f:<\/p>\n<pre><code>mysqladmin -u root -p version <\/code><\/pre>\n<h3>MySQL connector<\/h3>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043a\u043e\u043d\u043d\u0435\u043a\u0442\u043e\u0440 \u0434\u043b\u044f mysql:<\/p>\n<pre><code>yum install mysql-connector-python3 <\/code><\/pre>\n<h3>Cloudstack-management<\/h3>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u0430\u043d\u0435\u043b\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f Cloudstack:<\/p>\n<pre><code>yum install cloudstack-management <\/code><\/pre>\n<h3>Cloudstack-agent<\/h3>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c Agent Cloudstack:<\/p>\n<pre><code>yum install cloudstack-agent <\/code><\/pre>\n<h3>QEMU &amp; Libvirt<\/h3>\n<p>\u041d\u0430 \u0445\u043e\u0441\u0442\u0435 \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c QEMU \u0438 Libvirt.<\/p>\n<p>QEMU VNC \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0441\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c <code>\/etc\/libvirt\/qemu.conf<\/code>:<\/p>\n<pre><code>#vnc_listen = \"0.0.0.0\" <\/code><\/pre>\n<h3>Libvirt<\/h3>\n<p>\u0412 \u043a\u043e\u043d\u0444\u0438\u0433 Libvirt \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u0442\u0440\u043e\u0447\u043a\u0438 <code>\/etc\/libvirt\/libvirtd.conf<\/code>:<\/p>\n<pre><code>listen_tls = 0 listen_tcp = 1 tcp_port = \"16509\" auth_tcp = \"none\" mdns_adv = 0 <\/code><\/pre>\n<p>\u042e\u043d\u0438\u0442-\u0444\u0430\u0439\u043b systemd Libvirt <code>\/usr\/lib\/systemd\/system\/libvirtd.service<\/code><\/p>\n<pre><code>systemctl mask libvirtd.socket libvirtd-ro.socket libvirtd-admin.socket libvirtd-tls.socket libvirtd-tcp.socket <\/code><\/pre>\n<p>\u0414\u043b\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 cloudstack-agent \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0443\u0441\u0442\u043e\u0439 \u0444\u0430\u0439\u043b \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 <code>\/etc\/sysconfig\/<\/code>:<\/p>\n<pre><code>touch \/etc\/sysconfig\/libvirtd <\/code><\/pre>\n<p>\u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0434\u0435\u043c\u043e\u043d libvirt:<\/p>\n<pre><code>systemctl restart libvirtd <\/code><\/pre>\n<p>\u0421\u0441\u044b\u043b\u043a\u0438:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/libvirt.org\/manpages\/libvirtd.html#system-socket-activation\" rel=\"noopener noreferrer nofollow\">https:\/\/libvirt.org\/manpages\/libvirtd.html#system-socket-activation<\/a><\/p>\n<\/li>\n<\/ul>\n<h3>Networking<\/h3>\n<h4>\u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c IP Forwarding<\/h4>\n<p>\u041d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043d\u0430 \u0445\u043e\u0441\u0442\u0435 (\u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u043e\u0434\u043d\u0430 \u043c\u0430\u0448\u0438\u043d\u0430) IP Forwarding.<\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0444\u0430\u0439\u043b \/etc\/sysctl.d\/cloudstack.conf \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u0442\u0440\u043e\u0447\u043a\u0438:<\/p>\n<pre><code>net.ipv4.ip_forward=1 <\/code><\/pre>\n<p>\u0423\u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u0438\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e IP Forwarding \u0432\u043a\u043b\u044e\u0447\u0435\u043d:<\/p>\n<pre><code>sysctl net.ipv4.ip_forward <\/code><\/pre>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c eth0 <code>\/etc\/sysconfig\/network-scripts\/ifcfg-eth0<\/code>:<\/p>\n<pre><code>DEVICE=eth0 HWADDR=00:04:xx:xx:xx:xx ONBOOT=yes HOTPLUG=no BOOTPROTO=none TYPE=Ethernet BRIDGE=cloudbr0 <\/code><\/pre>\n<p>\u0418 \u0437\u0430\u0442\u0435\u043c \u0434\u0432\u0430 \u0431\u0440\u0438\u0434\u0436\u0430 &#8212; cloudbr0:<\/p>\n<pre><code>DEVICE=cloudbr0 TYPE=Bridge ONBOOT=yes BOOTPROTO=none IPV6INIT=no IPV6_AUTOCONF=no DELAY=5 IPADDR=192.168.42.11 GATEWAY=192.168.42.1 NETMASK=255.255.255.0 STP=yes <\/code><\/pre>\n<p>cloudbr1 <code>\/etc\/sysconfig\/network-scripts\/ifcfg-cloudbr1<\/code>:<\/p>\n<pre><code>DEVICE=cloudbr1 TYPE=Bridge ONBOOT=yes BOOTPROTO=none IPV6INIT=no IPV6_AUTOCONF=no DELAY=5 STP=yes <\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u043a\u0440\u0438\u043f\u0442 cloudstack-setup-databases:<\/p>\n<pre><code>cloudstack-setup-databases cloud:&lt;PASSWORD>@localhost --deploy-as=root <\/code><\/pre>\n<p>\u041f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<pre><code>Mysql user name:cloud                                                           [ OK ] Mysql user password:******                                                      [ OK ] Mysql server ip:localhost                                                       [ OK ] Mysql server port:3306                                                          [ OK ] Mysql root user name:root                                                       [ OK ] Mysql root user password:******                                                 [ OK ] Checking Cloud database files ...                                               [ OK ] Checking local machine hostname ...                                             [ OK ] Checking SELinux setup ...                                                      [ OK ] Detected local IP address as 185.149.240.25, will use as cluster management server node IP[ OK ] Preparing \/etc\/cloudstack\/management\/db.properties                              [ OK ] Applying \/usr\/share\/cloudstack-management\/setup\/create-database.sql             [ OK ] Applying \/usr\/share\/cloudstack-management\/setup\/create-schema.sql               [ OK ] Applying \/usr\/share\/cloudstack-management\/setup\/create-database-premium.sql     [ OK ] Applying \/usr\/share\/cloudstack-management\/setup\/create-schema-premium.sql       [ OK ] Applying \/usr\/share\/cloudstack-management\/setup\/server-setup.sql                [ OK ] Applying \/usr\/share\/cloudstack-management\/setup\/templates.sql                   [ OK ] Processing encryption ...                                                       [ OK ] Finalizing setup ...                                                            [ OK ]  CloudStack has successfully initialized database, you can check your database configuration in \/etc\/cloudstack\/management\/db.properties <\/code><\/pre>\n<h3>sudoers<\/h3>\n<p>\u0414\u043b\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 cloudstack-agent \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u0442\u0440\u043e\u0447\u043a\u0438 \u0432 <code>\/etc\/sudoers<\/code>:<\/p>\n<pre><code>cloudstack ALL=NOPASSWD: \/usr\/bin\/cloudstack-setup-agent defaults:cloudstack !requiretty <\/code><\/pre>\n<h3>End<\/h3>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a cloudstack-setup-management:<\/p>\n<pre><code>Starting to configure CloudStack Management Server: Configure CloudStack Management Server ...[OK] CloudStack Management Server setup is Done! Please ensure ports 8080, 8250, 8443, and 9090 are opened and not firewalled for the management server and not in use by other processes on this host. <\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a \u0430\u0433\u0435\u043d\u0442\u0430 Cloudstack:<\/p>\n<pre><code>systemctl enable cloudstack-agent systemctl start cloudstack-agent systemctl status cloudstack-agent <\/code><\/pre>\n<h3>UI<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c WebUI CloudStack:<br \/> http:\/\/:8080\/client<\/p>\n<p>\u0423\u0447\u0435\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e:<\/p>\n<pre><code>admin password <\/code><\/pre>\n<figure class=\"\">\n<div><figcaption>Login<\/figcaption><\/div>\n<\/figure>\n<figure class=\"\">\n<div><figcaption>UI<\/figcaption><\/div>\n<\/figure>\n<ul>\n<li>\n<p><a href=\"https:\/\/cloudstack.apache.org\/kubernetes.html\" rel=\"noopener noreferrer nofollow\">https:\/\/cloudstack.apache.org\/kubernetes.html<\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/783220\/\"> https:\/\/habr.com\/ru\/articles\/783220\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-364011","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/364011","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=364011"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/364011\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=364011"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=364011"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=364011"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}