feat: more tools and rename
This commit is contained in:
parent
a5f81bcaef
commit
af9268cbc0
8 changed files with 40 additions and 4 deletions
|
@ -3,3 +3,8 @@
|
|||
> Run them from the *main* directory.
|
||||
|
||||
Tools used for the IXVD infra
|
||||
|
||||
Prefix legend:
|
||||
- `server-*`, these tools will modify only the current server.
|
||||
- `repo/*`, these tools will modify the repo.
|
||||
- `setup/*`, setup scripts
|
3
tools/repo/setup-server-folder.sh
Normal file
3
tools/repo/setup-server-folder.sh
Normal file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
cp -r servers/skel/. servers/${1:-$(hostname)}
|
15
tools/server-docker-compose.sh
Normal file
15
tools/server-docker-compose.sh
Normal file
|
@ -0,0 +1,15 @@
|
|||
#!/bin/sh
|
||||
|
||||
# manage docker-compose with this macro
|
||||
|
||||
if ! [ -d "servers/$(hostname)" ]; then
|
||||
echo "couldn't find servers/$(hostname)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
dc_args="-p $(hostname)"
|
||||
for f in servers/$(hostname)/docker-compose.d/*.yml; do
|
||||
dc_args="$dc_args -f $f"
|
||||
done
|
||||
|
||||
docker-compose $dc_args $@
|
|
@ -2,8 +2,10 @@
|
|||
|
||||
if grep -q "debian" /etc/os-release; then
|
||||
echo "installing packages..."
|
||||
apt update
|
||||
apt install \
|
||||
apt update -y
|
||||
apt install -y \
|
||||
cifs-utils \
|
||||
restic
|
||||
restic \
|
||||
docker.io \
|
||||
docker-compose
|
||||
fi
|
11
tools/setup/40-docker.sh
Normal file
11
tools/setup/40-docker.sh
Normal file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh
|
||||
|
||||
if ! docker network inspect proxy &> /dev/null; then
|
||||
echo "creating proxy network..."
|
||||
docker network create proxy
|
||||
fi
|
||||
|
||||
if ! docker network inspect internal &> /dev/null; then
|
||||
echo "creating internal network..."
|
||||
docker network create internal
|
||||
fi
|
Loading…
Reference in a new issue