Experimenting with cloud solution for On-demand visualization. I got a tip from a colleague. Apache CLOUDSTACK can manage VMware environment. So why not test it!
First of all I need to install the management server. So I have chosen CentOS 7. Cloudstack has no manual for CentOS 7 (Only has one for CentOS 6), so I have started building a manual for CentOS 7.
How to implement this on CentOS 7?
CentOS 7 – Starting installation of Cloudstack.
I have already created a Centos server with the minimal software installation. I will use the package of Shape Blue for VMware. This is the link for the latest version:
NOTE: Currently the is a problem with the Shapeblue repo. Please use these links:http://packages.shapeblue.co.za/cloudstack/main/centos7/4.8/
So we will create first the REPO on the CentOS server.
vi /etc/yum.repos.d/cloudstack.repo Add following line to cloudstack.repo [cloudstack-4.8] name=cloudstack baseurl=http://packages.shapeblue.com/cloudstack/main/centos7/4.8 enabled=1 gpgcheck=1 gpgkey=http://packages.shapeblue.com/release.asc Import the gpg release key wget https://packages.shapeblue.com/release.asc --2016-05-21 09:39:05-- https://packages.shapeblue.com/release.asc Resolving packages.shapeblue.com (packages.shapeblue.com)... 188.8.131.52 Connecting to packages.shapeblue.com (packages.shapeblue.com)|184.108.40.206|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 1735 (1.7K) [text/plain] Saving to: ‘release.asc’ 100%[====================================================================>] 1,735 --.-K/s in 0s 2016-05-21 09:39:05 (21.9 MB/s) - ‘release.asc’ saved [1735/1735] sudo rpm --import release.asc And our repository is ready to use. We may now install any of the available packages, for example:
yum install cloudstack-management cloudstack-usage cloudstack-agent
yum install mariadb-server mariadb -y After the installation edit the following file and add the lines in black. vi /etc/my.cnf [mysqld] innodb_rollback_on_timeout=1 innodb_lock_wait_timeout=600 max_connections=350 log-bin=mysql-bin binlog-format=ROW datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock systemctl restart mariadb systemctl enable mariadb MariaDB security mysql_secure_installation /bin/mysql_secure_installation: line 379: find_mysql_client: command not found NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY! In order to log into MariaDB to secure it, we'll need the current password for the root user. If you've just installed MariaDB, and you haven't set the root password yet, the password will be blank, so you should just press enter here. Enter current password for root (enter for none): OK, successfully used password, moving on... Setting the root password ensures that nobody can log into the MariaDB root user without the proper authorisation. Set root password? [Y/n] y New password: Re-enter new password: Password updated successfully! Reloading privilege tables.. ... Success! By default, a MariaDB installation has an anonymous user, allowing anyone to log into MariaDB without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother. You should remove them before moving into a production environment. Remove anonymous users? [Y/n] y ... Success! Normally, root should only be allowed to connect from 'localhost'. This ensures that someone cannot guess at the root password from the network. Disallow root login remotely? [Y/n] y ... Success! By default, MariaDB comes with a database named 'test' that anyone can access. This is also intended only for testing, and should be removed before moving into a production environment. Remove test database and access to it? [Y/n] y - Dropping test database... ... Success! - Removing privileges on test database... ... Success! Reloading the privilege tables will ensure that all changes made so far will take effect immediately. Reload privilege tables now? [Y/n] y ... Success! Cleaning up... All done! If you've completed all of the above steps, your MariaDB installation should now be secure. Thanks for using MariaDB! Create the cloudstack database on the mariaDB cloudstack-setup-databases cloud:secret --deploy-as=root:<password> 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 192.168.101.9, 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 cloudstack-setup-management –tomcat7 Starting to configure CloudStack Management Server: Configure Firewall ... [OK] Configure CloudStack Management Server ...[Failed] Cannot find /etc/cloudstack/management/server-nonssl.xml or /etc/cloudstack/management/tomcat6-nonssl.conf, https enable failed Try to restore your system: Restore Firewall ... [OK] Restore CloudStack Management Server ...[OK] To solve the failed error, copy the file server7-nonssl.xml to server.xml cp -p server7-nonssl.xml server.xml systemctl stop cloudstack-management.service systemctl start cloudstack-management.service systemctl status cloudstack-management.service ● cloudstack-management.service - CloudStack Management Server Loaded: loaded (/usr/lib/systemd/system/cloudstack-management.service; enabled; vendor preset: disabled) Active: active (running) since Sat 2016-05-21 17:16:50 CEST; 6s ago Main PID: 5702 (java) CGroup: /system.slice/cloudstack-management.service └─5702 /usr/lib/jvm/jre/bin/java -Djava.awt.headless=true -Dcom.sun.management.jmxremote=false -... systemctl enable cloudstack-management.service Created symlink from /etc/systemd/system/multi-user.target.wants/cloudstack-management.service to /usr/lib/systemd/system/cloudstack-management.service.
Open your webbrowser and go to the following webspage:
This will show your the login page of CloudStack (Use the default admin password: admin/password)