-
Notifications
You must be signed in to change notification settings - Fork 1
Development Instructions
Julio SANTILARIO BERTHILIER edited this page Jan 19, 2024
·
1 revision
- Clone this repository
- Verify that you have latest Vagrant and VirtualBox (tested with 6.0)
- Open a terminal in the cloned directory and run
vagrant up
Note: The first time you run this command it will take a long time because Vagrant needs to download, aprovision and install the base required software.
- run
vagrant ssh
to get inside VM - run
cd docker-stacks
- run
./simva install
Note: The first time you run this command it will take a long time because it is required to download all docker images required for SIMVA.
- run
./simva start
to start all containers.
Note: The first time you run this command it will take a long time because all componentes need to initialize.
By default Vagrant maps the following ports:
- 8080 (host) -> 80 (guest)
- 8443 (host) -> 443 (guest)
To simplify things you may want to apply the following instructions in order to map to regular ports using the OS firewall / capabilities.
sudo iptables -I INPUT 1 -p tcp --dport 8443 -j ACCEPT
sudo iptables -I INPUT 1 -p tcp --dport 8080 -j ACCEPT
sudo iptables -I INPUT 1 -p tcp --dport 443 -j ACCEPT
sudo iptables -I INPUT 1 -p tcp --dport 80 -j ACCEPT
sudo iptables -t nat -I PREROUTING 1 -p tcp --dport 443 -d 127.0.0.1 -j REDIRECT --to-ports 8443
sudo iptables -t nat -I PREROUTING 1 -p tcp --dport 80 -d 127.0.0.1 -j REDIRECT --to-ports 8080
# https://serverfault.com/questions/211536/iptables-port-redirect-not-working-for-localhost
# PREROUTING isn't used by the loopback interface, you need to also add an OUTPUT rule:
sudo iptables -t nat -I OUTPUT -p tcp -o lo -d 127.0.0.1 --dport 80 -j REDIRECT --to-ports 8080
sudo iptables -t nat -I OUTPUT -p tcp -o lo -d 127.0.0.1 --dport 443 -j REDIRECT --to-ports 8443
See:
- https://davidhamann.de/2019/06/20/setting-up-portproxy-netsh/
- https://docs.microsoft.com/en-us/windows-server/networking/technologies/netsh/netsh-interface-portproxy
ssh -L0.0.0.0:9092:localhost:9092 -o UserKnownHostsFile=/dev/null -N [email protected]
docker run \
--name tunnel-kafka1 \
--publish 9092:9092 \
--network kafka_services \
-d \
alpine/socat \
tcp-listen:9092,fork,reuseaddr tcp-connect:kafka1.internal.test:9092
docker run \
--name tunnel-traefik-http \
--network host \
-d \
alpine/socat \
tcp-listen:80,fork,bind=172.29.0.1 tcp-connect:192.168.253.2:80
docker run \
--name tunnel-traefik-https \
--network host \
-d \
alpine/socat \
tcp-listen:443,fork,bind=172.29.0.1 tcp-connect:192.168.253.2:443