Very often this can be a problem to manage cloud costs efficiently. As a result, you are wasting about 45% of your cloud spends or even much more. There are different ways to optimize these expenses in order to apply the released budget on directions that can bring the income. The most widely used are:
- Monitoring utilization and rightsizing instances
- Automating hibernation of temporary workloads
- Shutting down workloads during certain hours
- Selecting cloud or region based on cost
Today we are going to cover one of the most simple but still highly effective solutions to save money while running your development environments in the cloud. Usually during such lifecycle stages as development or testing the environment is not constantly required, like during nighttime or weekends. The waste can be easily noticed in the simple illustration of a week with 5 working days approximately 10 hours each:
As you see, about 70% of resources is wasted during non-working hours. So it would be a smart decision to stop your environment during such idling period to cut spends. Obviously, doing it manually is an inefficient way of management, so you need to automate the process.
Jelastic created a cron-based scheduler add-on that is designed to automate the stop and start operations for any environment on the cloud platform. Though being extremely simple in configuration, it allows to gain considerable savings, especially when working with multiple environments. And to help you with that, below we’ll consider the steps required to install and manage this add-on and a number of possible configurations for the most common use cases with this solution. So, let’s go on!
Hibernation Scheduler Installation
1. Log into the dashboard and click the Marketplace button at the top pane.
2. Switch to the Add-ons tab and find the Env Start/Stop Scheduler solution. Hover over it and click the appeared Install button.
3. Within the opened frame, you need to configure and confirm installation.
Provide the following data to customize add-on up to your needs:
- Stop / Start - cron trigger conditions for the appropriate environment operations execution (5 characters each); you can leave the default values to stop environment at 7pm and start at 9am daily, specify your own ones or leave one of them blank in case you don’t want to activate it
- Environment name - target environment that should be managed by add-on
- Nodes - environment layer the add-on will be installed to; it is fetched automatically upon selecting the environment (we recommend leaving this field unchanged).
Click Install to add a scheduler.
4. In a moment, you’ll see a notification about the operation being completed successfully.
That’s it! The add-on has been installed and is already working, being ready to regulate your environment activity time based on the given schedule.
Hibernation Scheduler Management
In case you need to adjust the start / stop conditions after installation, this can be done directly via dashboard:
1. Click on the Add-ons icon next to the environment layer, where the solution was installed.
Within the opened tab, find the scheduler and select the Configure button.
2. The appropriate frame will be shown, allowing to set new values for the Stop and Start triggers (or to disable one of them through clearing the corresponding field).
For example, let’s adjust stop and start time to half past nine in the evening and eight o’clock in the morning respectively. Click Apply to use the new settings for the add-on.
3. When moving project to production (or in case you just don’t need this solution anymore), use the menu at the top right corner of the scheduler to Uninstall it. In such a way, you’ll ensure permanent application availability for your customers.
Confirm this operation within pop up and, in a moment, add-on will be removed from your environment.
Common Use Cases
Cron triggers syntax is very versatile, which allows to adjust add-on up to your specific needs and smartly manage environment uptime. Below, we’ve gathered some of the most common use cases, that may be helpful for you:
- nighttime - stop environment every day in the evening (e.g. 7 p.m.) and start in the morning (9 a.m.)
- weekends - stop every Friday evening and start Monday morning
- nighttime + weekends - stop in the evening and start in the morning on working days (stopped during weekends)
- every other day - stop on odd days of a month and start on even days
- holidays - plan hibernation for a particular holiday (e.g. New Year celebration); stop on December 30th and start on second of January
That’s all! Now, you know how to work with Jelastic Env Start/Stop Scheduler add-on and can use it to organize your environments uptime. Try one of the above-described use cases (or provide start and stop time based on your specific needs) to maximize resources/funds saving on your testing and development environments running in the Jelastic Cloud.