Hello, and welcome to GDL-IL, GDL Israel.
Today we're going to speak about Compute Engine.
And I'll try to show you how easy it is to start a new
instance of your own virtual machine on Google
infrastructure.
And since in most of the cases, we're talking here in
Google Developer Live Israel about entrepreneurship,
start-ups, and front end development.
I'll try to show you how you could quickly create a micro
instance, install Apache on it and from there you could take
it and do some clever, amazing things.
Of course, you could take these same exact steps and
install any other piece of software that you would like
to install on a new virtual Linux box.
It could be node.js.
It could be [? nyc.js. ?]
It could be lots of other things.
So let's jump and see.
I'll show my screen.
And as you can see here, if you go to cloud.google.com,
you'll have quite a lot of different products that today
we are supporting.
Right now, in this episode, so we're going to focus on
Compute Engine.
However, if you want platform as a service, and you are
developing your service site in Java, iPhone, [? GO, ?] or
PHP, App Engine might be an even more suitable solution.
Definitely if you're doing something nice in terms of
your ATI, so Cloud Endpoint could be a
great product for that.
Or you just want to build some web service and support it
from App Engine.
With App Engine, you're basically running in a certain
container that Google is maintaining, scaling, and
taking care of all the quote, unquote, "redundant" jobs that
you don't want to do as your own system administrator.
You want to focus on what you're good at, and write your
amazing software.
Other things that we have-- we'll try to touch them in the
next few weeks-- will be cloud storage and Cloud SQL.
And, of course, BigQuery, the ability to run clever queries
on billions of rows and get the results in
less than a few seconds.
So as we said, Compute Engine basically lets you run Linux
virtual machines, and talking to them, and do whatever you
want with those machines.
Let's see how I could do it.
If you'll go to Google Cloud Console like I have here,
probably you won't have too many projects
like I do here but.
But in this case, you're just clicking
on Create New Project.
And I did it already just to save time, and you'll get all
the different options of what you want to do in this
specific project.
Now in our case, we choose the Compute Engine.
And, of course, we need to enable billing.
In App Engine, you have the ability to run up to 12
projects without any billing.
So if you want just to test things inside App Engine, just
choose this far now.
If you want to try Compute Engine, you will need to
enable billing.
Lucky for us and to save time, I already prepared a project
with billing enabled.
And if we'll go into it, you could see here that you have
several things that you could do with.
One, I already created a box.
And I created a micro version of it because we don't need
too much if you want just to run one, let's say,
development server, and testings up in the cloud.
If you click on this line, you'll get quite a lot of
different things that are attaching to
this specific box.
And, for us, maybe what's important here is the zone.
So it could be in the United States or in Europe and, in
our case, in Israel, I choose Europe.
The external IP so we could reach this machine, and of
course, some other parameters, like the disk and the network.
Down here at the bottom, you have the ability to see how
you want to communicate with the specific box.
In our case, we choose SSH, and to work with SSH, we have
this nice GC SQL tool, that after you install it--
and it's quite easy.
Four steps, four clicks and you're installing it--
you run this specific command in order to
connect to your box.
Now as I said, I already attached to this box.
Now let's see just that I share the
right screen with you.
Let's cancel this screen share, and I'll try to share
my desktop so you'll be able to see everything that I do.
Let's close this one, and here we already connected basically
to our box.
And as you can see here, I first just want to show all
the different packages that I have.
I have 230, so it's not too much.
All the essential packages that you will want to see when
you start to do things.
And here you could get, of course, a more thorough look
of all the different packages that you have.
And as you can see up here, what I previously did already
is, I just run this one command of Sudo, App Get,
Install Apache 2.
And now in our case, of course, it's already there so
it's letting me know that it's there.
But if it wasn't, was just downloading and installing it
for me, now that I have it, I could go, of course, to this
location of var.dub.dub.dub.
And here I just want to see what files I have.
I have, of course, a different index HTML file that Apache is
bringing to me.
And to make things a bit nicer, I also put
that To Do List app.
Of course, they have all of the MV-Star frameworks.
And with a little twist of using a leverage IndexDB so
everything will be the same for us locally as well.
And if I'm going to now to, let's take here, my instance.
And in the instance I could see the external IP.
Right now I don't have any DNS settings for it.
I'll just go here, put it.
And, of course, we're getting the first Hello World of
Apache, but if I'll just go here and try to go to the
special demo that I prepared.
So you can see here that we have all the nice
capabilities here.
And, of course, if I'm refreshing everything, it's
still working and I could delete stuff, and it's a quite
nice application.
If I want to change it or to change anything, let's see how
this works.
Of course, I'm just coming here, and entering the file.
Hello all.
Should be L, I, L. Yours.
Thank you for watching.
After I saved it, and I'm refreshing--
you could see here that I'm having a full control.
One thing that you want to remember is that when you go
in here, you have the ability and you should go to network
and basically make sure, if you want to have certain
settings to your own network, you have full control of it,
if you want to take a snapshot and save the data and the
state this specific instance, you could create a new
snapshot, and it would basically allow you to save
all the data that you right now have in
this specific machine.
And then replicate it and create new machines out of
this instance.
Another nice thing to note is, when you're coming to this
console and on network, you could go to the default.
And here you have fewer firewalls that you
might want to set.
Of course, internal IPs we are allowing.
And then if you need the SSH like we did here, of course,
it's open by default.
And then what you want to do in this case is just to enable
the web server firewall.
Because if you want to allow it to access on TCP and heed
the server, you won't be able to reach these pages.
Let's just for fun try to delete this firewall.
And as you can see here, it's now deleting it.
And if I'm refreshing and I want to check it again, I see
now that I don't have it here.
And now if I try to reach our Hello World page, you could
see that I can't do that.
So very important to remember to basically create a new
instance and to give it-- if you'll try to put [INAUDIBLE],
it will let you know that we're only
getting things like this.
So in our case, I'll do TCP.
And, of course, the name will be Web Server.
And I'll create it.
You could see how quickly, basically, it's creating
everything for you.
And once this is done, I'm coming again here and hitting
it, and everything is back to normal.
So I think we pretty much covered the main things.
As you saw, it's quite easy to establish a new instance, run
with it, have new packages and models that will
make you more efficient.
And from that on, you have all the nice abilities of taking
snapshots, controlling images, and having all the metadata
and operations of what you do.
You could choose quite a lot of different images.
I chose Debian but there's lots of [INAUDIBLE] as well.
And two other things that you might want to check are, as I
mentioned, you're hitting cloud.google.com, but you have
two other locations if you could work and check what
you're doing.
One will be called [INAUDIBLE] google.com APIs.
And here you could basically see what you're doing on each
and every project and what APIs you're using or
allowing for it.
The other location is the App Engine dashboard, so it would
be on AppEngine.google.com.
And here you could see all your projects and, of course,
in our case, see exactly what's going on
on the server itself.
So I think we covered most of the things that we wanted, and
I think next time.
Thank you very much.