Skip to content

Enable deployments to Azure instance - #46

Merged
alexander-wudy merged 8 commits into
mainfrom
feature/Setup-Dev-Instance-Deploy-to-Azure-#34
Jun 19, 2026
Merged

Enable deployments to Azure instance#46
alexander-wudy merged 8 commits into
mainfrom
feature/Setup-Dev-Instance-Deploy-to-Azure-#34

Conversation

@alexander-wudy

Copy link
Copy Markdown
Collaborator

The automatic deployments might not immediately work, as I will have to probably tinker with the GitHub Secrets for a short bit. But otherwise, this should be the implementation for Terraform and Ansible

@alexander-wudy alexander-wudy self-assigned this Jun 10, 2026
@alexander-wudy alexander-wudy linked an issue Jun 10, 2026 that may be closed by this pull request
@alexander-wudy
alexander-wudy force-pushed the feature/Setup-Dev-Instance-Deploy-to-Azure-#34 branch from 36f0c6f to 7484d19 Compare June 10, 2026 23:08
@alexander-wudy
alexander-wudy requested a review from w-richter June 10, 2026 23:09
Comment thread infra/iac/azure/main.tf
Comment thread .github/workflows/deploy-azure.yml
Comment thread .github/workflows/start-vm.yml
Comment thread .github/workflows/deploy-azure.yml
Comment thread .github/workflows/deploy-azure.yml Outdated
with:
key: ${{ secrets.AZURE_VM_SSH_KEY }}
if_key_exists: replace
known_hosts: "placeholder"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you accidentally leave a placeholder?

Comment thread .github/workflows/deploy-azure.yml Outdated
ansible-playbook playbook.yml \
-i "${{ env.AZURE_VM_IP }}," \
--user devops-admin \
--extra-vars "github_token='${{ secrets.AZURE_PULL_PAT }}' ansible_ssh_common_args='-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null'"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ssh known hosts is being completely ignored anyways because of
ansible_ssh_common_args='-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null'
if intentional ignore this and other inline comment

Comment thread infra/iac/azure/Dockerfile Outdated
Comment thread infra/iac/azure/secrets.tf Outdated
Comment thread infra/init-db/01-init-databases.sh Outdated

if [ -n "$POSTGRES_MULTIPLE_DATABASES" ]; then
echo "Multiple database creation requested: $POSTGRES_MULTIPLE_DATABASES"
for db in $(echo $POSTGRES_MULTIPLE_DATABASES | tr ',' ' '); do

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would fail if database name ever had spaces or special chars, unlikely but simple fix

IFS=',' read -ra DBS <<< "$POSTGRES_MULTIPLE_DATABASES"
for db in "${DBS[@]}"; do
    create_database "$db"
done

Comment thread .github/workflows/deploy-azure.yml Outdated
@@ -0,0 +1,73 @@
name: deploy-azure.yml

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

convention is human readable:

Suggested change
name: deploy-azure.yml
name: Deploy to Azure

@w-richter

Copy link
Copy Markdown
Collaborator

lgtm now

@alexander-wudy
alexander-wudy merged commit 43adfd9 into main Jun 19, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Setup Dev Instance: Deploy to Azure

3 participants