CloudStack: Difference between revisions
mNo edit summary |
No edit summary |
||
| Line 4: | Line 4: | ||
Refer to the installation guide at [http://docs.cloudstack.apache.org/en/latest/quickinstallationguide/qig.html#management-server-installation http://docs.cloudstack.apache.org/en/latest/quickinstallationguide/qig.html] | Refer to the installation guide at [http://docs.cloudstack.apache.org/en/latest/quickinstallationguide/qig.html#management-server-installation http://docs.cloudstack.apache.org/en/latest/quickinstallationguide/qig.html] | ||
=== | === Node setup === | ||
The following should be done prior to installing the management and/or agent components. | |||
==== Disable SELinux ==== | |||
The system should have SELinux disabled.{{Highlight | The system should have SELinux disabled.{{Highlight | ||
| code = # setenforce 0 | | code = # setenforce 0 | ||
| Line 11: | Line 14: | ||
| lang = terminal | | lang = terminal | ||
}} | }} | ||
==== CloudStack Repos ==== | |||
Install CloudStack repos, then the CloudStack management package.{{Highlight | |||
| code = # cat > /etc/yum.repos.d/cloudstack.repo <<EOF | |||
[cloudstack] | |||
name=cloudstack | |||
baseurl=http://download.cloudstack.org/centos/8/4.15/ | |||
enabled=1 | |||
gpgcheck=0 | |||
EOF | |||
| lang = terminal | |||
}} | |||
==== Install base packages ==== | |||
{{Highlight | {{Highlight | ||
| code = # yum -y install epel-release | | code = # yum -y install epel-release | ||
# yum -y install bridge-utils net-tools | # yum -y install bridge-utils net-tools | ||
# cat > /etc/sysconfig/network-scripts/ifcfg-cloudbr0 <<EOF | | lang = terminal | ||
}} | |||
===Management node setup=== | |||
On the management node, setup the following components. | |||
==== Network configuration ==== | |||
Setup networking | |||
{{Highlight | |||
| code = # cat > /etc/sysconfig/network-scripts/ifcfg-cloudbr0 <<EOF | |||
DEVICE=cloudbr0 | DEVICE=cloudbr0 | ||
TYPE=Bridge | TYPE=Bridge | ||
| Line 35: | Line 60: | ||
# systemctl stop firewalld | # systemctl stop firewalld | ||
# systemctl disable firewalld | # systemctl disable firewalld | ||
| lang = terminal | | lang = terminal | ||
}} | }} | ||
| Line 85: | Line 98: | ||
Setup CloudStack. | Setup CloudStack. | ||
{{Highlight | {{Highlight | ||
| code = # | | code = # yum -y install cloudstack-management | ||
# cloudstack-setup-databases cloud:password@localhost --deploy-as=root | # cloudstack-setup-databases cloud:password@localhost --deploy-as=root | ||
| Line 91: | Line 104: | ||
# systemctl start cloudstack-management | # systemctl start cloudstack-management | ||
# systemctl enable cloudstack-management | # systemctl enable cloudstack-management | ||
# Seed the systemvm into secondary storage | |||
# /usr/share/cloudstack-common/scripts/storage/secondary/cloud-install-sys-tmplt -m /export/secondary -u https://download.cloudstack.org/systemvm/4.15/systemvmtemplate-4.15.1-kvm.qcow2.bz2 -h kvm -F | |||
| lang = terminal | | lang = terminal | ||
}}At this point, you should have the CloudStack web UI available at http://cloudstack:8080/client. Login as admin / password. Continue the setup process via the web interface. | }}At this point, you should have the CloudStack web UI available at http://cloudstack:8080/client. Login as admin / password. Continue the setup process via the web interface. | ||
=== Agent node setup === | |||
The agent node must have virtualization enabled. /dev/kvm should exist. | |||
{{Highlight | |||
| code = # yum -y install cloudstack-agent | |||
## edit /etc/libvirt/qemu.conf | |||
vnc_listen=0.0.0.0 | |||
## edit /etc/libvirt/libvirtd.conf | |||
listen_tls = 0 | |||
listen_tcp = 1 | |||
tcp_port = "16509" | |||
auth_tcp = "none" | |||
mdns_adv = 0 | |||
= | ## edit /etc/sysconfig/libvirtd: | ||
LIBVIRTD_ARGS="--listen" | |||
# systemctl restart libvirtd | |||
| lang = terminal | |||
}} | |||
Revision as of 23:50, 21 July 2021
Installation
Here are my brief notes on getting CloudStack on Rocky Linux 8.4.
Refer to the installation guide at http://docs.cloudstack.apache.org/en/latest/quickinstallationguide/qig.html
Node setup
The following should be done prior to installing the management and/or agent components.
Disable SELinux
The system should have SELinux disabled.
# setenforce 0
# vi /etc/selinux/config
## disable selinux
CloudStack Repos
Install CloudStack repos, then the CloudStack management package.
# cat > /etc/yum.repos.d/cloudstack.repo <<EOF
[cloudstack]
name=cloudstack
baseurl=http://download.cloudstack.org/centos/8/4.15/
enabled=1
gpgcheck=0
EOF
Install base packages
# yum -y install epel-release
# yum -y install bridge-utils net-tools
Management node setup
On the management node, setup the following components.
Network configuration
Setup networking
# cat > /etc/sysconfig/network-scripts/ifcfg-cloudbr0 <<EOF
DEVICE=cloudbr0
TYPE=Bridge
ONBOOT=yes
BOOTPROTO=static
IPV6INIT=no
IPV6_AUTOCONF=no
DELAY=5
IPADDR=172.16.10.2
GATEWAY=172.16.10.1
NETMASK=255.255.255.0
DNS1=8.8.8.8
DNS2=8.8.4.4
STP=yes
USERCTL=no
NM_CONTROLLED=no
EOF
# systemctl stop firewalld
# systemctl disable firewalld
Install MySQL (cannot be MariaDB):
# rpm -ivh http://repo.mysql.com/mysql80-community-release-el8.rpm
# yum -y install mysql-server
# yum -y install mysql-connector-python
## edit /etc/my.cnf to have the following lines.
cat >> /etc/my.cnf <<EOF
[mysqld]
innodb_rollback_on_timeout=1
innodb_lock_wait_timeout=600
max_connections=350
log-bin=mysql-bin
binlog-format = 'ROW'
EOF
# systemctl enable mysqld
# systemctl start mysqld
Setup storage
# mkdir -p /export/primary /export/secondary
# yum -y install nfs-utils
# cat > /etc/exports <<EOF
/export/secondary *(rw,async,no_root_squash,no_subtree_check)
/export/primary *(rw,async,no_root_squash,no_subtree_check)
EOF
# systemctl start nfs-server
# systemctl enable nfs-server
Setup CloudStack.
# yum -y install cloudstack-management
# cloudstack-setup-databases cloud:password@localhost --deploy-as=root
# cloudstack-setup-management
# systemctl start cloudstack-management
# systemctl enable cloudstack-management
# Seed the systemvm into secondary storage
# /usr/share/cloudstack-common/scripts/storage/secondary/cloud-install-sys-tmplt -m /export/secondary -u https://download.cloudstack.org/systemvm/4.15/systemvmtemplate-4.15.1-kvm.qcow2.bz2 -h kvm -F
At this point, you should have the CloudStack web UI available at http://cloudstack:8080/client. Login as admin / password. Continue the setup process via the web interface.
Agent node setup
The agent node must have virtualization enabled. /dev/kvm should exist.
# yum -y install cloudstack-agent
## edit /etc/libvirt/qemu.conf
vnc_listen=0.0.0.0
## edit /etc/libvirt/libvirtd.conf
listen_tls = 0
listen_tcp = 1
tcp_port = "16509"
auth_tcp = "none"
mdns_adv = 0
## edit /etc/sysconfig/libvirtd:
LIBVIRTD_ARGS="--listen"
# systemctl restart libvirtd