Skip to content

Commit

Permalink
Merge pull request #77 from babeloff/main
Browse files Browse the repository at this point in the history
Changes Related to Installer Updates
  • Loading branch information
brothercorvo authored Jul 14, 2024
2 parents f51379f + 897390b commit eb2e0c9
Show file tree
Hide file tree
Showing 20 changed files with 176 additions and 127 deletions.
2 changes: 1 addition & 1 deletion docs/HowToHelp/DevSetupPipVScode.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ open VS Code Explorer to the location of the FreeTAKServer project


### FTS YAML File
In the folder containing FreeTakServer repo create a file:
In the folder containing the FreeTakServer repo create a file:
`FTSConfig.yaml`


Expand Down
6 changes: 4 additions & 2 deletions docs/Installation/mechanism/Ansible/ZeroTouchInstall.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,11 @@ This `ZTI` installs and configures FreeTAKHub components on a single device.
### Services Status
This command will output the status of these services
```
sudo systemctl status fts.service fts-ui.service mumble-server.service nodered.service mediamtx.service
sudo systemctl status fts.service fts-ui.service mumble-server.service nodered.service rtsp-simple-server.service
```

Note:: `rtsp-simple-server` is also known as `mediamtx`.

[how to start / stop / enable a service?](../../../Troubleshooting/Service.md)


Expand Down Expand Up @@ -220,7 +222,7 @@ wget -qO - bit.ly/freetakhub2 | sudo bash -s -- --legacy

??? tip "testing a forked repository."
```console
export MY_IPA=10.2.118.124
export MY_IPA=10.2.118.126
export MY_REPO=babeloff
wget -qO - https://raw.githubusercontent.com/${MY_REPO}/FreeTAKHub-Installation/main/scripts/easy_install.sh | sudo bash -s -- --ip-addr ${MY_IPA} --repo https://github.com/${MY_REPO}/FreeTAKHub-Installation.git
```
Expand Down
31 changes: 16 additions & 15 deletions docs/Installation/mechanism/Manual/Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# FreeTAK Server Installation
This guide will walk you through installing FreeTAKServer 2.x

## 0. Document Goals
## Document Goals

- Prepare host OS
- Install FreeTAKServer
Expand All @@ -13,15 +13,15 @@ This guide will walk you through installing FreeTAKServer 2.x
- **TBD** ~~Install the [Video Service](../../../administration/brokered/Video/Installation.md)~~

---
## Note: Linux Distributions
### Note: Linux Distributions

The main supported OS is Ubuntu 22.04.
Due to cross-compatibility, Debian 10 and the latest Raspbian also work.

Centos/RHEL/Fedora installation instructions are provided on a best-effort volunteer basis.

---
## 1. Update OS Packages
## Update OS Packages

Update OS Packages before proceeding with the installation

Expand All @@ -46,7 +46,7 @@ sudo dnf update
</details>

---
## 2. Pre-requisite Software
## Pre-requisite Software


Install packages from the distro repo
Expand Down Expand Up @@ -100,7 +100,7 @@ source venv/bin/activate
</details>

---
## 3. Install Python Libraries
## Install Python Libraries

<details>
<summary>
Expand Down Expand Up @@ -128,7 +128,7 @@ pip install wheel pycairo
</details>

---
## 4. Remove Old Installation
## Remove Old Installation
**YOU MUST DO THIS IF:**

- Free TAK Server has been installed before
Expand Down Expand Up @@ -172,7 +172,7 @@ sudo rm /opt/FTS/FTSDataBase.db
</details>

---
## 5. Install FreeTAKServer
## Install FreeTAKServer
Install the FreeTAKServer and the associated Web UI

<details>
Expand Down Expand Up @@ -223,7 +223,7 @@ This will download and install version 0.2.0.13 of FreeTAKServer. If no version
</details>

---
## 6. Check Installation
## Check Installation

The pip utility allows the user to check the installation and dependency status of a package.

Expand All @@ -237,7 +237,7 @@ Otherwise, there was an issue with the pip installation,
and you should investigate the pip-generated installation logs for more information.

---
## 7. Configure and Run FreeTAKServer
## Configure and Run FreeTAKServer

FTS versions older than 1.9 are not configured this way. For versions <1.9 you
will need to locate older versions of this document in the repo history.
Expand Down Expand Up @@ -309,12 +309,12 @@ In virtualenv installations,
it is inside the virtualenv directory.

The wizard creates the YAML configuration file under the location you selected,
the default location is `/opt/FTSConfig.yaml`.
the default location is `/opt/fts/FTSConfig.yaml`.

FreeTAKServer will then proceed start all the services.

