Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
N
nextgen-router
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
nextgen-router
Commits
6ded7cc6
Commit
6ded7cc6
authored
Nov 12, 2024
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
async and migrate image
parent
5999d343
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
58 additions
and
32 deletions
+58
-32
cloud.yaml
cloud.yaml
+2
-2
files/bridge-post-scripts/post-up.sh.j2
files/bridge-post-scripts/post-up.sh.j2
+2
-0
files/bridge-post-scripts/pre-down.sh.j2
files/bridge-post-scripts/pre-down.sh.j2
+2
-0
files/bridge-post-scripts/pre-up.sh.j2
files/bridge-post-scripts/pre-up.sh.j2
+2
-0
files/dhcpv6/docker-compose.yml.j2
files/dhcpv6/docker-compose.yml.j2
+2
-2
files/dnsmasq/docker-compose.yml.j2
files/dnsmasq/docker-compose.yml.j2
+2
-2
files/interfaces.j2
files/interfaces.j2
+8
-0
files/services/docker-compose.yml.j2
files/services/docker-compose.yml.j2
+4
-4
install.yaml
install.yaml
+7
-7
tasks/mcnetwork-install-process.yaml
tasks/mcnetwork-install-process.yaml
+24
-15
variables.yaml
variables.yaml
+3
-0
No files found.
cloud.yaml
View file @
6ded7cc6
...
...
@@ -32,8 +32,8 @@
name
:
'
{{item}}'
source
:
pull
with_items
:
-
git-registry.m
ycard.moe
/nanahira/docker-smartdns
-
git-registry.m
ycard.moe
/nanahira/dnsmasq:original
-
git-registry.m
oenext.com
/nanahira/docker-smartdns
-
git-registry.m
oenext.com
/nanahira/dnsmasq:original
-
name
:
clean some rubbish packages
become
:
true
apt
:
...
...
files/bridge-post-scripts/post-up.sh.j2
View file @
6ded7cc6
...
...
@@ -76,7 +76,9 @@ handle_gateway() {
ip rule add pref 100 fwmark
"
$GATEWAY_NEXT_HOP_MARK
"
lookup
"
$GATEWAY_NEXT_HOP_MARK
"
ip rule add pref 400 fwmark
"
$GATEWAY_SELECTION_MARK
"
lookup
"
$GATEWAY_NEXT_HOP_MARK
"
{
%
if
not br.noOrigin | default
(
false
)
%
}
eth_origin
-I
"
$BRIDGE_NAME
"
"
$GATEWAY_ID
"
"
$GATEWAY_ADDRESS
"
"
$GATEWAY_MAC
"
{
% endif %
}
}
{
%
if
br.gateways is defined and br.gateways %
}
...
...
files/bridge-post-scripts/pre-down.sh.j2
View file @
6ded7cc6
...
...
@@ -25,7 +25,9 @@ handle_gateway() {
ip rule del pref 100 fwmark
"
$GATEWAY_NEXT_HOP_MARK
"
lookup
"
$GATEWAY_NEXT_HOP_MARK
"
ip rule del pref 400 fwmark
"
$GATEWAY_SELECTION_MARK
"
lookup
"
$GATEWAY_NEXT_HOP_MARK
"
{
%
if
not br.noOrigin | default
(
false
)
%
}
eth_origin
-D
"
$BRIDGE_NAME
"
"
$GATEWAY_ID
"
"
$GATEWAY_ADDRESS
"
"
$GATEWAY_MAC
"
{
% endif %
}
}
{
%
if
br.gateways is defined and br.gateways %
}
...
...
files/bridge-post-scripts/pre-up.sh.j2
View file @
6ded7cc6
...
...
@@ -11,8 +11,10 @@ export BRIDGE_NAME={{br.name}}
{
%
for
link
in
br.links %
}
# link {{link}}
{
%
if
not
(
br.noWaitUp | default
(
false
))
%
}
## Ensure link is up
_wait_for_interface_online
"{{link}}"
{
% endif %
}
{
%
if
br.macvlan is defined and br.macvlan %
}
## macvlan {{br.name}}{{link | regex_replace('\.', '')}} of {{link}}
...
...
files/dhcpv6/docker-compose.yml.j2
View file @
6ded7cc6
...
...
@@ -6,7 +6,7 @@ services:
{% if br.dhcpv6Receive is defined and br.dhcpv6Receive %}
dhcpv6-{{srcbr.name}}-{{br.name}}:
restart: always
image: git-registry.m
ycard.moe
/nanahira/docker-dhcpv6-client
image: git-registry.m
oenext.com
/nanahira/docker-dhcpv6-client
network_mode: host
cap_add:
- NET_ADMIN
...
...
@@ -23,7 +23,7 @@ services:
{% for br in bridges %}
{% if br.dhcpv6Receive is defined and br.dhcpv6Receive %}
dhcpv6-ppp{{ppp.id}}-{{br.name}}:
image: git-registry.m
ycard.moe
/nanahira/docker-dhcpv6-client
image: git-registry.m
oenext.com
/nanahira/docker-dhcpv6-client
network_mode: host
cap_add:
- NET_ADMIN
...
...
files/dnsmasq/docker-compose.yml.j2
View file @
6ded7cc6
...
...
@@ -3,7 +3,7 @@ services:
{% if not (smartdns.external is defined and smartdns.external) %}
smartdns:
restart: always
image: git-registry.m
ycard.moe
/nanahira/docker-smartdns
image: git-registry.m
oenext.com
/nanahira/docker-smartdns
network_mode: host
command: -f -x -c /etc/smartdns/smartdns.conf
volumes:
...
...
@@ -12,7 +12,7 @@ services:
{% endif %}
dnsmasq:
restart: always
image: git-registry.m
ycard.moe
/nanahira/dnsmasq:original
image: git-registry.m
oenext.com
/nanahira/dnsmasq:original
network_mode: host
cap_add:
- NET_ADMIN
...
...
files/interfaces.j2
View file @
6ded7cc6
...
...
@@ -88,8 +88,12 @@ iface {{vlan.link}}.{{vlan.tag}} inet6 manual
{% for br in bridges %}
## {{br.name}}
{% if br.async | default(false) %}
auto {{br.name}} &
{% else %}
auto {{br.name}}
allow-hotplug {{br.name}}
{% endif %}
iface {{br.name}} inet {{br.type}}
{% if not (br.direct is defined and br.direct) %}
{% if br.links is defined and br.links and br.links | length > 0 %}
...
...
@@ -140,8 +144,12 @@ mtu {{br.mtu}}
{% if ppps is defined and ppps %}
{% for ppp in ppps %}
## ppp{{ppp.id}}
{% if br.async | default(false) %}
auto ppp{{ppp.id}} &
{% else %}
auto ppp{{ppp.id}}
allow-hotplug ppp{{ppp.id}}
{% endif %}
iface ppp{{ppp.id}} inet ppp
pre-up {{ansible_user_dir}}/nextgen-router/scripts/ppp{{ppp.id}}/pre-up.sh
post-down {{ansible_user_dir}}/nextgen-router/scripts/ppp{{ppp.id}}/post-down.sh
...
...
files/services/docker-compose.yml.j2
View file @
6ded7cc6
...
...
@@ -2,12 +2,12 @@ version: '2.4'
services:
lldpd:
restart: always
image: git-registry.m
ycard.moe
/nanahira/docker-lldp
image: git-registry.m
oenext.com
/nanahira/docker-lldp
network_mode: host
{% if gdut is defined and gdut %}
drcom:
restart: always
image: git-registry.m
ycard.moe
/nanahira/gdut-drcom
image: git-registry.m
oenext.com
/nanahira/gdut-drcom
network_mode: host
command: --remote-ip {{gdut.remote}} --keep-alive1-flag {{gdut.flag}} --enable-crypt 1
{% endif %}
...
...
@@ -24,7 +24,7 @@ services:
{% if dnsmasq.aptCacher is defined and (dnsmasq.aptCacher == "localhost" or (dnsmasq.aptCacher.localhost is defined and dnsmasq.aptCacher.localhost)) %}
apt-cacher-ng:
restart: always
image: git-registry.m
ycard.moe
/nanahira/apt-cacher-ng-docker:latest
image: git-registry.m
oenext.com
/nanahira/apt-cacher-ng-docker:latest
environment:
UPSTREAM_MIRROR: {{ dnsmasq.aptCacher.upstream | default('http://mirrors.tuna.tsinghua.edu.cn') }}
ports:
...
...
@@ -50,7 +50,7 @@ services:
- ./pxe/menus:/data
pxe-nginx:
restart: always
image: git-registry.m
ycard.moe
/nanahira/docker-nginx-plus
image: git-registry.m
oenext.com
/nanahira/docker-nginx-plus
ports:
- '{{services.address}}:16980:16980'
volumes:
...
...
install.yaml
View file @
6ded7cc6
...
...
@@ -51,15 +51,15 @@
name
:
'
{{item}}'
source
:
pull
with_items
:
-
git-registry.m
ycard.moe
/nanahira/docker-smartdns
-
git-registry.m
ycard.moe
/nanahira/dnsmasq:original
-
git-registry.m
ycard.moe
/nanahira/docker-dhcpv6-client
-
git-registry.m
ycard.moe
/nanahira/docker-lldp
-
git-registry.m
ycard.moe
/nanahira/gdut-drcom
-
git-registry.m
oenext.com
/nanahira/docker-smartdns
-
git-registry.m
oenext.com
/nanahira/dnsmasq:original
-
git-registry.m
oenext.com
/nanahira/docker-dhcpv6-client
-
git-registry.m
oenext.com
/nanahira/docker-lldp
-
git-registry.m
oenext.com
/nanahira/gdut-drcom
-
teddysun/kms
-
git-registry.m
ycard.moe
/nanahira/apt-cacher-ng-docker:latest
-
git-registry.m
oenext.com
/nanahira/apt-cacher-ng-docker:latest
-
wastrachan/tftpd
-
git-registry.m
ycard.moe
/nanahira/docker-nginx-plus
-
git-registry.m
oenext.com
/nanahira/docker-nginx-plus
-
oznu/cloudflare-ddns
-
cturra/ntp
handlers
:
...
...
tasks/mcnetwork-install-process.yaml
View file @
6ded7cc6
-
name
:
pull images
docker_image
:
name
:
'
{{item}}'
source
:
pull
with_items
:
-
git-registry.mycard.moe/railgun/gateways-monitor
-
git-registry.mycard.moe/railgun/babeld
-
git-registry.mycard.moe/railgun/ocserv
-
git-registry.mycard.moe/railgun/openconnect
-
git-registry.mycard.moe/nanahira/gost
-
git-registry.mycard.moe/railgun/tun:new
#- git-registry.mycard.moe/railgun/railgun-routing-client
-
name
:
image for arp
-
name
:
Define Docker images array
set_fact
:
mcnetwork_docker_images
:
-
git-registry.moenext.com/railgun/gateways-monitor
-
git-registry.moenext.com/railgun/babeld
-
git-registry.moenext.com/railgun/ocserv
-
git-registry.moenext.com/railgun/openconnect
-
git-registry.moenext.com/nanahira/gost
-
git-registry.moenext.com/railgun/tun:new
# - git-registry.moenext.com/railgun/railgun-routing-client
-
name
:
Add warp-proxy image to mcnetwork_docker_images if architecture is x86_64
set_fact
:
mcnetwork_docker_images
:
"
{{
mcnetwork_docker_images
+
['git-registry.moenext.com/nanahira/warp-proxy']
}}"
when
:
ansible_architecture == 'x86_64'
-
name
:
Pull Docker images
docker_image
:
name
:
git-registry.mycard.moe/nanahira/warp-proxy
name
:
'
{{
item
}}'
source
:
pull
when
:
ansible_architecture == 'x86_64'
with_items
:
"
{{
mcnetwork_docker_images
}}"
-
name
:
Tag Docker images
shell
:
|
{% for image in mcnetwork_docker_images %}
docker tag {{ image }} {{ image | regex_replace('git-registry.moenext.com', 'git-registry.mycard.moe') }}
{% endfor %}
changed_when
:
false
-
name
:
debian packages
become
:
true
apt
:
...
...
variables.yaml
View file @
6ded7cc6
...
...
@@ -47,6 +47,9 @@ vars:
file
:
somefile.txt
address
:
10.0.0.4
interfaces_custom
:
'
'
# 自定义条目
noWaitUp
:
false
# 不等待链路有效
noOrigin
:
false
# 不设置源进源出规则
async
:
false
# 异步启动,不等待系统开机
-
name
:
brwan
links
:
-
bond0.2
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment