From abfe52c822464acec87609f29c97376b8570303c Mon Sep 17 00:00:00 2001 From: Nikita Date: Sun, 6 Sep 2020 16:06:21 +1000 Subject: [PATCH 1/7] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B5=D0=BD=D0=B5=D1=81?= =?UTF-8?q?=D0=B5=D0=BD=D1=8B=20=D1=81=D0=BA=D1=80=D0=B8=D0=BF=D1=82=D1=8B?= =?UTF-8?q?=20VPN=20=D0=B2=20=D0=BE=D1=82=D0=B4=D0=B5=D0=BB=D1=8C=D0=BD?= =?UTF-8?q?=D1=83=D1=8E=20=D0=BF=D0=B0=D0=BF=D0=BA=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cloud-bastion.ovpn => VPN/cloud-bastion.ovpn | 0 setupvpn.sh => VPN/setupvpn.sh | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename cloud-bastion.ovpn => VPN/cloud-bastion.ovpn (100%) rename setupvpn.sh => VPN/setupvpn.sh (100%) diff --git a/cloud-bastion.ovpn b/VPN/cloud-bastion.ovpn similarity index 100% rename from cloud-bastion.ovpn rename to VPN/cloud-bastion.ovpn diff --git a/setupvpn.sh b/VPN/setupvpn.sh similarity index 100% rename from setupvpn.sh rename to VPN/setupvpn.sh From f709ccf46c830c217c0a6ea88f1c24bcb6328f89 Mon Sep 17 00:00:00 2001 From: Nikita Date: Sun, 6 Sep 2020 16:07:58 +1000 Subject: [PATCH 2/7] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=20IP=20=D1=82=D0=B5=D1=81=D1=82=D0=BE=D0=B2=D0=BE=D0=B3?= =?UTF-8?q?=D0=BE=20=D0=BF=D1=80=D0=B8=D0=BB=D0=BE=D0=B6=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index dc03fda..1acd70f 100644 --- a/README.md +++ b/README.md @@ -4,5 +4,10 @@ korobeynikovnv Infra repository для chain подключения через bastion использовать: ssh -J appuser@84.201.138.71 appuser@10.130.0.12 +#Домашнее задание №5 VPN через pritunl bastion_IP=84.201.177.74 someinternalhost_IP=10.130.0.12 + +#Домашнее задание №6 тестовое приложение на руби +testapp_IP = 130.193.38.55 +testapp_port = 9292 From f590d88e936a51249c88e01765f898fc0534ee99 Mon Sep 17 00:00:00 2001 From: Nikita Date: Sun, 6 Sep 2020 18:43:54 +1000 Subject: [PATCH 3/7] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D1=8B=20=D1=81=D0=BA=D1=80=D0=B8=D0=BF=D1=82=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy.sh | 4 ++++ install_mongodb.sh | 5 +++++ install_ruby.sh | 3 +++ 3 files changed, 12 insertions(+) create mode 100644 deploy.sh create mode 100644 install_mongodb.sh create mode 100644 install_ruby.sh diff --git a/deploy.sh b/deploy.sh new file mode 100644 index 0000000..6b3f66d --- /dev/null +++ b/deploy.sh @@ -0,0 +1,4 @@ +#!/bin/bash +git clone -b monolith https://github.com/express42/reddit.git +cd reddit && bundle install +puma -d diff --git a/install_mongodb.sh b/install_mongodb.sh new file mode 100644 index 0000000..2ae392c --- /dev/null +++ b/install_mongodb.sh @@ -0,0 +1,5 @@ +#!/bin/bash +wget -qO - https://www.mongodb.org/static/pgp/server-4.2.asc | sudo apt-key add - +echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.2.list +sudo systemctl start mongod +sudo systemctl enable mongod diff --git a/install_ruby.sh b/install_ruby.sh new file mode 100644 index 0000000..7290649 --- /dev/null +++ b/install_ruby.sh @@ -0,0 +1,3 @@ +#!/bin/bash +apt update +apt install -y ruby-full ruby-bundler build-essential From 0059cb77f85010b608aa2fa1e0b0f95d2a178112 Mon Sep 17 00:00:00 2001 From: Nikita Date: Sun, 6 Sep 2020 09:02:27 +0000 Subject: [PATCH 4/7] +chmodx --- deploy.sh | 0 install_mongodb.sh | 0 install_ruby.sh | 0 3 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 deploy.sh mode change 100644 => 100755 install_mongodb.sh mode change 100644 => 100755 install_ruby.sh diff --git a/deploy.sh b/deploy.sh old mode 100644 new mode 100755 diff --git a/install_mongodb.sh b/install_mongodb.sh old mode 100644 new mode 100755 diff --git a/install_ruby.sh b/install_ruby.sh old mode 100644 new mode 100755 From bcb57737d3eb2061ec218fa13a59baf6c8328290 Mon Sep 17 00:00:00 2001 From: Nikita Date: Sun, 6 Sep 2020 09:32:23 +0000 Subject: [PATCH 5/7] fixed script errors --- deploy.sh | 5 ++++- install_mongodb.sh | 2 ++ reddit | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) create mode 160000 reddit diff --git a/deploy.sh b/deploy.sh index 6b3f66d..017cc4f 100755 --- a/deploy.sh +++ b/deploy.sh @@ -1,4 +1,7 @@ #!/bin/bash +sudo apt-get update +sudo apt-get install -y git git clone -b monolith https://github.com/express42/reddit.git -cd reddit && bundle install +cd reddit +bundle install puma -d diff --git a/install_mongodb.sh b/install_mongodb.sh index 2ae392c..fafcd42 100755 --- a/install_mongodb.sh +++ b/install_mongodb.sh @@ -1,5 +1,7 @@ #!/bin/bash wget -qO - https://www.mongodb.org/static/pgp/server-4.2.asc | sudo apt-key add - echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.2.list +sudo apt-get update +sudo apt-get install -y mongodb-org sudo systemctl start mongod sudo systemctl enable mongod diff --git a/reddit b/reddit new file mode 160000 index 0000000..5c217c5 --- /dev/null +++ b/reddit @@ -0,0 +1 @@ +Subproject commit 5c217c565c1122c5343dc0514c116ae816c17ca2 From 79dfd69820f833a1c8d17ef2e1ef6d32434054d8 Mon Sep 17 00:00:00 2001 From: Nikita Date: Sun, 6 Sep 2020 03:22:11 -0700 Subject: [PATCH 6/7] added https support --- README.md | 2 +- install_mongodb.sh | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1acd70f..b6079c7 100644 --- a/README.md +++ b/README.md @@ -9,5 +9,5 @@ bastion_IP=84.201.177.74 someinternalhost_IP=10.130.0.12 #Домашнее задание №6 тестовое приложение на руби -testapp_IP = 130.193.38.55 +testapp_IP = 178.154.227.39 testapp_port = 9292 diff --git a/install_mongodb.sh b/install_mongodb.sh index fafcd42..22e12b9 100755 --- a/install_mongodb.sh +++ b/install_mongodb.sh @@ -1,4 +1,6 @@ #!/bin/bash +apt-get update +apt-get install apt-transport-https ca-certificates wget -qO - https://www.mongodb.org/static/pgp/server-4.2.asc | sudo apt-key add - echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.2.list sudo apt-get update From 336aed031873df62bb50f93eda82c549ef4a984e Mon Sep 17 00:00:00 2001 From: Nikita Date: Thu, 17 Sep 2020 14:30:18 +0000 Subject: [PATCH 7/7] changed ip --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b6079c7..b84a6d2 100644 --- a/README.md +++ b/README.md @@ -9,5 +9,5 @@ bastion_IP=84.201.177.74 someinternalhost_IP=10.130.0.12 #Домашнее задание №6 тестовое приложение на руби -testapp_IP = 178.154.227.39 +testapp_IP = 178.154.224.94 testapp_port = 9292