►
From YouTube: Contributing to NRE Labs (Part 2): The Antidote CLI
Description
This is part of an informal demonstration of the process of contributing to NRE Labs (https://nrelabs.io).
For a detailed, authoritative reference, please use the NRE Labs documentation at https://docs.nrelabs.io
NRE Labs Contribution Video Series
- Part 1: First Steps - https://www.youtube.com/watch?v=HOU5k77RQNc
- Part 2: The Antidote CLI - https://www.youtube.com/watch?v=G3sM_5rk2yc
- Part 3: Opening a Pull Request - https://www.youtube.com/watch?v=mfEVoV7FiE0
- Part 4: Previewing Your Changes - https://www.youtube.com/watch?v=c4a2PP4gJqE
A
Hello,
my
name
is
Matt
Oswalt,
and
this
is
part
two
of
our
contributing
to
the
NRA
labs
curriculum
series
in
which
we
will
use
the
antidote
CLI
to
bootstrap
a
new
lesson
so
working
with
the
antidote
CLI
is
a
three-step
process.
First,
we're
gonna
need
to
download
the
antidote
CLI
and
there
are
precompiled
binaries
that
we
can
just
download
from
the
project
site
step.
Two
is
following
one
of
the
creation:
Wizards
and
we're
gonna
be
creating
a
lesson
in
this
example.
A
Although
there's
other
things
you
can
create
with
the
antidote
CLI
so
we'll
follow
through
this
wizard
it'll
ask
some
questions
about
like
what
kind
of
things
we
wanted.
The
lesson
and
various
things
like
that.
Next,
once
we
have
a
lesson:
bootstrapped
we're
going
to
run
the
validation
command,
which
allows
us
to
validate
that
the
curriculum
will
have
locally.
If
you
remember,
we
cloned
the
antidote
or
we
cloned
the
nra
labs
curriculum
in
a
previous
video.
A
We're
gonna
make
sure
that
that
new
lesson
that
we've
bootstrapped
is
valid
and
doesn't
have
any
issues
before
we
move
on
to
the
next
step.
So
here
are
the
three.
These
are
the
three
steps
that
we're
gonna
do
today,
a
quick
word
before
we
get
started.
The
antidote
CLI
is
designed
to
be
as
easy
as
possible
for
new
lesson
creation,
but
if
you're
new
to
entering
labs,
it
can
still
be
pretty
complicated.
If
you're
worried
about
doing
the
wrong
thing,
maybe
putting
the
wrong
value
in
the
wrong
field,
don't
sweat
it!
A
Everything
can
be
fixed
later.
Just
do
your
best
and
work
forward
to
a
pull
request
where
others
can
help
you
out.
So
if
you
head
on
over
to
the
documentation,
which
is
at
Doc's
NRE
labs
to
I/o
you'll,
see
that
there
is
a
link
over
there
to
the
left
that
says
the
antidote
CLI
go
ahead
and
click
that
and
you'll
navigate
to
this
page,
which
has
a
sort
of
a
tabbed
view
of
different
commands.
A
You
can
run
based
on
the
platform
you're
on
I'm
running
on
Ubuntu,
so
I'll
head
to
this
tab,
but
you
can
use
these
other
tabs
to
do
basically
the
same
thing.
It's
all
about
just
getting
that
binary,
downloaded
and
running
it
locally,
so
I'll
copy
these
first
two
commands
that
basically
downloads
the
tarball
and
then
extracts
it,
and
that
should
result
in
the
antidote
binaries
being
made
available
to
us
on
our
system.
A
And
you
can
see
the
result
of
this
is
that
we
now
actually
have
three
binaries.
Two
of
them
you
don't
have
to
worry
about.
These
are
actually
more
for
just
sort
of
administrators
people
who
run
antidote
based
platforms
like
NRI
labs.
The
one
we
really
care
about
is
this
antidote
binary,
which
we
can
actually
run
directly
if
we
just
type
antidote
and
then
say,
H,
prove
it
print
some
help.
A
Output
now
I
prefer
to
work
with
things
just
via
sort
of
the
native
commands
and
that
and
to
do
that,
we
need
to
have
it
somewhere
on
the
path
so
I'm
just
going
to
actually
move
this
into
antidote,
then
a
user
bin,
or
rather
user
local
bin,
and
that
way
we
can
just
run
it
like
that.
Now
you
don't
have
to
do
that,
but
I
like
to
do
that
for
convenience.
Okay,
so
the
next
thing
we
want
to
do
is
we
want
to
access
the
lesson.
A
Creation,
wizard
and
you
can
see
sort
of
in
the
help
output
that
we
have
a
sub
command,
that
we
can
run
here
called
lesson.
So
let's
do
antidote
lesson
and
then
we'll
type
create
what
this
does.
Is
it
sort
of
enters
us
into
this
new,
interactive,
wizard
and
there's
links
to
the
docs
throughout
this
wizard?
So
if
you
get
lost,
if
you're
not
sure
what
something
means,
there's
quite
a
few
options
for
you.
Obviously
you
can
click
on
any
one
of
those
links
that
you'll
find
throughout
the
output.
A
You
can
also
type
question
mark
at
almost
any
time
and
it
will
provide
you
with
a
little
bit
more
information.
So
if
there's
certain
constraints
on
the
data
that
you
that
you're
able
to
put
in
it'll
tell
you
it
needs
to
be
a
string,
it's
a
required
field.
What
is
sort
of
a
brief
description
of
what
this
field
is.
This
is
basically
like
a
helper
tool
that
allows
you
to
create
the
lesson
metadata
sort
of
without
having
to
guess
at
what
what
it
means.
A
So,
let's
walk
through
this
wizard
will
just
call
this
our
new
lesson.
Next
is
the
field
slug
now
this
is
basically
a
unique
identifier.
You
can
kind
of
think
of
it
as
the
same
thing
that
you
might
put
into
like
a
blog
post,
URL,
that's
sort
of
where
that
comes
from.
So
we'll
just
do
our
new
lesson,
so
no
spaces,
no
try
not
to
do
any
uppercase
is
usually
just
lowercase
alpha
with
maybe
some
hyphens
in
there.
A
Next,
we
want
to
select
a
category
for
this
lesson
right
now.
The
categories
within
the
platform
are
fundamentals,
tools
and
workflows.
Again,
if
you
want
to
know
sort
of
what
the
difference
is
between
them,
go
ahead
and
just
head
on
over
to
the
doc
site,
but
we'll
stick
with
fundamentals
for
now,
because
it
seems
to
be
what
what,
when
it's
pretty
common
next
diagram
now.
This
is
basically
an
internet,
accessible
image
like
a
PNG.
Something
like
that.
We
don't
want
that
for
now,
but
we
can
always
put
that
in
later.
A
Again,
if
you
have
any
questions,
you
can
just
hit
question
mark
and
if
it's
optional
feel
free
to
leave
it
out,
so
we'll
just
leave
it
out
same
thing
with
video
is
sort
of
the
same
thing.
It's
sort
of
an
external
resource,
we'll
just
leave
that
out
for
now
next
tier,
if
you
have
any
doubts,
just
hit
prod
the
other
fields.
A
Are
there
really
only
for
really
it's
is
this
field
was
really
gonna
be
deprecated
soon,
if
I'm
being
honest,
so
just
go
ahead
and
select
a
Pradhan
less,
you
know
what
you're
doing
next
collection
again.
This
is
one
of
those
optional
fields.
Some
of
our
lessons
are
part
of
sort
of
broader
collections
that
might
belong
to
say
some
sort
of
an
organization
or
a
company.
Again,
if
you
have
any
doubts,
just
go
ahead
and
leave
it
out
description.
A
This
is
a
this
is
a
way
for
you
to
really
define
in
an
in
a
in
a
short
way.
What
this
lesson
is
all
about.
So,
let's,
let's,
let's,
let's
put
a
brief
description
in
here
boom
lesson:
there
we
go
and
then
maybe
a
short
description.
This
would
be
something
like
okay.
What
is
this
trying
to
teach
new
lessons
might
be
you
know?
Maybe
maybe
if
you
were
teaching
a
lesson
on
ansible,
then
your
description
would
be
something
like.
A
This
is
a
lesson
on
ansible,
where
we
learn
how
to
do
Network
automation
using
the
ansible
tool,
and
then
short
description
would
basically
just
be
maybe
the
word
ansible.
The
idea
here
is,
with
short
description,
you're,
providing
a
really
like
1
to
2
word
answer
for,
what's
being
taught
in
the
lesson
description
that
can
be
a
little
bit
longer
and
a
little
bit
more
verbose
prereqs.
A
These
are
really
slugs
that
point
to
other
lessons.
So
if
your
lesson
depends
on
other
lessons,
meaning
your
lesson
covers
topics
that
other
lessons
already
cover
in
much
more
fundamental
detail.
You
can
go
ahead
and
list
those
here.
We
don't
have
any
prereq,
so
we
can
just
leave
it.
Blank
same
thing
with
tags.
Tags
are
again
sort
of
a
categorization
mechanism,
so
we'll
just
say,
comma
separated
list
new
lesson
and
that
way
we
put
it
in
there.
So
that's
really
the
the
first
little
bit.
A
This
is
just
metadata
that
describes
the
lesson
sort
of
ways
of
describing
sort
of
where
the
lesson
fits
and
what
it's
about.
Next
we
get
into
the
meat
of
it.
So
you'll
notice
we've
kind
of
gone
down
a
level
in
the
wizard.
What
this
is
doing
is
it's
asking
us
to
create
a
series
of
stages
in
again,
if
you're
not
familiar
with
this
terminology,
feel
free
to
click
the
link
and
get
an
explanation.
This
is
sort
of
antidote
foo
for
describing
what
effectively
boils
down
to
things
like
logical
sections
or
chapters
of
a
lesson.
A
A
So
within
these
stages
we
have
an
opportunity-
and
we
can
have
a
lesson
with
a
single
stage
or
multiple
stages
and
we'll
actually
get
an
opportunity
to
specify
that
here
in
a
little
bit.
But
for
now
what
we're
doing
is
we're
specifying
the
description
for
the
first
stage
so
stage
0,
which
is
the
first
stage,
give
me
the
description
for
that.
So
in
this,
in
this
stage,
we're
gonna
cover
introduction
to
a
new
lesson
in
terms
of
lesson
guides.
We
have
a
few
options
again,
a
head
on
over
the
docs.
A
If
you
want
to
know
the
details
between
the
two,
we
will
stick
with
markdown
for
a
default
next
it
do.
We
want
to
provide
a
video
for
this
stage
very
similar
to
the
video
field
up
here.
The
only
difference
is
that
this
is
specific
to
this
stage.
Some
people
have
different
videos
for
each
stage.
Some
people
have
videos
for
the
whole
lesson,
so
it
really
just
depends
on
what
you're
going
for
and,
of
course,
if
you
want
it's
optional,
so
feel
free
to
leave
it
out.
Now
we
can
provide
the
the
answer.
A
Yes
at
this
point,
if
we
would
like
to
loop
back
and
continue
to
add
more
stages,
but
let's
say
we
just
wanted
to
create
this
lesson
as
a
single
stage
just
for
now,
so
we'll
soul
hit.
No
next,
we
need
to
be.
We
need
to
create
a
series
of
endpoints
endpoints
are
instances
of
a
software
image
that
we
can
make
available
in
a
lesson.
So,
for
instance,
if
you
need
a
sort
of
a
container
that
runs,
ansible
is
a
good
example
that
would
be
an
endpoint,
maybe
a
network
device.
That
would
be
another
endpoint.
A
This
is
where
you
effectively
create
references
to
that
software.
So
if
you
want
an
instance
of
our
utility
image
running
within
your
lesson,
you
would
describe
it
here
so
we'll
name
it
here.
For
instance,
a
common
way
of
describing
endpoints
is
just
simply
something
like
you
know,
Linux
one,
just
a
simple
generic
Linux
container.
That's
designed
to
run
some
commands.
You
just
give
it
a
sort
of
a
human,
readable
name.
Next
we're
going
to
create
the
reference
to
the
image.
A
So
this
is
a
reference
to
the
the
actual
slug
that's
used
for
the
image
and
if
you
don't
have
any,
if
you,
if
you're,
not
sure
what
that's
about
the
docs
sort
of
going
to
tells
on
that,
but
one
very
common
ref
reference
for
images
is
utility.
This
is
one
of
the
containers,
that's
maintained
by
the
project
that
just
has
a
bunch
of
Python
stuff
installed,
and
so
you
can.
A
Okay,
next,
do
you
want
the
that
end
point
to
be
automatically
configured
using
one
of
the
configuration
options
within
the
platform?
You
can,
of
course,
select
none',
meaning
no
configuration
will
be
done
to
it
and
that's
somewhat
common
for
various
reasons.
Sometimes
the
image
is
good
enough
on
its
own,
but
sometimes
you
want
to
be
able
to
provide
some
runtime
configuration
mechanisms,
we're
actually
gonna
select
Python
and
what
that
means
is.
A
It
says
what
we're
gonna
need
to
do
as
a
result
is
provide
a
Python
script
for
this
end
point
for
every
stage
actually,
and
that
basically
allows
us
to
configure
that
end
point
at
runtime.
So
the
platform
will
start
that
that
end
point
and
then
we'll.
Then
it
will
run
a
Python
script
that
you
provide
to
further
configure
it
so
that
it's
ready
for
the
learner,
so
we'll
provide
Python
here
next
additional
ports.
This
is
a
field
that
may
or
may
not
be
necessary,
based
on
the
next
thing
that
we
do.
A
Basically,
if
you
don't
have
any
presentations,
you'll
need
to
put
something
into
here
into
additional
ports.
It's
basically
a
way
to
open
up
any
additional
ports
that
weren't
otherwise
opened
by
the
creation
of
presentations
which
we'll
get
into
next.
We
know
that
we're
going
to
create
a
presentation
for
this
endpoint,
so
we'll
go
ahead
and
actually
skip
this.
We
don't
need
to
provide
anything
here
and
speaking
of
which,
yes,
let's
create
some
presentations
for
this
endpoint.
You
can
kind
of
think
of
presentations
as
views
into
an
endpoint.
A
So
we
have
this
Linux
that
we
have
this
utility
image.
We
call
it
Linux
one,
it's
the
name
of
it
at
runtime,
sort
of
the
host
name.
We
want
to
be
able
to
present
that
image
on
that
endpoint
rather
to
the
user,
namely
through
SSH
through
a
CLI
interface,
and
so
we
do
want
to
create
a
presentation.
We'll
say
yes,
and
this
is
where
we
get
an
opportunity
to
name
it,
we'll
just
name
it
CLI.
Here
we
provide
the
port
22,
because
we're
gonna
use
SSH
and
again.
A
This
is
one
of
the
reasons
why
we
were
able
to
say
no
additional
ports,
because
if
you
don't
have
any
presentations,
you
do
need
to
provide
something
here:
endpoints
they
don't
have
any
ports
open
or
kind
of
pointless.
But
since
we
have
presentations,
we
can
leave
out
this
field
and
then
provide
the
port's
that
we
want
opened
here
in
the
presentations
layer
and
then
finally,
we'll
select
SSH
as
the
presentation
type
and
that's
it
so,
no
more,
no
more
presentations
for
that
endpoint
and
no
more
endpoints.
A
Of
course,
if
you'd
like
to
create
more,
you
certainly
can
and
then
do
you
wish
to
create
any
connections.
We
only
have
a
single
endpoint,
so
this
actually
isn't
really
needed.
But
if
you
wanted
to
create
connections
between
endpoints,
this
is
where
you
would
get
an
opportunity
to
do
that,
and
really
all
this
would
be
is
sort
of
a
reference
between
them.
A
So
if
we
had
Linux
one
and
maybe
Linux
two
as
an
example,
you
would
create
a
connection
and
then
refer
to
one
and
then
refer
to
the
other,
and
that
would
connect
the
two
at
runtime
now
authors.
This
is
an
important
field,
because
what
this
does
is
it
gives
you
credit
for
your
lesson.
There's
a
field
that's
actually
made
available
in
the
web,
UI
to
all
of
the
users
that
describes
who
you
are
and
what
you
do
so
definitely
I
would
recommend
doing
this.
A
A
But
since
we
were
already
there,
we
can
just
provide
the
local
directory
and
what
this
does
at
the
very
end
is
it
actually
creates
a
skeleton
lesson
for
us,
and
so
it
creates
all
the
different
metadata
files
as
well
as
maybe
some
starter
files.
You'll
notice
that
there's
a
guide
MD
file
in
here
there's
a
few
other
things
and
really
what
this
does
is.
It
creates
a
skeleton
lesson
now,
if
you
look
at
the
warning
here
below,
it's
really
important
to
read
this,
because
it's
actually
you're
actually
not
finished
here.
A
There's
quite
a
few
things
that
we
need
to
do
manually.
One
of
the
big
obvious
thing
is:
we
need
to
provide
the
content,
so
you
need
to,
you
know,
actually
add
content
to
the
lesson
guide
here,
but
there's
a
bunch
of
other
things
that
we
need
to
do
and
one
of
the
ways
that
we
learn.
What
else
needs
to
be
done
is
by
running
the
antidote,
validate
command,
so
we'll
type
antidote
validate
and
then
we'll
type
dot.
A
And
basically,
what
this
says
is:
hey
I
want
you
to
validate
the
curriculum
as
it
stands,
so
we've
created
a
new
lesson
directory
here
in
our
new
lesson,
let
me
know
if
the
curriculum
after
creation
of
that
lesson
directory,
let
me
know
if
the
curriculum
is
still
valid
and
it
is
not
so
there's
a
few
things
we
need
to
do.
One
of
those
things
is
creating
a
configuration
file
for
our
endpoint
Linux
one.
Now
you
remember
for
the
Linux
one
endpoint
in
the
wizard.
A
We
actually
specified
that
we
wanted
to
configure
it
with
Python
and
the
error
that
we're
seeing
here
for
the
validate
command
says:
hey
I'm,
not
finding
that
configuration
file.
So
let's
go
ahead
and
create
that
if
we
go
to
lessons
directory,
you
can
see
that
we
have
this
new
directory.
That
says
our
new
lesson
and
you'll
see
we
have
stage
0
and
under
configs
we've
got
nothing
so
since
we
selected
Python,
we
need
to
create
a
new
Python
script.
A
Now
the
way
this
works
is
you
have
to
tell
that
the
name
of
the
file
is
very
important.
The
file
name
needs
to
be
the
name
of
the
endpoint
that
it's
designed
to
target
so
in
this
case
Linux
one.
Now
since
we
specified
Python,
we
need
to
end
that
with
dot
P,
why?
If
you
were
creating
an
answerable
playbook,
for
instance,
you'd
end
it
with
dot
yml
and
if
you're,
using
napalm
to
configure
things
like
Network,
Devices
you'd
end
it
with
dot
txt.
A
But
since
it's
a
Python
file,
we're
gonna
end
it
with
dot
py,
so
we
can
leave
it
blank
for
now.
Obviously,
if
you
want
this
to
do
anything,
you
would
need
to
exit
the
Python
file
to
actually
do
what
you
want
it
to
do,
but
we'll
save
that
for
a
different
video.
For
now,
just
creation
of
the
file
will
suffice.
A
So
let's
rerun
the
validate
command
and
as
you
can
see,
the
lesson
is
now
valid.
Last
thing
to
check
out
would
be
the
metadata
file
that
was
created.
This
is
these
are
the
recorded
answers
for
that
wizard
that
we
went
through
earlier.
You
can
see
that
we
have
the
different
stages.
The
different
end
points
in
all
of
these
different
fields
that
we
provided
up
here.
A
Just
do
a
quick
once-over
make
sure
that
everything
is
sort
of
the
way
that
you
expect
lasts,
and
this
is
certainly
not
least,
you
want
add
your
content,
so
the
markdown
file
here
guide,
MD
underneath
stage
0
is
where
all
of
the
content
goes.
So
if
you
want
to
know
sort
of
how
to
write
a
good,
a
lesson
guide
head
on
over
to
doc,
stat
NRI
labs
done
I/o,
there's
quite
a
few
examples
there,
but
yeah.
This
is
sort
of
the
skeleton
version
of
this.