Browse Source

Add n2 container and try to get its records from n1

via the authority records.
master
juga 11 months ago
parent
commit
c5aa0c7125
2 changed files with 35 additions and 3 deletions
  1. +14
    -0
      docker-compose.yml
  2. +21
    -3
      docker/gnunet/test.sh

+ 14
- 0
docker-compose.yml View File

@ -29,6 +29,20 @@ services:
- "7776"
restart: unless-stopped
gnunet.n2.pep.example:
image: ${GNUNET_IMAGE:-gnunet}
container_name: gnunet.n2.pep.example
hostname: gnunet
domainname: n2.pep.example
volumes:
- ./tmp/n2:/home/gnunet
- ./docker/gnunet.conf:/home/gnunet/.config/gnunet.conf
ports:
- "7777:7776"
expose:
- "7776"
restart: unless-stopped
# Naming the services with the FQDN so that the containers can resolve the
# other containers in the same network domains.
n1.pep.example:


+ 21
- 3
docker/gnunet/test.sh View File

@ -4,8 +4,9 @@ set -x
mkdir -p ./tmp/authority/.config
mkdir -p ./tmp/n1/.config
chown -R 1000:1000 ./tmp/authority ./tmp/n1
docker-compose up -d gnunet.n1.pep.example authority.pep.example
mkdir -p ./tmp/n2/.config
chown -R 1000:1000 ./tmp/authority ./tmp/n1 ./tmp/n2
docker-compose up -d gnunet.n1.pep.example gnunet.n2.pep.example authority.pep.example
sleep 3
echo "Test how would a node register itself in GNS via its GNUnet node and register to an Authority."
@ -51,4 +52,21 @@ docker exec gnunet.n1.pep.example gnunet-namestore -z root -a -e "1 d" -p -t PKE
echo "In gnunet.n1, ask about authority records."
docker exec gnunet.n1.pep.example gnunet-gns -t A -u authority.authority.root
docker-compose stop
echo "All process with gnunet.n2.pep.example"
docker exec gnunet.n2.pep.example gnunet-identity -C root
docker exec gnunet.n2.pep.example gnunet-identity -d
N2=$(docker exec gnunet.n2.pep.example gnunet-identity -d | grep root | awk '{print $3}')
echo $N2
docker exec gnunet.n2.pep.example gnunet-identity -s namestore -e root
docker exec gnunet.n2.pep.example gnunet-namestore -D
docker exec gnunet.n2.pep.example gnunet-namestore -z root -a -e "1 d" -p -t A -n n2 -V 172.19.0.4
docker exec gnunet.n2.pep.example gnunet-gns -t A -u n2.root
docker exec gnunet.n2.pep.example gnunet-namestore -z root -a -e "1 d" -p -t PKEY -n authority -V $AUTHORITY
docker exec gnunet.n2.pep.example gnunet-gns -t A -u authority.authority.root
docker exec authority.pep.example gnunet-namestore -z root -a -e "1 d" -p -t PKEY -n n2 -V $N2
docker exec authority.pep.example gnunet-gns -t A -u n2.n2.root
echo "In gnunet.n2, Is it possible now to ask about the n2 records that the authority have?"
# This does not answer, needs some time?
#docker exec gnunet.n2.pep.example gnunet-gns -t A -u n1.authority.root
# docker-compose stop

Loading…
Cancel
Save