mirror of
https://code.forgejo.org/actions/setup-forgejo.git
synced 2024-12-26 06:42:17 -05:00
nested LXC need different IP ranges
This commit is contained in:
parent
8b2ff23fc0
commit
9279b526cd
2 changed files with 7 additions and 5 deletions
|
@ -6,7 +6,7 @@ jobs:
|
|||
- uses: actions/checkout@v3
|
||||
- run: |
|
||||
set -x
|
||||
./dependencies.sh
|
||||
LXC_IP_RANGE=10.0.9 ./dependencies.sh
|
||||
./forgejo.sh setup root admin1234 codeberg.org/forgejo/forgejo:1.19
|
||||
./forgejo-runner.sh setup
|
||||
# testdata/run.sh workflow http://root:admin1234@$(cat forgejo-ip):3000 root demo
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
set -x
|
||||
|
||||
: ${LXC_IP_RANGE:=10.0.8}
|
||||
|
||||
function install_docker() {
|
||||
if ! systemctl is-active --quiet docker; then
|
||||
echo deb http://deb.debian.org/debian bullseye-backports main | tee /etc/apt/sources.list.d/backports.list && apt-get update
|
||||
|
@ -16,11 +18,11 @@ function install_lxc() {
|
|||
systemctl disable --now dnsmasq
|
||||
apt-get install -y -qq lxc
|
||||
systemctl stop lxc-net
|
||||
cat >> /etc/default/lxc-net <<'EOF'
|
||||
LXC_ADDR="10.0.8.1"
|
||||
cat >> /etc/default/lxc-net <<EOF
|
||||
LXC_ADDR="$LXC_IP_RANGE.1"
|
||||
LXC_NETMASK="255.255.255.0"
|
||||
LXC_NETWORK="10.0.8.0/24"
|
||||
LXC_DHCP_RANGE="10.0.8.2,10.0.8.254"
|
||||
LXC_NETWORK="$LXC_IP_RANGE.0/24"
|
||||
LXC_DHCP_RANGE="$LXC_IP_RANGE.2,$LXC_IP_RANGE.254"
|
||||
LXC_DHCP_MAX="253"
|
||||
EOF
|
||||
systemctl start lxc-net
|
||||
|
|
Loading…
Reference in a new issue