---
## 7. FTS Configuration
## FTS Configuration
### Manual `FTSConfig.yaml`

!!! warning
Expand All @@ -335,7 +335,8 @@ ConnectionMessage = f'Welcome to FreeTAKServer {version}. The Parrot is not dead
```

---
## 9. FTS-UI Configuration

## FTS-UI Configuration

Edit the `config.py` file in the `FreeTAKServer-UI` directory where it was installed by pip

Expand Down Expand Up @@ -423,7 +424,7 @@ app.config['SYSSTATUSINTERVAL'] = '600000';
app.config['DATAPACKAGESIZELIMIT'] = '15360000';
```

### 10. Start UI
### Start UI

In the terminal, navigate to the `FreeTAKServer-UI` directory wherever it was
installed by the pip utility.
Expand Down Expand Up @@ -459,7 +460,7 @@ to that shown below.
```

---
## 11. Next Steps
## Next Steps

### Create a service

Expand All @@ -486,7 +487,7 @@ IP = '[FTS external IP]'
APPIP = '[FTS-UI internal IP]'
```

## 12. Check Installation
## Check Installation

After finishing all the steps, make sure your configuration is acceptable and
server running properly.
Expand Down
2 changes: 1 addition & 1 deletion docs/Installation/mechanism/Manual/Manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ if you are running as root, `/root` is a good choice.
Original Value
```python
# this should be set before startup
DBFilePath = str(r'/opt/FTSDataBase.db')
DBFilePath = str(r'/opt/fts/FTSDataBase.db')
```

As roots Home Folder
Expand Down
2 changes: 1 addition & 1 deletion docs/Installation/platform/Cloud/AWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ If anything fails, check IP values in the following files:

### config.py

ZTI installs this file in /root/fts.venv/lib/python3.11/site-packages/FreeTAKServer-UI/config.py
ZTI installs this file in /opt/fts.venv/lib/python3.11/site-packages/FreeTAKServer-UI/config.py

* APPIP: Internal IP
* IP: Public IP
Expand Down
4 changes: 2 additions & 2 deletions docs/Installation/platform/Windows/Windows_Manual_Install.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,14 +169,14 @@ Configure the `FreeTakServer` by editing the `<site-packages>\FreeTAKServer\core

Path examples:
* native Windows install: `C:\Software\python\Lib\site-packages\FreeTAKServer\core\configuration\MainConfig.py`
* ZTI python virtual environment: `/root/fts.venv/lib/python3.11/site-packages/FreeTAKServer/core/configuration/MainConfig.py`
* ZTI python virtual environment: `/opt/fts.venv/lib/python3.11/site-packages/FreeTAKServer/core/configuration/MainConfig.py`
* conda env named `tak`: `C:\Users\user\micromamba\envs\tak\Lib\site-packages\FreeTAKServer\core\configuration\MainConfig.py`

Configure the `FreeTAKServer-UI` by editing the `<site-packages>\FreeTAKServer-UI\config.py` file.

Path examples:
* native Windows install: `C:\Software\python\Lib\site-packages\FreeTAKServer-UI\config.py`
* ZTI python virtual environment: `/root/fts.venv/lib/python3.11/site-packages/FreeTAKServer-UI/config.py`
* ZTI python virtual environment: `/opt/fts.venv/lib/python3.11/site-packages/FreeTAKServer-UI/config.py`
* conda env named `tak`: `C:\Users\user\micromamba\envs\tak\Lib\site-packages\FreeTAKServer-UI\config.py`

```text
Expand Down
4 changes: 2 additions & 2 deletions docs/Troubleshooting/ManualConfiguration.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ if you are running as root, `/root` is a good choice.
Original Value
```python
# this should be set before startup
DBFilePath = str(r'/opt/FTSDataBase.db')
DBFilePath = str(r'/opt/fts/FTSDataBase.db')
```

As roots Home Folder

```python
# this should be set before startup
DBFilePath = str(r'/root/FTSDataBase.db')
DBFilePath = str(r'/opt/fts/FTSDataBase.db')
```
### MySQL database
FTS supports an abstraction layer, so it's easy to use a different database like MySQL.
Expand Down
6 changes: 3 additions & 3 deletions docs/Troubleshooting/Service.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ While they can grow to be complex, they are usually very simple.
### background
The main directive is ExecStart, which specifies the command that should be run when the service is started. The command is
```bash
/usr/bin/python3 /root/fts.venv/lib/python3.11/site-packages/FreeTAKServer-UI/run.py.
/usr/bin/python3 /opt/fts.venv/lib/python3.11/site-packages/FreeTAKServer-UI/run.py.
```
Here's what each part of the command does:

