Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
vmttn committed Aug 30, 2023
1 parent d8d04c9 commit 496c264
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 6 deletions.
21 changes: 16 additions & 5 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,16 +107,27 @@ jobs:
airflow_conn_pg = TF_OUTPUTS["airflow_conn_pg"]["value"]
public_ip = TF_OUTPUTS["public_ip"]["value"]
docker_host = f"ssh://root@{public_ip}"
print(f"AIRFLOW_CONN_S3={airflow_conn_s3}")
print(f"AIRFLOW_CONN_PG={airflow_conn_pg}")
print(f"DOCKER_HOST_={docker_host}")
print(f"SERVER_PUBLIC_IP={public_ip}")
EOF
)" >> "${GITHUB_ENV}"
- name: set up ssh agent
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
run: |
mkdir -p /home/runner/.ssh
ssh-keyscan SERVER_PUBLIC_IP >> /home/runner/.ssh/known_hosts
echo "${SSH_PRIVATE_KEY}" >> /home/runner/.ssh/key
chmod 600 /home/runner/.ssh/key
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
ssh-add /home/runner/.ssh/key
# - name: start services
# env:
# SSH_AUTH_SOCK: /tmp/ssh_agent.sock
# AIRFLOW_CONN_S3: ${{ env.AIRFLOW_CONN_S3 }}
# AIRFLOW_CONN_PG: ${{ env.AIRFLOW_CONN_PG }}
# BAN_API_URL: ${{ vars.BAN_API_URL }}
Expand All @@ -128,9 +139,9 @@ jobs:
# SIRENE_STOCK_ETAB_LIENS_SUCCESSION_URL: ${{ vars.SIRENE_STOCK_ETAB_LIENS_SUCCESSION_URL }}
# SIRENE_STOCK_UNITE_LEGALE_FILE_URL: ${{ vars.SIRENE_STOCK_UNITE_LEGALE_FILE_URL }}
# AIRFLOW_WWW_USER_PASSWORD: ${{ secrets.AIRFLOW_WWW_USER_PASSWORD }}
# DOCKER_HOST_: ${{ env.DOCKER_HOST_ }}
# SERVER_PUBLIC_IP: ${{ env.SERVER_PUBLIC_IP }}
# run: |
# DOCKER_HOST="${DOCKER_HOST_}" docker compose up -d
# DOCKER_HOST="ssh://root@${SERVER_PUBLIC_IP}" docker compose up -d

destroy:
runs-on: ubuntu-20.04
Expand Down
20 changes: 20 additions & 0 deletions deployment/environments/staging/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion deployment/modules/stack_data/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ resource "scaleway_object_bucket" "main" {

resource "scaleway_iam_application" "main" {
organization_id = data.scaleway_account_project.main.organization_id
name = "airflow"
name = "${var.environment_name}--airflow--tf"
}

data "scaleway_account_project" "main" {
Expand Down

0 comments on commit 496c264

Please sign in to comment.