SantikaS Infra repository
##Connection to one command: ssh -i ~/.ssh/appuser -A [email protected] -p 2222 ##On bastion host: ##Turn on ipv4_forwarding sudo nano /etc/sysctl.conf ##Uncomment #net.ipv4.ip_forward=1 net.ipv4.ip_forward=1 ##Save and exit. ##Further apply. sudo sysctl -p ##Forwarding port 2222 from bastion to port 22 of someinternalhost sudo iptables -t nat -A PREROUTING -p tcp --dport 2222 -j DNAT --to 10.128.0.35:22 sudo iptables -t nat -A POSTROUTING -o eth0 -p tcp --dport 22 -d 10.128.0.35 -j SNAT --to 10.128.0.25:2222 ##Save iptables sudo apt install iptables-persistent sudo service netfilter-persistent save ##Checking sudo iptables -t nat -L
##On local host: ##Checking: ssh -i ~/.ssh/appuser -A [email protected] -p 2222
##Connection by alias someinternalhost nano ~/.ssh/config ##Add to file Host someinternalhost HostName 51.250.94.202 User appuser IdentityFIle ~/.ssh/appuser Port 2222
##Checking ssh someinternalhost
##VPN Connect configuration bastion_IP = 51.250.94.202 someinternalhost_IP = 10.128.0.35
##DZ N4 testapp_IP = 178.154.207.23 testapp_port = 9292
##Add script startup.sh and metadata.yaml ##Run script bash startup.sh
##DZ N5 http://84.201.167.175:9292/
##DZ N6 ##ip APP: http://51.250.84.123:9292/ ##ip balancer: http://51.250.89.147:8080/
##DZ Т7
##DZ N8
##DZ N9
##DZ N10
##DZ N11 ##Install VirtualBox @ Vagrant ##Add Vagrantfile ##Add config_mongo.yml ##Fix db/tasks/main.yml ##Fix app/tasks/ruby.yml ##Fix app/tasks/puma.yml ##Fix ansible/playbooks/deploy.yml ##Install Molecule, Testinfra, Virtualenv ##Fix ansible/requirements.txt ##Add db/molecule/default/tests/test_default.py ##Fix db/molecule/default/molecule.yml
##DZ N12-13 ##Install Docker ##Install Docker-machine ##Create Dockerfile ##Register on Docker Hub ##Create directory docker-monolith/infra ##Create files head.tf,main.tf,variables.tf ##Create docker.yml,deploy.yml,site.yml,ansible.cfg ##Create variables.json,create-docker-reddit-vm.sh