Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Isolation of FTS #123

Closed
wants to merge 86 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
80195fd
Update example-compose ui definition
RadioAndrea Mar 7, 2024
3369606
Added volume version of yaml file
RadioAndrea Mar 24, 2024
26e8cc2
Updated readme documentation
RadioAndrea Mar 24, 2024
46ce5fb
provide common function to create fts user and move fts.venv from /ro…
phreed Apr 5, 2024
94e9494
activate create-fts-user.yml
phreed Apr 5, 2024
1896839
install package as fts
phreed Apr 12, 2024
901dd90
install package as fts
phreed Apr 22, 2024
76b5abb
allow group write permission
phreed Apr 22, 2024
a4fcf50
Docker: Add env vars to compose files
stephendade Apr 25, 2024
1048de5
update --check logic and nodered version compatibility
phreed May 14, 2024
fa26617
update --check logic and nodered version compatibility
phreed May 14, 2024
ac32181
Merge pull request #125 from FreeTAKTeam/container/container-volume
RadioAndrea May 27, 2024
c4c01a0
Fixed example compose container registry link
RadioAndrea Jun 15, 2024
a2e6729
The default is to proceed following a warning.
phreed Jul 5, 2024
f946003
Update compose files so that containers can find each other
RadioAndrea Sep 1, 2024
4625756
provide common function to create fts user and move fts.venv from /ro…
phreed Apr 5, 2024
ac66907
activate create-fts-user.yml
phreed Apr 5, 2024
f662d4a
install package as fts
phreed Apr 12, 2024
32a04fb
install package as fts
phreed Apr 22, 2024
956ae47
allow group write permission
phreed Apr 22, 2024
f9bd7bb
update --check logic and nodered version compatibility
phreed May 14, 2024
4244f73
The default is to proceed following a warning.
phreed Jul 5, 2024
8204fb6
Merge remote-tracking branch 'origin/issue_118' into issue_118
phreed Sep 23, 2024
dd0eea3
introduce devcontainer.json
phreed Sep 24, 2024
5234246
update devcontainer.json
phreed Sep 28, 2024
c65ad7d
update to use distrobox for testing
phreed Sep 28, 2024
bd316d3
introduce distrobox as a test environment
phreed Sep 28, 2024
a289fe1
provide common function to create fts user and move fts.venv from /ro…
phreed Apr 5, 2024
b4a93dc
activate create-fts-user.yml
phreed Apr 5, 2024
5273366
install package as fts
phreed Apr 12, 2024
e308ff5
install package as fts
phreed Apr 22, 2024
30db9cf
allow group write permission
phreed Apr 22, 2024
91f2803
The default is to proceed following a warning.
phreed Jul 5, 2024
0f04b43
introduce devcontainer.json
phreed Sep 24, 2024
098496f
cause clean up to be less aggressive
phreed Sep 30, 2024
dd07a22
update node-red and worldmap version
phreed Oct 8, 2024
74a2fe1
ignore apt so files and merge error files
phreed Oct 8, 2024
6b01b86
enabled devcontainer
phreed Oct 8, 2024
eb73b15
use more current version of nodejs
phreed Oct 8, 2024
00735d9
invoke the nodejs environment function
phreed Oct 8, 2024
b457749
Update example-compose ui definition
RadioAndrea Mar 7, 2024
56ad582
Added volume version of yaml file
RadioAndrea Mar 24, 2024
2c2982c
Updated readme documentation
RadioAndrea Mar 24, 2024
e5fa925
Docker: Add env vars to compose files
stephendade Apr 25, 2024
5bb989b
Update compose files so that containers can find each other
RadioAndrea Sep 1, 2024
e449d23
Docker: Add env vars to compose files
stephendade Apr 25, 2024
d79b711
Docker: Add env vars to compose files
stephendade Apr 25, 2024
f7597ae
Update compose files so that containers can find each other
RadioAndrea Sep 1, 2024
79a592c
Docker: Add env vars to compose files
stephendade Apr 25, 2024
be09151
Docker: Add env vars to compose files
stephendade Apr 25, 2024
63c2619
Update compose files so that containers can find each other
RadioAndrea Sep 1, 2024
f5438b5
Docker: Add env vars to compose files
stephendade Apr 25, 2024
c282e5f
Update compose files so that containers can find each other
RadioAndrea Sep 1, 2024
d9015d7
Docker: Add env vars to compose files
stephendade Apr 25, 2024
cbfca2d
Update compose files so that containers can find each other
RadioAndrea Sep 1, 2024
55d3007
Docker: Add env vars to compose files
stephendade Apr 25, 2024
122bb37
Update compose files so that containers can find each other
RadioAndrea Sep 1, 2024
d490e14
Docker: Add env vars to compose files
stephendade Apr 25, 2024
05eeb0e
Docker: Add env vars to compose files
stephendade Apr 25, 2024
a8e637f
Update compose files so that containers can find each other
RadioAndrea Sep 1, 2024
0fc4657
Docker: Add env vars to compose files
stephendade Apr 25, 2024
679acf8
Docker: Add env vars to compose files
stephendade Apr 25, 2024
b60c23b
Update compose files so that containers can find each other
RadioAndrea Sep 1, 2024
f488123
update --check logic and nodered version compatibility
phreed May 14, 2024
25b5071
ignore apt so files and merge error files
phreed Oct 8, 2024
26fc64e
enabled devcontainer
phreed Oct 8, 2024
e0bcee7
use more current version of nodejs
phreed Oct 8, 2024
0ec2063
invoke the nodejs environment function
phreed Oct 8, 2024
2104692
Docker: Add env vars to compose files
stephendade Apr 25, 2024
d43fdde
Docker: Add env vars to compose files
stephendade Apr 25, 2024
4667ddd
Docker: Add env vars to compose files
stephendade Apr 25, 2024
a0503bb
Update compose files so that containers can find each other
RadioAndrea Sep 1, 2024
2670825
Docker: Add env vars to compose files
stephendade Apr 25, 2024
45b3657
Docker: Add env vars to compose files
stephendade Apr 25, 2024
5af1711
Update compose files so that containers can find each other
RadioAndrea Sep 1, 2024
1c53e68
Docker: Add env vars to compose files
stephendade Apr 25, 2024
29f629c
Update compose files so that containers can find each other
RadioAndrea Sep 1, 2024
7edd977
Docker: Add env vars to compose files
stephendade Apr 25, 2024
9af9c0e
Docker: Add env vars to compose files
stephendade Apr 25, 2024
13b5313
Update compose files so that containers can find each other
RadioAndrea Sep 1, 2024
1b6299e
Docker: Add env vars to compose files
stephendade Apr 25, 2024
2cd46eb
Docker: Add env vars to compose files
stephendade Apr 25, 2024
416fd89
Update compose files so that containers can find each other
RadioAndrea Sep 1, 2024
3fc76da
Merge remote-tracking branch 'refs/remotes/origin/issue_120' into iss…
phreed Oct 8, 2024
1a83783
match upstream main
phreed Oct 8, 2024
8bb946e
Merge branch 'issue_120' into issue_118
phreed Oct 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM mcr.microsoft.com/devcontainers/base:ubuntu-22.04
RUN apt-get update \
&& apt-get install -y python3 python3-pip \
&& pip3 install --upgrade pip
51 changes: 51 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
// For format details, see https://aka.ms/devcontainer.json.
// For config options, see the README at: https://github.com/devcontainers/templates/tree/main/src/ubuntu
{
"name": "FTS-Install",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"build": {
// Path is relative to the devcontainer.json file.
"dockerfile": "Dockerfile",
"context": "."
},

// Features to add to the dev container. ore info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {
"installZsh": "true",
"username": "vscode",
"userUid": "1000",
"userGid": "1000",
"upgradePackages": "true"
},
"ghcr.io/devcontainers/features/git:1": {
"version": "latest",
"ppa": "false"
}
},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "uname -a",

// Configure tool-specific properties.
"customizations" : {
"jetbrains" : {
"backend" : "IntelliJ"
}
},
"runArgs": [
"--net", "host",
"-e", "DISPLAY=:0",
"-e", "XAUTHORITY=/tmp/.Xauthority",
"-v", "${localEnv:HOME}/.Xauthority:/tmp/.Xauthority"
],
"containerEnv": {
"DISPLAY": "unix:0"
},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
4 changes: 2 additions & 2 deletions .github/workflows/pending/compatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ jobs:
uses: actions/cache@v2
with:
path: ~/.vagrant.d/boxes
key: ${{ runner.os }}-vagrant-${{ hashFiles('Vagrantfile') }}
key: "${{ runner.os }}-vagrant-${{ hashFiles('Vagrantfile') }}"
restore-keys: |
${{ runner.os }}-vagrant-
"${{ runner.os }}-vagrant-"

- name: Run vagrant up
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pending/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ jobs:
- uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
key: "${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}"
restore-keys: |
${{ runner.os }}-pip-
"${{ runner.os }}-pip-"

- name: Install test dependencies
run: pip3 install yamllint
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pending/molecule_all_on_one.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ jobs:
- uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
key: "${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}"
restore-keys: |
${{ runner.os }}-pip-
"${{ runner.os }}-pip-"

- name: Install test dependencies
run: pip3 install ansible molecule[docker] docker
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pending/molecule_fts_core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ name: FTS CORE (DOCKER)
- '**.md'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true

jobs:
Expand Down Expand Up @@ -69,9 +69,9 @@ jobs:
- uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
key: "${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}"
restore-keys: |
${{ runner.os }}-pip-
"${{ runner.os }}-pip-"

- name: Install test dependencies
run: pip3 install ansible molecule[docker] docker
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pending/molecule_multiple.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ jobs:
- uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
key: "${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}"
restore-keys: |
${{ runner.os }}-pip-
"${{ runner.os }}-pip-"

- name: Install test dependencies
run: pip3 install ansible molecule[docker] docker
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pending/molecule_mumble.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ jobs:
- uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
key: "${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}"
restore-keys: |
${{ runner.os }}-pip-
"${{ runner.os }}-pip-"

- name: Install test dependencies
run: pip3 install ansible molecule[docker] docker
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pending/molecule_noderedserver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ jobs:
- uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
key: "${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}"
restore-keys: |
${{ runner.os }}-pip-
"${{ runner.os }}-pip-"

- name: Install test dependencies
run: pip3 install ansible molecule[docker] docker
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pending/molecule_videoserver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ jobs:
- uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
key: "${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}"
restore-keys: |
${{ runner.os }}-pip-
"${{ runner.os }}-pip-"

- name: Install test dependencies
run: pip3 install ansible molecule[docker] docker
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,9 @@ ansible.cfg
/.vagrant/*
/.byebug_history
/docs/DEV.md

apt_inst.so
apt_pkg.so

git-error-*

24 changes: 24 additions & 0 deletions .justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

default:
@just --list

MY_WD := `pwd`
MY_IPA := `ip -4 addr show docker0 | grep -oP '(?<=inet\s)\d+(\.\d+){3}'`
MY_BRANCH := 'issue_118'
NO_COLOR := `TRUE`

alias dbox-act := dbox-activate

dbox-activate:
-distrobox rm -f fts
distrobox create --image docker.io/library/ubuntu:22.04 --name fts --yes \
--init --additional-packages "systemd libpam-systemd pipewire-audio-client-libraries vim snapd"

distrobox enter --name fts
sudo snap install just --edge --classic


dbox-install:
echo "My IPA: {{MY_IPA}}, WD: {{MY_WD}}, ISSUE: {{MY_BRANCH}}"
sudo bash {{MY_WD}}/scripts/easy_install.sh --repo file://{{MY_WD}}/.git --branch {{MY_BRANCH:-main}} --ip-addr {{MY_IPA}}

43 changes: 0 additions & 43 deletions containers/compose.yaml

This file was deleted.

51 changes: 26 additions & 25 deletions containers/container_readme.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,36 @@
# Containers
## Full Documentation
WIP
**WIP**

For full instructions see: https://freetakteam.github.io/FreeTAKServer-User-Docs/Installation/Docker/overview/
WIP

**WIP**

## Podman
These containers were designed under the podman runtime, and are fully compatible with being run as rootless.

If you are familiar with container infrastructure, you can simply copy this entire directory and modify the compose.yaml
to fit your needs.

## Quick Instructions

For podman:
```shell
podman-compose up
```

or if you use non-free runtime:

```shell
docker-compose up
```
## Docker
These containers are likely to work perfectly well in docker.

Then refer to other FTS documentation to do appropriate configuration.
Please consider running rootless for extra security.

All config files you need should be created in the volume, so it is a good idea to create a mounted volume instead of a
standard volume.

If you are missing any/all configuration files, ensure:
- Restart container to trigger copy script again
- Permissions are sufficient for the container to use the volume directory
- On selinux hosts, sticky bit may need to be set
- Also on selinux, you may need to reload the labels/contexts
## Quick Instructions
1. Copy the [`example-compose.yaml`](https://github.com/FreeTAKTeam/FreeTAKHub-Installation/blob/main/containers/example-compose.yaml)
file to your favorite directory.
2. Rename it to compose.yaml
3. Run the command

For podman:
```shell
podman-compose up
```

For non-free runtime:

```shell
docker-compose up
```

4. Then refer to other FTS documentation to do appropriate configuration using the environment variables exposed in the
compose file.
27 changes: 0 additions & 27 deletions containers/core-pypi.Dockerfile

This file was deleted.

29 changes: 0 additions & 29 deletions containers/core-run.sh

This file was deleted.

Loading
Loading