►
From YouTube: ECS Task Definition from local JSON
Description
ECS Task Definition from local JSON
Introduced in GitLab 13.3, ECS Task Definition from local JSON allows you to have the ECS Task Definition file in your GitLab repository. This means that you can exploit our version control and collaboration capabilities to maintain this file. Likewise, you can extend your organizations audit and compliance regulations to the Task Definition of your ECS services, have many stakeholders collaborate on the configuration and development of the Task Definition, and rollback to a previous version of the file, if needed. Lastly, this new feature helps you streamline your AWS deployments.
A
A
Then
you
have
ecs
service
in
this
demo.
I'm
going
to
be
talking
about
the
an
ecs
service
that
is
for
fargate
and
that's
the
environment
of
this
variable
is
going
to
be
review,
wildcard
environments
and
then
the
task
definition
which
is
called
sees
of
address
spring
task,
def
f,
so
those
are
the
three
variables
needed.
A
Obviously,
beyond
that,
you
also
need
the
the
aws
access
key
region
and
secret
access
key
to
be
able
to
connect
to
aws
from
from
the
runner.
One
more
thing
you
need
is
the
auto
devops
platform
target.
I
have
auto
devops
enabled
here
I'm
because
I'm
using
the
ecs
deployment
template
and
in
this
case
I've
defined
the
value
to
be
fargate,
because
I'm
going
to
be
creating
a
fargate
target
test
definition
and
a
farget
fargate
ecs
service.
A
A
So
one
way
to
do
it
is
you
know,
following
the
aws
documentation,
and
the
first
thing
that
personally
have
I
create
is
the
task
definition
and
the
test
definition
is
a
description
of
what's
going
to
be
in
in
a
container
that
is
going
to
be
running
as
a
service
in
acs.
A
So
you
follow
the
instructions
they
actually
have
launch
wiz
wizards
in
aws,
so
you
can
just
go
through
each
page
and
define
the
values
as,
as
you
know,
per
the
requirements
of
your
application,
then
the
next
thing
I
did
was
create
the
cluster
and
again
there
are
instructions
on
how
to
clear
the
cluster,
and
I
chose
ec2,
linux
plus
networking,
and
then,
after
that,
I
created
an
application
load
balancer
that
would
take
in
traffic
from
the
internet
and
route
it
to
a
specific
ecs
service.
A
So,
let's
just
let
me
show
you
what
it
looks
like
that
looks
like
once
they
are
created.
So
here
is
this
see
surveyor
ics
cluster?
This
has
three
services.
I
have
three
environments,
so
my
production
environment
is
actually
deploying
my
application
to
this
running
service.
I
have
another
branch
for
review,
which
is
this
one
here.
A
The
review
that
starts
with
a
two
roll
back
that
environment
is
being
deployed
to
this
right
here
to
this
service
and
the
far
gate
based
service
is
being
deployed
to
this
instance.
Here,
the
first
iteration
of
of
our
integration
to
ecs
was
the
ability
to
deploy
from
gitlab
to
ecs
through
the
pipeline,
and
it
looked
kind
of
like
this.
A
A
Okay
and
it's
using
the
task
definition
name
c
sub
editor
screen
task
def.
So
these
are
the
parameters
that
are
being
defined
in
the
environment,
variables
of
the
project
to
the
cluster,
the
service
name
and
the
test
definition.
The
improvement
introduced
in
13.3
to
this
integration
is
the
ability
to
actually
have
the
content
of
the
task
definition,
which
is
right
here.
A
A
A
And
you
know
this
allows
you
to
manage
your
definition
file
test
definition
file
within
your
project.
You
know
you
get
the
versioning.
Obviously
you
can
you
can
you
know,
track
the
changes.
You
have
call
stakeholders
collaborate
in
mrs
to
modify
and
update
the
test
definition
file
and
also
the
streams
lines,
streamlines
your
deployment
to
ecs,
making
you
more
productive
as
a
developer.
So
the
next
thing
I'm
going
to
show
you
is
how
the
pipeline
looks
like
so
the
pipeline
here
is
super
simple.
A
It
just
includes
a
template:
okay,
which
is
basically
the
gitlab
ccs
deployment,
template,
there's
a
bunch
of
variables
here
to
disable
a
lot
of
the
tests
that
are
included
in
the
autodevops
pipeline.
So
if
we
look
at
the
the
ec
deploy
ecs
git
lab
here,
this
contains
five
stages
and
it
includes
actually
it
is
setting
up
the
devops
platform
to
ecs,
which
is
not
going
to
be
used.
A
I'm
using
remember
I'm
using
fargate
in
the
project,
so
that's
going
to
be
overwritten,
and
then
it
includes
these
two
templates
and
the
one
of
interest
here.
Is
this
one
here
and
this
template
is
actually
the
one
doing
the
deployment
there
are
different
types
of
deployments.
It
could
be
just
a
production,
ecs
production,
fire
gate,
review,
fargo,
review,
ecs,
there's
those
four
options
and
what
it's
really
doing
is
doing
an
ecs
update
test
definition.
So
it's
going
to
think
of
it.
A
A
A
Then,
at
the
end,
you
can
click
on
this
button
and
it'll
give
you
the
json
file
for
all
everything
that
you
selected
in
the
through
the
wizard.
You
can
copy
and
paste
that
json
onto
here
now.
What
I
did
was
I
copy
that
json,
but
that
json
needs
to
be
mod
slightly
modified.
A
Another
thing
I
did
was:
I
had
to
delete
the
section
that
says
repository
credential,
so
I
deleted
this,
so
it
wouldn't
get
in
the
way
of
the
runner
correctly
signing
in
to
the
awscs
environment,
and
the
last
thing
I
did
was
I
had
to
make
sure
that
the
aws
log
groups
had
the
the
location
of
the
task
definition
that
we
were
replacing
okay,
so
this
is
the
think
of
this
is
the
before
and
then
the
new
we're
replacing
that
test
definition
with
this
new
new
one.
A
A
A
The
cluster
right
now
this
this
is
the
service
name
that
I'm
trying
to
redeploy.
I
will
be
redeploying,
and
the
task
definition
is
c
subvedra
spring
task:
def,
f,
okay
for
fargate.
A
Be
will
be
this
one
right
here,
so
the
new
name
will
be
sisa.
Vedra
fargate
task,
def
f,
not
spring
notice
that
this
is
a
new
name.
Okay,
and
I'm
showing
you
this
so
that
you
can
see
the
difference
once
the
deployment
happens.
A
A
The
ecs
service
dash
f
here
as
before
no
longer
has
this
c
sub
editor
spring
test
definition
f.
Now
it
has
the
c
sub,
far
gate
task,
def
dash,
f
and
version
number
one,
because
this
is
the
first
version
of
this
test
definition
that
has
been
applied
to
this
service.
If
we
look
at
the
tasks
notice
that
the
new
task
is
on
its
way
up,
so
we
need
to
wait
until
it's
in
a
running
state
for
us
to
see
the
new
newly
deployed
web
page.
A
Now
that
the
fargate
server
task
is
up
and
running,
we
can
go
and
check
the
web
application.
A
A
So,
in
conclusion,
in
this
technical
demo,
we
have
discussed
the
new
feature,
ecs
task
definition
from
local
json
and
having
the
task
definition
file
on
your
gitlab
repository,
allows
you
to
maintain
its
versions
via
our
version.
Control
and
collaboration
capabilities
have
other
stakeholders,
collaborate
on
the
task,
definition
configuration
and
development
roll
back
to
a
previous
version
of
a
task
definition
and
can
also
help
you
with
your
organizational
audit
and
compliance
of
your
ecs
container
definitions.