From 2ffc80682dfd8ba0d106673783da4949f11bb93c Mon Sep 17 00:00:00 2001 From: yuusuke_kanamura Date: Tue, 10 Sep 2024 17:57:36 +0900 Subject: [PATCH] =?UTF-8?q?feat:=E3=82=A4=E3=83=B3=E3=82=B9=E3=82=BF?= =?UTF-8?q?=E3=83=B3=E3=82=B9=E8=B5=B7=E5=8B=95=E3=81=97=E3=81=9F=E9=9A=9B?= =?UTF-8?q?=E3=81=ABsocat=E3=81=AE=E3=83=97=E3=83=AD=E3=82=BB=E3=82=B9?= =?UTF-8?q?=E3=82=92=E8=87=AA=E5=8B=95=E5=AE=9F=E8=A1=8C=E3=81=99=E3=82=8B?= =?UTF-8?q?=E5=87=A6=E7=90=86=E3=81=AE=E8=A8=AD=E5=AE=9A=E3=83=95=E3=82=A1?= =?UTF-8?q?=E3=82=A4=E3=83=AB=E3=81=AE=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../staging/public1-1/socat-dbconnection-1a.service | 10 ++++++++++ .../staging/public1-1/socat-portforwarding-1a.sh | 3 +++ .../staging/public2-1/socat-dbconnection-1d.service | 10 ++++++++++ .../staging/public2-1/socat-portforwarding-1d.sh | 3 +++ 4 files changed, 26 insertions(+) create mode 100644 ec2/gateway/staging/public1-1/socat-dbconnection-1a.service create mode 100644 ec2/gateway/staging/public1-1/socat-portforwarding-1a.sh create mode 100644 ec2/gateway/staging/public2-1/socat-dbconnection-1d.service create mode 100644 ec2/gateway/staging/public2-1/socat-portforwarding-1d.sh diff --git a/ec2/gateway/staging/public1-1/socat-dbconnection-1a.service b/ec2/gateway/staging/public1-1/socat-dbconnection-1a.service new file mode 100644 index 00000000..ce2d87d3 --- /dev/null +++ b/ec2/gateway/staging/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/staging/public1-1/socat-portforwarding-1a.sh b/ec2/gateway/staging/public1-1/socat-portforwarding-1a.sh new file mode 100644 index 00000000..7ae1aa37 --- /dev/null +++ b/ec2/gateway/staging/public1-1/socat-portforwarding-1a.sh @@ -0,0 +1,3 @@ +#!/bin/bash +socat tcp4-listen:40001,reuseaddr,fork TCP:mbj-newdwh2021-staging-dbcluster-instance-1.chs11qsgoyix.ap-northeast-1.rds.amazonaws.com:3306 & +socat tcp4-listen:50001,reuseaddr,fork TCP:mbj-newdwh2021-staging-dbcluster.cluster-chs11qsgoyix.ap-northeast-1.rds.amazonaws.com:3306 & \ No newline at end of file diff --git a/ec2/gateway/staging/public2-1/socat-dbconnection-1d.service b/ec2/gateway/staging/public2-1/socat-dbconnection-1d.service new file mode 100644 index 00000000..06c0c649 --- /dev/null +++ b/ec2/gateway/staging/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/staging/public2-1/socat-portforwarding-1d.sh b/ec2/gateway/staging/public2-1/socat-portforwarding-1d.sh new file mode 100644 index 00000000..2560a8a2 --- /dev/null +++ b/ec2/gateway/staging/public2-1/socat-portforwarding-1d.sh @@ -0,0 +1,3 @@ +#!/bin/bash +socat tcp4-listen:40001,reuseaddr,fork TCP:mbj-newdwh2021-staging-dbcluster-instance-1-ap-northeast-1d.chs11qsgoyix.ap-northeast-1.rds.amazonaws.com:3306 & +socat tcp4-listen:50001,reuseaddr,fork TCP:mbj-newdwh2021-staging-dbcluster.cluster-chs11qsgoyix.ap-northeast-1.rds.amazonaws.com:3306 & \ No newline at end of file