►
From YouTube: 2020-11-19 5 minute production app sync
Description
Direction: https://about.gitlab.com/direction/5-min-production/
A
You
want
to
start
with
a
demo.
B
B
It
has
gitlab,
say
a
yaml
file
with
just
two
lines
of
code,
including
five
minutes
production
up,
deploy,
template,
and
it
also
has
uci
cd
variables,
which
are
for
aws.
B
B
If
we
go
to
the
deploy
template
the
readme
that
I
used
during
the
previous
demo
yeah,
we
have
quite
a
lot
of
information
here,
but
in
the
section
of
database
it
says
that
environmental
variables
to
be
initialized
and
db
migrate
if
sat,
are
executed
right
after
stock
run.
So
what
that
means
is
that
we
can
set
up
two
variables
for
scripting
one
to
prepare
the
database
one
time
and
another
one
to
run
on
each
pipeline
to
update
it.
So,
basically,
migrations,
dbini
shall
lies
and
dbmigrate
variables.
B
You
might
recognize
them
because
they
are
also
used
in
autodevops.
In
the
same
way,
we
rely
on
users
to
find
and
debit
initialize
and
dbimigrate
for
themselves,
and
we
use
the
same
approach
the
same
name
in
here.
So
we,
our
first
goal,
is
to
make
five
minute
production
app
compatible
with
auto
develop.
So
we
can
integrate
it
back
easily,
so
yeah,
let's,
let's
add
those
variables
and
in
the
readme
we
have
an
example
for
rails
and
since
I'm
using
rails,
we
just
use
those.
C
B
B
Okay,
now,
when
I
made
appropriate
changes
yeah,
I
just
wait
for
the
pipeline
and
while
wait
for
the
pipeline
yeah,
we
can
do
two
things.
You
can
ask
me
questions
right
now.
If
you
have
any-
or
I
just
show
you
other
functionalities-
that
we
have.
B
Yay
good
good
choice,
so
yeah
I'm
using
master
right
now
in
this
example
but
yeah.
We
know
that
we
work
in
future
branches
and
let's
say
I
push
some
feature
in
the
branch
and
yeah.
If
you
use
this
five
minute
production
app,
you
can
just
go
to
the
merch
request
and
your
pipeline
will
run
here
too.
So
if
you
open
the
app
from
here,
you'll
see
actually
your
review
app
running
and
you
can
notice
the
difference
in
environments.
B
So
this
way
you
can
just
use
the
general
workflows
and
merch
requests
and
it
will
create
review
apps
and
destroy
review
apps,
as
as
you
create
and
merge,
and
accept
merch.
B
So
right
now
I
yeah
I
just
accept
merch
requests
and
triggers
destroy
job
which
will
be
equivalent
of
terraform,
destroy
and
remove
all
the
feature
branch
infrastructure
created
while
still
keeping
master
alive.
A
B
B
About
the
behavior,
so
those
variables
aws
success,
key
region
secret
key
they
can
be
protected,
they
can
be
unprotected,
depends
on
the
availability
of
the
branches.
So
let's
say
people
don't
want
to
run
this
on
the
feature
branches,
so
they
just
make
those
variables
protected
and
if
those
variables
are
not
available
in
regular
branches,
there
will
be
no
deploy
happening,
no,
no
provisioning,
nothing.
So
it
depends
on
your
needs.
You
can
tweak
this
behavior,
but
simply
telling
through
cicd
variables,
at
what
branches
you
want
visibility
of
those
variables.
B
B
Now,
let's
go
back
to
our
first
project
and
see
if
the
pipeline
is
good,
so
the
first
pipeline
was
without
changes
to
the
kit
labs
here.
Yeah
also,
there
is
nothing
happened
here
it
just.
It
deployed
the
code,
but
yeah
it's
not
enough.
Now
we
updated,
say
yeah
movies,
db
comments.
Let's
see
what
happening
here.
D
B
Good
now
now
it
should
try
good
good
okay.
So
this
is
a
failure
and
the
reason
why
it
fails
is
not
because
we
did
something
wrong,
but
because
rails
has
credentials
and
to
make
deployment
safe,
rails,
encrypts
those
credentials
and
keeps
them
in
config,
slash,
credential
and
encrypted
file
and
in
order
to
decrypt
them
during
any
rake
task
rails
need
a
secret
key
passed
to
it.
B
So
in
this
particular
case
we
want
our
application
running,
so
we
want
to
give
secret
key
base
variable
to
our
application
within
the
docker
container,
and
we're
going
to
do
that.
I
have
the
variable
locally.
So
let
me
just
copy
paste
it,
but
now,
if
we
just
add
the
variable
it
won't
be
available
to
within
the
instance
of
the
docker
within
the
ec2,
so
like
terraform,
we
have
a
different
concept
specifically
to
pass
variables
to
the
application
to
the
internal
site.
B
Internal
part
of
docuron,
you
just
add
gitlab
wire
as
a
prefix
and
do
like
rails
master
key,
and
you
put
the
value
here.
B
And
now
we
just
retry
the
job
and
see
if
it
will
work-
and
this
is
a
another
feature
that
we
introduced
is
like.
We,
you
want
the
ability
to
pass
environmental
variables
to
your
application
running,
otherwise,
you
can't
pass
certain
credentials.
You
can't.
A
Sorry,
why
why
is
there
a
difference
like
a
database,
aws
region,
I
can
just
define
and
glvar.
I
have
to
put
glvar
before
it.
Why
is
that?
What
is
the
translation
step?
I'm
missing.
B
B
The
environment
is
not
passing
through
layers
down,
so
what
we
do
here
in
gitlab,
we
just
reuse
a
terraform
approach,
so
terraform
has
this
tf
bar
prefixes
and
what
it
does
it's
like.
Okay,
well,
we'll
just
take
those
prefix
variables
for
you
know
for
configuring
stuff
for
terraform,
and
we
just
use
similar
approach
here
and
says
that
everything
that
has
jlvar
prefix
will
pass
down
through
to
your
web
app
within
the
docker.
B
And
with
the
change
it's
now
rails
is
working,
it
actually
can
decrypt
the
credentials
and
it
runs
a
db
initialize
and
it
successfully
creates
the
database.
So
if
we
go
to
the
environments,
if
we
open.
B
B
B
Try
it
out
issuer
board.
I
put
a
link
to
the
issue
board.
So
if
you
want
to
create
an
issue,
if
something
is
not
working,
if
you
have
recommendation,
if
you
want
to
contribute,
you
can
find
everything
there
and
we
also
have
a
slack
channel
with
the
same
name:
five
minute
production
app
where
you
can
reach
out
to
me
to
three
and
yeah
just.
B
Okay,
now,
next
to
the
next
point,
is
a
bit
about
our
plans
of
the
next
week,
so
we
want
to
introduce
s3
and
it's
it's
somewhat
there,
but
we
need
to
try
it
out
and
get
it
ready
to
be
presentable.
We
also
need
to
do
some
bug,
fixings
and
more
complex.
The
project
coins
and
more
side
problems
appears
there
need
to
be
some
fixes
done
there
and
yeah.
I
think
that's.
A
Cool
thanks
for
everything,
you're
you're
able
to
work
full-time
on
this
there's
enough
to
do
yep.
That's
good
awesome,
darby
at
0.4.
E
Yeah
I
just
wanted
to
throw
this
in
here.
I
created
a
mr
to
add
some
of
these
links
to
the
direction
page,
so
other
people
can
follow
along
there
and
then
I,
as
part
of
this,
I
created
a
a
youtube
playlist.
So
we
can
throw
these
meetings
in
there
and
if
someone
wants
to
catch
up,
they
can
do
it
that
way.
So
if
anyone
has
any
feedback
or
other
things
to
add
in
there
go
ahead
and
add
that
add
a
comment
in
there
and
I'll
get
that
taken
care
of.
A
Awesome
thanks
darby
5.5
gl
var,
it's
like
a
docker
fire,
but
we
call
it
gl
var,
but
because
why
not?
But
maybe
maybe
someone
can
add
to
the
to
the
readme,
which
is
excellent
by
the
way?
It's
absolutely
me
that
this
this
variable
goes
into
the
docker
container,
so
that
wasn't
super
intuitive
to
me.
D
D
Yeah,
so
let
me
just,
let
me
just
think
about
it
a
little
bit,
because
the
readme
is
titled
variables
exposed
to
the
web
application
and
and
jailware
eventually.
D
It
is
it
is,
it
is
absolutely
100
true,
so
all
the
all
the
variables
here
are
actually
provided
to
the
docker
container.
That
runs
the
web
application.
D
Yes-
and
you
will
you
will
know
by
next
week:
okay,
yeah,
cool,
okay,
think
about
it,
but
yes,
so
we
can.
We
can
definitely
include
that
it
goes
to
the
docker
container
because
that's
also
100
true,
but
I
just
want
to
think
about
whether
it's
a
detail
we
want
to
expose
to
the
end
user
or
not.
C
C
A
Promotion
wise:
what
are
the
plans
you
have?
First
blog
post
or
what
other
people
thinking.
C
I
think
it
would
be
a
good
idea.
I
just
want
to
try
it
out
myself.
First,
I
didn't
do
that.
This
week
I
was
waiting
for
the
project
being
moved.
A
Yeah
and
and
the
first
blog
post
doesn't
necessarily
have
to
be
about
what
is
being
what
we're
making
here.
It
can
also
be
a
rent.
Why
does
it
take
20
minutes
to
make
a
production,
app,
2020
speed,
run
between
the
different
options
heroku
and
the
other
ones
kubernetes.
The
cost
is
too
high.
It's
not
in
any
free
tier
three
tiers
of
the
hyper
clouds
benchmarks.
A
Stuff
like
that.
So
I.
E
E
Hey
michael
I'm
happy
to
help
with
any
blog
post
stuff,
too.
I've
got
a
couple
ideas
that
we
could
roll
in
there.
So
if
you
want
we
can
we
can
sing
up
offline.
C
Yeah
that
would
be
super
nice.
I
have
some
ideas
myself,
but
probably
it
makes
sense
to
just
say:
hey.
I
have
this
problem
in
my
experience
and-
and
you
have
that
and
we
are
trying
to
solve
it
together.
D
E
Yeah,
I
I
was
gonna,
hopefully
take
a
crack
at
it
tomorrow.
D
Perfect
perfect,
so
if
you
have
a
look
at
the
group
five-minute
production
app,
you
will
see
that
we
already
have
two
subgroups
in
there
for
examples
and
sandbox.
So
examples
are
so
sandbox
is
a
place
where
you
can
just
dump
your
work.
It
doesn't
really
matter
if
it
is
in
a
running
state
or
not,
but
the
example.
Subgroup
is
actually
linked
through
the
readme
and
it's
probably
a
place
for
curated
well-maintained
examples.
So
if
you
can
just
do
all
your
work,
there
that'll
be
great
or
else
you
can
do
it
wherever
you
like.
D
E
F
Hey
darby,
we
can
also
advertise
on
the
weekend
review.
There
might
be
other
engineers
who
want
to
try
it
out.
F
The
big
thing
is
is
credentials
to
basically
run
it
on
aws,
but
you
never.
D
D
This
pipeline
uses
the
gitlab
terraform
wrapper
right
and
that
is
of
course
mapped
or
that
wraps
over
a
specific
version
of
of
the
of
a
specific
version
of
terraform
against
which
the
state
gets
created.
Right.
So
if,
let's
say
the
release
next
week
in
13.6,
the
rapper
decides
to
use
terraform
version
plus
one
what
happens
to
the
existing
state,
because
the
way
this
works,
the
state
is
bound
to
the
specific
version
of
the
binary
you're
using
so
something
to
think
about.
E
I
think
that
makes
sense.
I
I
don't
have
enough
knowledge
of
terraform
to
know
like
what
would
happen,
but
I
can.
I
can
track
that
down
I'll
sync
with
the
team
that
knows
the
most
there
yeah.
D
It'll
be
just
you
know
like
in
the
perfect
world.
What's
going
to
happen
is
the
minute
we
bump
the
gitlab
terraform
version
maybe
run
some
automated
tests
that
check
out
the
five-minute
route
as
well.
So
just
link
that
up,
because
state
is
key
right.
If
we
yeah,
if
we
mess
up
the
state,
then
it
just
stops
working
one
fine
day,
yeah.
F
Good
call:
trey,
don't
worry
about
titles,
we're
here
to
help.
D
A
More
title,
more
responsibility,
great
well,
three
really
really
well
done.
This
really
amazing.