Apache CloudStack Deployment on Ubuntu Server: Difference between revisions
From WikiMLT
m Стадий: 5 [Фаза:Утвърждаване, Статус:Авторизиран]; Категория:Linux Server |
m Стадий: 6 [Фаза:Утвърждаване, Статус:Утвърден]; Категория:Linux Server |
||
(8 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<noinclude | <noinclude>{{ContentArticleHeader/Linux_Server}}</noinclude> | ||
==OS Preparation== | ==OS Preparation== | ||
<syntaxhighlight lang="shell" line="1"> | <syntaxhighlight lang="shell" line="1"> | ||
echo deb http://download.cloudstack.org/ubuntu focal 4.15 | sudo tee -a /etc/apt/sources.list.d/cloudstack.list | echo deb http://download.cloudstack.org/ubuntu focal 4.15 | sudo tee -a /etc/apt/sources.list.d/cloudstack.list | ||
wget -O - http://download.cloudstack.org/release.asc | sudo apt-key add - | wget -O - http://download.cloudstack.org/release.asc | sudo apt-key add - | ||
sudo apt update | sudo apt update | ||
</syntaxhighlight> | </syntaxhighlight> | ||
<syntaxhighlight lang="shell" line="1"> | <syntaxhighlight lang="shell" line="1"> | ||
sudo update-alternatives --config java | sudo update-alternatives --config java | ||
Line 18: | Line 13: | ||
==Install the Management Server== | ==Install the Management Server== | ||
*[https://docs.cloudstack.apache.org/en/latest/installguide/management-server/index.html#install-the-management-server-on-the-first-host Apache CloudStack Docs » Install the Management Server on the First Host] | *[https://docs.cloudstack.apache.org/en/latest/installguide/management-server/index.html#install-the-management-server-on-the-first-host Apache CloudStack Docs » Install the Management Server on the First Host] | ||
*[https://rohityadav.cloud/blog/cloudstack-rpi4-kvm/ Rohit Yadav » Apache CloudStack on RaspberryPi4 with Ubuntu 20.04 and KVM] | *[https://rohityadav.cloud/blog/cloudstack-rpi4-kvm/ Rohit Yadav » Apache CloudStack on RaspberryPi4 with Ubuntu 20.04 and KVM] | ||
Line 45: | Line 39: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{collapse/end}} | {{collapse/end}} | ||
{{Collapse/begin}} | {{Collapse/begin}} | ||
<syntaxhighlight lang="shell" line="1"> | <syntaxhighlight lang="shell" line="1"> | ||
Line 89: | Line 82: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{collapse/end}} | {{collapse/end}} | ||
==Prepare the System VM Template== | ==Prepare the System VM Template== | ||
*[https://docs.cloudstack.apache.org/en/latest/installguide/management-server/index.html#prepare-the-system-vm-template Apache CloudStack Docs » Prepare the System VM Template] | *[https://docs.cloudstack.apache.org/en/latest/installguide/management-server/index.html#prepare-the-system-vm-template Apache CloudStack Docs » Prepare the System VM Template] | ||
<syntaxhighlight lang="shell" line="1"> | <syntaxhighlight lang="shell" line="1"> | ||
Line 114: | Line 105: | ||
Successfully installed system VM template systemvmtemplate-4.15.0-kvm.qcow2.bz2 and template.properties to /mnt/vm-data-256GB/secondary/template/tmpl/1/3/ | Successfully installed system VM template systemvmtemplate-4.15.0-kvm.qcow2.bz2 and template.properties to /mnt/vm-data-256GB/secondary/template/tmpl/1/3/ | ||
</syntaxhighlight>{{collapse/end}} | </syntaxhighlight>{{collapse/end}} | ||
==Run 'cloudstack-setup-management'== | ==Run 'cloudstack-setup-management'== | ||
<syntaxhighlight lang="shell" line="1"> | <syntaxhighlight lang="shell" line="1"> | ||
Line 126: | Line 116: | ||
cloudstack-setup-managemen | cloudstack-setup-managemen | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==Remove CloudStack== | |||
== | <syntaxhighlight lang="shell" line="1"> | ||
sudo apt remove --purge cloudstack-management cloudstack-agent cloudstack-usage | sudo apt remove --purge cloudstack-management cloudstack-agent cloudstack-usage | ||
sudo rm -R /var/log/cloudstack/usage /var/log/cloudstack/management /var/lib/cloudstack/management | sudo rm -R /var/log/cloudstack/usage /var/log/cloudstack/management /var/lib/cloudstack/management | ||
Line 137: | Line 126: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
[[ | == References == | ||
* [https://docs.cloudstack.apache.org/en/latest/installguide/overview/index.html#minimum-system-requirements Apache CloudStack Docs » Package Repository] | |||
*[https://technologyrss.com/how-to-install-apache-cloud-stack-management-server-on-ubuntu-20-04/ TechnologyRSS Step#02: Download required package for setup Apache Cloud Stack] | |||
*[https://docs.cloudstack.apache.org/en/latest/upgrading/upgrade/_java_version.html?highlight=cloudstack-agent#java-version-requirement Apache CloudStack Docs » Java Version Requirement] | |||
* [https://rohityadav.cloud/blog/cloudstack-rpi4-kvm/ Apache CloudStack on RaspberryPi4 with Ubuntu 20.04 and KVM] (Setup Zones) | |||
<noinclude> | <noinclude> | ||
<div id='devStage'> | <div id='devStage'> | ||
{{devStage | {{devStage | ||
| Прндл = Linux Server | | Прндл = Linux Server | ||
| Стадий = | | Стадий = 6 | ||
| Фаза = Утвърждаване | | Фаза = Утвърждаване | ||
| Статус = | | Статус = Утвърден | ||
| ИдтПт = Spas | | ИдтПт = Spas | ||
| РзбПт = Spas | | РзбПт = Spas | ||
Line 154: | Line 148: | ||
| УтвДт = {{Today}} | | УтвДт = {{Today}} | ||
| ИдтРв = [[Special:Permalink/29756|29756]] | | ИдтРв = [[Special:Permalink/29756|29756]] | ||
| РзбРв = [[Special:Permalink/ | | РзбРв = [[Special:Permalink/29784|29784]] | ||
| АвтРв = [[Special:Permalink/29771|29771]] | | АвтРв = [[Special:Permalink/29785|29785]] | ||
| РзАРв = [[Special:Permalink/29771|29771]] | |||
| УтвРв = {{REVISIONID}} | | УтвРв = {{REVISIONID}} | ||
| РзУРв = [[Special:Permalink/29774|29774]] | |||
}} | }} | ||
</div> | </div> | ||
</noinclude> | </noinclude> |
Latest revision as of 13:44, 2 August 2022
OS Preparation
echo deb http://download.cloudstack.org/ubuntu focal 4.15 | sudo tee -a /etc/apt/sources.list.d/cloudstack.list
wget -O - http://download.cloudstack.org/release.asc | sudo apt-key add -
sudo apt update
sudo update-alternatives --config java
# 0 /usr/lib/jvm/java-11-openjdk-amd64/bin/java 1111 auto mode
Install the Management Server
- Apache CloudStack Docs » Install the Management Server on the First Host
- Rohit Yadav » Apache CloudStack on RaspberryPi4 with Ubuntu 20.04 and KVM
sudo apt install cloudstack-management cloudstack-agent cloudstack-usage
sudo systemctl stop cloudstack-agent.service cloudstack-management.service cloudstack-usage.service
sudo nano /etc/mysql/mysql.conf.d/cloudstack.cnf # cat /etc/mysql/mysql.conf.d/cloudstack.cnf
#Output
[mysqld]
server-id=1
sql-mode="STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION,ERROR_FOR_DIVISION_BY_ZERO,NO_ZERO_DATE,NO_ZERO_IN_DATE,NO_ENGINE_SUBSTITUTION"
innodb_rollback_on_timeout=1
innodb_lock_wait_timeout=600
max_connections=1000
log-bin=mysql-bin
binlog-format = 'ROW'
default-authentication-plugin=mysql_native_password
sudo systemctl restart mysql.service
sudo cloudstack-setup-databases cloudStackUser:'secret007@CL0Ud'@localhost \
--deploy-as=root -m 'secret007' -k 'secret007' -i 127.0.0.1
#Output
Mysql user name:cloudStackUser [ 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 ]
Using specified cluster management server node IP 127.0.0.1 [ OK ]
Checking Cloud database files ... [ OK ]
Checking local machine hostname ... [ OK ]
Checking SELinux setup ... [ 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
sudo cloudstack-setup-management
#Output
Starting to configure CloudStack Management Server:
Configure CloudStack Management Server ...[OK]
CloudStack Management Server setup is Done!
Please ensure the following ports are open for the management server to function properly:
8080 8250 8443 9090
Prepare the System VM Template
sudo mkdir /mnt/vm-data-256GB/secondary /mnt/vm-data-256GB/primary
cd ~/Downloads
wget http://download.cloudstack.org/systemvm/4.15/systemvmtemplate-4.15.0-kvm.qcow2.bz2
sudo /usr/share/cloudstack-common/scripts/storage/secondary/cloud-install-sys-tmplt \
-m /mnt/vm-data-256GB/secondary -f systemvmtemplate-4.15.0-kvm.qcow2.bz2 \
-h kvm -o localhost -r cloudStackUser -d 'secret007@CL0Ud' -s 'secret007'
#Output
mysql: [Warning] Using a password on the command line interface can be insecure.
mysql: [Warning] Using a password on the command line interface can be insecure.
Uncompressing to /usr/share/cloudstack-common/scripts/storage/secondary/65552f61-5ba7-4f6b-8f53-f2b25a6df676.qcow2.tmp (type bz2)...could take a long time
Moving to /mnt/vm-data-256GB/secondary/template/tmpl/1/3///65552f61-5ba7-4f6b-8f53-f2b25a6df676.qcow2...could take a while
Successfully installed system VM template systemvmtemplate-4.15.0-kvm.qcow2.bz2 and template.properties to /mnt/vm-data-256GB/secondary/template/tmpl/1/3/
Run 'cloudstack-setup-management'
# change the default port from 8080 to 8081
sudo nano /etc/cloudstack/management/server.properties
# open the port
sudo iptables -I INPUT 16 -p tcp -m tcp --dport 8081 -j ACCEPT
# run the management server
cloudstack-setup-managemen
Remove CloudStack
sudo apt remove --purge cloudstack-management cloudstack-agent cloudstack-usage
sudo rm -R /var/log/cloudstack/usage /var/log/cloudstack/management /var/lib/cloudstack/management
sudo rm -R /etc/cloudstack/management /var/log/cloudstack/agent /usr/share/cloudstack-agent /etc/cloudstack
sudo rm -R /usr/share/cloudstack-common /mnt/vm-data-256GB/primary /mnt/vm-data-256GB/secondary
update
sudo rm /etc/apt/sources.list.d/cloudstack.list
References
- Apache CloudStack Docs » Package Repository
- TechnologyRSS Step#02: Download required package for setup Apache Cloud Stack
- Apache CloudStack Docs » Java Version Requirement
- Apache CloudStack on RaspberryPi4 with Ubuntu 20.04 and KVM (Setup Zones)