Apache CloudStack Deployment on Ubuntu Server: Difference between revisions
From WikiMLT
m Стадий: 4 [Фаза:Авторизиране, Статус:Разработен]; Категория:Linux Server |
m Стадий: 5 [Фаза:Утвърждаване, Статус:Авторизиран]; Категория:Linux Server |
||
Line 136: | Line 136: | ||
{{devStage | {{devStage | ||
| Прндл = Linux Server | | Прндл = Linux Server | ||
| Стадий = | | Стадий = 5 | ||
| Фаза = | | Фаза = Утвърждаване | ||
| Статус = | | Статус = Авторизиран | ||
| ИдтПт = Spas | | ИдтПт = Spas | ||
| РзбПт = Spas | | РзбПт = Spas | ||
| АвтПт = | | АвтПт = Spas | ||
| УтвПт = | | УтвПт = {{REVISIONUSER}} | ||
| ИдтДт = 2.08.2022 | | ИдтДт = 2.08.2022 | ||
| РзбДт = 2.08.2022 | | РзбДт = 2.08.2022 | ||
| АвтДт = | | АвтДт = 2.08.2022 | ||
| УтвДт = | | УтвДт = {{Today}} | ||
| ИдтРв = [[Special:Permalink/29756|29756]] | | ИдтРв = [[Special:Permalink/29756|29756]] | ||
| РзбРв = [[Special:Permalink/29784|29784]] | | РзбРв = [[Special:Permalink/29784|29784]] | ||
| АвтРв = | | АвтРв = [[Special:Permalink/29785|29785]] | ||
| РзАРв = [[Special:Permalink/29771|29771]] | | РзАРв = [[Special:Permalink/29771|29771]] | ||
| УтвРв = {{REVISIONID}} | |||
| РзУРв = [[Special:Permalink/29774|29774]] | | РзУРв = [[Special:Permalink/29774|29774]] | ||
}} | }} | ||
</div> | </div> | ||
</noinclude> | </noinclude> |
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)