►
Description
In this video, Veer Muchandi explains how you can run different parts of your OpenShift projects in different components of your existing infrastructure.
NOTE: For the latest information on OpenShift 3.1, please visit https://enterprise.openshift.com or subscribe to the OpenShift Blog (https://blog.openshift.com).
A
Hello,
everyone
often
you
end
up
in
situations
where
you
want
to
deploy
your
applications
and
you
want
those
applications
to
run
on
specific
nodes
or
specific
parts
of
infrastructure.
Or
maybe
you
have
your
application
made
up
of
multiple
components
and,
for
example,
you
may
want
your
front-end
to
run
on
specific
infrastructure,
your
database
to
run
on
some
other
part
of
the
infrastructure.
So
you
want
your
application
components
to
run
on
different
parts
right.
A
A
There
is
one
node,
which
is
an
infrastructure,
node
and
I
labeled
it
as
in
front,
but
there
are
four
nodes
that
I
want
to
use
to
deploy
applications,
and
if
you
look
at
the
labels,
there
are
two
nodes
in
the
Reid
that
I
have
categorized
as
region
equal
to
secondary
and
region
equal
to
primary,
so
node,
1
and
node
2
are
secondary.
We
are
in
the
secondary
region,
node,
3
and
node.
4
are
at
the
primary
region.
A
Now
these
labels,
regions
and
zones
are
are
just
the
names
that
we
use
because
they
come
as
setup
by
default,
but
you
can
choose
to
use
whatever
nativeness
you
want,
and
the
policies
that
based
on
which
the
scheduler
makes
a
decision
on
where
to
deploy
your
application
component
depends
on
these
limits.
Now,
as
a
first
example,
let's
look
at
how
the
openshift
behaves
by
default
and
how
we
can
configure
that
default
behavior
for
the
scheduler
to
make
a
selection
of
where
to
place
your
applications
right.
A
So
for
that
in
the
open
ships
master
configuration
file,
you
can
set
up
a
default
load,
selector
right
and
in
in
my
case,
I
set
it
as
a
region
equal
to
primary,
which
makes
sure
that
if
I
don't
provide
any
values
on
or
if
I
don't
provide
any
configuration.
While
deploying
my
application
on
way
to
place
my
Asian
parts,
those
application
parts
will
land
up
in
region
equal
to
primary.
So
the
opens
shift
administrator
in
my
case
has
has
set
up
the
default
node
selector
in
the
configuration
file
as
region
equal
to
primary.
A
If
I
don't
provide
any
other
selection,
my
application
parts
will
land
on
the
nodes
that
are
labeled
as
region
equal
to
primer.
Let's
verify
that
by
deploying
an
application
and
create
a
new
project
and
I'll
deploy
an
application
with
a
simple
app
and
just
deploy
water
is
the
default.
Let's
see
where
it
lands
up,
it
takes
a
moment
to
build
and
apply.
A
The
application
is
now
running
a
new
bodies
up
let
the
pod
is
on
node
3,
which
is
in
the
region
primary.
So
by
default
the
pod
land
up
in
the
read
on
on
one
of
the
nodes,
which
is
node
3,
which
is
in
the
region
primary
right.
Let
us
try
to
scale
up
right
and
scale
to
two
parts.
Now,
if
you
look
at
where
the
second
part
is
getting
spun
up,
the
second
part
is
on
node
4.
So
again,
node
3
and
node
4
are
both
in
the
region
primary.
If
I
scale
up
further.
A
All
the
parts
that
are
that
get
added
will
be
either
on
node,
3
or
node
4.
So
let
me
go
to
a
different
view,
so
these
are
all
parts.
Every
part
is
either
on
note
for
our
node
4
node
3
node
3,
not
4,
not
3
right,
so
they
are
all
lining
up
in
region
which
is
labeled
as
primary
now
clean
up
this
project
and
we'll
see
how
we
can
change
this
project
configuration
in
such
a
way
that
any
thoughts
that
are
created
in
this
project
will
land
up
in
regions
secondary
in
sort
of
primary.
A
A
So
everything
lands
in
the
secondary
region.
If
I
try
to
add
another
application
component,
let's
say:
I
had
a
my
simple
database
here:
I
have
a
second
application
component.
That's
starting
up-
and
here
in
this
part,
is
on
node
1,
which
means
it
is
in
the
same
secondary
region.
So
now
we
have
the
default
as
region
primary
and
we
have
forced
the
namespace
with
an
annotation
of
where
we
said
no
selector
region
equal
to
secondary
and
all
the
parts,
in
spite
of
the
default
being
Road
region
equal
to
primary.
A
They
are
planning
upon
in
the
secondary
region
on
one
of
these
nodes.
Right
now
note
that
the
default
node
selector
configuration
for
openshift,
as
well
as
the
node
selector
configuration
for
individual
projects,
is
done
by
the
overshift
administrator.
The
administrator
defines
where
parts
created
for
any
project
should
done
now.
Let
us
say
you
want
the
administrator
to
give
you
freedom
to
choose
between
primary
and
secondary,
as
and
as
a
developer.
You
want
to
choose
where
you
want
your
application
components
to
land
up
between
these
regions
right.
How
do
we
do
that?
That's
an
excuse
case.
A
So
as
an
administrator
will
go
and
edit
that
namespace
as
an
administrator
I
am
editing
this
namespace,
you
have
a
node
selector
value
as
as
black
empty
string.
Note
that
I
am
NOT
deleting
this
node
selector
configuration
if
I
delete
it,
the
default
would
apply.
I
don't
want
to
delete
it,
but
I
want
the
users
of
this
project
to
be
able
to
deploy
the
application
to
any
region
they
want.
So
I
am
just
making
it
black.
A
A
Since
we
don't
have
any
restriction
now
it
can
land
either
on
nodes
within
primary
region
or
secondary
region.
So
it
could
be
anywhere
right.
So
the
part
is
now
up.
Let's
see
where
it
is,
the
part
is
coming
up
and
it
it
would
come
up
on
node,
2
and
node
2
is
in
the
secondary
region
right
in,
in
spite
of
the
default
region,
beam
primary
since
the
node
selector
is
empty,
the
default
did
not
get
apply
and
the
pod
landed
up
in
node
in
the
region
secondary
is,
from
the
developers
point
of
view
right.
A
How
do
I
force
this
my
sequel,
part
to
land
in
the
primary
region?
There
are
a
couple
of
ways
to
handle
that.
Let
us
look
at
the
deployment
configuration
so
the
first
way
will
edit
the
date
that
long
and
configuration
for
my
sequel,
I
open
the
deployment
configuration
for
my
sequel
and
go
to
the
spec
under
the
template.
This
template
represents
how
the
pods
are.
Template
is
going
to
look
like
and
under
this
template,
where
you
see
spec
will
add
the
node
selector
here.
So
our
hard
landed
upon
secondaries.
A
So
we
will,
we
will
force
it
to
go
to
primary
and
I
just
made
this
change.
Now,
if
I
look
at
Cosi
get
heart
once
I
made
this
change,
a
new
deployment
would
have
started
immediately
right.
Its
deployed
is
running
now
and
you
can
see
that
the
part
the
old
pod
went
away
and
a
new,
my
sequel,
pod
is
getting
deployed
earlier.
One
was
over
h-dr,
the
new
part,
it's
my
sequel
to
G
71
Katie
right.
This
is
the
new
part.
That's
coming
up.
So,
let's
see
where
this
new
pod
will
add
up.
A
J71
Katie,
my
sequel,
to
write-
and
this
part
is
on
node
4
and
node.
4
is
in
the
region
primary
right.
So
we
just
by
changing
the
deployment
configuration
and
adding
a
node
selected
in
the
deployment
configuration.
We
moved.
The
part
that
was
running
that
landed
up
in
the
secondary
region
to
the
primary
region
and
making
the
reverse
change
will
again
move
the
part
from
primary
reason
to
secondary
reason.
So
it
can
land
on
any
of
these
nodes.
A
But
you
you
can
force
a
region
in
the
part
but
changing
the
deployment
configuration
so
as
a
developer.
This
is
a
third
way
of
doing
it.
You
have
control
on
where
you
want
your
parts
to
line
up.
No
the
next
example.
Another
scenario
right
I
have
multiple
application
components
in
my
application.
Maybe
I
have
I
want
my
database
to
land
on
a
different
set
of
nodes,
so
I
want
my
application
logic
components
to
run
on
a
different
set
of
nodes.
A
Let's
say
you
want
to
divide
it
that
way,
and
you
want
your
regions
where
your
database
runs
to
be
separate
from
the
region
where
your
application
logic
turns.
Let's
say
whatever
your
needs
are
right.
If
you
want
to
do
it
that
way.
Well,
what
else
are
the
possibilities?
I
mean?
Do
I
have
to
do
it
each
individual
component
by
changing
the
deployment
configuration
for
each
component
separately,
or
is
there
a
way
we
can
apply
all
these
node
selectors
across
different
components?
A
In
my
architecture
like
in
openshift,
we
have
templates
right
so
can
I
make
this
kind
of
a
change
in
a
template,
and
the
answer
is
yes.
So,
let's
look
at
an
example
of
same
kind
of
a
change
in
a
template.
I
clean
up
the
the
project
again,
so
we
will
copy
an
existing
template
and
edit
it.
So,
let's
look
at
what
in
place.
We
have
I'm
interested
in
a
template
that
has
multiple
components.
So
let's
pick
up
this
one
CakePHP
my
sequel
example:
now
we
will
get
hold
of
this
template.
A
I
am
searching
for
all
the
templates
in
in
the
openshift
project.
Remember
all
the
templates
are
stored
in
the
OpenShift
product
and
I'm
trying
to
find
that
specific
template
of
my
interest
rates
starts.
The
name
starts
with
CakePHP,
so
I'm.
Looking
at
this
cake
PHP
my
sequel
example,
this
has
both
PHP
and
my
sequel
to
it
applies
to
components
so
we'll
pick
up
this
template
I
want
to
get
this
output
of
this
template
as
a
JSON
file,
and
let
me
save
that
file
at
so
now.
A
I
have
my
template
copied
in
copy
locally
into
this
file.
Let
me
open
this
file
in
an
editor,
and
so
we
are
looking
for
this
template
and
this
template
has
a
spec
there.
It
deploys
two
different
kinds
of
containers:
one
is
at
PHP
and
the
other
is
my
sequel.
I'll
add
node
selectors.
We
want
to
deploy
the
PHP
part
of
the
application
in
the
secondary
region.
Again,
I
am
looking
for
a
template
for
the
database
and
for
the
database
part
I
want
my
database
to
be
deployed
in
the
primary
region.
A
I
also
won't
change
the
metadata
of
my
template
so
that
I
give
it
a
different
name
and
I'll
also
make
another
change
to
I'll,
be
using
this
template
in
my
local
project,
so
I'm
also
changing
the
namespace
to
deploy
this
template
into
the
new
project.
Namespace,
so
I
mean
totally
fortunate.
So
this
template
one
I
change
the
name
of
the
template.
I
change,
the
namespace
in
which
this
template
is
going
to
be
used.
A
I
have
made
a
change
to
the
deployment
configuration
part
of
the
PHP
part
to
get
deployed
into
the
secondary
region
and
I
made
it
change.
The
deployment
configuration
part
of
the
my
sequel
part
to
deploy
into
the
and
then
I
will
create
a
template
in
my
project.
So
all
I'm
saying
here
is
process
this
years
on
file,
which
has
the
specifications
for
the
template
which
will
end
up
creating
this
template
in
my
project.
So
this
template
is
now
created.
A
So
if
I
say
under
this
project,
it
shows
the
new
template
that
I
just
added.
Now,
let's
go
back
to
the
project
and
we'll
this
is
the
template
that
we
just
added
we'll
use
this
template
to
deploy
our
application,
and
this
template
deploys
a
PHP
component
as
well
as
a
my
sequel,
just
go
ahead
and
say:
create
it's
trying
to
deploy
both
the
components
the
my
sequel
is
already
deployed.
Let
us
see
where
this
pod
is
running.
A
This
pod
is
being
spun
upon
or
three
it's
running,
on,
node
3
now,
node
3
is
in
the
primary
region.
That's
where
we
wanted
ours,
my
sequel
to
get
applause,
and
we
wanted
the
PHP
part
to
be
deployed
in
the
second
region,
which
is
one
of
the
node
one,
and
not
to
the
PHP.
Application
is
being
built,
it'll
take
a
couple
of
minutes
for
it
to
get
deployed
and
the
PHP
part
is
now
running
in
on
o2,
which
is
in
the
secondary
region.
A
This
is
an
example
of
how
you
can
change
the
templates
to
add
more
selectors,
so
that
when
you
have
a
configuration,
you
can
direct
the
individual
application
component
parts,
the
parts
of
the
application
to
go
to
different
regions.
If
you
want
it
to
write
our
different
set
of
nodes,
if
you
want
it.
So
to
summarize,
we
discussed
different
ways
of
deploying
the
applications
to
the
nodes
of
our
choice.
A
First
week
about
how
the
default
works
for
the
entire
environment,
the
administrator
could
set
up
a
default
node
selector
in
the
project
configuration
of
the
master
config
file,
which
will
make
sure
that
any
project
that
gets
created
gets
into
that
default.
Node
selector
that
is
defined
here,
if
no
other
values
are
used
by
the
user.
Second,
we
talked
about
how
you
can
define
those
the
node
selectors
of
the
project
level,
where
any
components
that,
within
that
project
would
go
into
whatever
labels
are
given
the
north's
letter.
A
Fourth,
we
we
also
talked
about
complex
situations
where
you
have
a
bunch
of
components
getting
across
the
weather,
using
a
template
where
you
can
go
and
edit
the
deployment
configurations
within
the
template,
so
that,
when
the
individual
components
cut
spanner,
they
go
into
the
specific
regions
of
your
choice,
so
different
ways
to
solve
the
problem
there
are,
and
each
one
has
its
own
value,
so
use
whatever
makes
sense
for
your
situation.
Thanks
a
lot
for
watching
this
video.