Browse Source

Merge branch 'main' of https://github.com/volosoft/eventhub into main

staging
yusuf karatoprak 5 years ago
parent
commit
a6c8b7a2e3
  1. 62
      azure-pipelines.yml
  2. 19
      manifests/deployment.yml
  3. 10
      manifests/service.yml

62
azure-pipelines.yml

@ -0,0 +1,62 @@
trigger:
- main
variables:
dockerRegistryServiceConnection: 'b46a670b-6940-4de5-b6b1-b06f9dd1c849'
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)
- upload: manifests
artifact: manifests
- stage: Deploy
displayName: Deploy stage
dependsOn: Build
jobs:
- deployment: Deploy
displayName: Deploy-HttpApi-Host
pool:
vmImage: $(vmImageName)
environment: 'volosofteventhub-6504.default'
strategy:
runOnce:
deploy:
steps:
- task: KubernetesManifest@0
displayName: Deploy to Kubernetes cluster
inputs:
action: deploy
manifests: |
$(Pipeline.Workspace)/manifests/deployment.eventhub.httpapi.host.yml
$(Pipeline.Workspace)/manifests/service.eventhub.httpapi.host.yml
containers: |
$(containerRegistry)/$(imageRepository):$(tag)

19
manifests/deployment.yml

@ -0,0 +1,19 @@
apiVersion : apps/v1
kind: Deployment
metadata:
name: voloeventhubhttpapihost
spec:
replicas: 1
selector:
matchLabels:
app: voloeventhubhttpapihost
template:
metadata:
labels:
app: voloeventhubhttpapihost
spec:
containers:
- name: voloeventhubhttpapihost
image: voloeventhubhttpapihost.azurecr.io/voloeventhubhttpapihost
ports:
- containerPort: 5002

10
manifests/service.yml

@ -0,0 +1,10 @@
apiVersion: v1
kind: Service
metadata:
name: voloeventhubhttpapihost
spec:
type: LoadBalancer
ports:
- port: 5002
selector:
app: voloeventhubhttpapihost
Loading…
Cancel
Save