►
From YouTube: Magento Cloud Demo - Cloud Docker with Joe Shelton
Description
Joe has extensive experience in Magento Cloud and will share insights on how to make local development for Magento Cloud easier.
We will review the essential steps for the local environment setup of an in-progress Magento Cloud project. Appropriate for beginners to the Magento Cloud and/or Docker platform.
Project: https://github.com/magento/magento-cloud-docker
A
So
hello,
everyone
once
again
welcome
to
our
community
demo.
Today
we
have
Joe
from
Magento
as
a
speaker.
Joe
did
a
really
great
job
on
creating
some
guys.
How
to
use
cloud.
Docker
has
pretty
much
active
on.
You
know:
community
groomings.
We
have
around
the
same
project
so
he
wanted
to
share
today
his
experience
and
the
flows
he
worked
on
how
to
actually
use
it
occur
for
your
cloud
development.
If
you
already
have
a
project
and
you
never
used
it
before
locally
I
mean
mr.
Tucker.
A
B
C
B
Right
well
started,
then,
thank
you,
yep
any
and
thanks
everyone
for
joining,
so
today
we'll
be
discussing
how
to
get
your
development.
Your
local
development
environment
set
up
for
specifically
a
Magento
cloud
project
using
Magento
clouds,
docker
implementation
and
we'll
be
reviewing
how
to
enter
a
project.
That's
that
might
already
be
in
in
progress.
B
B
B
B
A
project
that's
already
in
progress,
so
maybe
you
have
you
know.
Maybe
you've
been
introduced
to
a
cloud
project
that
has
already
been
active
for
months
or
a
year.
Maybe
the
site
is
live
it's
going
to
have
products
in
the
database,
possibly
customers
and
orders,
and
you
would
like
to
recreate
that
that
live
environment
on
your
local
machine
for
development
purposes.
That's
what
well!
That's
the
workflow
we'll
be
examining
here,
and
this
presentation
will
be
appropriate
for
for
developers
that
are
new
to
either
the
Magento
cloud
platform
or
the
dot.
The
Magento
cloud.
B
So
this
is
a
cloud
environment
where
I've
uploaded
the
sample
data
sample
data
that
Magento
provides,
does
provide
a
number
of
CMS
pages
and
products,
and
even
some
customers
and
orders.
So
this
is
this
is
how
we're
simulating
a
project,
that's
already
in
progress.
What
you're
looking
at
is
in
a
cloud
environment
and
we're
gonna
recreate
what
you're,
seeing
here
in
our
local
environments
using
docker.
B
So
here
is
an
outline
of
the
the
setup
steps
that
we'll
be
using
on
day,
one
we're
going
to
we're
going
to
download
three
essential
assets
for
board
development
to
our
locals.
We're
going
to
prepare
the
cloud
configuration
files,
we're
going
to
customize
those
files
just
a
little
bit
then
we'll
start
up
the
doctor
environment,
we'll
review
how
to
create
an
en
Vida
PHP
file
and
then
we'll
be
ready
to
view
our
website
locally
in
a
browser.
B
All
right
so
are
three
essential
assets
for
development
are
basically
your
project
files
or,
what's
in
your
code,
repository
the
database
from
the
cloud
environment
and
the
media
from
the
cloud
environment.
This
is
these
are
three
essential
assets
that
you
would
need
for
any
sort
of
local
development,
docker
or
not.
So
there's
really
nothing
docker
specific.
Here
we
will
be
using
the
Magento
cloud
CLI
and
if
you,
if
you
haven't.
C
B
Into
that
CLI,
yet
I
would
recommend
that
you
do
so
because
it
does
give
you
a
lot
of
a
lot
of
convenience.
It
saves
you
a
little
bit
of
time
every
day,
just
because
it
provides
convenient
aliases
for
a
number
of
commands
that
you
would
routinely
use
like
interacting
with
the
git
repository
or
SSH
connections.
All
of
those
routine
tasks
are
made
easier
by
the
Magento
cloud
CLI.
B
So
just
to
show
you
what
that
looks
like
and
on
the
command
line,
we're
going
to
do
just
the
base.
An
mg
C
command,
which
is
mg
C,
is
a
built-in
alias
for
the
magento
cloud
CLI.
So
you
can
save
yourself
a
lot
of
time
by
just
using
that
alias
and
if
you
just
use
the
plain
mg,
C
command,
you're
gonna
get
a
list
of
all
the
projects
you
have
asked.
B
Access
to
all
the
cloud
projects
and
in
the
leftmost
column,
is
a
is
the
ID
that
you'll
need
to
supply
to
the
next
command,
which
is
mcg
get
and
then
the
idea
of
the
project
you
want
to
get,
and
this
is
just
cloning,
the
repository.
So
it's
asking
you
which
directory
you'd
like
to
clone
the
project
into
and
then
what
branch
you
would
like
to
check
out
initially
and
then
we're
going
to
go
ahead
and
do
a
composer
install
after
that.
Just
to
get
the
full
amount
of
files.
B
B
B
Well,
that's
just
an
mg
c
DB
dump
and
that's
that's
automatically.
If
you
have
multiple
cloud
projects,
this
tool
is
automatically
detecting
which
which
project
directory
you're
in
and
what
branch
is
checked
out
and
it's
going
to
go
into
the
equivalents,
environment
and
and
dump
the
database
of
the
cloud
environment
and
then
copy
that
down
to
your
local
all
in
one
convenient
command.
B
B
Okay,
so
next
we
are
going
to
actually
prepare
the
docker
configuration
files
you
when
you're,
when
you're.
Looking
at
your
your
repository,
you
might
notice
that
there
is
no
no
docker
compose
dot
llamo
file,
which
is
the
main
docker
configuration
file,
we're
actually
going
to
dynamically,
generate
that
configuration
file
using
another
CLI,
the
ECE
tools
CLI
and
the
docker
build
command.
So
this
is.
This
is
a
really
nice
piece
of
automation
that
Magento
is
providing.
B
It
does
the
same
job
as
the
cloud
environment
of
taking
a
look
at
your
services,
amo
file,
and
in
that
file
you
have
what
specific
services
are
defined
for
this
project
at
at
different
versions.
So
if
you've
got,
you
know
a
database
and
elasticsearch,
and
maybe
you
installed
on
your
project,
the
this
build
command
is
actually
going
to
take
a
look
at
that
and
give
you
the
appropriate
containers
to
match
the
specific
specifics
of
your
project.
B
If
you
have
multiple
projects,
this
is
going
to
generate
a
different
doctor,
configuration
that's
specific
to
each
project
and
really
accurately
reproduces
being
the
cloud
environment
on
your
local
using
docker.
So
we're
going
to
we're
going
to
do
that,
build
process,
there's
a
couple
options:
we're
going
to
use
for
the
build
command.
The
first
is
mode
of
developer.
B
There
is
a
production
mode
or
production
docker
configuration
that
would
be
more
appropriate
for
testing,
doing
automated
tests
or
just
a
demo
of
Magento,
but
since
what
our
purpose
here
is
to
start
development
on
a
project,
so
we're
going
to
use
the
development
mode
of
docker
and
then
there's
also
a
sync
engine
option
and
we're
going
to
use
mutagen.
The
sync
engine
is
for
performance
reasons.
B
Instead
of
directly
mounting
the
project
files
into
the
docker
container,
which
is
something
you
might
see.
Another
document
doctor
implementations
this
this
particularly
on
max
max,
has
a
very
bad
performance,
high
page
load
times,
so
we're
actually
going
to
use
the
sync
engine
to
copy
all
the
project
files
into
the
doctor
environment,
and
then
that
is
an
active,
two-way
sync.
B
So
here,
where
we're
running
that
docker
build
command
and
it's
got
a
simple
output,
it
just
says
configuration
was
built.
So
let's
take
a
look
at
the
two
configuration
files.
It's
it
has
generated
in
our
project.
The
first
is
dr.
composed
amel,
which
is
the
main
docker
configuration
file
and,
if
you're
not
familiar
with
docker
it
is
it
resembles
a
virtual
machine.
Only
there's
going
to
be
a
different,
a
different
container
for
each
of
the
services
associated
with
an
environment,
so
you've
got
a
different
operating
system.
B
That's
that's
just
for
the
database,
and
you
can
see
that
defined
here
in
this
file.
We've
got
a
container
for
the
database.
A
separate
container
for
Redis
next
is
a
lab
elasticsearch,
PHP
fpm,
so
on
and
on
there's
a
number
of
different
containers
that
are
generated
to
provide
a
replica
of
the
cloud
environment
and
just
a
little
bit
of
configuration
on
each
of
those
containers
that
will
make
them
work.
The
second
file
that
we
just
jumped
to
there
was
the
in
the
dot
doctor
directory
config
dot
PHP,
and
this
is
a
distributable
file.
B
So
it's
intended
to
be
kind
of
a
template
or
a
default,
and
you
might
recognize
some
of
the
variables
and
values
that
are
being
defined
here.
These
same
variables
would
be
in
the
cloud
environment
and
they
control
deployment
behavior.
This
is
where
things
like
your
connection:
information
for
services,
our
supplies,
like
your
database
and
Redis,
and
there's
also
some
information
on
routes
and
then
some
other
magenta
cloud
variables
at
the
bottom
there
that
just
control
many
different
aspects
of
a
deployment.
C
B
B
So
just
to
give
you
an
example,
going
back
into
that
doctor
composed
out
the
animal
file
you've
got,
for
instance,
your
your
database
is
going
to
be
Magento
to.
But,
if
you
have
say
three
cloud
projects,
they're
all
going
to
have
their
own
docker
environment
and
the
database
in
each
of
those
environments
would
be
named.
Magento
I
prefer,
when
I'm
executing
sequel
queries
on
a
database.
You
know
kind
of
double
check
the
name
of
that
database
just
to
make
sure
I'm
I'm,
targeting
the
right
database
easy
to
get
confused
when
things
are
named.
B
B
There's
something
project
specific,
because
I
wouldn't
want
multiple
projects
to
be
accessed
with
the
same
domain
name,
so
I'm,
gonna,
I'm,
gonna
change
the
basically
the
name
space
make
it
more
specific
for
both
the
database
and
the
base
URLs
of
this
project
and
there
there
are
two
nice
ways
to
extend
those
changes
so
that
you're
not
interfering
with
the
base
configuration
files,
we're
going
to
use
a
docker
composed
override
file
and
also
a
dot.
Dr
/
config
dot
PHP
file
to
make
those
changes.
B
B
And
then
I'll
actually
I'll
get
the
the
base
file
and
this
customization
side-by-side
so
that
it's
a
little
more
obvious.
What's
going
on
so
on,
the
left.
You've
got
the
base
file
and
you've
got
that
in
the
database
environment.
You've
got
the
Magento
defined
as
the
database
name
and
user,
and
over
on
the
right
I'm
just
kind
of
overriding
that
particular
piece
of
configuration
with
something
that
is
more
specific
to
this
project.
B
So
we
make
that
change
in
the
doctor
composed
override
Gammill
file
and
we'll
need
to
also
make
a
similar
change
in
another
place.
We're
going
to
have
to
create
a
config
dot
PHP
file
in
the
dot
doctor
directory.
So
we
will
want
to
copy
that
distributable
file
and
and
just
right
alongside
it,
have
a
config
dot
PHP
file
so
that
we're
not
overriding
the
the
base
file.
B
B
And
the
reason
for
that
is
the
those
values
in
the
config
dot.
Php
file
are
actually
encrypted
and
turned
into
a
string
that
that
then,
is
added
as
an
environment
variable
to
the
doctor
environment,
so
that
encryption
process
actually
happens
when
you
run
the
build
command.
So
so
you
have
to
run
that
again
after
any
changes
to
config
dot,
PHP.
B
Okay,
so
now
well
we're
ready
our
configuration
is
done.
We
are
ready
to
start
this
docker
environment
up
and
we're
going
to
use.
Another
CLI
with
Magento
is
supplying
a
dr.
CLI
at
bin,
slash
docker
that
has
several
convenience
methods
and
aliases
to
help
you
work
with
the
doctor
environment,
so
we're
going
to
use
bin
docker
up
to
start
up
the
docker
environment
and
then
we're
going
to
use
a
script
in
the
the
root
of
the
project
called
mutagen
SH.
That
will
start
the
file
sink.
You
don't
want
to
forget
to
do
that.
B
Otherwise,
you
won't
have
any
project
files
inside
the
doctor
environment,
so
the
bin
docker
up
command
will
actually
attempt
to
to
shut
down
any
previous
environments
that
were
running
so
it
does
that
first
and
then
it
goes
through
and
it
creates
all
your
your
separates
containers
and
the
output
looks
like
that.
If
it
was
successful,
now
we're
going
to
use
a
dr
command
dr.
PS,
just
to
take
a
look
at
those
containers.
B
And
then,
at
the
bottom,
there
I'm
starting
up
the
file
sync
with
the
the
command
bash,
mutagens
Sh.
So
that
just
takes
a
moment
and
then
it
says
it
successfully
created
a
a
session
which
is
basically
that
means
the
two-way
sync
is
active
now,
depending
on
the
size
of
your
filesystem
and
the
size
of
that
database,
that
is,
that
is
being
imported.
Remember
we
put
the
database
in
a
place
where
it's
automatically
being
imported
so
that
that
started
when
we
issued
the
bin
docker
of
command
that
database
import
started.
B
You
know
if
you
have
a
database,
that's
five
to
ten
gigs.
Sometimes
that
can
take
half
a
day
on
a
local
system
to
import.
So
if,
after
this
point
you're
having
problems,
you're
just
gonna
want
to
verify
both
that
the
database
is
fully
imported
and
you're
also
going
to
want
to
verify
that
your
file
system
was
fully
synced.
Your
project
files.
B
Okay,
so
the
the
last
file
that
we'll
need
to
prepare
in
order
to
get
Magento
running
is
an
important
one.
He
and
V
dot
PHP
now
somewhat
somewhat
difficult.
You
know
it's
not
obvious
how
you
would
necessarily
create
this
file,
I
think,
ideally
on
a
file
or
on
a
project
that
has
already
been
running,
someone
may
have
a
sample
env
dot,
PHP
file.
They
can
give
you
it's.
It
probably
should
be
up
to
the
technical
lead
of
the
project
to
kind
of
define
a
sample
he
and
V
dot
PHP.
B
B
So,
ideally
you
you
could
ask
around
and
and
find
some
kind
of
a
sample
he
and
V
dot
PHP
file,
but
if
there
is
not
one
available,
I'll
show
you
a
convenient
way
to
generate
one
that
will
work.
So
the
first
thing
we're
going
to
do
is
use
the
MVC
SSH
command
to
login
to
a
cloud
environment.
So
this
is
just
SS
aging,
SS,
aging
us
into
an
actual
cloud
environment
and
then
we're
going
to
use
cat
a
pet
C
and
V
dot
P
P.
B
This
is
just
going
to
output
that
cloud
in
V
dot,
PHP
file
to
the
screen
and
it's
easily
copy
and
paste
able
that
way,
lots
of
more
elegant
ways
to
do
this,
but
I'm
just
showing
what
is
the
most
accessible
way
to.
Maybe
someone
that's
new
to
UNIX
this.
This
just
makes
it
a
pretty
easy
copy
and
paste
job.
So
I'm
just
copying
this.
The
contents
of
this
file
out
of
the
cloud
environment
and
then
I'm
going
to
create
the
same
file
on
our
local
and
just
paste.
The
contents.
B
While
does
not
have
values
that
would
work
in
the
local
environment,
so
we're
going
to
regenerate
this
file
so
that
it
does
have
working
values
for
those
connections
to
services,
so
we're
actually
going
to
use
the
the
deployment
script
that
is
supplied
by
Magento.
Remember
earlier,
I
told
you
not
to
use
the
build
script,
but
the
second
half
of
other
deployment
is
the.
That
is
the
deployment
phase.
This
script
is
safe
to
run
on
your
local
and,
and
it
has
a
few
different
advantages.
B
It
does
a
few
different
things
that
you
would
ordinarily
have
to
do
manually
in
your
local
environment.
Here
it's
regenerating
the
env
dot
PHP
file.
So
it's
adding
the
the
appropriate
connection,
information
for
the
services
that
docker
has
created,
and
it
also
goes
into
your
database
and
it
replaces
the
base
URLs,
with
whatever
we
have
customized
and
at
the
end
there
it's
running
set
up
upgrade.
These
are
all
steps
that
you
would
have
to
do
manually
if
you
weren't
running
this
script,
so
I
find
this
script
is
very
convenient
to
run
during
it.
B
Okay,
so
we're
almost
done
with
setup
there.
There
are
a
few
more
commands
that
we
need
to
run.
We
do
need
to
switch
to
developer
mode
since
we
ran
the
basically
what
is
trying
to
emulate
the
cloud
deployment
phase.
All
of
our
cloud
environments
are
in
production
mode,
Magento
is
in
production
mode.
Since
we
are,
we
have
the
intent
of
doing
development
in
our
local
environments,
we're
going
to
want
to
switch
to
developer
mode,
so
there's
a
command
to
do
that.
B
There's
a
couple
of
commands
that
will
correctly
configure
varnish
cache
and
then
we're
going
to
need
to
re
index
elasticsearch
if
you're,
using
elasticsearch
on
your
project,
which
I
recommend
on
your
local
doctor,
created
an
elastic
search
container
that
is
totally
empty.
The
end
from
the
data
there
was
not
copied
from
the
cloud
environments
so
we're
just
gonna
we're
gonna
populate
the
elastic
search
container
with
data
by
reindex
een,
just
your
search
index,
the
other
indexes
are
in
the
database
and
they
were
pulled
down
from
the
cloud
environment
and
are
intact
in
the
local
environment.
B
So
we're
just
going
to
re
index
the
search
index
and
then
you're
also
going
to
want
to
not
forget
to
add
whatever
domain
name
you're
using
for
the
project
to
your
hosts
file.
I
won't
demonstrate
that
there's
plenty
of
other
documentation
on
how
to
do
that.
But
it's
a
good
thing
not
to
forget
at
this
point.
Sometimes
that
can
bite
you
if
you've
forgotten,
to
do
that.
Little
small
thing
so
just
to
demonstrate
what
that
looks
like
I've
copied
these
commands
from
the
documentation
the
setup
documentation
in
dev
Docs.
B
So
if
you
need
to
find
them
later,
they
are
in
the
documentation,
and
these
these
commands
are
kind
of
jumping
into
the
doctor
environments
and
running
one
command
and
then
jumping
back
out.
That's
why
the
output
output
is
kind
of
verbose
here
is
just
because
you're
jumping
in
and
out
of
the
containers
per
command.
B
And
now
they're
too
reindex
the
search
index,
we're
actually
going
to
use
a
bin
dr.
bash
command,
which
which
will
log
us
into
the
cloud
doctor
environment.
Now
from
here
we
can
just
issue
bin
Magento
CLI
commands
as
normal,
just
pre
indexing
and
clearing
the
cache
whatever
you
need
to
do
that,
then.
Dr.
bash
command,
just
kind
of
puts
you
in
into
the
doctor
environment
and
you
can
use
commands
you're
familiar
with
so.
B
A
A
Did
you
already
answer
all
the
questions?
Yeah
yeah
I'm,
just
fine
I'm,
just
wondering
you
know
if
if,
if
guys
are
looking
for
something
else
on
top
of
that,
you
know
discuss,
for
example,
how
how
to
run
multiple
projects,
even
though
you
cover
that.
But
it's
probably
you
know
the
important
thing
at
cetera.
So,
as
do
you
have
any
any
other
questions,
yeah.
B
B
I,
let's
see
I
think
I
mean
the
presentation
itself
is
being
recorded
and
I
could
figure
out
somewhere
to
put
the
slides
as
well.
Okay,.
B
So,
just
a
short
little
last
section
here,
so
how
will
this
environment
wiii
be
maintained
in
an
ongoing
basis?
So
for
you
know,
if
you
finish
up
your
development
tasks
and
you've
got
you
know
three
more
you're
gonna
have
to
work
on
this
project
for
four
weeks
months
or
years
bubble.
Maintenance
of
this
development
environment.
Look
like
the
good
news
is
most
of
what
we've
already
done,
won't
have
to
be
repeated.
All
of
those
commands
only
need
to
be
run
during
initial
setup.
B
What
you
will
want
to
do
is
just
kind
of
start
up
and
and
shut
down
the
environment
daily
or,
if
you're,
switching
between
different
projects
that
have
docker
environments,
you're,
probably
going
to
need
to
shut
down
the
the
the
docker
environment
in
order
to
switch
to
another
project.
So
to
do
that,
you're
going
to
want
to
use
the
start
and
stop
and
dr.
start
then
docker
stop
commands
you're
gonna.
There
are
also,
then
dr.
up
and
been
docker
down,
but
these
both
completely
destroy
any
existing
environments.
B
So
you
are
going
to
have
data
loss
using
up
and
down
your
database
is
going
to
be
deleted.
Basically,
actually
I
don't
think
it's
deleted,
but
it's
it's
dissociated
with
the
the
container.
So
it's
going
to
be
unless
you're
a
pro
Abbe
docker,
you
probably
aren't
going
to
be
able
to
get
the
database
back
so
so
make
sure
you're
not
using
up
and
down
unless
you
intend
to
completely
destroy
that
environment.
B
Most
people
I
know
that
are
doing
development
want
they're
kind
of
want
their
database
to
persist
from
day
to
day
from
task
to
task.
So
in
order
to
get
that
persistence
of
your
data,
you
start
and
stop
and
then
also
remember
that
whenever
you're
starting
up
your
doctor
environment,
you
also
have
to
start
that
file
sync
as
a
separate
process,
so
remember
to
run
that
mutagen
command
every
day.
When
you
start
work
as
well.
B
You
don't
have
to
remember
any
funny
aliases
you
just
go
in
there
and
use
bin
slash
Magento
to
clear
caches
reindex,
whatever
you
need
to
do,
and
then
the
other
recommendation
that
I
would
make
is
just
to
become
familiar
with
all
the
bin
docker
CLI
commands
so
just
to
review
those
you
and
just
go
into
the
bin
folder
and
then
open
up
the
the
docker
script.
And
it's
pretty
easy
to
understand.
B
What's
there
you
can
see
all
the
the
convenient
aliases
that
Magento
has
provided
and
kind
of
see
how
Magento
intends
for
you
to
interact
with
the
the
docker
environment,
and
then
you
can
also
see
kind
of
what's
going
on
under
the
hood
when
you're
using
those
those
CLI
commands,
so
that
can
kind
of
illuminate
how
the
doctor
environment
is
working.
So
this
is
something
I
check.
Every
time,
I
get
a
new
version
of
the
docker
implementation.
I
check
here
to
see
what
updates
have
happened
here.
A
A
Thanks
for
you
know,
sharing
your
experience
and,
at
the
end
of
the
presentation,
actually
wanted
to
make
few
more
announcements.
So,
as
you
know,
we
have
all
this
gold
open
source.
All
the
docker
specific
part
of
code
is
hosted
in
the
magenta
cloud.
The
repository
so
feel
free
to
browse
it
and
look
essentially.
What's
there,
we
have
I,
guess
17,
open
issues
right
now,
and
many
community
members
are
were
deeply
involved
in
to
development
of
it.
A
Essentially,
so
even
like
some
features
you
were
asking
about
in
chat
are
already
in
progress
because
we're
pretty
much
try
to
drive
this
project
as
a
community
driven
project
so
essential
in
whatever
the
needs
are
on
the
partner
sites,
we're
trying
to
get
the
things
ready
so
that
we
can
make
the
experience
seamless
for
everyone
and
the
final
thing.
I
guess
we're
planning
to
you
to
drop
the
release
for
residuals
were
soon
so
actually
look
at
the
release
notes
from
time
to
time
and
we'll
also
do
an
announcement
in
select
channels
once
once.