Browse Source

alpine admin

master
zeus 4 years ago
parent
commit
a07e33dd2b
  1. 13
      files/mongo/docker-compose.yml
  2. 2
      hybrid/scripts/check-wg-connection.sh
  3. 1
      start
  4. 3
      start-venus-stats

13
files/mongo/docker-compose.yml

@ -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:

2
hybrid/scripts/check-wg-connection.sh

@ -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
start

@ -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
start-venus-stats

@ -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