From 0eee8aa843e7aa351938358726f96d7c101f12ee Mon Sep 17 00:00:00 2001 From: HyejiYu <90139122+HyejiYu@users.noreply.github.com> Date: Wed, 20 Nov 2024 18:37:32 +0900 Subject: [PATCH 1/2] Update consumer-actions.yml --- .github/workflows/consumer-actions.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/consumer-actions.yml b/.github/workflows/consumer-actions.yml index 0709b4c..17b1640 100644 --- a/.github/workflows/consumer-actions.yml +++ b/.github/workflows/consumer-actions.yml @@ -24,11 +24,15 @@ jobs: GCE_IP: ${{ secrets.GCE_IP }} GCE_USER: ${{ secrets.GCE_USER }} GCE_SSH_PRIVATE_KEY: ${{ secrets.GCE_SSH_PRIVATE_KEY }} + GCE_SSH_PUBLIC_KEY: ${{ secrets.GCE_SSH_PUBLIC_KEY }} GCE_USER_HOME: ${{ secrets.GCE_USER_HOME }} run: | mkdir -p ~/.ssh echo "${GCE_SSH_PRIVATE_KEY}" > ~/.ssh/id_rsa + echo "${GCE_SSH_PUBLIC_KEY}" >> ~/.ssh/authorized_keys chmod 600 ~/.ssh/id_rsa + chmod 700 ~/.ssh + chmod 600 ~/.ssh/authorized_keys rsync -avz -e "ssh -o StrictHostKeyChecking=no" "$GITHUB_WORKSPACE/messagequeue/consumer/HomePlus_consumer.py" ${GCE_USER}@${GCE_IP}:${GCE_USER_HOME}/HomePlus_consumer.py rsync -avz -e "ssh -o StrictHostKeyChecking=no" "$GITHUB_WORKSPACE/messagequeue/consumer/Oasis_consumer.py" ${GCE_USER}@${GCE_IP}:${GCE_USER_HOME}/Oasis_consumer.py From 0d977208aa7a1a14e082a5ca52f9797d176687f1 Mon Sep 17 00:00:00 2001 From: HyejiYu <90139122+HyejiYu@users.noreply.github.com> Date: Wed, 20 Nov 2024 18:38:18 +0900 Subject: [PATCH 2/2] Update dag-actions.yml --- .github/workflows/dag-actions.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dag-actions.yml b/.github/workflows/dag-actions.yml index 9e462b5..4ccaeeb 100644 --- a/.github/workflows/dag-actions.yml +++ b/.github/workflows/dag-actions.yml @@ -35,11 +35,15 @@ jobs: GCE_IP: ${{ secrets.GCE_IP }} GCE_USER: ${{ secrets.GCE_USER }} GCE_SSH_PRIVATE_KEY: ${{ secrets.GCE_SSH_PRIVATE_KEY }} + GCE_SSH_PUBLIC_KEY: ${{ secrets.GCE_SSH_PUBLIC_KEY }} GCE_AIRFLOW_HOME: ${{ secrets.GCE_AIRFLOW_HOME }} run: | mkdir -p ~/.ssh echo "${GCE_SSH_PRIVATE_KEY}" > ~/.ssh/id_rsa - chmod 600 ~/.ssh/id_rsa # SSH 키 권한 설정 + echo "${GCE_SSH_PUBLIC_KEY}" >> ~/.ssh/authorized_keys + chmod 600 ~/.ssh/id_rsa + chmod 700 ~/.ssh + chmod 600 ~/.ssh/authorized_keys rsync -avz -e "ssh -o StrictHostKeyChecking=no" "$GITHUB_WORKSPACE/airflow/HomePlus_dag.py" ${GCE_USER}@${GCE_IP}:${GCE_AIRFLOW_HOME}/dags/HomePlus_dag.py rsync -avz -e "ssh -o StrictHostKeyChecking=no" "$GITHUB_WORKSPACE/airflow/Oasis_dag.py" ${GCE_USER}@${GCE_IP}:${GCE_AIRFLOW_HOME}/dags/Oasis_dag.py rsync -avz -e "ssh -o StrictHostKeyChecking=no" "$GITHUB_WORKSPACE/airflow/requirements/modules.py" ${GCE_USER}@${GCE_IP}:${GCE_AIRFLOW_HOME}/dags/requirements/modules.py