Newsletter:7/Migrating Zenoss to CloudStack
Migrating Zenoss to Cloudstack
Our latest survey, the 2014 State of the Open Source Cloud, shows a 72% growth in open source cloud adoption over the last two years, with 30% of respondents currently using an open source cloud. Due to the increased interest in open source clouds, this article explains how to create and deploy Zenoss in a CloudStack 4.4.1 environment, and includes the following sections:
- Getting Started
- Creating a Zenoss Template in CloudStack
- Installing Your Zenoss Template in CloudStack
- Configuring Your Service Offering
- Configuring Your Security Zone
- Instantiating Your Instance
- Next Steps
As we begin, a couple of important notes. This article applies specifically to Zenoss 4.x, and also assumes that you have followed the instructions in Quis Custodiet Ipsos Custodis and Encrypt All the Bits from previous newsletters. Since some of the hardware requirements and process will differ between Zenoss 4.x and Zenoss 5.x, the next generation of the Zenoss platform, if you are using 5.x, simply match your Service Offering size to the appropriate requirements as documented in the Zenoss 5.x Install Guide. This article also assumes that you installed a basic flat Layer 2 Cloud Stack by following the official CloudStack Installation. Also note that if you have more complex topography or multiple Security Groups, you will need to make additional adjustments.
Creating a Zenoss Template in CloudStack
To create a Zenoss template in CloudStack, complete the following steps:
- Fire up VirtualBox or VMWare Player.
- Do a CentOS 6.x minimal install.
- Configure eth0 for DHCP.
- Install all updates, and then use the Zenoss 4.x Install Script to install Zenoss.
- Copy over the following CloudStack password change initscript (code below)
- Comment out the contents of /etc/udev/rules.d/70-persistent-net.rules and any UUID’s and MAC addresses in /etc/sysconfig/network-scripts/ifcfg-eth0 to ensure you get a consistent network adapter every time you bring up the instance.
- Shut down your virtual machine, and then upload the VHD or VMDK to a local webserver. This file should be somewhere between 3 and 5 GB in size.
# cd /etc/init.d/ # wget http://download.cloud.com/templates/4.2/bindir/cloud-set-guest-password.in # mv cloud-set-guest-password.in cloud-set-guest-password # chkconfig --add cloud-set-guest-password
You have now created a Zenoss template in CloudStack.
Installing Your Zenoss Template in Cloud Stack
Once you have created your Zenoss template in CloudStack, you are now ready to install your template. CloudStack has an ACL for downloading templates from webservers. To install your Zenoss template in CloudStack, complete the following steps:
- Set up a webserver on the management server, and scp the VHD or VMDK image to the webserver.
- To add the ACL, navigate to Global Settings, and then search for "secstorage.allowed.internal.sites".
- Add the IP address of the CloudStack box, save, and then restart the management server using the following command:
Note: Do not use the restart command.
# service cloudstack-manager stop # service cloudstack-manager start
To finish, Use the Register Template wizard to add your template, and make sure you check the Password Enabled button. CloudStack tends to change passwords the first time the network works on a VM, and can lock you out. The password management capability will override this. Also (unless you used a different hypervisor) select KVM as your hypervisor. It will take a minute or two for CloudStack to download your image.
Configuring Your Service Offering
The 1-2 minutes required to add your Zenoss template to CloudStack is a great time to configure a Service Offering appropriate to Zenoss. For Zenoss 4.2.5, 4-8 GB and 2 cores is a good start. Consult the Zenoss 4.x Installation Guide for specific numbers. For Zenoss 5.x, 20 GB and 4 cores is the minimum, but again, consult the Zenoss 5.x Installation Guide for more specifics.
Configuring Your Security Zone
- Navigate to Network, and select Security Groups from the drop down list.
- Select your security group (which is probably named “default”), and then select Ingress Rule.
- Add ports 22 and 443 (you may need 8080 if you aren’t using nginx).
- Set your CIDR to the range(s) of addresses allowed to access Zenoss. You do not need to set an Egress rule.
Instantiating Your Instance
After you have configured your security zone, instanstiate your instance by completing the following steps:
- Navigate to Instances.
- Select your zone, and add from template, then find your template under My Templates.
- Under Compute Offering, select the service offering you created earlier.
- Under Disk Offering, provide at least 20 GB (note that you may need to grow your filesystem).
- Under Network, select your “default” security group.
- Confirm all your settings are correct, then launch the instance.
Once your instance starts (may take a minute or two), click on your new instance, and then click on NICs to find the IP address. Confirm connectivity via SSH and HTTPS, and if you need to make more adjustments, you can use the View Console option on the Details tab. It looks like a command prompt icon.
Once you have your Zenoss instance up and running in CloudStack, don’t forget that you can use this Zenoss instance to monitor your CloudStack installation itself using the CloudStack ZenPack from Zenoss. Read the Monitoring Cloudstack article to find out what the CloudStack ZenPack can do for you!