blob: 8bd7847d36c6a0a99d55da93cdf6566b65c78940 [file] [log] [blame]
John DeNisco06dcd452018-07-26 12:45:10 -04001.. _settingENV:
2
3.. toctree::
4
5
6Setting your ENV Variables
7==========================
8
9
10The :ref:`vppVagrantfile` used in the VPP repo sets the configuration options based on your ENV (environment) variables, or to default the configuration at specified values if your ENV variables are not initialized (if you did not run the *env.sh* script found below).
11
12This is the *env.sh* script found in *vpp/extras/vagrant*. When run, the script sets ENV variables using the **export** command.
13
14.. code-block:: bash
15
16 export VPP_VAGRANT_DISTRO="ubuntu1604"
17 export VPP_VAGRANT_NICS=2
18 export VPP_VAGRANT_VMCPU=4
19 export VPP_VAGRANT_VMRAM=4096
20
21In the :ref:`vppVagrantfile`, you can see these same ENV variables used (discussed on the next page).
22
23Adding your own ENV variables is easy. For example, if you wanted to setup proxies for your VM, you would add to this file the **export** commands found in the :ref:`building VPP commands section <building>`. Note that this only works if the ENV variable is defined in the :ref:`vppVagrantfile`.
24
25Once you're finished with *env.sh* script, and you are in the directory containing *env.sh*, run the script to set the ENV variables with:
26
John DeNiscoa14c1662018-08-01 10:38:23 -040027.. code-block:: shell
John DeNisco06dcd452018-07-26 12:45:10 -040028
29 $ source ./env.sh