Tommy Carpenter | 4249398 | 2019-11-06 07:27:16 -0500 | [diff] [blame] | 1 | .. This work is licensed under a Creative Commons Attribution 4.0 International License. |
| 2 | .. http://creativecommons.org/licenses/by/4.0 |
Tommy Carpenter | 0a3f676 | 2019-11-06 09:24:16 -0500 | [diff] [blame] | 3 | .. Copyright (C) 2019 AT&T Intellectual Property |
Tommy Carpenter | 4249398 | 2019-11-06 07:27:16 -0500 | [diff] [blame] | 4 | |
Lott, Christopher (cl778h) | 14d016e | 2020-04-27 10:45:47 -0400 | [diff] [blame] | 5 | A1 Installation Guide |
| 6 | ===================== |
Tommy Carpenter | 4249398 | 2019-11-06 07:27:16 -0500 | [diff] [blame] | 7 | |
| 8 | .. contents:: |
| 9 | :depth: 3 |
| 10 | :local: |
| 11 | |
| 12 | Optional ENV Variables |
| 13 | ---------------------- |
| 14 | |
Lott, Christopher (cl778h) | 20d87ed | 2020-04-29 16:50:06 -0400 | [diff] [blame] | 15 | You can set the following environment variables when launching a container to change the A1 behavior: |
Tommy Carpenter | 4249398 | 2019-11-06 07:27:16 -0500 | [diff] [blame] | 16 | |
Tommy Carpenter | 0a3f676 | 2019-11-06 09:24:16 -0500 | [diff] [blame] | 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. |
Tommy Carpenter | 4249398 | 2019-11-06 07:27:16 -0500 | [diff] [blame] | 22 | |
Lott, Christopher (cl778h) | 20d87ed | 2020-04-29 16:50:06 -0400 | [diff] [blame] | 23 | 4. ``USE_FAKE_SDL``: This allows testing of the A1 feature without a DBaaS SDL container. The default is False. |
| 24 | |
Tommy Carpenter | 4249398 | 2019-11-06 07:27:16 -0500 | [diff] [blame] | 25 | K8S |
| 26 | --- |
| 27 | 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. |
| 28 | |
| 29 | Local Docker |
| 30 | ------------- |
| 31 | |
Lott, Christopher (cl778h) | fe30c17 | 2020-04-29 15:23:28 -0400 | [diff] [blame] | 32 | Build the image |
| 33 | ~~~~~~~~~~~~~~~ |
Tommy Carpenter | 4249398 | 2019-11-06 07:27:16 -0500 | [diff] [blame] | 34 | :: |
| 35 | |
Lott, Christopher (cl778h) | fe30c17 | 2020-04-29 15:23:28 -0400 | [diff] [blame] | 36 | docker build --no-cache -t a1:latest . |
Tommy Carpenter | 4249398 | 2019-11-06 07:27:16 -0500 | [diff] [blame] | 37 | |
| 38 | .. _running-1: |
| 39 | |
Lott, Christopher (cl778h) | fe30c17 | 2020-04-29 15:23:28 -0400 | [diff] [blame] | 40 | Start the container |
| 41 | ~~~~~~~~~~~~~~~~~~~ |
| 42 | |
Lott, Christopher (cl778h) | 20d87ed | 2020-04-29 16:50:06 -0400 | [diff] [blame] | 43 | The A1 container depends on a companion DBaaS (SDL) container, but if that is not convenient set |
| 44 | an environment variable as shown below to mock that service. Also a sample RMR routing table is |
| 45 | supplied in file `local.rt` for mounting as a volume. The following command uses both: |
Tommy Carpenter | 4249398 | 2019-11-06 07:27:16 -0500 | [diff] [blame] | 46 | |
| 47 | :: |
| 48 | |
Lott, Christopher (cl778h) | 20d87ed | 2020-04-29 16:50:06 -0400 | [diff] [blame] | 49 | docker run -e USE_FAKE_SDL=True -p 10000:10000 -v /path/to/local.rt:/opt/route/local.rt a1:latest |
Tommy Carpenter | 4249398 | 2019-11-06 07:27:16 -0500 | [diff] [blame] | 50 | |
Lott, Christopher (cl778h) | fe30c17 | 2020-04-29 15:23:28 -0400 | [diff] [blame] | 51 | View container API |
| 52 | ~~~~~~~~~~~~~~~~~~ |
| 53 | |
| 54 | A web user interface generated from the OpenAPI specification can be accessed at this URL: |
| 55 | |
| 56 | :: |
| 57 | |
| 58 | http://docker-host-name-or-ip:10000/ui |
| 59 | |
| 60 | Check container health |
| 61 | ~~~~~~~~~~~~~~~~~~~~~~ |
| 62 | |
Lott, Christopher (cl778h) | 20d87ed | 2020-04-29 16:50:06 -0400 | [diff] [blame] | 63 | The following command requests the container health. Expect an internal server error if the |
| 64 | Storage Data Layer (SDL) service is not available or has not been mocked as shown above. |
Lott, Christopher (cl778h) | fe30c17 | 2020-04-29 15:23:28 -0400 | [diff] [blame] | 65 | |
| 66 | :: |
| 67 | |
| 68 | curl docker-host-name-or-ip:10000/a1-p/healthcheck |