From 3cec6d5fc8439f2eefae9be1c755898ecb674af2 Mon Sep 17 00:00:00 2001 From: yusuf karatoprak Date: Sat, 1 May 2021 07:02:28 +0300 Subject: [PATCH] update azure pipeline 2 --- azure-pipelines-1.yml | 72 ------------------- azure-pipelines.eventhub.httpapi.host.yml | 2 +- azure-pipelines.eventhub.web.yml | 2 +- azure-pipelines.yml | 71 ------------------ .../deployment.eventhub.httpapi.host.yml | 2 +- .../deployment.eventhub.identityserver.yml | 2 +- manifests/deployment.eventhub.web.yml | 2 +- manifests/deployment.yml | 19 ----- manifests/service.yml | 10 --- 9 files changed, 5 insertions(+), 177 deletions(-) delete mode 100644 azure-pipelines-1.yml delete mode 100644 azure-pipelines.yml delete mode 100644 manifests/deployment.yml delete mode 100644 manifests/service.yml diff --git a/azure-pipelines-1.yml b/azure-pipelines-1.yml deleted file mode 100644 index 005fbe6..0000000 --- a/azure-pipelines-1.yml +++ /dev/null @@ -1,72 +0,0 @@ -# Deploy to Azure Kubernetes Service -# Build and push image to Azure Container Registry; Deploy to Azure Kubernetes Service -# https://docs.microsoft.com/azure/devops/pipelines/languages/docker - -trigger: -- main - - -variables: - - # Container registry service connection established during pipeline creation - dockerRegistryServiceConnection: 'be4690ca-0fbe-4473-a10e-c45c2a32a3c1' - imageRepository: 'voloeventhubhttpapihost' - containerRegistry: 'voloeventhubhttpapihost.azurecr.io' - dockerfilePath: '**/Dockerfile.EventHub.HttpApi.Host' - tag: '$(Build.BuildNumber)' - - # Agent VM image name - vmImageName: 'ubuntu-latest' - - -stages: -- stage: Build - displayName: Build stage - jobs: - - job: Build - displayName: Build - pool: - vmImage: $(vmImageName) - steps: - - task: Docker@2 - displayName: Build and push an image to container registry - inputs: - command: buildAndPush - repository: $(imageRepository) - dockerfile: $(dockerfilePath) - containerRegistry: $(dockerRegistryServiceConnection) - tags: | - $(tag) - - - publish: manifests - artifact: manifests - -- stage: Deploy - displayName: Deploy stage - dependsOn: Build - - jobs: - - deployment: Deploy - displayName: Deploy-HttpApi.Host - timeoutInMinutes: 60 # how long to run the job before automatically cancelling - cancelTimeoutInMinutes: 30 # how much time to give 'run always even if cancelled tasks' before stopping them - pool: - vmImage: $(vmImageName) - environment: 'voloeventhubhttpapihost.default' - strategy: - runOnce: - deploy: - steps: - - - - task: KubernetesManifest@0 - displayName: Deploy to Kubernetes cluster - inputs: - action: deploy - namespace: default - manifests: | - $(Pipeline.Workspace)/manifests/deployment.eventhub.httpapi.host.yml - $(Pipeline.Workspace)/manifests/service.eventhub.httpapi.host.yml - containers: | - $(containerRegistry)/$(imageRepository):$(tag) - diff --git a/azure-pipelines.eventhub.httpapi.host.yml b/azure-pipelines.eventhub.httpapi.host.yml index 005fbe6..f3938ff 100644 --- a/azure-pipelines.eventhub.httpapi.host.yml +++ b/azure-pipelines.eventhub.httpapi.host.yml @@ -10,7 +10,7 @@ variables: # Container registry service connection established during pipeline creation dockerRegistryServiceConnection: 'be4690ca-0fbe-4473-a10e-c45c2a32a3c1' - imageRepository: 'voloeventhubhttpapihost' + imageRepository: 'voloeventhubhttpapihost' containerRegistry: 'voloeventhubhttpapihost.azurecr.io' dockerfilePath: '**/Dockerfile.EventHub.HttpApi.Host' tag: '$(Build.BuildNumber)' diff --git a/azure-pipelines.eventhub.web.yml b/azure-pipelines.eventhub.web.yml index 3e52e35..6b697cf 100644 --- a/azure-pipelines.eventhub.web.yml +++ b/azure-pipelines.eventhub.web.yml @@ -10,7 +10,7 @@ variables: # Container registry service connection established during pipeline creation dockerRegistryServiceConnection: '1ae4ab3c-b39a-4860-b6dc-683cc524d1e4' - imageRepository: 'volosofteventhub' + imageRepository: 'voloeventhub' containerRegistry: 'voloeventhub.azurecr.io' dockerfilePath: '**/Dockerfile.EventHub.Web' tag: '$(Build.BuildNumber)' diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index 3e52e35..0000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,71 +0,0 @@ -# Deploy to Azure Kubernetes Service -# Build and push image to Azure Container Registry; Deploy to Azure Kubernetes Service -# https://docs.microsoft.com/azure/devops/pipelines/languages/docker - -trigger: -- main - - -variables: - - # Container registry service connection established during pipeline creation - dockerRegistryServiceConnection: '1ae4ab3c-b39a-4860-b6dc-683cc524d1e4' - imageRepository: 'volosofteventhub' - containerRegistry: 'voloeventhub.azurecr.io' - dockerfilePath: '**/Dockerfile.EventHub.Web' - tag: '$(Build.BuildNumber)' - - # Agent VM image name - vmImageName: 'ubuntu-latest' - - -stages: -- stage: Build - displayName: Build stage - jobs: - - job: Build - displayName: Build - pool: - vmImage: $(vmImageName) - steps: - - task: Docker@2 - displayName: Build and push an image to container registry - inputs: - command: buildAndPush - repository: $(imageRepository) - dockerfile: $(dockerfilePath) - containerRegistry: $(dockerRegistryServiceConnection) - tags: | - $(tag) - - - publish: manifests - artifact: manifests - -- stage: Deploy - displayName: Deploy stage - dependsOn: Build - - jobs: - - deployment: Deploy - displayName: Deploy-EventHub.Web - timeoutInMinutes: 60 # how long to run the job before automatically cancelling - cancelTimeoutInMinutes: 30 # how much time to give 'run always even if cancelled tasks' before stopping them - pool: - vmImage: $(vmImageName) - environment: 'voloeventhub.default' - strategy: - runOnce: - deploy: - steps: - - - - task: KubernetesManifest@0 - displayName: Deploy to Kubernetes cluster - inputs: - action: deploy - manifests: | - $(Pipeline.Workspace)/manifests/deployment.eventhub.web.yml - $(Pipeline.Workspace)/manifests/service.eventhub.web.yml - containers: | - $(containerRegistry)/$(imageRepository):$(tag) - diff --git a/manifests/deployment.eventhub.httpapi.host.yml b/manifests/deployment.eventhub.httpapi.host.yml index 3bc8859..8f063ed 100644 --- a/manifests/deployment.eventhub.httpapi.host.yml +++ b/manifests/deployment.eventhub.httpapi.host.yml @@ -13,7 +13,7 @@ spec: spec: containers: - name: volosoft-eventhub-httpapi-host-container - image: voloeventhubhttpapihost.azurecr.io/voloeventhubhttpapihost:v1 + image: voloeventhubhttpapihost.azurecr.io/voloeventhubhttpapihost imagePullPolicy: Always resources: limits: diff --git a/manifests/deployment.eventhub.identityserver.yml b/manifests/deployment.eventhub.identityserver.yml index 2943a29..3150c4c 100644 --- a/manifests/deployment.eventhub.identityserver.yml +++ b/manifests/deployment.eventhub.identityserver.yml @@ -13,7 +13,7 @@ spec: spec: containers: - name: volosoft-eventhub-identityserver-container - image: voloeventhubidentityserver.azurecr.io/voloeventhubidentityserver:v1 + image: voloeventhubidentityserver.azurecr.io/voloeventhubidentityserver imagePullPolicy: Always resources: limits: diff --git a/manifests/deployment.eventhub.web.yml b/manifests/deployment.eventhub.web.yml index 1dac37d..a64eae8 100644 --- a/manifests/deployment.eventhub.web.yml +++ b/manifests/deployment.eventhub.web.yml @@ -13,7 +13,7 @@ spec: spec: containers: - name: volosoft-eventhub-web-container - image: voloeventhub.azurecr.io/voloeventhub:v1 + image: voloeventhub.azurecr.io/voloeventhub imagePullPolicy: Always resources: limits: diff --git a/manifests/deployment.yml b/manifests/deployment.yml deleted file mode 100644 index fe913f5..0000000 --- a/manifests/deployment.yml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion : apps/v1 -kind: Deployment -metadata: - name: volosofteventhub -spec: - replicas: 1 - selector: - matchLabels: - app: volosofteventhub - template: - metadata: - labels: - app: volosofteventhub - spec: - containers: - - name: volosofteventhub - image: voloeventhub.azurecr.io/volosofteventhub - ports: - - containerPort: 8080 \ No newline at end of file diff --git a/manifests/service.yml b/manifests/service.yml deleted file mode 100644 index 669ae56..0000000 --- a/manifests/service.yml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: volosofteventhub -spec: - type: LoadBalancer - ports: - - port: 8080 - selector: - app: volosofteventhub \ No newline at end of file