►
From YouTube: OpenShift Demo Part 10: Blue Green Deployments
Description
In this video, Veer Muchandi demos how to mange blue-green deployments on OpenShift 3.
NOTE: For the latest information on OpenShift 3, please visit https://enterprise.openshift.com or subscribe to the OpenShift Blog (https://blog.openshift.com).
A
In
this
video
we'll
talk
about
how
to
do
Bluegreen
deployments
using
the
openshift,
but
before
getting
into
an
example
of
doing
Bluegreen
deployments.
Let
us
first
understand
what
Bluegreen
deployments
actually
mean.
One
of
the
challenges
that
we
have
in
general
is
being
able
to
switch
over
from
a
current
version
of
an
application
to
a
new
version,
pretty
quickly
with
minimal
downtime,
and
there
have
been
patterns
that
have
come
up
on
how
to
do
that
by
minimizing.
The
downtime
and
Bluegreen
deployments
is
one
of
those
patterns.
A
Let's
take
an
example
of
a
change
made
to
this
application,
and
that
is
the
version
2
of
the
same
application,
and
we
will
treat
that
version.
2
as
a
green
deployment,
now
let's
say
this
green
deployment
is
set
up.
It
is
equivalent
to
the
production
setup
now
once
that,
once
that
green
deployment
is
ready,
what
we
would
do
is
switch
over
the
connection
from
the
router
to
the
green
version
of
the
application,
the
version
2
of
the
application
and,
at
the
same
time
remove
the
connection
to
the
version
1
of
the
application.
A
That's
called
blue
green
deployment.
It
happens
pretty
quickly
because
all
you
need
to
do
is
go
and
make
a
change
to
the
router
so
that
the
end
user
doesn't
see
any
downtime
they're,
just
seeing
a
sudden
switchover
of
the
of
the
traffic
being
routed
to
application
version.
2
now,
let's
say
you
switched
over
just
now,
and
you
figured
out
that
there
is
some
issue
and
you
have
to
roll
back
to
the
older
version
of
the
application.
That's
also
very
simple:
you
can
just
disconnect
the
green
version
and
switch
back
to
the
blue
version.
A
That's
the
blue
Glen
deployment,
so
you
have
two
similar
instances
of
your
production
application,
one
with
blue
version
version,
1
and
the
other
with
green
version,
and
you
can
switch
between
blue
and
green
whenever
you
want
now,
let
us
see
how
to
achieve
that
in
OpenShift
version.
3
now
I'm
logged
into
my
openshift
environment
and
I'm
in
the
project
creation
screen
I'm,
creating
a
new
project.
I'm
naming
my
project
as
blue,
green
and
I
just
gave
a
display
name
and
a
short
description
and
I'm
saying
create.
A
Now
this
will
create
a
new
project
with
the
name
Bluegreen.
Now,
once
the
project
is
created,
we
will
deploy
an
application
into
this
project.
I
have
an
example
of
a
simple
application
that
will.
This
is
a
PHP
app.
There
is
an
index
dot
PHP
page
all
it
does.
Is
it
paints
a
rectangle,
and
it
feels
that
rectangle
with
two
different
colors,
so
initially,
let's
say
I
would
want
to
paint
a
blue
rectangle
I'm
going
to
change
it
to
so
it's
going
to
paint
a
rectangle
and
fill
it
with
color
blue.
A
A
A
A
I'll
leave
the
rest
of
the
parameters,
as
these
and
then
say
create
now
this
initiates
the
next
two
I
build
process.
It
pulls
the
source
code
from
this
get
repository
and
the
build
process
will
also
pull
the
Builder
image,
the
PHP
builder
image,
and
it
will
layer
my
code
on
the
top
of
the
Builder
image
and
it
will
create
an
application
image
and
it
will
put
that
in
the
registry
and
then
deploy
it.
I'll
change
to
the
project
from
a
command
line.
I'll
use
the
blue
green
project
that
we
just
created
in
a
minute.
A
A
Openshift
has
pulled
my
source
code
and
it
pulled
the
PHP
application
image
and
it
created
an
application
image
based
you
using
my
code,
and
it
is
now
trying
to
push
the
application
image
into
the
registry.
This
will
take
a
minute,
and
now
the
image
is
successfully
pushed
you'll
see
that
open
ship
starts,
deploying
that
application
immediately
and
if
I
do
OC
get
force.
Now
there
is
a
blue
application
running.
We
did
not
create
a
route
for
this
application,
so
let
us
try
to
create
it
now.
Let's
first
look
at
the
service.
A
A
Now
the
reason
I
named
it
and
named
it
blue
green,
is
because
we
are
going
to
use
the
same
route
to
switch
between
blue
and
green.
Now.
This
blue,
green,
as
you
can
see,
is
the
new
route
that
got
created
and
it
is
pointing
to
the
service,
blue
and
this
service
is
front.
Ending
that
part
which
is
going
to
draw
a
blue
box
right.
That's
the
version
one
of
our
application.
So
now
that
is
there
let's
go
and
check.
A
You
can
see
that
as
soon
as
we
added
that
route,
that
route
is
visible
here
on
that
on
this
open
shift
console.
So
let's
try
to
invoke
this
application
all
or
new
tab.
So
this,
as
you
can
see,
this
image
is
actually
creating
a
pea
in
PNG.
So
let
me
slash
PNG,
and
you
see
here
is
a
blue
box.
So
this
is
the
execution
of
that
core
that
that's
right
in
here,
so
it's
just
drawing
a
box
and
filling
it
with
blue
color.
A
Now,
let's
go
back
and
change
the
core
we
are
going
to
now
create
a
version
2
of
this
application
and
I'm
going
to
edit
this
core
I'll
comment
out
the
line
that
creates
a
blue
box
and
I'll
change
it
to
the
code
that
fills
this
rectangle
with
green
color
I'll
go
back
and
deploy
another
application.
So
let
me
I'm
not
overwriting
this
existing
application.
It
will
keep
running
it.
A
Select
this
image
do
the
same
thing
like
before
this
time:
I'm
going
to
call
this
green,
so
the
application
is
being
named
green
and
since
we
are
going
to
use
the
route
that
we
created
earlier,
I'm
not
going
to
add
a
route
for
this
app
and
I'll
leave
the
rest
of
the
stuff,
as
is
and
say,
create
now
just
like
before.
This
will
take
a
minute
to
launch
this
application.
It
will
build
the
core
and
it
will
deploy
the
core.
A
A
The
green
pod
is
now
running
now.
If
you
look
at
the
image
here,
it
is
still
showing
the
blue
image
right.
That's
because
the
route
is
pointing
to
the
version
1
of
the
application.
Now,
let's
assume
that
this
version
2
has
been
tested
and
it's
ready
to
go
and
we
are
ready
to
switch
over
there
out
from
pointing
to
from
blue
to
green
right.
What
we'll
do
is
we'll
edit
the
route
we
look
at
the
list
of
routes.
A
A
And
I'll
go
down
to
the
spec
part
of
it
and
I'll
say
this:
this
pic
is
saying
that
this
host
name
blue
green
dot,
test
v3,
dot,
OS
icloud.com,
is
pointing
to
a
service
whose
name
is
blue.
Now,
I'll
change
this
to
green
and
I'll,
save
and
exit,
and
that's
it.
You
can
see
right
behind
the
on
the
screen
that
the
the
URL,
the
name
given
to
this
the
the
route
got
transferred
from
blue
to
green
right.
Now,
let's
invoke
this
in
a
new
tab.
A
We
need
the
rectangle
thing
now.
If
I
refresh
it
it
it
it's
drawing
a
green
box
now
as
simple
as
that
so
with
when
I,
whenever,
when
I
wanted
to
switch
over
the
application
to
the
blue
from
blue
to
green,
all
I
have
all
I
needed
to
do
was
go
and
edit
the
route
point
it
from
blue
to
green
and
the
route
will
now
show
that
it
is
pointing
to
green.
Now.
Let's
say
there
is
something
wrong
with
this
green
deployment
and
people
don't
like
it.