WEBVTT
Kind: captions
Language: en

00:00:00.030 --> 00:00:05.009
Now that we have a template vagrant file
for our project we can go and customize

00:00:05.009 --> 00:00:08.849
this for the particular requirements
that we need for our development server

00:00:08.849 --> 00:00:15.030
I've created a predefined vagrant file
and linked it in the resources of the

00:00:15.030 --> 00:00:18.810
video so what we'll do is we'll copy
this into our vagrant file and then I'll

00:00:18.810 --> 00:00:24.000
talk you through all the changes line by
line okay so open up the vagrant file

00:00:24.000 --> 00:00:29.820
resource copy the contents head over to
atom and replace this entire vagrant

00:00:29.820 --> 00:00:34.720
file with our customized vagrant file
and then save it

00:00:34.720 --> 00:00:36.270
okay so we've kept the

00:00:36.270 --> 00:00:40.500
vagrant configuration block here which
is the standard configuration block

00:00:40.500 --> 00:00:45.899
that's required in all vagrant files and
we've also left the config dot VM dot

00:00:45.899 --> 00:00:50.560
box setting to Ubuntu slash Bionic64

00:00:50.560 --> 00:00:53.879
so
what I've done below this is pinned it

00:00:53.879 --> 00:00:58.949
to a specific version and this is just
to avoid any changes being made or any

00:00:58.949 --> 00:01:03.870
updates being made to this image
breaking the steps in this course I may

00:01:03.870 --> 00:01:08.220
modify this slightly in the future to
incorporate future updates after I've

00:01:08.220 --> 00:01:13.290
tested them so don't worry if this isn't
exactly the same as what it shows in the

00:01:13.290 --> 00:01:17.820
video here but just note that this is
pinned to a specific version so that it

00:01:17.820 --> 00:01:23.600
doesn't break if there's
modifications made to the base image

00:01:23.600 --> 00:01:29.579
okay now we have the config dof VM dot
network line and what this does is it

00:01:29.579 --> 00:01:35.790
Maps a port from our local machine to
the machine on our server so when we run

00:01:35.790 --> 00:01:41.100
our application we'll be running it on a
network port 8000 and we want to make

00:01:41.100 --> 00:01:47.070
this port accessible from our host
machine so the host machine is our

00:01:47.070 --> 00:01:51.149
laptop or whichever machine you're
running the development server on and

00:01:51.149 --> 00:01:56.430
the guest machine is the development
server itself by default ports are not

00:01:56.430 --> 00:02:00.659
automatically accessible on any guest
machine so you need to add this line to

00:02:00.659 --> 00:02:07.439
make them accessible so we can access
them by going localhost port 8000 and it

00:02:07.439 --> 00:02:15.080
will automatically map the connection to
our guest machine or development server

00:02:15.100 --> 00:02:20.810
okay now we have this provision block
here now this is how you can run scripts

00:02:20.810 --> 00:02:26.030
when you first create your server I've
added some commands to the script and

00:02:26.030 --> 00:02:30.770
the first one is to disable the auto
update which conflicts with this auto

00:02:30.770 --> 00:02:35.340
update when we first run it on Ubuntu

00:02:35.340 --> 00:02:37.700
I've then added this update line here

00:02:37.700 --> 00:02:42.230
which will update the local repository
with all of the available packages so

00:02:42.230 --> 00:02:48.620
that we can install Python 3 virtual env
and zip so we're going to be using these

00:02:48.620 --> 00:02:52.550
two packages later on so Python 3
virtual env is a virtual environment

00:02:52.550 --> 00:02:58.130
which we'll use in a future video and
zip is the standard zip tool which we

00:02:58.130 --> 00:03:02.270
can use to create compressed zip files
which again we'll be using later on in

00:03:02.270 --> 00:03:04.640
this course

00:03:04.640 --> 00:03:08.480
then what I do here is I
create a bash aliases file and I

00:03:08.480 --> 00:03:14.750
basically set Python 3 to the default
Python version for our vagrant user now

00:03:14.750 --> 00:03:18.350
this just means that every time you run
Python it will automatically use Python

00:03:18.350 --> 00:03:23.300
3 instead of the default Python 2.7 and
since we're using Python 3 in this

00:03:23.300 --> 00:03:27.500
course this just makes it handy because
it means you don't need to type Python 3

00:03:27.500 --> 00:03:31.020
manually every time you run a command

00:03:31.020 --> 00:03:33.110
okay so that's the vagrant file that we

00:03:33.110 --> 00:03:37.150
need for our development server

