Over the users I’ve written a good bit about pushing a workload off to a virtual machine sitting in a data center somewhere. The Google CloudPlatform has matured a lot and I haven’t really gotten around to writing about it. So… It’s worth going into their SDK and what it looks like from a shell using some quick examples.
For starters, you’ll need an account with Google Cloud Platform, at cloud.google.com and you’ll want to go ahead and login to the interface, which is pretty self-explanatory (although at first you might have to hunt a little for some of the more finely grained features, like zoning virtual instances.
The SDK will include the gcloud command, which you’ll use to perform most tasks in the Google CloudPlatform. To install the SDK, go to https://cloud.google.com/sdk/downloads
and download the appropriate version for your computer. If you’re on a mac, most likely the x86_64 version.
Next, move the downloaded folder to a permanent location and run the install.sh inside it, which will kindly offer to add gcloud to your path.
Welcome to the Google Cloud SDK!
To help improve the quality of this product, we collect anonymized usage data
and anonymized stacktraces when crashes are encountered; additional information
is available at <https://cloud.google.com/sdk/usage-statistics>. You may choose
to opt out of this collection now (by choosing ‘N’ at the below prompt), or at
any time in the future by running the following command:
gcloud config set disable_usage_reporting true
Do you want to help improve the Google Cloud SDK (Y/n)? y
Modify profile to update your $PATH and enable shell command
Do you want to continue (Y/n)? y
The Google Cloud SDK installer will now prompt you to update an rc
file to bring the Google Cloud CLIs into your environment.
Enter a path to an rc file to update, or leave blank to use
Backing up [/Users/charlesedge/.bash_profile] to [/Users/charlesedge/.bash_profile.backup].
[/Users/charlesedge/.bash_profile] has been updated.
==> Start a new shell for the changes to take effect.
For more information on how to get started, please visit:
Inside that bin folder, you’ll find the gcloud python script, which once installed, you can then run. Next, you’ll need to run the init, which links it to your CloudPlatform account via oauth. To do so, run gcloud with the init verb, which will step you through the process:
Welcome! This command will take you through the configuration of gcloud.
Your current configuration has been set to: [default]
You can skip diagnostics next time by using the following flag:
gcloud init –skip-diagnostics
Network diagnostic detects and fixes local network connection issues.
Checking network connection…done.
Reachability Check passed.
Network diagnostic (1/1 checks) passed.
You must log in to continue. Would you like to log in (Y/n)? y
If you say yes in the above screen, your browser will then prompt you with a standard Google oauth screen where you’ll need to click Allow.
Now go back to Terminal and pick a “Project” (when you set up billing the default was created for you):
Pick cloud project to use:
 Create a new project
Please enter numeric choice or text value (must exactly match list
The Command Line
Next, we’re gonna’ create a VM. There are several tables that lay out machine types. Let’s start by listing any instances we might have:
gcloud compute instances list
Listed 0 items.
Note: If you have a lot of these you can use
to filter them quickly.
Then let’s pick a machine type. A description of machine types can be found at https://cloud.google.com/compute/docs/machine-types
. And an image. Images can be seen using the compute command with images and then list, as follows:
gcloud compute images list
Now, let’s use that table from earlier and make a custom machine using an ubuntu uri, a –custom-cpu and a –custom-memory:
gcloud compute instances create krypted1 –image https://www.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/images/ubuntu-1610-yakkety-v20170502 –custom-cpu 2 –custom-memory 5
You’ll then see that your VM is up, running, and… has an IP:
NAME ZONE MACHINE_TYPE PREEMPTIBLE INTERNAL_IP EXTERNAL_IP STATUS
krypted1 us-central1-a custom (2 vCPU, 5.00 GiB) 10.128.0.2 220.127.116.11 RUNNING
Now let’s SSH in:
gcloud compute ssh krypted1
This creates ssh keys, adds you to the hosts and SSH’s you into a machine. So viola. You’re done. Oh wait, you don’t want to leave it running forever. After all, you’re paying by the minute… So let’s list your instances:
gcloud compute instances list
Then let’s stop the one we just created:
gcloud compute instances stop krypted1
And if you’d like, tear it down:
gcloud compute instances delete krypted1
Overall, super logical, very easy to use, and lovely command line environment. Fast, highly configurable VMs. Fun times!
krypted May 18th, 2017
Posted In: cloud, Mac OS X, Ubuntu, Unix
Apple, google cloud, instances, MAC, sdk, ssh, Virtual Machines, VMs
At first I didn’t think that I was going to write a review of my Pebble. Then, I realized that my perspective is probably different than most, so I changed my mind and decided to jot down 10 things to know about the Pebble. Before I get into that though, I’m one of those weird people that still wears a watch. Yes, I know, how very dated I must look. But hey, I really don’t care so I keep wearing it. Therefore, a different device on that wrist really doesn’t move the needle, it’s just a device that isn’t the other one that I wore for 20 years… I have stopped wearing my Tag completely, but that’s OK, it’s getting a little long in the tooth anyway.
The Pebble has a lot of promise. A lot is fulfilled and more yet has yet to be fulfilled. Let me explain, starting with the things I love (the promise that is fulfilled):
- The Pebble has an SDK. Using the SDK, developers can design apps and sell them or post them online.
- The battery of a Pebble lasts me about 5 or 6 days, depending on how many push alerts the device gets over the low power bluetooth connection back to my phone.
- The screen is monotone and epaper, which is to say that it is not designed to emit light (unless shaken) and so you can see the screen very well in sunlight, much like the pump at a gas station.
- The Pebble receives low power bluetooth push alerts from your phone. This means that when someone says something on Instagram, likes a photo on Facebook or sends you a text, you see it on the phone and on the watch. Since many alerts you just look at, this keeps you from taking the phone out of your pocket. You can’t really do anything with most alerts, but you can see them and just file the piece of information for later. The alert will still be on your phone when you take it out of your pocket.
- When someone calls, you see caller ID and contact info on the watch. You can then answer a call right from the watch. If you’re wearing headphones and a mic then you never have to take the phone out of your pocket to answer calls.
- You can control music on your iPhone through the watch. This means you can go forward and backward without taking the phone out of your pocket. When I’m on my morning runs this is especially helpful when I’m on a treadmill as taking my phone out of my pocket on the treadmill often makes me just unstable enough to possibly wipe out on the treadmill. I’ve only had it in the winter here in Minnesota so I’m not sure if that will matter to me when I get to run outside again.
The promise to be fulfilled:
- I think this starts with a true app store, like Apple has. There are accelerometers and other doohickeys in these things that mean they can really do a lot more than what they can today. The app store isn’t out yet, although you can buy or download apps at the Pebble site (it’s just not a simple process all the time and better apps typically tend to get written when people make money from them).
- There are fitness apps but the device doesn’t yet replace a FuelBand or a FitBit. It doesn’t track steps (which with an accelerometer should be simple to do), calculate burned calories, etc. I’d like to see an app that allows you to choose foods you tell an app on your phone you like so you can calorie count at the dinner table without busting out your phone. I’d also like to see a step tracking app that can sync to FitBit so I can stop wearing my Force.
- Watchfaces are currently the big thing most apps allow you to control. I don’t give two craps about changing the watch to look different. However, if you want to make your own “Haz Cheezburgur” watch face, feel free (this isn’t really a bad thing, just a lot of time wasted designing pixelated and monotone watch faces that could have been spent writing cool apps).
- The device is currently half way between SDK 1 and SDK 2. This means there are cool features that you can only get if you go through a lengthy upgrade process that includes sending them a UDID for your iOS device. It’s not a terrible thing, like the other promises to be fulfilled with the Pebble, it’s just a thing.
Overall, I love the Pebble. The nerd factor around not having to take your phone out of your pocket, the ability to skip songs, the ability to look and see which push alerts you actually care about are all awesome. I hope that the app store brings with it a bunch of new apps that give you access to lots of things and that I can get rid of my Nike FuelBand or FitBit soon, but that could be 2 weeks from now or 2 years for all I know. It’s a quality device that’s well worth the money if the things I mention are things that you’d like to have. However, for now it’s not a replacement for that Garmin, FuelBand, etc type of device you may be using for fitness purposes. Anyway, if it’s the type of thing you’re into then good luck and I hope you enjoy it!
krypted January 5th, 2014
Posted In: Wearable Technology
accelerometer, App Store, battery, caller ID, cold, downloads, epaper, fitbit, flex, force, FuelBand, iPhone, low powered bluetooth, MAC, mic, pebble watch, screen, sdk, sports watch, watchfaces