Getting started with CREODIAS: Suspend and back up your resources before going on holidays
Get ready! Summer holidays are coming! It’s a time of rest and frequent trips. This may mean a lot of absences and slowing down the projects’ implementation or even suspending them. However, in the cloud infrastructure everything is continuously working once set in motion, regardless of whether someone uses it or not. Below you can find some useful information on how to avoid problems with your cloud environment during holiday absence.
Just to remind you – there are 3 billing models on CREODIAS as described in this document: Wallets and Contracts Management.
If you use the pay-per-use (PPU) billing, resources left on the cloud, even an idle one, consume a lot of your credits, or worse, consume all credits resulting in a sudden unplanned stop of all resources and shelving them. Usually, such events cause data loss or problems with running the environment again.
If you use the pay-as-you-go (PAYG) billing, you receive an invoice that cover the cloud consumption, even if the infrastructure has not been actively used.
Track your billing system email notifications
The billing system at CREODIAS is continuously monitoring your wallet status, detecting low amount, and it sends email notifications to all the organization members with administrator rights:
Notifications come from the address: Notifications <notifications@cloudferro.com>
Notifications’ titles are: “CREODIAS: Wallet balance is low” or “CREODIAS: Wallet balance is zero”
Notification messages follow this pattern:
Dear <your_name_here>,
Wallet default wallet: <wallet_name> balance is low / equal or less than 0. Currently it is <credit_amounts>. If there is only one wallet connected to your services, it will cause your services stop in a near future.
You can read more information why and when notification are sent to you in this document: Your Guide to PayPerUse services on CREODIAS. You will also learn from the document when unpaid resources are deleted. It is important that you pay attention to these notifications and set up email redirection to your colleagues who replace you.
How to prepare backups of the results with tools such as scp or rsync
Before going on holidays, it is worth making backups of key project data (source code, configuration files, output results) on your local storage (office NAS, university storage, etc.). It does not have to be a laborious process. If you prepare a simple script using scp, or better, rsync command, all data will be transferred at once. The document How to Upload and Synchronise Files with SCP / RSYNC? describes how to use those commands on CREODIAS.
With this kind of backup, even in the worst case when the resources are deleted after 30 days, only your cloud environment will be affected, but your data will be safe.
Save your money by shelving Virtual Machines
After a graceful shutdown of the project services and then virtual machines, you can shelve all of them. The shelved VMs are billed only for the image storage that is a fraction of the cost of running an instance at the same time.
The shelving and un-shelving process is quite easy and is described in this document: How to Shelve or Unshelve a VM?
This is the most affordable option providing significant savings without a complicated procedure.
Prepare backups of Virtual Machines to Object storage
If your project has to be suspended for a longer time, consider storing your virtual machine images in an Object Storage, and completely clean the resources instead of shelving them. You will pay for the object storage, that is cheaper than the block storage used for volumes.
The step zero would be to do a backup of most important data to repositories and local storage. Even with a suspended project it can be necessary to access the project data in an easy manner.
Firstly, prepare some small flavor VM in your environment with an attached volume able to store the image of your largest VM or volume. The creation of VMs and volumes was described in the previous mini-guides:
Then, prepare the object storage as described in this document: How to use Object Storage on Creodias.
Container may be used directly in Linux :
- How to access object storage from CREODIAS using s3cmd
- How to access private object storage using S3cmd or boto3 on CREODIAS
Or mounted to the Linux filesystem:
How to Mount Object Storage Container as a File System in Linux Using s3fs on CREODIAS
Remember: store EC2 credentials not only on the cloud but also locally or in your password manager.
When you get familiar with uploading data to the object storage, use virtual machine created in the first step and follow the first part of this document: OpenStack instance migration using command line on CREODIAS. You will get a file with an image of the selected machine. This file may be uploaded to object storage.
Restoring a VM from the object storage would require again a small VM with volume. Download the image from the Container and then follow the second part of the before-mentioned document.
Test the entire process on one VM to be sure that you are able to:
- Save VM to an image.
- Store the image in a container.
- Delete the source virtual machine.
- Download the image from the container.
- Run the properly restored virtual machine.
Then you may save all your VMs to the object storage and remove the original ones.
Author: Mateusz Ślaski, Sales Support Engineer, CloudFerro