►
From YouTube: Keptn Developer Meeting - March 26th, 2020
A
B
A
And
for
today
we
have
planned
a
couple
of
things.
We
want
to
show
you
and
your
most
of
you
most
of
you
might
already
know.
So
all
the
content,
everything
we
have
check
it
out
on
captain
dot
s
age
and
also
in
our
beautiful
repository
heat
up
the
complex
captain
captain,
that's
our
main
repository
where
you
find
all
the
source
code,
but
we
also
have
today
Christian
and
he
will
he
has
prepared
demo
demo
for
you,
so
there
would
be
a
dedicated
posit
Ori
for
this.
We
will
see
live
coding
today.
A
We
will
see
how
to
interact
with
captain
how,
where
to
put
your
content,
so
we
have
a
lot
of
things
prepared,
so
I
think.
With
this
we
get
started
and
yeah,
that's
basically
what
we
have
prepared
for
today.
We
will
kind
of
tell
you
a
little
bit:
what
is
the
workflow
of
captain?
How
does
captain
work
internally,
how
you
can
interact
with
captain,
then
captain
cloud
events?
What
are
technical
events?
A
Why
you
want
to
know
them
what
you
can
do
with
that,
and
that's
basically
the
things
you
need
for
interacting
with
captain,
and
we
will
show
you
what
are
the
main
three
use
cases
we
can
think
of
how
to
interact
with
captain.
So
we
have
configure
eyes
them
into
three
buckets
and
we
will
explain
this
to
you
and
then
Christian
will
show
you
how
to
actually
implement
one
of
those
use
cases.
A
We
have
prepared
templates,
he's
going
to
use
this
template
and
then
right
from,
let's
say
actually
from
scratch,
a
very
new
captain
service
that
never
existed
before,
and
we
will
do
this
life
here
today,
and
this
is
also
the
reason
why
we
are
recording
this.
So
you
can
also
watch
this
later
on.
All
of
his
instructions
follow
its
lead
and
write
your
own
service
and
yeah.
We'll
also
want
to
show
you
how
to
contribute
to
captain.
So
if
you
want
to
contribute
back
to
captain,
there
are
yeah.
A
There
are
a
couple
of
ways
how
to
do
this
and
we
just
want
to
guide
you
through
this
process.
So
for
the
first
part
like
what
is
the
captain
workflow?
How
does
captain
internally,
how
does
it
start
and
yet
Christian
you're?
Most
welcome
also
to
kind
of
interrupt
me
here
if
I
miss
anything
and
I,
don't
want
to
be
like
only
me
talking,
but
I
would
just
try
to
explain
it
a
little
bit.
So
basically,
captain
is
an
event.
B
A
Workflow,
so
everything
starts
with
in
events
that
can
be
sent
either
from
the
captain,
API
or
CLI.
So
you
send
it
with
the
kick
and
CLI
or
you
send
it
directly
from
other
tools
to
the
captain
API
and
it
starts
with
the
configuration
change.
So
some
of
the
combination
changes,
so
captain
will
start
its
internal
workflow.
It
goes
to
a
deployed.
Captain
will
start
the
deployment
into
the
state
or
to
the
next
events,
deployment
finished.
A
A
Events
in
captain
and
what
we
have
is
already
some
default
services
that
subscribe
to
these
events
and
then
you
will
execute
their
logic.
So
when
there
is
a
new
configuration
change,
the
default
service
inside
captain
is
the
health
service.
So
helm
starts
the
deployment
and
will
inform
captain
that
the
deployment
is
finished.
So
that's
the
next
event
for
the
deployment
finished
event.
There.
A
We
have
the
Chi
meter
service,
which
is
the
default
service
in
captain
for
the
tests,
so
the
chavita
service
will
be
informed
which,
because
it's
subscribed
to
this
very
event
type,
so
the
can
be
the
service,
will
start
its
work
and
will
inform
captain
when
this
work
is
done.
So
it's
basically
when
the
tests
are
finished.
So
the
next
event
is
this
tests
finished
event,
and
here
we
have
our
lighthouse
service,
which
is
basically
the
implementation
of
the
captain.
A
So
this
is
one
like
one
basic
workflow
in
captain,
but
there
are
other
workflows
possible
so
for,
for
example,
if
you
only
have
the
correct
captain
quality
gates
workflow,
then
it's
basically,
you
start
with
an
evaluation,
and
you
don't
do
the
deployment
or
the
testing
within
captain.
This
might
be
done
outside
of
captain.
So
you
can
only
start
the
evaluation
workflow,
which
then
again
the
Lytle
service
which
is
subscribe
to
this
start
evaluation,
will
do
its
work.
A
Do
it
will
do
the
evaluation
send
back
the
revelation
that
event
and
the
gatekeeper
service
can
then
promoted
a
lot?
So
here
you
also
have
the
possibility
only
to
use
a
part
of
captain
and
not
the
not
complete
captain
full-blown
version,
I
would
say
and
yeah
I
said
there
are
different
ways
and
actually
this
there
is
another
way
when
you
want
to
do
when
we
actually
want
to
trigger
the
tests
and
I
think
Christian.
This
is
the
example
you've
prepared
for
for
today.
A
Yes,
exactly
so
as
you've
seen
in
the
previous
example,
with
the
quality
gates
use
case,
we
would
have
started
with
a
stat
emulation.
He
went,
but
at
the
same
time
we
could
have
started
with
a
deployment
finished.
He
went
because,
let's
say
you
have
a
champions
pipeline
or
whatever
at
a
pipeline,
in
the
background
that
basically
just
sensitive
ointment
finished
event
into
captain.
But
the
thing
that's
missing
here
right
now,
obviously,
is
the
qu
meter
service,
because
with
the
captain
quality
gates
installation,
we
only
provide
lighthouse
and
some
other
things
in
the
background
that
necessary.
A
But
what
we're
gonna
do
today
is
we're
gonna
find
that
missing
piece
we
actually
gonna
implement
that
missing
piece.
We're
gonna,
implement
a
custom
test
service
and
we're
gonna.
Do
this
with
a
template?
That's
written
in
go
long,
basically,
just
to
show
how
easy
it
is
to
write
such
a
thing.
Yeah
and
the
nice
thing
about
this-
is
that
it
nicely
interacts
with
the
existing
captain
installation.
So
there's
no
need
to
actually
change
your
configuration
of
captain
or
to
change
anything
in
captain.
A
You
only
install
another
service
and
then
you
can
trigger
a
deployment
finished
event.
That's
that's!
Pretty
cool,
actually,
I'm,
really
looking
forward
to
see
this
demo.
We
talked
about
it,
but
I
haven't
seen
in
life,
so
I'm
really
looking
forward
and
yeah.
That's
also
the
part
where
all
the
captain
values
come
into
play
right
exactly
thanks
for
that
segue.
So,
basically
captain
cloud
events.
They
are
implementing
the
cloud
events
0.2
specification
by
the
way
we're
planning
an
upgrade
to
the
cloud
event
1.0
spec
in
the
near
future,
so
don't
miss
out
on
that
anyway.
A
The
cloud
events
are
right
now
specified
on
our
github
repo
called
github.com.
Slash
captain
slash,
expects
us
provided
the
link
to
the
cloud
events
specific
part
in
the
presentation.
I
think
you
will
share
this
presentation
later
with
the
community
as
well,
and
so
what
is
a
cloud
event
in
case?
You
are
new
to
cap.
No
in
case
you
and
you
haven't,
you
have
never
seen
such
a
cloud
event.
A
Basically,
it's
a
specification
that
has
a
couple
of
fields
that
are
necessary,
for
instance
the
type
and
the
type
is
something
that
we
can
control
in
our
environment.
So
one
example
type
would
be
a
configuration
change
or,
as
it
is
written
down
here,
SH
dot,
captain
dot
event,
dot
configuration
dot
to
change.
A
Most
of
you
probably
have
heard
about
the
captain
sent
event
new
artifact
and
maybe
also
about
the
captain,
sent
event
start
evaluation,
but
in
fact
you
can
send
any
cloud
event.
That's
specified
to
captain
I've
linked
the
reference
API
in
this
presentation.
So
if
you
go
to
the
reference
at
the
later
point,
you
can
see
a
way
to
interact
with
captain
wire,
a
REST
API
or
if
you
don't
want
to
implement
the
REST
API.
You
can
also
just
use
the
cap.
A
The
CLI,
by
using
the
captain,
sent
event
command
and
instead
of
specifying
an
event
name,
you
can
specify
a
chase
and
payload
in
here
yr
minus
F
and
a
file
name.
I
will
actually
demo
that
later
because
I
need
that
and
you
can
also
find
docs
on
that
specific
captain
feature
in
the
captain.
Docs
page.
A
So
Before
we
jump
into
into
the
demo.
Maybe
at
this
point
I
would
also
remind
you,
so
we
have
an
assumed
webinar.
We
have
also
the
possibility
to
ask
questions
or
use
the
Q&A
feature
or
just
post
some
questions
in
the
chat.
If
you
want
after
we
have
seen
the
demo,
we
also
we
will
stop
the
cloud
recording
and
we
can
still
have
like
some
questions
in
this.
B
B
A
A
Or
maybe
how
to
listen
for
events,
but
we
think
there
are
basically
three
different
use
cases
how
to
interact
with
captain-
and
let's
start
with
the
first
use
case,
where
you
can
think
of
something
like
a
notification,
service
or
login,
or
something
you
for
auditing
or
these
kind
of
things
where
you
actually
don't
want
to
control
the
captain.
Workflow,
you
don't
to
interfere
with
the
captain
workflow
you
just
want
to
subscribe
to
it
and
just
received
a
let's.
A
So
here
basic
step
would
be
you
subscribe
to
the
captain
event,
only
maybe
to
all
of
them
or
just
to
disable
types
that
are
relevant
for
you
and
then
you
will
receive
this
event.
And
then
you
can
do
your
code
execution,
your
business
logic
within
your
service
and
there
is
no
need
to
send
back
anything
to
captain.
So
it's
basically
you
just
listen
for
events
and
then
do
your
magic
no
need
to
set
back
something
to
captain.
A
We
have
seen
these
kind
of
integrations,
for
example,
for
a
notification
service
which
works
with
slack
with
MS
teams
and
others.
So
you
can
kind
of
get
your
captain
events
directly
in
your
in
your
own
chat
tool.
The
next
use
case
would
be
to
provide
something
like
a
testing
service
to
provide
something
for
captain
how
to
interact
with
Captain
Wing.
We
can
think
of
instead
of
cheerleader,
maybe
using
some
other
testing
tool.
So
you
would
subscribe
to
the
captain
event.
You
would
receive
the
events
and
then
execute
the
code.
A
Workflow,
so
that's
what
we've
seen
also
in
the
previous
slides
and
that's
also
what's
Christian
is
going
to
demo
today
and
then
there
is
actually
a
third
use
case.
Where
you
will
you
don't
subscribe
for
events
but
use
just
maybe
trigger
in
captain
workflow,
maybe
just
send
to
captain
in
new
artifact
event
or
and
some
other
events
you
trigger
parts
of
the
captain
workflow
and
you
don't
subscribe
to
events
and
basically
maybe
you
don't
even
have
a
lot
of
custom
code.
You
want
to
execute
before.
B
A
Maybe
just
trigger
after
some
other
automation
pipelines,
maybe
they
need
to
trigger
at
the
captain
workflow.
So
you
can
also
trigger
this
by
just
sending
cloud
events
to
captain
and
I.
Think
from
this
point,
Christian.
The
stage
is
all
yours
again.
If
there
are
any
questions,
let
us
know
by
the
chat,
feature
or
human
a
feature.
If
you
want
to
wait
with
your
questions
and
we
can
chop
into
in
this
Cup
afterwards,
but
now
I'm
really
looking
forward
to
see
what
how
to
write
my
first
caption
service,
yeah
Thank,
You
Ann.
A
A
We
recommend
either
using
Visual
Studio
code
or
Chet
brains,
goal
and
there's
some
plugins
that
you
should
use
for
Visual
Studio
code
and
for
Chet
prints
:,
but
you
can
do
without
them,
but
just
in
case
you're
watching
this
just
install
those
plugins.
If
you
at
the
time,
you
should
also
have
the
docker
CLI
ready
to
go
on
your
local
computer
and
a
docker
hub
account,
or
if
you
want
to
use
any
other
container
registry.
That
would
obviously
also
work
but
makes
it
works
a
little
bit
more
difficult.
A
Cube.
Ctl
should
already
have
that,
but
in
case
you
haven't,
please
install
it.
The
version
doesn't
matter
that
much
just
use
the
latest
one
for
cube
CTL,
but
for
the
kubernetes
cluster
we
recommend
having
versions
1.30
into
1.15,
for
full
interoperability
with
all
the
captain
features
in
my
case,
I'm,
actually
using
it
and
demoing
this
using
mini
cube.
So
that's
also
very
nice
example.
If
you're
just
a
developer-
and
you
don't
have
a
cluster
or
you
don't
have
the
money
to
spend
on
google,
kubernetes
or
other
providers,
you
can
also
just
use
mini
cube.
A
It
works
nicely
on
most
computers
with
some
restrictions,
obviously
on
Windows
and
Mac
OS
that
might
apply
it
might
not
apply
depending
on
your
setup,
but
basically
just
look
it
up
and
you'll
figure
it
out.
I'm
sure
optional,
but
also
recommended,
is
a
github
account
and
Travis
CI
enabled.
But
you
don't
need
that
for
this
tutorial.
This
is
just
for
further
development
after
that,
but
what
I
really
do
recommend
is
that
you
take
a
look
into
the
tool
called
scaffold.
It's
also
tool
developed
by
Google.
A
Obviously,
if
you
have
data
in
there
make
sure
to
pack
them
up,
but
if
you're
just
using
that
for
experimental,
interesting
stuff,
you
should
stop
and
delete
it
and
I've
started
a
new
cluster.
This
case,
using
the
VM
driver,
none
option
because
that
would
run
on
bare
metal.
So
to
say
you
don't
need
a
virtual
machine
for
that.
It
just
runs
with
docker,
with
the
caveat
that
you
cannot
use
the
captain
full
installation
anyway,
I'll
get
to
that
in
a
second.
A
After
setting
up
the
cluster,
I
always
like
to
verify
that
my
cluster
is
actually
working
for
this
I
use,
cube,
CTL
get
nodes,
and
it
just
tells
you,
okay,
I'm
on
a
Dell,
Precision
laptop
and
the
status
is
ready
and
it's
impression,
1.17
all
right
after
verified
that
I
also
already
installed
captain
in
this
case,
captain
version
zero
point
six
point:
one
with
the
use
case:
quality
gates,
option
platform
cube
anita's
as
we
are
on
mini
cube.
We
don't
need
any
special
features
for
that.
Just
use
platform
cuban
years
and
I
selected
gateway,
node
port.
A
That
last
thing
is
crucial.
It
might
not
always
work
depending
when
you
set
up.
If
you
use
a
virtual
machine,
for
instance,
instead
of
DVM
driver
equals
non
option,
you
might
have
to
specify
gateway,
load
balancer
or
actually
you
don't
have
to
specify
it,
because
it's
the
default
option,
but
in
that
case
it
might
work
a
little
different.
However,
this
is
documented
on
our
Doc's
page.
A
So,
as
you
can
see
in
the
screenshot,
the
installation
basically
has
run
through
and
it
has
finished
and
with
that
I
have
basically
only
one
thing
left
to
do.
It's
to
verify
that
my
captain
installation
is
working
as
intended.
I,
basically
just
check
what
pots
has
kept
me
installed
in
my
cluster,
using
cube
city
I'll,
get
pots
and
for
namespace
captain,
and
you
can
see
a
couple
of
well
known.
A
A
I'll
actually
show
that
in
a
second
again
now
we
can
stop
the
tutorial,
and
let's
talk
about
what
the
tutorial
will
show.
We
will
actually
build
a
captain
service
in
go
and
that
service
will
take
a
deployment
finished
event.
It
will
execute
W
get
on
the
public
deployment
URI
in
case
you
don't
know
that
thing.
Yet
that's
a
new
variable
or
that's
a
new
data
field
on
our
deployment
finished
event
that
we've
introduced
with
captain
zero
six
one.
A
You
will
see
it
in
action
in
a
couple
of
minutes,
so
don't
worry,
and
after
we've
executed
W
get
on
that
URI.
We
will
send
a
test
finish.
They
went
back
to
the
captain
cluster
for
this
little
demo.
We've
prepared
a
template
repository
which
is
currently
located
on
a
github.com,
slash,
captain
sandbox
slash
captain
service
template
go.
A
This
link
will
most
likely
change
in
the
future,
but
github
should
have
a
redirect,
so
the
link
will
still
work
and
in
case
you're
interested
in
a
final
product.
The
final
product
or
the
final
outcome
of
this
tutorial
is
also
available
under
my
personal
github
repository
all
right.
So
just
to
tease
you
a
little
bit,
what
will
be
the
outcome
that
we
can
see
in
captain's
bridge?
Hopefully
what
we
should
see
in
captain's
bridge
is
a
deployment
finished
event
that
we
sent
in
and
W
get
test.
Service
reacts
with
a
test
finished
event.
A
In
this
case,
it's
a
successful
test
and
we'll
send
an
evaluation.
Danny
went
sorry,
lighthouse,
we'll
pick
it
up
and
then
evaluate
the
result
of
the
tests
and
sent
an
evaluation
to
an
event.
We
did
not
install
the
the
option
to
have
an
SLI
provider
like
dynaTrace
or
Prometheus
in
this
case,
because
we
wanted
to
keep
the
tutorial
as
simple
and
as
easy
to
follow
as
possible.
A
Alright,
with
that
I
will
start
with
the
steps
you
need
to
do
actually,
as
the
first
step
that
I
just
promise
before
you
should
execute
captain
status
to
verify
that
your
clusters
actually
running
and
what's
also
always
nice,
is
to
click
on
the
API
or
to
open
the
API
in
a
browser
and
go
to
the
swagger
UI
there.
We
go.
That's
just
to
verify
that
everything
that
we
see
is
actually
available
and
what
you
can
see
here
is,
for
instance,
the
event
endpoint
that
you
can
use
to
send
a
cloudy
event
to.
A
We
won't
use
that
endpoint,
just
in
case
you're
interested.
You
can
easily
figure
it
out.
We
buy
at
this
value
I,
just
there's
a
hint
here.
If
people
are
not
so
much
familiar
with
the
swagger
UI,
it's
basically
an
interactive
UI,
where
you
can
also
take
the
captain,
API
talk
and
how
retrieve
that,
because
everything
is
in
the
captain
documentation
and
then
you
can
authorize
here
and
you
can
basically
execute
the
command.
So
I
clicking
this
in
this
UI
here.
A
A
Yes,
thank
you,
you
that's
exactly
what
it
is
for,
and
obviously
the
API
is
going
to
change
over
the
next
couple
of
months
with
new
features
coming
in
a
new
endpoints
coming
in.
So
what
you're
seeing
here
is
obviously
what
is
available
right
now
in
captain
zero
six
one
and
at
the
later
point
there
will
be
more
endpoints
available,
but
it's
actually
not
necessary.
In
the
long
term,
we
will
use
the
CLI
for
our
demo
and
we
will
show
you
that
in
a
second
so
on
to
the
captain
service
template
that
we
have
available
here.
A
It
is
right
now
on
the
captain,
sandbox
organization.
Viewing
will
tell
you
a
little
bit
about
that
later
and
with
this
little
template,
we
bring
a
couple
of
files
to
you
like
main
dot,
go
file
and
event
handler
at
go
file.
It
go
Martin
to
go
some
so
in
case
you're
new
to
the
go
development.
These
would
be
your
main
files
that
you
should
look
at
within
that
repository.
If
you
just
want
to
develop,
if
you
want
to
have
a
broader
look
at
all,
they
are
files.
A
I
can
recommend
also
looking
into
the
deploy
folder,
where
we
have
the
kubernetes
deployment,
which
we
will
show
in
a
second,
but
we
won't
stay
too
long
with
that
and
before
instance,
have
a
travis
tamil
file
that
you
can
use
for
some
automated
testing
and
building
and
some
other
files
that
are
usually
found
in
a
repo
one.
Important
thing
is
also
the
docker
file.
I
will
show
that
in
the
code
editor
later,
but
just
to
give
you
a
quick
overview
of
what
this
repository
has
so
how
to
use
this
repository.
A
The
easiest
way
is
to
download
it
I,
don't
recommend
cloning
it,
because
we
will
have
to
set
up
and
you
get
Ripper
anyway.
So
just
click
here
and
select,
download,
zip
or
at
a
later
point
you
can
probably
go
to
the
github
releases
page
and
download
the
zip
file
from
there,
and
then
you
can
see
there
is
this
folder
called
captain
service
template,
go
master,
I,
recommend
going
into
that
folder
and
then
selecting
all
those
files
and
extracting
it
into
your
folder.
A
Alright
and
I'm
gonna
extract
it
here
now
in
case
you
are
familiar
with
go
and
you
are
wondering:
don't
you
have
to
set
a
go
project
power
for
something
or
what
is
my
special
setup
with
that?
My
answer
to
that
is:
no,
you
don't
have
to
do
it
anymore,
we're
using
go
modules
and
by
using
go
modules.
A
lot
of
these
steps
are
a
lot
easier,
so
you're
not
bound
anymore
to
such
a
directory.
A
Alright,
to
start
with
I'm
just
gonna
go
into
my
projects.
Folder
and
I'm
gonna
go
into
my
simple
W
get
test
service.
You
can
also
just
use
a
file
explorer
to
do
that
I'm
just
using
that
as
a
shortcut
to
start
Visual
Studio
code,
but
you
could
have
also
just
started
with.
You
should
be
code
from
wherever
and
just
select
open,
folder
all
right,
I
hope
the
font
size
is
okay
to
read,
you
I
think
so,
yes
great,
and
what
I
just
want
to
highlight
here.
A
You
is
that
when
you
watch
this
video
maybe
later
because
we
also
put
it
online
on
YouTube,
so
anything
watch
this.
We
Christian
really
just
started
with
just
copying
this
template,
so
there
is
right
now
there
is
no
custom
code
in
it.
So
actually
we
are
going
to
start
coding
right
now.
So
that's
like
the
perfect
time,
yep
jump
in
here,
yeah
yeah
great!
Thank
you.
So
as
the
first
thing,
what
I
recommend
is
opening
you
read
me
or
in
case
you
had
it
open
in
the
browser
already.
A
A
So
we've
written
kept
the
service
template
at
a
couple
of
occurrences
in
here
which
is
going
to
use
the
built-in
functionality
of
be
sure
to
decode
and
we're
gonna
search
for
captain
service
template
go
and
we're
gonna,
replace
that
with
our
name,
which
is
simple,
W
get
test
service,
it's
52
occurrences,
but
that
makes
the
whole
process
a
lot
easier
and
then
the
next
step
here
is
to
also
double
check
our
image
names.
Basically,
we've
written
your
username
at
a
couple
of
image
names.
This
is
a
container
image
or
a
docker
image.
A
We
need
to
change
that
to
our
docker
hub
organization,
which
in
my
case
it's
just
my
name.
So
if
you
don't
know
it
just
go
to
docker
up
or
hop,
dot-com
create
an
account
login,
and
it's
just
your
name,
and
what
this
basically
does
is.
It
replaces
a
lot
of
occurrences
of
our
image
names
that
you
can,
for
instance,
find
in
the
readme.
A
So
in
the
readme
we've
written
a
couple
of
common
tasks
and
one
of
these
common
tasks
is
the
docker
build
command
for
our
source
code
and,
as
you
can
see,
it
now
has
my
docker
hub
username
in
here
and
my
service
image
name
that
I've
replaced.
If
you
look
in
the
readme
here,
you
can
see
it's
the
template
name.
A
Alright,
let
me
double
check
the
list
here.
So
don't
forget
anything
yeah
we
can
probably
just
initialize
the
git
repo
and
push
our
code
there.
That's
fine!
We
should
do
that
so
as
I
just
extracted.
This
I
want
to
make
sure
I
have
a
terminal
open
and
right.
Git
init
dots
and
get
at
dots
I
have
a
get
ignore
file
right
there
that
ignores
a
couple
of
files.
This
is
best
practice,
so
we
don't
add
anything.
That's
like
secure
or
a
binary
and
we're
just
gonna
write
a
git
commit
initial
commit
all
of
this.
A
You
can
obviously
also
do
just
Y
at
the
UI.
It's
just
like
I'm,
a
terminal
person
in
case
you
haven't,
figured
it
out
alright.
So
then
the
remaining
steps
of
to
readme
we
can
ignore.
For
now.
For
now,
we're
gonna
just
explore
the
repository
a
little
bit.
So,
let's
start
with
the
service
that
Yama
file
that
I've
promised
you
to
show
earlier.
This
is
our
kubernetes
deployment
and
it
basically
contains
as
a
first
step
a
deployment
of
our
simple
W
get
test
service.
It
has
the
image
name
of
that
service.
A
It
says
that
we're
gonna
use
port
8080
within
that
service,
and
there
is
some
other
configuration
variables
that
we
need
to
communicate
with
the
captain
cluster.
In
addition,
we
need
to
make
sure
that's
the
cutest
thing,
although
to
expose
our
service
on
port
8080
s,
so
other
services
within
the
cluster
can
reach
it
and
last
but
not
least,
actually
one
of
the
most
important
things
you
need
to
do
is
you
need
to
subscribe
to
a
cloud
event
or
even
to
multiple
cloud
events,
and
this
is
done.
A
Why
are
a
captain
distributor
and
within
that,
basically,
to
give
it
a
short
story?
We
have
a
docker
image.
That's
called
captain
distributor,
it's
also
available
in
version
0,
6
1,
and
it
uses
a
nuts
cluster
to
connect
to
and
we're
subscribing
to
all
events
that
start
with
s.
H
dot
captain
this
is
all
pre-configured.
You
don't
have
to
touch
this
if
you
don't
want
to
so
that's
all
there.
A
The
next
thing,
that's
pre-configured
and
that
you
don't
have
to
touch
is
the
main
go
file
that
basically
has
a
couple
of
options
that
you
can
pass
by
our
environment
variables.
So
if
you
want
to
extend
your
service,
if
you
want
to
do
advanced
stuff,
if
you
want
to
have
like
secrets
pass
through
your
service,
you
can
do
that
by
environment
options.
But
that's
beyond
this
tutorial.
Today's
focus
is
just
listening
to
a
cloud
event.
A
A
This
is
used
to
process
an
incoming
cloud
event,
so
the
nuts
class,
the
wire
a
distributor,
will
send
the
cloud
event
to
our
simple
W
get
test
service,
and
here
we
basically
have
a
long
if
else--if
chain
that
checks
for
the
type
and
passes
the
cloudy
event
for
you
and
then
sends
the
cloudy
event
to
another
function.
So
now
this
is
the
the
funny
or
the
interesting
part
for
you
wet
starts.
If
you
go
into
that
function,
you
can
either
control
click.
So
I
haven't
set
up
my
IDE,
except
for
installing
the
plugins.
A
This
is
all
pre-configured
in
the
IDE.
You
can
control
click
into
this
function
and
it
will
be
opened
for
you
or,
if
you
want
to
do
it.
The
other
way
around
you
can
go
into
the
file
called
event,
handlers
that
go
in
your
file
system
and
just
open
this
file.
And
that's
that's
your
main
entry
point
where
you
should
start
writing
code
now.
A
This
file
basically
contains
a
couple
of
handle
functions
so,
for
instance,
handle
configuration
change
you
an
or
handle
deployment,
finished
event
handle
test,
finished
event
and
some
others,
and
you
can
extend
it.
Obviously,
with
other
event
functions
and
you
would
have
to
say
specify
the
name
of
the
event
it
may
not
go,
but
that's
also
beyond
of
the
tutorial
today,
because
today
we're
going
to
focus
on
the
handle
deployment
finished
event
function.
So,
if
you
remember
the
screen
shot
from
before
and
the
use
case
that
I've
told
you,
we
have
an
external
deployment
tool.
A
For
instance,
Jenkins
has
deployed
using
whatever
tool
that
you
can
imagine
and
in
the
end
our
Jenkins
pipeline
is
just
used
to
say.
Oh
I
want
to
start
testing
now
I've
successfully
deployed,
but
captain
you
handle
the
testing
and
you
handle
the
evaluation,
and
so
somebody
else
sends
a
deployment
finished
event
into
captain
and
we
need
to
listen
to
that
event,
and
the
nice
thing
here
is
now
that
we
have
some
utility
functions
that
we
can
work
with
so,
for
instance,
I've
already
written
it
in
our
template.
A
Here
as
an
example,
we
can
use
the
my
captain.
Dot
send
test
finished
event,
so
my
captain
is
arrival
pass
to
this
function.
It
basically
contains
some
other
variables
that
are
set
for
you
automatically.
Don't
worry
too
much
about
it,
but
what
you
can
do
is
and
again
this
is
pre-configured
in
the
IDE.
You
can
say
my
captain
dot
and
it
will
give
you
a
couple
of
things.
A
Unfortunately,
not
what
I
was
looking
for.
That's
easy
to
explain.
Although
before
we
actually
start,
we
should
try
to
compile
our
code
because
we've
just
extracted
a
git
repository.
We
haven't
downloaded
any
dependencies,
so
I'm
opening
the
readme
I'm
gonna
go
to
the
common
tasks
and
that's
the
common
tasks.
The
first
one
is
built
a
binary
and
if
you're
not
familiar
with
go
basically,
this
is
just
a
compiled
command.
If
you're
familiar
with
go
I,
don't
need
to
explain
it
to
you
anyway.
So,
let's
test
this,
let's
hope
it
works
crossing
fingers
yeah.
A
B
A
A
It
also
takes
a
test
strategy
at
employment
strategy,
which
we
don't
actually
need
right
now.
We
can
just
leave
that
empty.
We
have
a
smart
default
built-in
if
it's
empty.
It
takes
the
deployment
strategy
and
the
test
strategy
of
the
incoming
event.
The
same
is
true
for
project
service.
In
stage
all
that
information
is
actually
coming
from
the
incoming
event.
So
that's
fine
and
the
next
parameter
it
takes
is
a
time
event.
It's
called
start
adapt
so
for
this
we
will
actually
store
it
in
of
arrival.
A
A
There's
two
time
stems
that
you're
interested
in
the
time
when
you
started
testing
at
the
time
that
you
finish,
testing
and
the
second
things
at
a
time
when
you
finish,
testing
is
basically
determined
by
when
you
call
the
same
test
finished
event
all
right,
the
last
but
not
least,
we
need
a
result.
We're
gonna
have
that
I
think
warned
of
warning
for
now
and
we
need
some
labels.
I
think
I
can
enter
no
I.
Don't
I
need
to
pass
the
labels
here.
It's
actually
not
implemented
yet
so
we
have
the
incoming
event
here.
A
This
is
the
full
cloudy
event
and
we
have
the
incoming
event
data.
So
the
deployment
finished
event
which
we
can
process
here,
it's
coming
in
from
data
and
if
we
can
take
a
look
what's
in
this
event,
so
we
just
write
theta
dot
and
you
get
a
couple
of
arrivals.
That's
in
that
event,
so
everything
working
as
expected
here.
A
A
Where
it's
not
updating,
okay,
it
wasn't
updating
all
right
with
that.
Setting
that
we
have
right
here,
we
could
actually
just
start
and
deploy
our
service
and
and
watch
it
working
in
progress
now.
This
is
nothing
fancy
yet
obviously,
I
know
that,
but
just
to
give
you
a
quick
overview
of
what
this
does.
So,
what
do
we
need
to
do?
The
manual
steps
now
would
be
to
build
our
image
using
docker,
build
and
then
push
this
image
to
our
docker
hub
registry
and
then
select
cube,
CTL,
apply
eff
and
yeah.
A
It's
a
couple
of
manual
steps
that
I
want
to
skip
for
now.
Hence,
I
have
included
this
little
tool
here
called
scaffold
and
we're
just
gonna
run
scaffold
run
tail.
The
tail
means
to
print
the
lock
output
from
the
service,
and
what
scaffold
now
does?
Is
it
executes
the
command
that
I
just
mentioned?
It
executes
the
docker,
build
it
pushes
it
to
the
docker
hub
registry,
and
it
applies
the
deployment
that
we
have
in
here
and
for
that
it's
important
to
know.
There
is
a
file
called
scaffold
llamó
in
here,
which
basically
specifies
exactly
that.
A
It
specifies
that
you
should
build
this
docker
image,
which
is
specified
by
the
docker
file,
and
you
should
deploy
a
kubernetes
manifest
file.
So
while
that
is
working,
I'm
gonna
expose
the
captain's
bridge
because
we
want
to
watch
what's
going
on
now.
I,
don't
have
it
there,
we
go
so
I'm
gonna
expose
captain's
bridge.
This
is
a
command
that
you
will
find
in
our
tutorial.
A
It's
actually
not
exposing
I'm,
just
port
forwarding
to
the
bridge
container,
and
we
can
open
it
why
a
localhost,
9000
and
our
bridge
is
currently
empty
because
we
don't
have
a
project
here,
but
I
was
also
expected.
Obviously,
so
we
need
to
create
a
new
project
before
we
actually
continue
developing.
So
we
can
test
it.
So
I
have
downloaded
captain
examples
which
you
can
find
on
the
github.com.
/
captain
slash
examples.
A
It's
also
in
our
tutorials
and
in
that
we
have
the
own
boarding
cards
folder,
and
what
we
need
to
do
is
we
need
to
create
a
project.
I'm
gonna
call
it
sock
shop
and
I'm
gonna
use
the
shipyard
file
called
I
think
it's
called
shipyard
quality
gates,
llamo
yeah,
maybe
take
it.
Let's
take
a
look
at
the
shipyard
quality
gates,
Yama
file.
This
is
basically
a
very,
very
basic
shipyard
file
that
only
contains
one
stage
and
the
stage
is
called
hardening.
A
A
B
A
The
café's
bridge
in
civics
dot
co-taught
6.1,
but
we
do
also
have
EAP
program
so
where
you
can
get
like
the
latest
versions
of
the
captain's
bridge.
So
if
you're
interested
in
this,
we
have
already
a
couple
of
very
nice
improvements
in
the
latest
version,
so
you
can
check
it
out
here
on
captain
don
sh
and
you
will
find
the
instructions
how
to
to
change
or
how
to
have
create
your
captain's
bridge
from
the
latest
release
version
to
the
EAP
version.
It's
basically,
except
that
it's
one
come
and
the
Christians
happening
here.
A
A
Yeah
I
mean
it's
fine.
The
service
is
compiling
in
the
background,
so
yeah
half
the
time
for
that
so
I
just
executed
that
command
and
it
says
it's
updated.
The
only
thing
we
need
to
do
is
the
port
forwarding
is
not
working.
Once
you
update
the
image,
you
need
to
cancel
the
port
running
and
restart
it,
and
if
I
refresh
here
now,
we
should
see
yep
it
just
changed.
There
is
the
new
version
string
below
here
from
the
EAP
version,
and
with
that
we
should
see
a
couple
of
new
features.
A
Maybe
if
you
can
spot
them,
I
won't
tell
you
all
right,
great
all
right.
The
service
is
actually
running
right
now,
as
we
can
see,
there's
a
couple
of
lock
outputs
already
there.
So
what
is
this
doing
right
now?
It's
sending
like
unhandled
captain
cloud
event
messages,
because
we
have
some
internal
events
that
we
also
have
received.
Don't
worry
too
much
about
them.
This
is
basically
just
troubleshooting
and
debug
output
for
our
service.
A
A
This
is
basically
made
for
postman
and
it
would
send
the
event
to
port
8080,
but
as
a
promise
today,
I
want
to
use
the
captain
CLI
to
send
that
event.
So
I
would
just
take
the
event
payload
from
here.
I
copy
it
and
I
will
create
a
new
file
in
here
and
I'm
gonna
call
it
deployment,
finished,
dot
event
and
I
will
copy
paste.
My
JSON
payload
in
here
and
then
from
another
terminal
session,
I
will
just
say:
captain
sent
even.
A
F
deployment
finished
dot
event
and
that
should
actually
send
the
deployment
finished
event
into
my
cluster.
So
it
returns
a
I,
kept
in
context
that
he
here,
starting
with
five
seventy
five
and
we
should
actually
see
the
very
same
ID
popping
up
in
our
captain's
bridge
in
the
carts
micro
service
in
a
couple
of
seconds,
so
I'm
just
waiting
for
auto
refresh
to
load
the
new
event,
which
would
happen
any
second.
A
Now
there
we
go
so
we
just
got
a
deployment
finished
event
in
bridge
we've,
just
send
it
using
the
captain's
CLI
and
what
this
actually
should
do.
This
actually
should
load
the
deployment
service
that
we've
sorry
it
should
handle.
The
deployment
finished
event
that
we've
implemented
in
here
and
send
out
a
test
finished
event
which
it
isn't
doing,
but
that's
fine,
that's
why
we
have
to
log
output
for.
A
You
would
ask,
and
the
question
is
we
just
have
to
implement
it
obviously,
and
what
we
want
to
do
is
we
want
to
call
W
get
of
data
thoughts.
What
is
it
called
deployment?
Your
eye,
pública
things
there
we
go.
We
want
to
execute
W,
get
of
data
or
deployment
your
eye
public
and
to
do
that
we
need
in
go
just
to
call
execute
command.
A
So
that's
the
that's
the
go
library
that
does
that
for
us
and
for
that
we
you
use
w,
get
that's
the
calling
binary
that
we're
gonna
call
and
it's
captain
dollars
H
and
it
would
download
the
index.html
page
of
captain.
Dot
is
a
to
my
local
hard
drive
and
we
want
to
use
the
tool
to
implement
a
basic
health
check.
A
You
could
also
implement
this
to
run
like
a
loop
like
loop
of
1,000
requests
that
you
want
to
execute,
or
you
can
even
run
parallel
requests
if
you
want,
but
that's
a
go
feature
yeah
whatever
you
think
can
think
about
just
you
need
to
implement
it
in
here,
but
this
is
the
starting
point
and
what
we
need
from
that
is.
This
thing
returns
that
commands
and
this
command
needs
to
run
and
running
that
command
actually
returns.
Let
me
double
check
you
might
cheat
sheet
here.
That
was
actually
wrong.
Sorry,
we
need
this.
A
So
we
cannot
just
say
if
error,
unequal,
nil,
we're
gonna
print
this
little
error
and
we're
gonna
in
case
there
is
an
error,
we're
gonna
return,
a
test
finished
event:
I'm,
just
gonna
copy
paste
it
from
my
from
my
cheat
sheet
here
in
case
there
is
an
error.
We
will
return,
it
test
finished
event
with
status
ever
and
I.
A
Think
I
need
to
zoom
out
a
little
bit.
So
there
we
go,
we're
gonna,
send
the
test
finished
event
and
in
case
there's
no
error,
which
is
the
obvious
else.
Part
which
is
gonna,
send
a
test
finished
event
with
status.
Success
I'm
also
just
gonna
copy
paste
that
just
to
be
100%
sure
that
I
don't
miss
anything
and
we
have
to
write
like
the
real
service
name
here,
which
is
the
simple
W
get
test
service
and.
B
A
Fit
into
the
other
variable
is
called
differently.
Yeah
just
saw
that
Thanks.
So
with
that,
that's
actually
all
you
need
to
do
as
we
capture
STD
out
here.
We
should
make
it
like
make
some
troubleshooting
output
in
case.
We
need
it
and
that
should
actually
already
work,
as
I
said
before,
I'm
using
scaffold
so
I'm
just
gonna
run
scaffold.
I
just
did
the
ctrl
C
in
the
console
and
I'm
gonna
run
scaffold
run
tail
again.
This
is
gonna,
build
my
docker
container
and
bring
it
up.
A
So
it's
ask
a
question
here.
So
the
basic
or
like
the
only
thing
we
have
to
do
with
this
template
is
really
to
implement
one
function
here.
It's
the
handle,
deployment,
finished
event,
function
or
the
handle
or
whatever,
like
a
handle,
a
handler
function.
That's
the
only
thing
we
have
to
implement
and
we.
B
B
A
Very
simple,
alright,
so
this
thing
is
now
deployed.
I'm
gonna
switch
to
my
second
terminal
here
and
I'm
gonna
send
the
same
deployment
finished
event
again:
I'm
just
gonna
change,
I'm,
just
gonna
change
the
captain
context
study,
because
that
should
actually
be
random.
In
fact,
I'm
just
gonna
leave
it
out,
because
that
will
generate
a
new
ID
for
me
and
we're
gonna
increase.
Like
you
see,
there's
labels
we
have
here.
We
can
see
them
in
bridge
as
well.
A
A
For
some
reason,
the
W
get
command
has
probably
failed,
but
that's
easy
to
explain,
because
we
need
to
take
a
look.
Our
W
get
would
actually
try
to
access
this
domain
and
I'm
guessing
this
domain.
Is
it's
just
not
available
so
I'm
gonna
switch
the
deployment
URI
public
for
demo
purposes
here
to
Captain
door.
Sh
I'm
gonna
send
in
the
same
event
again
I'm
gonna,
look
at
the
log
output.
Now
there
we
go.
It
now
sends
cloudy
bandwidth
results
success,
because
now
it
is
able
to
access
it.
A
A
A
Now
it's
it
worked.
We
do
now
have
the
hardening
event
in
here
again
with
result,
apparently,
but
for
some
reason
it's
not
able
to
send
a
cloudy
event
yeah,
but,
as
I
have
shown
in
the
screenshot
before
I
got
this
actually
working
this
morning.
So
there's
nothing.
I
can
actually
do
right
now
to
to
make
this
work,
except
for
like
going
to
debugging,
which
I
think
is
not
interesting
for
this
video
right
now,
but
with
that
I
would
like
to
complete
my
tutorial
and
I
promise.
A
We
will
find
this
ever
and
document
it
and
make
sure
it's
part
of
the
tutorial,
but
in
the
end,
this
is
all
that
you
have
to
write
just
to
comment
again
on
this
hour
that
I
did
with
the
stage
we
have
a
couple
of
test.
Events
in
our
repository,
obviously
open
them
check
the
contents
of
them.
Our
test
events
are
usually
taken
from
the
spec,
so
respect
usually
works
with
like
sock
shop
and
service
cards
and
stage
def,
and
you
need
to
adapt
them
obviously
to
your
example
in
to
your
demo.
B
A
A
I
just
want
to
highlight
how
to
actually
contribute
to
captain,
because
that's
quite
easy
and
if
you
already
have
some
projects
you're
working
on
that
you
want
to
contribute
to
captain
or
if
you
want
just
want
to
continue
to
existing
parts
of
captain,
then
you
can
either
go
to
the
captain
posit
or
II
or
organisation,
and
you
find
on
the
existing
code.
You
may
find
some
improvements
you
want
to
do,
or
maybe
you
want
to
kind
of
work
with
us.
Then
you
can
do
it
on
the
existing
repository.
A
If
you
have
new
repositories,
then
the
first
part
would
be
to
to
propose
them
to
the
captain
sent
box
organization.
So
you
can
just
go
there
open
up
an
issue
and
we
will
reach
out
to
you
to
bring
your
repositories
over
from
your
personal
kidnap,
account
to
the
captain
set
box,
account
or
organization.
So
you
can
work
on
this
in
the
captain
sent
box
and
we,
like
you,
can
contribute
to
the
captain.
Community
and
the
whole
captain
community
can
profit
from
from
everything
you've
done
already
and
graduated
confident
confident
is
already
out
there.
A
A
So
that's
also
the
reason
why
the
template
starts
in
captain
set
box,
and
then
we
will
move
it
over
to
captain
country
once
it
has
its
first
adopters
and
if
it's
used
and
maintains,
then
we
can
move
it
to
the
captain
country
organization,
but
captain
sandbox
is
really
the
place
where
you
can
start
where
you
can
get
in
touch
also
with
the
captain
developers
and
it's
kind
of
a
starting
point
for
all
captain
community
content
and
contributions.
So
we
are
looking
forward
to
see
some
company
there.
A
It's
already
quite
a
couple
of
repositories
are
out
there,
so
you
can
also
take
a
look.
There
maybe
learn
from
others
and
then
contribute
your
content
as
well,
and
the
last
part
I
just
want
to
highlight
that
it's
easy
also
to
get
in
touch
with
the
boat
captain
team,
outside
of
those
weekly
cadence
of
community
meetings
and
developer.
A
Reach
out
to
us
on
the
captain,
slack
channels
follow
us
on
Twitter
and
yeah.
You
already
know
our
github
repositories,
and
now
we
have
these
two
contribution
repositories
as
well,
which
I
just
explained
so
with
this
I
think
I'm
going
to
stop
during
the
recording
just
stay
in
this
meeting.
I
just
stopped
the
cloud
recording
and
we
just
open
up
the
round
for
questions.
I
just
have
to
find
it
where
I
stop
the
recording.
It
says:
stop
sharing.