Add Users to Google Compute Engine / EC2 Instances

KeysIn the past, when I wanted to share a Linux box with other users, it was simply by creating another user and making sure their password are ‘strong’. These days, it’s much safer not to use passwords over ssh but rather keys in order to connect (over ssh) to your machines in the cloud.

Here is the full list of commands you need to do in order to add a user. It’s being tested on Ubuntu so if you are on another OS, please continue with caution.

[gist f949f215b405d2d767b3]



Google Cloud: Managed VMs And Docker

Google cloud platform“Google’s ability to build, organize, and operate a huge network of servers and fiber-optic cables with an efficiency and speed that rocks physics on its heels. This is what makes Google Google: its physical network, its thousands of fiber miles, and those many thousands of servers that, in aggregate, add up to the mother of all clouds.” – Wired
This quote about Google cloud platform is on the spot. In the slides below,  I tried to give an overview on the new features that are now part of Google cloud. If you attended #CodeMotion TLV yesterday – You will find these slides familiar. If it’s not the first time you hear the phrase ‘Google cloud’, jump to slide 14. Continue reading

cloud, webdev

What’s New On Google Cloud Platform

This year at #DevConTLV the main theme was around cloud and databases. In my talk I did my best to emphasis, that in the past 15 years, Google has been building out the world’s fastest, most powerful, highest quality cloud infrastructure on the planet and it is opening it so external developers could enjoy it. There are many services like: App Engine, BigQuery and VMs on Compute engine that all come with the same idea. You (=the developer) should focus on what you good at and not by reinventing the wheel again (and again) by trying to find the secret in memcache optimizations. It’s my 4th year in this event and I can say that it is (without doubt) one of the best developer conferences in Tel Aviv. So if you are around next time, please try to join us. It’s great fun to talk with so many talented developers and the talks that I’ve been to, where very good and informative. Continue reading


Spark Cluster on Google Compute Engine

gce+sparkWhat is Spark and Why?

Apache Spark is an open source cluster computing system that aims to make data analytics fast — both fast to run and fast to write. To run programs faster, Spark offers a general execution model that can optimize arbitrary operator graphs, and supports in-memory computing, which lets it query data faster than disk-based engines like Hadoop. In the past, I’ve wrote an intro on how to install Spark on GCE and since then, I wanted to do a follow up on the topic but with more real world example of installing a cluster. Luckily to me, a reader of the blog did the work! So after I got his approval, I wanted to share with you his script. Continue reading


How To Set A Server To Server VPN on Google Compute Engine

There are many cases where you wish to migrate data from one location to another. In most cases, you will wish to do it over a secure channel. In this tutorial we will see what are the main steps in order to set a VPN (in this case: StrongSwan) on Google Compute Engine so you will have a server to server VPN solution between your on own server(s) located in the basement and Compute Engine.
In this tutorial we will setup a VPN connection from your own datacenter to Compute Engine. First, let’s look at the big picture. We wish to have one gateway in our datacenter and another on Compute Engine. These gateways, will be responsible to connect and secure our channel so we could transfer our data over it in a secure way.

High Level Network diagram

VPN on GCE network macro view

Main steps

Continue reading