Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

gdp / README-server-install.md @ master

History | View | Annotate | Download (4.27 KB)

1 7f982ac3 Eric Allman
% Installing a Global Dataplane Server From Source Code
2 ebd10406 Eric Allman
3
These instructions are relevant *only* if you are installing the
4
server code from the source tree.  If you have installed the
5
server code from a package, or if it is already installed, read
6
the document `doc/gdp-server-admin.md`.
7
8 632861ce Eric Allman
Generally speaking, we are moving toward distributions using Docker
9
images (first choice) and Debian packages.  Installations from
10
source should only be used if you are collaborating with us on the
11
base system.
12
13 ebd10406 Eric Allman
These steps assume you are building and installing the code from the
14
source tree.  If you are using a Debian package, see the instructions
15
with it and skip to the next section.
16
17
Installing Step by Step
18 7f982ac3 Eric Allman
=======================
19 ebd10406 Eric Allman
20
  * Run the script `adm/gdp-setup.sh` to set up your system
21
    so that the source code can be compilied.  In particular,
22
	this installs all the third party packages you should need.
23
  * Create `/usr/local/etc/gdp.conf.sh` or `/etc/gdp.conf.sh`
24
    if you want to override any of the defaults.
25
  * Run the script `adm/init-gdp-server.sh` from the root of
26
    the GDP source tree.  This creates the `gdp` user, creates
27
	the system directories, etc.  Note that this has certain
28
	dependencies on Berkeley.  See below for details.
29
  * Compile the source tree using `make` from the source root.
30
    Details can be found in `README-compiling.md`.
31
  * Install the header files, libraries, and binaries using
32
    `make install`.  You will probably need to be root for
33
	this to work.  If you changed the setting for `GDP_ROOT`
34
	in `gdp.conf.sh` you will also have to set `LOCAL_ROOT`
35
	on the command line, e.g., if you have set `GDP_ROOT` to
36
	/usr/local/gdp, use:
37
38
		make install LOCAL_ROOT=/usr/local/gdp
39
40
Details
41 7f982ac3 Eric Allman
=======
42 ebd10406 Eric Allman
43 7f982ac3 Eric Allman
## Changing Defaults
44 ebd10406 Eric Allman
45
If you want to change defaults, create `/usr/local/etc/gdp.conf.sh`
46
or `/etc/gdp.conf.sh`.  This is read as a shell file, and should
47
consist of NAME=value definitions.  There are several parameters
48 632861ce Eric Allman
that can be changed, the most useful of which is `GDP_ROOT`.
49 ebd10406 Eric Allman
50
There are three cases for `GDP_ROOT`:
51
52
  * `GDP_ROOT` = `/usr` means that everything will be installed
53 0dc3d148 Eric Allman
    in the "normal" system directories: `/usr/bin`, `/usr/sbin`,
54 9e62cb26 Eric Allman
    `/var/log`, and `/etc/gdp`.  Note that files in `/etc` are in
55
    a subdirectory.  This is the default.
56
  * `GDP_ROOT` = `/usr/local` or `/opt/local` means that everything
57
    will be installed in subdirectories of `GDP_ROOT` with the
58
    exception of configuration files, which will be stored in
59
    `GDP_ROOT/etc/gdp`.
60 ebd10406 Eric Allman
  * Otherwise everything is installed in subdirectories of
61
    the indicated directory.  For example, if `GDP_ROOT` is
62 9e62cb26 Eric Allman
    `/home/gdp` then all installation will go into that
63
    directory instead of the system directories, i.e.,
64
    `/home/gdp/bin`, `/home/gdp/etc`, etc.
65 ebd10406 Eric Allman
66 0dc3d148 Eric Allman
Other locations can be set explicitly (rather that deriving from
67
`GDP_ROOT`):
68
69
  * `GDP_ETC`: the location for configuration files.
70
  * `GDP_LOG_DIR`: where system logs are stored.
71
72 7f982ac3 Eric Allman
## Initializing the Server
73 ebd10406 Eric Allman
74
The script `adm/init-gdp-server.sh` should do most of the steps
75
necessary for initializing a server.  This:
76
77
  * Creates a user and group named `gdp:gdp` if it doesn not exist.
78
  * Creates directories needed by the GDP.  See below for details.
79
  * Creates initial parameter files.
80
81
This script does have some Berkeley dependencies that may require
82
editing some files after you have run the script.  These will
83 9e62cb26 Eric Allman
be located in the directory `$GDP_ETC/params`.
84 ebd10406 Eric Allman
85
The parameter `swarm.gdp.routers` (file `gdp`) is set to the
86
list of hosts to search to find a GDP router.  This will be
87
initialized with the names of routers at Berkeley.  If you are
88
running your own router you will probably want to change this.
89
90
The parameter `swarm.gdplogd.gdpname` (file `gdplogd`) assumes
91
that your domain name is "eecs.berkeley.edu".  You should change
92
this to match your domain.  The convention is to use the
93
reversed domain name of the host running `gdplogd` with
94
`.gdplogd` appended.  For example, if your `gdplogd` server
95
is named `server.foo.example.com`, the value of that parameter
96
should be `com.example.foo.server.gdplogd`.
97
98
Next Steps
99 7f982ac3 Eric Allman
==========
100 ebd10406 Eric Allman
101
Proceed to the documenet `doc/gdp-server-admin.md` for details about
102
post-install operation.
103
104
<!-- vim: set ai sw=4 sts=4 ts=4 : -->
105 632861ce Eric Allman
<!-- Use
106 7f982ac3 Eric Allman
	pandoc -s -o README-server-install.html README-server-install.md
107 632861ce Eric Allman
to process this to HTML -->