00:00:14.920
uh
00:00:23.760
and we're going to talk about
00:00:24.720
development environment setup with
00:00:26.240
vagrant
00:00:27.359
so let me give you an example from my
00:00:29.279
own experience
00:00:30.480
some months back i was working on a
00:00:32.480
large scale application in a
00:00:33.920
as part of a very big team and we faced
00:00:36.960
three issues predominantly
00:00:38.559
number one what worked on my computer
00:00:40.399
didn't work on my friend's computer
00:00:42.079
and number two the qa qa's always
00:00:43.440
complained that we were giving them
00:00:44.719
broken code
00:00:45.600
and number three the project manager
00:00:47.120
started losing trust in us
00:00:49.039
why was this happening the project was
00:00:51.120
very big which means we had a lot of
00:00:52.879
external dependencies
00:00:54.800
lot of dependencies means a lot of
00:00:56.559
versions which means the permutation and
00:00:58.559
combinations of these versions and
00:01:00.239
these dependencies means potentially
00:01:02.399
every every developer can have their own
00:01:04.559
unique development environments
00:01:06.320
for example someone used apache someone
00:01:08.159
use nginx i'm sure you get the picture
00:01:11.200
so what we wanted was one development
00:01:13.680
environment
00:01:14.479
which can be repeatable and shareable
00:01:16.479
across all developers in the team
00:01:18.240
so what did we do we used vagrant i'm
00:01:20.799
guessing
00:01:21.280
most of you would have already heard of
00:01:22.720
vagrant but still
00:01:25.280
vagrant is a software which is written
00:01:27.280
in ruby it's open source software
00:01:29.439
it can be used to run on it can be used
00:01:32.240
on a
00:01:32.640
virtual machine like vmware virtualbox
00:01:34.799
or amazon ec2
00:01:36.799
so what we can do is use a tool like
00:01:39.600
puppet
00:01:40.079
chef or um or ansible
00:01:43.360
to actually provision our our code on
00:01:46.240
these machines
00:01:47.119
so shui will actually explain and show
00:01:49.119
us a demo
00:01:51.520
okay let me show you how we can use
00:01:54.079
background to set up our machine to have
00:01:56.240
a development environment
00:01:57.920
to use vagrant basically we need
00:02:00.479
background and virtualbox to be
00:02:01.840
installed in our machine
00:02:02.960
and then we just need to import the
00:02:04.479
basebox and then round background
00:02:06.320
we will have a virtualbox running our
00:02:08.239
machine but in order to
00:02:10.160
have an environment for project
00:02:11.760
development we still need to
00:02:13.680
write our own configurations so that we
00:02:15.760
are able to have a customized box for
00:02:18.080
the development
00:02:19.120
so here is a project and the
00:02:21.920
configuration i'm using
00:02:23.920
for for this purpose
00:02:32.959
and here here
00:02:36.000
is a background file i write for for
00:02:39.120
project for rupee development in this
00:02:41.680
file i'm using a purpose uh um
00:02:44.879
i'm using a prefetch box as a base box
00:02:48.400
and
00:02:48.720
forwarding port 3000 and also i'm
00:02:52.000
using i'm supporting a file
00:02:54.959
synchronization
00:02:56.720
but this is not enough we still need to
00:02:58.640
automate the process of
00:02:59.840
installing different tools like rbm and
00:03:02.480
ruby
00:03:03.440
so i'm also i'm using some provisioners
00:03:08.319
that we're gonna supporting vagrant
00:03:10.239
supporting multiple provisioners for
00:03:11.920
example the chest party and also
00:03:14.239
docker and here i'm using purple modules
00:03:16.959
to install them
00:03:20.480
and here here is the purple purple
00:03:23.120
script i write
00:03:24.319
in this script i'm installing rvm ruby
00:03:27.440
rails and
00:03:28.239
other installations automatically so
00:03:30.480
after i get all this
00:03:32.480
configuration ready i'm able to have my
00:03:34.720
virtualbox running in my machine
00:03:37.920
and this one i already have a box
00:03:40.879
running here
00:03:58.840
uh
00:04:12.000
yeah here is my box running here i
00:04:15.120
already have a box running
00:04:17.600
and also i already checked on my sample
00:04:20.320
project inside my
00:04:21.919
inside my folder and this one is a ruby
00:04:25.199
project
00:04:25.919
so now i can access it into my box
00:04:32.000
as i mentioned before my box is
00:04:33.600
supporting file synchronization
00:04:35.440
this means i am able to have my project
00:04:38.320
running
00:04:39.199
project i am able to modify my project
00:04:41.680
inside my box
00:04:43.120
inside my local machine and then i'm
00:04:44.880
able to run it within the box
00:04:47.120
so now i can easily access the same file
00:04:50.240
as what i can see in my local machine
00:04:52.880
and here is my gross project and then
00:04:56.720
start running the server
00:05:03.199
and now i can see it
00:05:08.639
yeah it works
00:05:14.320
so now i already i think you already
00:05:16.720
have an idea how background can help us
00:05:18.800
to
00:05:19.440
bend and help can simplify the process
00:05:22.320
of
00:05:22.560
other installations firstly we only need
00:05:26.320
to have
00:05:27.360
a configuration file so that background
00:05:29.440
can help us to do all the installation
00:05:31.440
automatically and this configuration
00:05:33.840
file is able to be shared among the team
00:05:36.000
so that all the team members can have
00:05:37.759
the same settings
00:05:39.199
and also it doesn't require much
00:05:41.199
technical knowledge
00:05:42.639
so all the team members including people
00:05:45.600
like testers
00:05:46.560
and tester designers and project owners
00:05:49.440
are able to have
00:05:50.240
their box running and can see their
00:05:53.120
project
00:05:54.000
locally and what's more a for background
00:05:57.759
we know it's written in ruby
00:05:59.520
so it can be quite flexible we can
00:06:01.680
always write our own ruby gems and use
00:06:03.840
them as plugins for vagrant
00:06:07.039
so i i think i think after you start
00:06:10.560
using it
00:06:11.199
you will explore more benefit italy
00:06:15.759
thank you if you want to see our sample
00:06:17.759
app or the code that we have written you
00:06:19.280
can find it over here and if you have
00:06:20.720
any
00:06:21.120
questions suggestions or feedback please
00:06:22.880
feel feel free to write us on those
00:06:24.639
email ids thank you
00:06:52.080
you