Browse Source

alpine admin

master
zeus 1 month ago
parent
commit
a07e33dd2b
4 changed files with 18 additions and 1 deletions
  1. +13
    -0
      files/mongo/docker-compose.yml
  2. +1
    -1
      hybrid/scripts/check-wg-connection.sh
  3. +1
    -0
      start
  4. +3
    -0
      start-venus-stats

+ 13
- 0
files/mongo/docker-compose.yml View File

@@ -24,6 +24,19 @@ services:
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_INITDB_ROOT_PASSWORD}
MONGO_INITDB_DATABASE: ${MONGO_INITDB_DATABASE}

swlabadminvenus:
hostname: 'swlabadminvenus'
image: 'hub.swarmlab.io:5480/venus-admin:latest'
entrypoint: /bin/bash -c "tail -f /dev/null"
user: root
network_mode: host
cap_add:
- NET_ADMIN
- SYS_MODULE
volumes:
- ${VENUSADMIN}:/config
- /lib/modules:/lib/modules

volumes:
swlabmongovenusData:
swlabmongovenusLog:

+ 1
- 1
hybrid/scripts/check-wg-connection.sh View File

@@ -8,7 +8,7 @@ for f in /sys/class/net/swlab*; do
f="${f#"${f%%[![:space:]]*}"}"
f="${f%"${f##*[![:space:]]}"}"
f=${f:5}
for fdir in ./hybrid/connect/$f*; do
for fdir in /config/$f*; do
if [[ -d "$fdir" && ! -L "$fdir" ]]; then
fdirfull=$fdir
fdirdir=$(basename $fdir)

+ 1
- 0
start View File

@@ -32,6 +32,7 @@ sudo /bin/bash $wdir/hybrid/connect/get-base-ca > /dev/null 2>&1

./update-agent.sh
docker pull hub.swarmlab.io:5480/venusclient:latest
docker pull hub.swarmlab.io:5480/venus-admin:latest

bash ./start-venus-stats


+ 3
- 0
start-venus-stats View File

@@ -70,6 +70,7 @@ conf=$wdir/hybrid/venus-stats/mongod.conf
port=$(EPHEMERAL_PORT)
coll=logs
ip='127.0.0.1'
venusadmin=$wdir/hybrid/connect


cat << FOE > $wdir/hybrid/venus-stats/.env
@@ -83,6 +84,7 @@ MONGO_VENUS_CONF=$conf
MONGO_VENUS_IP=$ip
MONGO_VENUS_PORT=$port
MONGO_VENUS_COLLECTION=$coll
VENUSADMIN=$venusadmin
FOE


@@ -93,6 +95,7 @@ cd $wdir/hybrid/venus-stats;

docker-compose down &&
docker-compose rm &&
docker volume rm venus-stats_swlabmongovenusData &&
docker-compose pull &&
docker-compose build --no-cache &&
docker-compose up -d --force-recreate

Loading…
Cancel
Save