Skip to content

Commit 046202b

Browse files
authored
Merge pull request #47 from d3vilh/docker-compose-v2
Moving to Docker compose v2
2 parents 7d74866 + a9f5a36 commit 046202b

36 files changed

+282
-222
lines changed

README.md

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,42 +25,47 @@ Overall, this Raspberry Pi Home Internet Gateway provides a universal solution f
2525
> **Note**: You can run it on CM4 board with 8Gb eMMC card. Full installation on top of latest [Raspios lite (64bit)](https://downloads.raspberrypi.org/raspios_lite_arm64/images/) will use 4,5Gb of your eMMC card. Raspberry Pi **Zero-W** or **W2** boards can also be used, but it's important to note that they lack an internal Ethernet adapter and have limited CPU and RAM resources. This can restrict the number of containers that can be run and the number of clients that can connect to the VPN server.
2626
2727
# Installation
28-
1. Install [Ansible](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html):
28+
1. Install dependencies:
2929
```shell
30-
sudo apt-get install -y git ansible python3-pip musl-tools
30+
sudo apt-get install -y git python3-pip musl-tools
3131
```
32-
2. Clone this repository:
32+
2. Install [Ansible](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html) with pip, as yum repo version is to old:
33+
```shell
34+
sudo pip install --upgrade pip && sudo pip install ansible --break-system-packages
35+
```
36+
We need to use `--break-system-packages` to install *Ansible core 2.18.1* with propper `community.docker-compose-v2` support.
37+
3. Clone this repository:
3338
```shell
3439
git clone https://github.com/d3vilh/raspberry-gateway
3540
```
36-
3. Then enter the repository directory:
41+
4. Then enter the repository directory:
3742
```shell
3843
cd raspberry-gateway
3944
```
40-
4. Install requirements:
45+
5. Install requirements:
4146
```shell
4247
ansible-galaxy collection install -r requirements.yml
4348
```
4449
> **Note**: If you see `ansible-galaxy: command not found`, you have to relogin (or reboot your Pi) and then try again.
4550
<details>
4651
<summary>Continue Installation with WebUI</summary>
4752

48-
5. Run [Webinstall](https://github.com/d3vilh/raspberry-gtw-webconfig) binary:
53+
6. Run [Webinstall](https://github.com/d3vilh/raspberry-gtw-webconfig) binary:
4954
```shell
5055
secret@rpgw:~/raspberry-gateway $ ./webinstall # Supports now both legacy Pi4_x64 and Pi5_x64
5156
2023/07/07 18:01:03 Welcome! The web interface will guide you on installation process.
5257
Installation logs: webinstall.log
5358
2023/07/07 18:01:03 Starting web server on http://10.10.10.18:8088
5459
```
55-
6. Copy server address (`http://10.10.10.18:8088` as above example) from the console and paste into your browser, then press Enter. Raspberry-Gateway webinstall window will appear:
60+
7. Copy server address (`http://10.10.10.18:8088` as above example) from the console and paste into your browser, then press Enter. Raspberry-Gateway webinstall window will appear:
5661
![Webinstall picture 1](/images/Webinstall-01.png)
57-
7. Choose all the components you would like to install and change all the passwords (keep them in mind).
62+
8. Choose all the components you would like to install and change all the passwords (keep them in mind).
5863
> **Note**: You can leave all the passwords as default, but it's not recommended.
59-
8. Press "Save" button. When your configuration is ready:
64+
9. Press "Save" button. When your configuration is ready:
6065
![Webinstall picture 2](/images/Webinstall-02.png)
61-
9. Then press "Install" button. It will initiate installation in background:
66+
10. Then press "Install" button. It will initiate installation in background:
6267
![Webinstall picture 3](/images/Webinstall-03.png)
63-
10. The installation process will take some time.
68+
11. The installation process will take some time.
6469
Once that's done, it'll be like you have a new **Raspberry Gateway** up and running.
6570
* #### Additional options:
6671
* **To Remove** any of previously installed component - click `Uninstall "component"` checkbox then `save` configuration file and press `Uninstall` button.

ansible.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[defaults]
22
nocows = True
3+
ask_become_pass = true
34
inventory = ./inventory.yml
45
interpreter_python = auto_silent

main.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,15 @@
1111
- advanced.config.yml
1212

1313
- name: Ensure apt cache is up to date
14+
become: true
1415
ansible.builtin.apt:
1516
update_cache: true
1617
cache_valid_time: 3600
1718
when:
1819
- ansible_facts.os_family == "Debian"
1920

2021
- name: Ensure pacman cache is up to date
22+
become: true
2123
community.general.pacman:
2224
update_cache: true
2325
when:
@@ -29,57 +31,71 @@
2931

3032
tasks:
3133
- name: Setup Docker
34+
become: true
3235
ansible.builtin.import_tasks: tasks/docker.yml
3336

3437
- name: Setup Portainer
38+
become: true
3539
ansible.builtin.import_tasks: tasks/portainer.yml
3640
when: portainer_enable
3741

3842
- name: Setup OpenVPN Client
43+
become: true
3944
ansible.builtin.import_tasks: tasks/openvpn-client.yml
4045
when: ovpn_client_enable
4146

4247
- name: Setup Gluetun Server
48+
become: true
4349
ansible.builtin.import_tasks: tasks/gluetun.yml
4450
when: gluetun_vpnclient_enable
4551

4652
- name: Setup OpenVPN Server
53+
become: true
4754
ansible.builtin.import_tasks: tasks/openvpn-server.yml
4855
when: ovpn_server_enable
4956

5057
- name: Setup Unbound DNS
58+
become: true
5159
ansible.builtin.import_tasks: tasks/unbound-dns.yml
5260
when: unbound_dns_enable
5361

5462
- name: Setup Pi Hole
63+
become: true
5564
ansible.builtin.import_tasks: tasks/pi-hole.yml
5665
when: pihole_enable
5766

5867
- name: Setup Technitium DNS Server
68+
become: true
5969
ansible.builtin.import_tasks: tasks/tech-dns.yml
6070
when: tech_dns_enable
6171

6272
- name: Setup WireGuard Server
73+
become: true
6374
ansible.builtin.import_tasks: tasks/wireguard.yml
6475
when: wireguard_server_enable
6576

6677
- name: Setup qBitTorrent
78+
become: true
6779
ansible.builtin.import_tasks: tasks/qbittorrent.yml
6880
when: qbittorrent_enable
6981

7082
- name: Setup Samba Server
83+
become: true
7184
ansible.builtin.import_tasks: tasks/sambaserver.yml
7285
when: samba_enable
7386

7487
- name: Setup xray
88+
become: true
7589
ansible.builtin.import_tasks: tasks/xray-xui.yml
7690
when: xray_enable
7791

7892
- name: Setup Raspberry Monitoring
93+
become: true
7994
ansible.builtin.import_tasks: tasks/raspberry-monitoring.yml
8095
when: monitoring_enable
8196

8297
- name: Setup Shelly Plug Monitoring
98+
become: true
8399
ansible.builtin.import_tasks: tasks/shelly-plug.yml
84100
when: shelly_plug_monitoring_enable
85101

0 commit comments

Comments
 (0)