Expand All @@ -42,12 +42,12 @@ Here's what each part of the command does:
-m
: This option tells Python to run a module as a script.

/root/fts.venv/lib/python3.11/site-packages/FreeTAKServer-UI/run.py
/opt/fts.venv/lib/python3.11/site-packages/FreeTAKServer-UI/run.py
: This is the path to the Python module that should be run as a script.

So when the service is started,
the Python interpreter will run the `run.py` module
located in the `/root/fts.venv/lib/python3.11/site-packages/FreeTAKServer-UI/` directory.
located in the `/opt/fts.venv/lib/python3.11/site-packages/FreeTAKServer-UI/` directory.

This code above is running `FreeTAKServer-UI`,
which is a user interface for `FreeTAKServer`.
Expand Down
2 changes: 1 addition & 1 deletion docs/Troubleshooting/SocketIssue.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ sudo reboot -n
!!! note
The FTS certs directory can generally be found at
```shell
/root/fts.venv/lib/python3.11/site-packages/FreeTAKServer/certs
/opt/fts.venv/lib/python3.11/site-packages/FreeTAKServer/certs
```

# SSL issue: Change the Number of max file open
Expand Down
67 changes: 51 additions & 16 deletions docs/Troubleshooting/fts-core-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,66 @@

![image](../Installation/images/zero-touch-deply-default.png)

Some of these services have a secure and a clear instance.

The core consists of the following logical elements (with the indicated default ports):
## Components

* API Service
* REST instance (port 19023)
* websocket instance (port 19023)
* DP Service
* SSL instance (port 8443)
* Clear instance (port 8080)
* Federation Service
* Clear instance (port 9000)
* CoT Service
* SSL instance (port 8089)
* Clear instance (port 8087)
The core consists of several logical components.
They are all TCP ports, some encrypted via SSL and some in the clear.

## API Service
Note:: The indicated ports are default values.

### Application Programming Interface (API) Service

## DP Service
* REST instance (port 19023)
* websocket instance (port 19023)

### Digital Py (DP) Service

## Federation Service
* SSL instance (port 8443)
* Clear instance (port 8080)

### Federation Service

* Clear instance (port 9000)

## CoT Service

* SSL instance (port 8089)
* Clear instance (port 8087)

## Reconfiguration

The `ZeroTouch` installer makes assumptions configuring the system.
There are corner cases which `ZeroTouch` will miss.
For example, `ZTI` acquires the IP address by, effectively using:
```bash
curl https://ifconfig.me/ip
```
In several environments this produces the desired result.
In the case where the server is not on the public internet,
this result will be incorrect.
The following is more likely to provide the IP address you want.
```bash
ip addr
```

[Verify and/or Edit the `fts` configuration file](../administration/usingConsole.md)
```
/opt/fts/FTSConfig.yaml
```

Here is a fragment of that configuration file.
```yaml
Addresses:
FTS_COT_PORT: 8087
FTS_SSLCOT_PORT: 8089
FTS_DP_ADDRESS: 127.0.0.1
FTS_USER_ADDRESS: 127.0.0.1
FTS_API_PORT: 19023
FTS_FED_PORT: 9000
FTS_API_ADDRESS: 127.0.0.1
```
Adjust `FTS_DP_ADDRESS`, `FTS_USER_ADDRESS` & `FTS_API_ADDRESS`
to reflect your IP (or ZeroTier IP) address.


40 changes: 0 additions & 40 deletions docs/Troubleshooting/fts-server.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/Troubleshooting/fts-ui-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Validate the properties set in the `fts-ui` configuration file.
[Verify and/or Edit the `fts-ui` configuration file](../administration/usingConsole.md)
Use of a python virtual environment (here the ZTI location) is recommended.
```
/root/fts.venv/lib/python3.11/site-packages/FreeTAKServer-UI/config.py
/opt/fts.venv/lib/python3.11/site-packages/FreeTAKServer-UI/config.py
```
Here is a sample fragment of that file.
```python
Expand Down
2 changes: 1 addition & 1 deletion docs/Troubleshooting/fts-ui.service
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ StartLimitIntervalSec=0
Type=simple
Restart=always
RestartSec=1
ExecStart=/usr/bin/python3 -m /root/fts.venv/lib/python3.11/site-packages/FreeTAKServer-UI/run.py
ExecStart=/usr/bin/python3 -m /opt/fts.venv/lib/python3.11/site-packages/FreeTAKServer-UI/run.py

[Install]
WantedBy=multi-user.target
Loading

0 comments on commit eb2e0c9

Please sign in to comment.