From 594b1b02d6f07815a0916f48e009092fc176458b Mon Sep 17 00:00:00 2001 From: amceyeson Date: Sat, 17 May 2025 19:53:48 +0100 Subject: [PATCH 1/7] Create main.yml --- .github/workflows/main.yml | 49 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000000..885d77a064 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,49 @@ +name: build_deploy_aks +on: + push: + paths: + - "**" +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout source code + uses: actions/checkout@v3 + - name: ACR build + id: build-push-acr + uses: azure/acr-build@v1 + with: + service_principal: ${{ secrets.service_principal }} + service_principal_password: ${{ secrets.service_principal_password }} + tenant: ${{ secrets.tenant }} + registry: ${{ secrets.registry }} + repository: ${{ secrets.repository }} + image: azure-vote-front + folder: azure-vote + branch: master + tag: ${{ github.sha }} + - name: Azure login + id: login + uses: azure/login@v1.4.3 + with: + creds: ${{ secrets.AZURE_CREDENTIALS }} + - name: Set AKS context + id: set-context + uses: azure/aks-set-context@v3 + with: + resource-group: '${{ secrets.resource_group }}' + cluster-name: '${{ secrets.cluster_name }}' + - name: Setup kubectl + id: install-kubectl + uses: azure/setup-kubectl@v3 + - name: Deploy to AKS + id: deploy-aks + uses: Azure/k8s-deploy@v4 + with: + namespace: 'default' + manifests: | + azure-vote-all-in-one-redis.yaml + images: '${{ secrets.registry }}.azurecr.io/${{ secrets.repository }}/azure-vote-front:${{ github.sha }}' + pull-images: false + - name: Get Pods + run: kubectl get pods | grep vote From 25271acb01f0489747d8733047297b566409a60a Mon Sep 17 00:00:00 2001 From: amceyeson Date: Sat, 17 May 2025 19:56:15 +0100 Subject: [PATCH 2/7] Update config_file.cfg --- azure-vote/azure-vote/config_file.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-vote/azure-vote/config_file.cfg b/azure-vote/azure-vote/config_file.cfg index e32731fadf..10744b6e00 100644 --- a/azure-vote/azure-vote/config_file.cfg +++ b/azure-vote/azure-vote/config_file.cfg @@ -1,5 +1,5 @@ # UI Configurations TITLE = 'Azure Voting App' -VOTE1VALUE = 'Cats' +VOTE1VALUE = 'Fish' VOTE2VALUE = 'Dogs' -SHOWHOST = 'false' \ No newline at end of file +SHOWHOST = 'false' From c708bacd924adf9adbc4068c482219c02bd901e2 Mon Sep 17 00:00:00 2001 From: amceyeson Date: Sat, 17 May 2025 20:18:09 +0100 Subject: [PATCH 3/7] Update azure-vote-all-in-one-redis.yaml Image updated to "acrgh455.azurecr.io/azuredocs/azure-vote-front:v2" from Redis image --- azure-vote-all-in-one-redis.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-vote-all-in-one-redis.yaml b/azure-vote-all-in-one-redis.yaml index 75b6822824..0b86452552 100644 --- a/azure-vote-all-in-one-redis.yaml +++ b/azure-vote-all-in-one-redis.yaml @@ -16,7 +16,7 @@ spec: "kubernetes.io/os": linux containers: - name: azure-vote-back - image: mcr.microsoft.com/oss/bitnami/redis:6.0.8 + image: acrgh455.azurecr.io/azuredocs/azure-vote-front:v1 env: - name: ALLOW_EMPTY_PASSWORD value: "yes" From 18adcee74f8e860cba2da23fdfcb5e5f767405db Mon Sep 17 00:00:00 2001 From: amceyeson Date: Sat, 17 May 2025 20:47:24 +0100 Subject: [PATCH 4/7] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 885d77a064..c76b3c282c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -45,5 +45,5 @@ jobs: azure-vote-all-in-one-redis.yaml images: '${{ secrets.registry }}.azurecr.io/${{ secrets.repository }}/azure-vote-front:${{ github.sha }}' pull-images: false - - name: Get Pods + - name: Get Pods yes run: kubectl get pods | grep vote From 756bf003ff957034f03aea3345914ebc8661c4b1 Mon Sep 17 00:00:00 2001 From: amceyeson Date: Sat, 17 May 2025 20:48:14 +0100 Subject: [PATCH 5/7] Update config_file.cfg --- azure-vote/azure-vote/config_file.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-vote/azure-vote/config_file.cfg b/azure-vote/azure-vote/config_file.cfg index 10744b6e00..2716d06d83 100644 --- a/azure-vote/azure-vote/config_file.cfg +++ b/azure-vote/azure-vote/config_file.cfg @@ -1,5 +1,5 @@ # UI Configurations TITLE = 'Azure Voting App' -VOTE1VALUE = 'Fish' +VOTE1VALUE = 'Fishes' VOTE2VALUE = 'Dogs' SHOWHOST = 'false' From 96eb21d7ee041858ff121499a2b6ab5bf9de94ef Mon Sep 17 00:00:00 2001 From: amceyeson Date: Sat, 17 May 2025 20:53:01 +0100 Subject: [PATCH 6/7] Update config_file.cfg --- azure-vote/azure-vote/config_file.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-vote/azure-vote/config_file.cfg b/azure-vote/azure-vote/config_file.cfg index 2716d06d83..10744b6e00 100644 --- a/azure-vote/azure-vote/config_file.cfg +++ b/azure-vote/azure-vote/config_file.cfg @@ -1,5 +1,5 @@ # UI Configurations TITLE = 'Azure Voting App' -VOTE1VALUE = 'Fishes' +VOTE1VALUE = 'Fish' VOTE2VALUE = 'Dogs' SHOWHOST = 'false' From 755fdedc22416fd4a8757ff85e22a1deed7ccc75 Mon Sep 17 00:00:00 2001 From: amceyeson Date: Sat, 17 May 2025 21:58:40 +0100 Subject: [PATCH 7/7] Update config_file.cfg --- azure-vote/azure-vote/config_file.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-vote/azure-vote/config_file.cfg b/azure-vote/azure-vote/config_file.cfg index 10744b6e00..ef0858ccdd 100644 --- a/azure-vote/azure-vote/config_file.cfg +++ b/azure-vote/azure-vote/config_file.cfg @@ -1,5 +1,5 @@ # UI Configurations TITLE = 'Azure Voting App' -VOTE1VALUE = 'Fish' +VOTE1VALUE = 'Fishs' VOTE2VALUE = 'Dogs' SHOWHOST = 'false'