►
From YouTube: Security Policies: Automatic Demo Environment
Description
This video presents our script's initial phase to prepare an automatic demo environment: https://gitlab.com/gitlab-org/govern/security-policies/projects/automatic-demo-environment.
A
Hello:
everyone,
my
name,
is
Alan
krishowsky,
I'm
engineering
manager
for
security
policies,
team
at
gitlab,
and
today,
I
would
like
to
quickly
show
you
our
script
to
prepare
demo
environment
and
testing
environments
automatically.
So
we
have
prepared
a
project
called
automatic
demo
environment
where
we
try
to
create
a
script
that
would
allow
us
to
automatically
create
group
projects
with
enabled
security
policies
and
with
some
merge
requests.
We
did
that
because
we
would
like
to
speed
up
a
little
bit
our
verification.
We
would
like
to
help
with
writing
end-to-end
test
for
it.
A
So
we'd
like
to
have
a
one
place
that
we
could
quickly
create
demo
environment
for
either
demo
purposes
or
testing
purposes.
We
would
like
it
to
be
consistent
across
our
group
to
speed
up
the
verification
process.
This
is
the
mainly
thing
that
we
would
like
to
achieve.
That's
why
we
have
created
this
project
and
in
this
project
we
have
really
small
script,
which
we
are
using
lead
to
to
read
and
create
groups,
project
policies
using
gitlab,
CLI
and
other
apis
as
well.
So,
first
of
all
in
the
readme
file,
you
can
find
some
information.
A
What
what
you
can
do
with
that?
So,
first
of
all,
you
need
parent
group
ID,
and
this
is
the
group
ID
that
you'd
like
to
to
create
groups
in.
So
let
let
me
go
to
our
group.
I'm
gonna,
I'm
gonna
use
one
of
the
group
that
we
already
have
here.
So
let
it
be
this
one
I'm
gonna
just
go
and
gonna
grab
this
group
ID
and
I'll
go
to
code
and
I'm
gonna
here,
okay,
so
this
is
the
same
one
so
I'll.
What
I
would
like
to
do
here?
A
I
would
like
to
create
a
group
called
group
demo,
one
two,
three
I'm
I,
don't
want
to
delete
it
after
you
create
it.
You
can
rerun
the
script
and
change
the
delete
to
true,
and
this
will
delete
the
group
for
you.
So
it's
great
if
you'd
like
to
quickly
spin
up
the
environment
test,
something
and
just
delete
it
and
clean
it.
A
I'm
gonna
use
a
path
called
like
group
demo,
one
two
three
I
can
set
users
maintainers,
for
example,
I
can
specify
that
I
would
like
to
add
this
user
as
a
maintainer,
this
user,
with
this
ID.
If
you're
curious
about
your
ID
or
the
ID
of
the
user,
you'd
like
to
I'll
get
some
information
from
you
can
find
the
user
ID
here
in
the
gitlab
profile.
A
Okay,
within
this
group,
I'm
going
to
create
a
project
called
test
project
and
this
test
project
will
be
an
empty
project
and
I'm
gonna
have
merch
request
created
here
with
the
branch
called
update,
trig
me
and
that
will
contain
only
changes
made
the
readme
file
and
we're
going
to
update
the
readme
file.
This
will
be
the
title
of
the
comment
and
this
will
be
the
content.
So
after
we
create
the
Mr,
we're
gonna
change
the
the
content
of
the
readme
file,
then
we're
going
to
have
another
project.
A
It
will
be
called
embroider
project
because
you
can
also
specify
the
import
URL,
and
this
way
you
can
use
the
project
already
have
you
can
use
it
as
some
kind
of
template
for
you
and
and
your
demo
environment
as
well.
So,
instead
of
creating
everything
from
scratch,
you
can
just
import
it
by
by
specifying
the
import,
URL
and
then
I'm
gonna
create
some
policies
so
for
the
first
project,
I'm
going
to
use
the
first,
the
policy
with
id001,
as
you
can
see
in
the
in
the
policies
folder,
you
can
find
this
policy.
A
This
will
be
very
simple
policy
to
enforce,
can
execution
policy
and,
and
second
one
is
for
zest
the
the
way
it
works.
A
You
can
either
specify
the
ID
and
you
can
add
more
policies
or
you
can
specify
the
URL
with
the
policy
ammo
file
from
the
project
that
you're
already
using
and
you
have
access
to
and
then
as
well.
I
would
like
to
create
a
merge
request
here
with
some
content
and
instead
of
like
providing
the
content
as
a
text,
you
can
also
specify
the
content
URL,
and
this
way
you
will
be
able
actually
to
create
the
some
changes
to
the
readme
file
by
using
external
file
as
well.
A
Okay,
the
main
question
is
how
to
run
it,
the
to
run
it.
First
of
all,
you
need
to
asset
specified
in
a
readme
file.
You
need
to
have
Ruby
installed,
you
have
to
have
a
configured
gitlab,
CLI
and
authenticated,
and
and
then
you
need
to
prepare
the
configuration
yaml
file-
and
this
is
what
we
have
here.
So
I'm
gonna
just
jump
into
item
and
I'm
going
to
just
run,
Ruby
automation,
RP
and
what
it
will
do.
People
say
a
few
things
you'll
see
in
the
logs
with
what's
actually
happening.
A
So
you
see
that
we
created
a
group
we're
adding
a
member.
Sometimes
when
member
is
not
able
to
be
added,
because
there
is
already
of
the
project,
it
will
say
failed,
although,
like
the
that
means
that
user
is
still
in
the
project,
but
you
see
like
next
steps
are,
are
working
properly,
so
we
are
creating
new
merch
requests,
creating
project
and
and
parent
group,
and
so
on.
A
So
I'm
gonna
go
to
to
gitlab
right
now
and
I'm
gonna
see
if,
if
this
new
group
is
being
created
with
this
project,
okay,
here
we
have
it
so
group
demo,
one
two:
three:
we
have
already
some
projects.
Let's
take
a
look
at
the
first
project
test
project.
As
you
can
see,
we
already
have
the
merch
request
here
you
can
jump
and
you
can
see
that
merge
request
is
there
and
that
we
actually
made
the
change
that
we
wanted
so
I
can
I
can
now
go
back
to
our
group
demo.
A
Okay,
here
we
are
and
we
have
a
pipeline
that
is
currently
running,
and
you
have
some
small
changes
that
we've
made
just
to
just
to
show
it.
As
you
can
see,
just
all
right,
you
can
play
with
it.
We
would
like
to
extend
it
in
the
future
to
allow
for
more
possibilities,
but
if
you'd
like
to
use
it
feel
free,
go
to
gitlab,
org,
govern
security
policies,
project
and
this
automatic
demo
environment
and
you
can
see
how
it
works.