Category

GCP

Creating a VM Snapshot in google cloud using Python

By | Blogs, GCP | One Comment

Written by Nirmal Prabhu, Cloud Engineer, Powerupcloud Technologies.

Information is eternal, computers are ephemeral, backup is the saviour.

Keeping it to the point, we have a script to do that to automate VM disk snapshot for google cloud using python and it works with the help of tags.

This script will take a snapshot of all the disks of a VM whose tag matches under condition.

Tag your Virtual machine whose disks to be backed up. Here we used [‘env’:’prod’] where “env” is a key and “prod” is a value.

import apiclient

import json

from datetime import datetime, timedelta

day = datetime.now()

##To get the current date with format.

currday = day.strftime(‘%d-%m-%Y’)

compute = apiclient.discovery.build(‘compute’, ‘v1’)

def list_instances(compute, project, zone):

result = compute.instances().list(project=project, zone=zone).execute()

desired_vms= []

vmdisks= []

data=””

for each_item in result[‘items’]:

if each_item[‘labels’][‘env’]==’prod’: ##Mention the VM label to take snapshot

desired_vms.append(str(each_item[‘name’]))

disks = (each_item[‘disks’])

for disk in disks:

vmdisks.append(str(disk[‘deviceName’]))

data={“vmname”:desired_vms,”disk”:vmdisks}

for disk in vmdisks:

snapshot_body = {‘name’:’automated-snap-’+disk + currday} ## Name Format for new snapshot.

print “Creating snap for %s” % disk

request = compute.disks().createSnapshot(project=’xxx’, zone=’asia-south1-c’,disk=disk, body=snapshot_body) ##Mention the project and Zone

response = request.execute()

return data

print(list_instances(compute,’xxx’ ,’asia-south1-c’)) ##Mention the project and Zone

That’s it… We are done. Happy Automating…Let us know what you think!

Evaluating a hybrid cloud approach — How does one set up for success?

By | AWS, Azure, GCP | No Comments

Written by Agnel Bankien, Head of Marketing at Powerupcloud Technologies.

The blended benefits of private cloud including control, visibility, greater leverage along with the perceived greater security and flexibility, the agility of the public cloud make the hybrid cloud an obvious consideration. However, in practice, the pairing of traditional systems with public cloud-based systems increases complexities. This is at cross-purposes, as one of the core management reasons for hybrid cloud adoption is to hide complexity behind an abstraction layer. In addition, some hybrid models adopted by organizations are done so without fully integrating cloud and on-prem.

The true benefits of a hybrid model call for refreshed approaches towards IT management and more than often necessitates cultural realignment. While there is inherent complexity, which will only increase, there are multiple benefits and being mindful of some aspects, would ensure the best leverage of a hybrid model.

Before we get to that, on the industry and where is it headed:

Reports indicate the global hybrid cloud market is valued at around USD 40 billion in 2017 and is expected to reach a value of USD 138 billion by 2023, at a CAGR of upwards of 22, during the forecast period (2018–2023). This market is split by:

Solution:

  • Cloud Management and Orchestration
  • Disaster Recovery
  • Security and Compliance
  • Hybrid Hosting

Service Model:

  • Infrastructure as a Service (IaaS)
  • Platform as a Service (PaaS)
  • Software as a Service (SaaS)

IaaS is the fastest-growing segment of the wider cloud market with Gartner predicting the top 10 providers including AWS, Azure and Google Cloud will account for around 70% of the IaaS market by 2021.

Forrester’s predictions in 2019 are:

Enterprise cloud spending will soar as core business app modernization takes off: Core business applications being replaced with new cloud SaaS apps, and others will be refactored using new cloud-native techs like containers, Kubernetes, and functions

Private cloud adoption and spending will grow faster: Cloud in 2019 is about creating a flexible, Agile, automated. Success will be measured by developer satisfaction and time-to-market for new products and services, and not by taking out the cost

True SaaS-based connected cloud ecosystems will emerge to turbocharge innovation: The resurgence of “industry clouds” with extensible SaaS applications which are becoming development platforms.

According to a CIO survey, cloud users are aware that they are wasting money in the cloud — they estimate 30% waste. To combat this issue, 58% of cloud users rate cloud optimization efforts as their top initiative for the coming year.

We at Powerup with expertise across leading public cloud platforms including as top-tier partners on AWS, Azure, Google Cloud … offer best-in-class platform-agnostic solutions. Our deep technical expertise in Data Center technologies including VMware, Hyper-V, Open Stack offers a robust understanding of hybrid ecosystems. Additionally our implementations in container orchestration like Kubernetes & Docker Swarm having resulted in up to ~80% cost efficiency for large enterprise customers. The Powerup ACE (Advanced Consulting for Enterprise)team lead by solution architects using enterprise-class frameworks can help assess >plan>deploy>manage any IT infra solution. Amplified with platform-agnostic expertise in container orchestration, we can help an organization adopt an “optimized hybrid cloud infrastructure”.

While well known, a re-articulation of the benefits of a hybrid approach:

A hybrid cloud combines the best elements of private and public clouds (and Co-Lo), with no single platform capable of supporting a wide variety of Ops, Development and business unit requirements. These are some of the benefits of this blended approach.

> Network Optimization

> Flexibility & Scalability

> Reduced Latency

> Organizational Agility

> Resource Optimization

Given the relative nascency of the Hybrid cloud, mastery in its management is still some time away, and with complexity increasing over time, the approaches will have to continuously evolve. There are some aspects however that should be focused upon, to ensure that path-to-success is set up.

These are some aspects to focus on for an optimal hybrid strategy:

> Workload management

The following needs to be defined:

  • Who owns the workload and escalation?
  • Business criticality
  • When do the workloads run?
  • Where do the workloads run? On the public cloud, private cloud, or in both places?
  • Why were the decisions made about where to run the workload? And when they may need to be re-evaluated?

> Security and governance

A recent survey of CIO’s reveal 77% of its respondents see security as a challenge, while 29 % see it as a significant challenge. Core to the success of hybrid cloud management is how the following are defined and handled:

  • Security and performance
  • Policy management

> Management layer — A unified interface

To manage diverse entities with their native interfaces, a unified management layer that abstracts you away from complexity.

> Defining SLA’s

Go beyond the baseline of good performance but providing meets specific expectations and is defined in the management layer as an extension of business requirements.

> Leveraging tools

Mapping tools to the requirement for API management, Resource management, Cloud management platforms, Performance management, DevOps management, Security management, Network management, etc.

At Powerup we partner with organizations on this journey, which is orchestrated using our PCLP (Powerup Cloud LaunchPad) framework; an enterprise-class methodology that aids customers with an optimal start their cloud journey. PCLP is designed to help customers visualize the end-state of a cloud migration activity and arrive at a base-line cloud framework with key components configured before any migration begins. Successful adoptions are premised on clear base-line definition across the following 7 parameters.

Happy to hear your thoughts on the subject or sharing of experiences, if you would like to have a conversation with us, do drop us a line at marketing@powerupcloud.com