SPEAKER: Hi, I'd like to show you a cool new way
to create interactive tutorials that you can run right
inside the Cloud Shell environment.
So to start with, let's take a look
at this GitHub repo under Google Cloud Platform slash Cloud dash
Shell dash tutorials.
Now this repo contains a file called tutorial dot md, which
is a markdown specification of the desired structure
and flow for my tutorial.
Let's look at the underlying markdown syntax there,
and we see a few things.
There's one top level header, and this defines
the title of my tutorial.
And then there's a sequence of second level headers
where each second level header corresponds to a discrete step
in my tutorial.
The rest of the file contains the usual markdown syntax
formatting, like highlighting code snippets and command
lines, and things like that.
There are also a few special commands,
like this walkthrough Editor open file.
What this does is it generates a hyperlink
in the tutorial, which, when clicked,
will automatically open that specified
file from the current repo in the Cloud Shell Editor.
So that's kind of roughly the syntax of one
of these tutorials.
Let's see it actually running live.
So we'll go back up to the top level.
And in the Read Me for this repo,
I have a hyperlink coded, which runs that exact file.
So what this does is it specifies the Cloud Shell URL.
It tells the system which repo I would
like automatically cloned.
It says I'd like the Cloud Shell Editor enabled by default.
And the new piece here is this tutorial equals parameter,
which defines a file in this repo to be interpreted
as a tutorial in markdown.
So we're directing it at the tutorial dot md
file we just looked at.
Let's click on that link and see what happens.
So it's warning me it's about to auto-clone
a repo into my environment.
It instantiates the Shell, clones that repo,
starts up the Cloud Shell Editor with all the files in that repo
as a project, and it automatically
started my tutorial on the right-hand side of the screen.
As you can see, I have my title and my steps
that I can go forward and backward through.
It highlights some of the syntax, like this Echo command.
You get an automatic button to copy that
to the clipboard, which I can then paste into a Cloud Shell.
So a lot of nice authoring capabilities there.
And I also have those special integrated directives
I told you about.
For example, if you wanted to direct somebody
to click on this Web Preview button,
rather than kind of direct them there through imagery
or instructions, you can generate one of these URL--
or one of these hyperlinks, which, when clicked,
will automatically spotlight that portion of the screen.
As you go through to the end you can even
generate a little widget that gets feedback
from the user as to what their experience was
like with the tutorial.
One last thing I want to show you
is that you can actually run these tutorials right
from the Shell.
And what I'm going to do is finish the tutorial,
close it, and then invoke it again from over here.
All I had to do was run Cloud Shell, launch tutorial,
minus D for developer mode, and then
the file in this current environment
that I want to be the specification of the tutorial.
And that starts it just like the hyperlink
did in my previous example.
So this is a nice way if you're an author
and you want to test and iterate on a tutorial,
this gives you the ability to do that right from the console.
That's pretty much it.
I also wanted to point you to the documentation, which
you can find under Cloud dot Google dot com
slash Shell slash docs slash tutorials.
And there you can find more details
about formatting your markdown and all
of the different capabilities that are available,
those special features I mentioned
for integrating your tutorial with the console or the Cloud
Shell environment.
So that's it.
I hope you enjoyed that.
I hope this gave you a sense for some of the powerful things you
can do in authoring these tutorials in the Google Cloud
environment.
Thanks.