CloudStack 4.2 RPM build how to

CloudStack 4.2 is ready for release but the site has not updated so that you can just update your repo and install or upgrade so in this post I’ll go thru the process I use to compile from source. You can use this process for other versions but some things may change. You could also follow the process on the Apache Cloudstack documentation website but this is a slim down version to get you quickly moving with 4.2.

First things first and that mean setting up a system with all the things needed to get that final result which is usable Apache Cloudstack RPMS for CentOS6 or RHEL6. I have only tested this process and RPMS with CentOS 6.4. Follow the steps below:

yum groupinstall "Development Tools" -y

More packages are needed:

yum install git ant ant-devel java-1.6.0-openjdk java-1.6.0-openjdk-devel mysql mysql-server tomcat6 mkisofs gcc python MySQL-python openssh-clients wget rpm-build ws-commons-util net-snmp genisoimage -y

Install Apache Maven:

wget http://www.us.apache.org/dist/maven/maven-3/3.0.5/binaries/apache-maven-3.0.5-bin.tar.gz
cd /usr/local/
tar -zxvf apache-maven-3.0.5-bin.tar.gz

Set the environment variables for maven:

echo export M2_HOME=/usr/local/apache-maven-3.0.5 >> /etc/profile.d/maven.sh
echo export PATH=/usr/local/apache-maven-3.0.5/bin:${PATH} >> /etc/profile.d/maven.sh

Now reboot!! Log back in when the system is back up.

Download the Apache CloudStack 4.2 source zip file from Github. This can be done in a few different ways but in this post I’ll just go to the https://github.com/apache/cloudstack page.

Once there change from the “master” branch to the “4.2″ branch or follow this URL (https://github.com/apache/cloudstack/tree/4.2) then in the bottom right hand corner click the “Download Zip” button.

When the file is downloaded, unzip it and copy it to the system we setup for building the RPMs from source.

cd packaging/centos63
./package.sh

All the rpm packages will be create in dist/rpmbuild/RPMS/x86_64

cloudstack 4.2 rpm build

If you want to create a repository that you can access from a web server use “createrepo”.

yum install createrepo
createrepo

If you want to do a local installation using the packages you can run the command below.

yum --nogpgcheck localinstall cloudstack*.rpm

I have not tested an upgrade scenario but if you do try it yourself make sure the put hosts in “maintenance mode” before upgrading them. But the command below should work, just pick the right RPMs to upgrade instead of using the wildcard method.

yum --nogpgcheck localupgrade cloudstack*.rpm

CloudStack 4.2 RPM build how to originally appeared on theHyperadvisor by Antone Heyward

Tags: , , ,

2 Responses to CloudStack 4.2 RPM build how to

  1. Larry Hernandez on September 27, 2020 at 1:40 pm

    Great article! As a side note the 4.2 RHEL repo (http://cloudstack.apt-get.eu/rhel/4.2/) is up and has nonoss built in.

  2. Antone Heyward on September 27, 2020 at 1:49 pm

    Thanks for the link Larry. For those that may not know the nonoss or non-oss contains the plugins that provide support for VMware, Netscaler, F5, etc.

Leave a Reply

Disclaimer:

The opinions expressed on this blog are solely those of the individual that left it, and do not reflect the opinions of their employer.



%d bloggers like this: