mirror of
https://github.com/flynx/proxmox-utils.git
synced 2025-12-25 21:02:04 +00:00
Compare commits
2 Commits
63b5ae6c8d
...
ffb69c61ad
| Author | SHA1 | Date | |
|---|---|---|---|
| ffb69c61ad | |||
| a7b036f487 |
30
Makefile
30
Makefile
@ -17,10 +17,14 @@
|
|||||||
# CT's with DHCP network configuration.
|
# CT's with DHCP network configuration.
|
||||||
# - the rest of the CT's are created in order of importance, strting
|
# - the rest of the CT's are created in order of importance, strting
|
||||||
# from CT's needed for access and ending with services.
|
# from CT's needed for access and ending with services.
|
||||||
CTs := \
|
CORE_CTs := \
|
||||||
gate ns \
|
gate ns
|
||||||
ssh wireguard syncthing \
|
MINIMAL_CTs := \
|
||||||
nextcloud #gitea
|
ssh wireguard
|
||||||
|
APP_CTs := \
|
||||||
|
syncthing nextcloud #gitea
|
||||||
|
DEV_CTs := \
|
||||||
|
gitea
|
||||||
|
|
||||||
|
|
||||||
DEPENDENCIES = make git dig pct
|
DEPENDENCIES = make git dig pct
|
||||||
@ -53,6 +57,9 @@ FORCE:
|
|||||||
$<
|
$<
|
||||||
|
|
||||||
|
|
||||||
|
%.config: %/config.example
|
||||||
|
|
||||||
|
|
||||||
config.global: config.global.example
|
config.global: config.global.example
|
||||||
@ [ ! -e "$@" ] \
|
@ [ ! -e "$@" ] \
|
||||||
&& cat "$<" > "$@" \
|
&& cat "$<" > "$@" \
|
||||||
@ -75,8 +82,21 @@ gate: gate-traefik
|
|||||||
|
|
||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
.PHONY: core
|
||||||
|
core: config $CORE_CTs)
|
||||||
|
|
||||||
|
|
||||||
|
.PHONY: minimal
|
||||||
|
minimal: core $(BASE_CTs)
|
||||||
|
|
||||||
|
|
||||||
|
.PHONY: dev
|
||||||
|
dev: minimal $(DEV_CTs)
|
||||||
|
|
||||||
|
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
all: config $(CTs)
|
all: minimal $(APP_CTs)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
42
README.md
42
README.md
@ -28,4 +28,46 @@ A set of scripts for automating setup and tasks in proxmox.
|
|||||||
- ...
|
- ...
|
||||||
|
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
|
|
||||||
|
### Proxmox
|
||||||
|
|
||||||
|
```shell
|
||||||
|
sudo apt update && sudo apt upgrade
|
||||||
|
```
|
||||||
|
|
||||||
|
```shell
|
||||||
|
sudo apt install git make
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
### Network Bridges
|
||||||
|
|
||||||
|
`proxmox-utils` expects there to be at least three bridges:
|
||||||
|
- WAN - connected to the port that faces the external network (either
|
||||||
|
directly of via a router)
|
||||||
|
- LAN - a virtual bridge, not connected to any physical interfaces
|
||||||
|
- ADMIN - connected to a second physical interface used for
|
||||||
|
administrative purposes.
|
||||||
|
|
||||||
|
Note their numbers (i.e. the number in `vmbr#`), this will be needed for
|
||||||
|
setup.
|
||||||
|
|
||||||
|
|
||||||
|
### DNS
|
||||||
|
|
||||||
|
Add `10.1.1.1` to the DNS on the Proxmox host node after the `127.0.0.1`
|
||||||
|
but before whatever external DNS you are using.
|
||||||
|
|
||||||
|
|
||||||
|
## Setup
|
||||||
|
|
||||||
|
```shell
|
||||||
|
sudo make all
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## Architecture
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -73,7 +73,7 @@ echo "# Creating CT..."
|
|||||||
pctCreateAlpine $ID "${OPTS_STAGE_1}" "$PASS"
|
pctCreateAlpine $ID "${OPTS_STAGE_1}" "$PASS"
|
||||||
|
|
||||||
echo "# Installing dependencies..."
|
echo "# Installing dependencies..."
|
||||||
@ lxc-attach $ID apk add bash bridge iptables traefik
|
@ lxc-attach $ID apk add bash bridge iptables traefik logrotate
|
||||||
|
|
||||||
echo "# Copying assets..."
|
echo "# Copying assets..."
|
||||||
@ pct-push-r $ID ./assets /
|
@ pct-push-r $ID ./assets /
|
||||||
|
|||||||
@ -72,7 +72,7 @@ echo "# Creating CT..."
|
|||||||
pctCreateAlpine $ID "${OPTS_STAGE_1}" "$PASS"
|
pctCreateAlpine $ID "${OPTS_STAGE_1}" "$PASS"
|
||||||
|
|
||||||
echo "# Installing dependencies..."
|
echo "# Installing dependencies..."
|
||||||
@ lxc-attach $ID apk add bash dnsmasq
|
@ lxc-attach $ID apk add bash dnsmasq logrotate
|
||||||
|
|
||||||
echo "# Copying assets..."
|
echo "# Copying assets..."
|
||||||
@ pct-push-r $ID ./assets /
|
@ pct-push-r $ID ./assets /
|
||||||
|
|||||||
@ -64,7 +64,7 @@ echo "# Creating CT..."
|
|||||||
pctCreateAlpine $ID "${OPTS_STAGE_1}" "$PASS"
|
pctCreateAlpine $ID "${OPTS_STAGE_1}" "$PASS"
|
||||||
|
|
||||||
echo "# Installing dependencies..."
|
echo "# Installing dependencies..."
|
||||||
@ lxc-attach $ID apk add bash syncthing
|
@ lxc-attach $ID apk add bash syncthing logrotate
|
||||||
|
|
||||||
echo "# Setup: syncthing..."
|
echo "# Setup: syncthing..."
|
||||||
@ lxc-attach $ID rc-update add syncthing
|
@ lxc-attach $ID rc-update add syncthing
|
||||||
|
|||||||
@ -91,7 +91,7 @@ echo "# Creating CT..."
|
|||||||
pctCreateAlpine $ID "${OPTS_STAGE_1}" "$PASS"
|
pctCreateAlpine $ID "${OPTS_STAGE_1}" "$PASS"
|
||||||
|
|
||||||
echo "# Installing dependencies..."
|
echo "# Installing dependencies..."
|
||||||
@ lxc-attach $ID apk add iptables wireguard-tools-wg-quick make bind-tools libqrencode
|
@ lxc-attach $ID apk add iptables wireguard-tools-wg-quick make bind-tools libqrencode logrotate
|
||||||
|
|
||||||
echo "# Copying assets..."
|
echo "# Copying assets..."
|
||||||
@ pct-push-r $ID ./assets /
|
@ pct-push-r $ID ./assets /
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user