From 32c4e498f9540faab8410a98f75c86e3d32b27de Mon Sep 17 00:00:00 2001 From: "shimoda.m@nds-tyo.co.jp" Date: Mon, 7 Oct 2024 10:47:57 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9C=AC=E7=95=AA=E7=94=A8=E3=81=AE?= =?UTF-8?q?=E8=A8=AD=E5=AE=9A=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB=E3=82=92?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../product/public1-1/socat-dbconnection-1a.service | 10 ++++++++++ .../product/public1-1/socat-portforwarding-1a.sh | 3 +++ .../product/public2-1/socat-dbconnection-1d.service | 10 ++++++++++ .../product/public2-1/socat-portforwarding-1d.sh | 3 +++ 4 files changed, 26 insertions(+) create mode 100644 ec2/gateway/product/public1-1/socat-dbconnection-1a.service create mode 100644 ec2/gateway/product/public1-1/socat-portforwarding-1a.sh create mode 100644 ec2/gateway/product/public2-1/socat-dbconnection-1d.service create mode 100644 ec2/gateway/product/public2-1/socat-portforwarding-1d.sh diff --git a/ec2/gateway/product/public1-1/socat-dbconnection-1a.service b/ec2/gateway/product/public1-1/socat-dbconnection-1a.service new file mode 100644 index 00000000..551ac04d --- /dev/null +++ b/ec2/gateway/product/public1-1/socat-dbconnection-1a.service @@ -0,0 +1,10 @@ +[Unit] +Description = socat-dbconnection-1a + +[Service] +ExecStart = /opt/socat-portforwarding-1a.sh +Type = oneshot +RemainAfterExit = yes + +[Install] +WantedBy = default.target \ No newline at end of file diff --git a/ec2/gateway/product/public1-1/socat-portforwarding-1a.sh b/ec2/gateway/product/public1-1/socat-portforwarding-1a.sh new file mode 100644 index 00000000..c257a075 --- /dev/null +++ b/ec2/gateway/product/public1-1/socat-portforwarding-1a.sh @@ -0,0 +1,3 @@ +#!/bin/bash +socat tcp4-listen:40001,reuseaddr,fork TCP:mbj-newdwh2021-product-dbcluster-instance-1.chs11qsgoyix.ap-northeast-1.rds.amazonaws.com:3306 & +socat tcp4-listen:50001,reuseaddr,fork TCP:mbj-newdwh2021-product-dbcluster.cluster-chs11qsgoyix.ap-northeast-1.rds.amazonaws.com:3306 & \ No newline at end of file diff --git a/ec2/gateway/product/public2-1/socat-dbconnection-1d.service b/ec2/gateway/product/public2-1/socat-dbconnection-1d.service new file mode 100644 index 00000000..a7f9be7c --- /dev/null +++ b/ec2/gateway/product/public2-1/socat-dbconnection-1d.service @@ -0,0 +1,10 @@ +[Unit] +Description = socat-dbconnection-1d + +[Service] +ExecStart = /opt/socat-portforwarding-1d.sh +Type = oneshot +RemainAfterExit = yes + +[Install] +WantedBy = default.target \ No newline at end of file diff --git a/ec2/gateway/product/public2-1/socat-portforwarding-1d.sh b/ec2/gateway/product/public2-1/socat-portforwarding-1d.sh new file mode 100644 index 00000000..0f1d2747 --- /dev/null +++ b/ec2/gateway/product/public2-1/socat-portforwarding-1d.sh @@ -0,0 +1,3 @@ +#!/bin/bash +socat tcp4-listen:40001,reuseaddr,fork TCP:mbj-newdwh2021-product-dbcluster-instance-1-ap-northeast-1d.chs11qsgoyix.ap-northeast-1.rds.amazonaws.com:3306 & +socat tcp4-listen:50001,reuseaddr,fork TCP:mbj-newdwh2021-product-dbcluster.cluster-chs11qsgoyix.ap-northeast-1.rds.amazonaws.com:3306 & \ No newline at end of file