abada0fdec2c8c9c941d15d91a8948c89a191629
[ric-plt/a1.git] / docs / installation-guide.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
3 .. Copyright (C) 2019 AT&T Intellectual Property
4
5 A1 Installation Guide
6 =====================
7
8 .. contents::
9    :depth: 3
10    :local:
11
12 Optional ENV Variables
13 ----------------------
14
15 You can set the following ENVs to change the A1 behavior:
16
17 1. ``A1_RMR_RETRY_TIMES``: the number of times failed rmr operations such as timeouts and send failures should be retried before A1 gives up and returns a 503. The default is ``4``.
18
19 2. ``INSTANCE_DELETE_NO_RESP_TTL``: Please refer to the delete flowchart in docs/; this is ``T1`` there. The default is 5 (seconds). Basically, the number of seconds that a1 waits to remove an instance from the database after a delete is called in the case that no downstream apps responded.
20
21 3. ``INSTANCE_DELETE_RESP_TTL``: Please refer to the delete flowchart in docs/; this is ``T2`` there. The default is 5 (seconds). Basically, the number of seconds that a1 waits to remove an instance from the database after a delete is called in the case that downstream apps responded.
22
23 K8S
24 ---
25 The "real" helm chart for A1 is in the LF it/dep repo. That repo holds all of the helm charts for the RIC platform. There is a helm chart in `integration_tests` here for running the integration tests as discussed above.
26
27 Local Docker
28 -------------
29
30 Build the image
31 ~~~~~~~~~~~~~~~
32 ::
33
34    docker build --no-cache -t a1:latest .
35
36 .. _running-1:
37
38 Start the container
39 ~~~~~~~~~~~~~~~~~~~
40
41 A sample RMR routing table is supplied here in file `local.rt` for mounting as a volume:
42
43 ::
44
45    docker run -p 10000:10000 -v /path/to/local.rt:/opt/route/local.rt a1:latest
46
47 View container API
48 ~~~~~~~~~~~~~~~~~~
49
50 A web user interface generated from the OpenAPI specification can be accessed at this URL:
51
52 ::
53
54     http://docker-host-name-or-ip:10000/ui
55
56 Check container health
57 ~~~~~~~~~~~~~~~~~~~~~~
58
59 The following command requests the container health.  This requires a Storage Data Layer
60 (SDL) service; expect internal server error if that service is not available/running.
61
62 ::
63
64     curl docker-host-name-or-ip:10000/a1-p/healthcheck