diff --git a/build/aro/webapp-build-artifacts.yml b/build/aro/webapp-build-artifacts.yml index 2f3687e3b..1f34de351 100644 --- a/build/aro/webapp-build-artifacts.yml +++ b/build/aro/webapp-build-artifacts.yml @@ -36,12 +36,6 @@ jobs: modifyOutputPath: true feedsToUse: config nugetConfigPath: src/NuGet.config - - task: CopyFiles@2 - displayName: 'Copy OpenShift App Build Template' - inputs: - sourceFolder: '$(Build.SourcesDirectory)/build/aro/openshift-templates' - contents: 'app-build-template.yml' - targetFolder: $(Build.ArtifactStagingDirectory) - task: PublishBuildArtifacts@1 displayName: 'Publish Artifact: drop' diff --git a/deploy/aro/basket-api/azure-pipelines.yml b/deploy/aro/basket-api/azure-pipelines.yml index 9c0439399..325d45de3 100644 --- a/deploy/aro/basket-api/azure-pipelines.yml +++ b/deploy/aro/basket-api/azure-pipelines.yml @@ -20,15 +20,16 @@ stages: OpenShiftProject: development SourceImageRegistryProjectName: $(OpenShiftProject) EnvironmentName: dev - IdentityApiHostName: identityapi.$(OpenShiftProject).svc - RedisHostname: redis.$(OpenShiftProject).svc - RabbitMqHostname: rabbitmq.$(OpenShiftProject).svc IdentityPublicHostName: identity$(EnvironmentName) - IdentityUrlExternal: https://$(IdentityPublicHostName) - IdentityApiUrl: http://$(IdentityApiHostName):8080 jobs: - - job: Configuration_Deployment - displayName: 'Configuration Deployment' + - job: BasketApiDeployment + variables: + IdentityApiHostName: identityapi.$(OpenShiftProject).svc + RedisHostname: redis.$(OpenShiftProject).svc + RabbitMqHostname: rabbitmq.$(OpenShiftProject).svc + IdentityUrlExternal: https://$(IdentityPublicHostName) + IdentityApiUrl: http://$(IdentityApiHostName):8080 + displayName: 'Basket API Deployment' pool: vmImage: 'windows-latest' steps: diff --git a/deploy/aro/identity-api/azure-pipelines.yml b/deploy/aro/identity-api/azure-pipelines.yml new file mode 100644 index 000000000..14ec5405d --- /dev/null +++ b/deploy/aro/identity-api/azure-pipelines.yml @@ -0,0 +1,44 @@ +variables: + OpenShiftServiceConnection: 'OpenShift on ARO' +trigger: + branches: + include: + - master + - dev + paths: + include: + - deploy/aro/basket-api/* + - deploy/aro/openshift-templates/* +resources: + pipelines: + - pipeline: BasketApiBuild + source: Basket-API-Build +stages: + - stage: development + displayName: Development + variables: + OpenShiftProject: development + SourceImageRegistryProjectName: $(OpenShiftProject) + EnvironmentName: dev + IdentityApiHostName: identityapi.$(OpenShiftProject).svc + RedisHostname: redis.$(OpenShiftProject).svc + RabbitMqHostname: rabbitmq.$(OpenShiftProject).svc + IdentityPublicHostName: identity$(EnvironmentName) + IdentityUrlExternal: https://$(IdentityPublicHostName) + IdentityApiUrl: http://$(IdentityApiHostName):8080 + jobs: + - job: Configuration_Deployment + displayName: 'Configuration Deployment' + pool: + vmImage: 'windows-latest' + steps: + - task: redhat.openshift-vsts.oc-setup-task.oc-setup@2 + displayName: 'Setup Openshift CLI' + inputs: + openshiftService: $(OpenShiftServiceConnection) + - script: 'oc project $(OpenShiftProject)' + failOnStderr: true + displayName: 'Set OpenShift Project Context' + - script: 'oc process -f ./deploy/aro/openshift-templates/identityapi-deploy-template.yml -p IMAGE_REGISTRY_PROJECT_NAME=$(SourceImageRegistryProjectName) | oc apply -f-' + failOnStderr: true + displayName: 'Ensure Identity API OpenShift DeploymentConfig and Service' \ No newline at end of file diff --git a/deploy/aro/openshift-templates/identityapi-deploy-template.yml b/deploy/aro/openshift-templates/identityapi-deploy-template.yml index e4b00ac98..15c665bc3 100644 --- a/deploy/aro/openshift-templates/identityapi-deploy-template.yml +++ b/deploy/aro/openshift-templates/identityapi-deploy-template.yml @@ -26,28 +26,39 @@ objects: spec: containers: - env: - - name: IdentityUrlExternal - value: ${IDENTITY_URL_EXTERNAL} - - name: IdentityUrl - value: ${IDENTITY_URL} + - name: SpaClient + value: ${WEB_SPA_URL} + - name: XamarinCallback + value: + - name: MvcClient + value: ${WEB_MVC_URL} + - name: LocationApiClient + value: ${LOCATION_API_URL} + - name: MarketingApiClient + value: ${MARKETING_API_URL} + - name: BasketApiClient + value: ${BASKET_API_URL} + - name: OrderingApiClient + value: ${ORDERING_API_URL} + - name: MobileShoppingAggClient + value: ${MOBILE_SHOPPING_AGGREGATOR_URL} + - name: WebShoppingAggClient + value: ${WEB_SHOPPING_AGGREGATOR_URL} + - name: WebhooksApiClient + value: ${WEBHOOKS_API_URL} + - name: WebhooksWebClient + value: ${WEBHOOKS_WEB_CLIENT_URL} - name: ConnectionString - value: ${REDIS_HOSTNAME} - - name: EventBusConnection - value: ${RABBITMQ_HOSTNAME} - - name: PORT - value: "8080" - - name: GRPC_PORT - value: "8081" - - name: PATH_BASE - value: /basket-api + valueFrom: + secretKeyRef: + key: ConnectionString + name: identity-db-connection-secret image: docker-registry.default.svc:5000/${IMAGE_REGISTRY_PROJECT_NAME}/${APPLICATION_NAME}:latest imagePullPolicy: Always name: ${APPLICATION_NAME} ports: - containerPort: 8080 protocol: TCP - - containerPort: 8081 - protocol: TCP resources: {} terminationMessagePath: /dev/termination-log terminationMessagePolicy: File @@ -80,10 +91,6 @@ objects: port: 8080 protocol: TCP targetPort: 8080 - - name: 8081-tcp-grpc - port: 8081 - protocol: TCP - targetPort: 8081 selector: app: ${APPLICATION_NAME} deploymentconfig: ${APPLICATION_NAME} @@ -105,20 +112,44 @@ parameters: displayName: Template Name name: TEMPLATE_NAME required: true - value: basketapi-deploy-template -- description: The external URL of the Identity endpoint - displayName: Identity URL External - name: IDENTITY_URL_EXTERNAL + value: identityapi-deploy-template +- description: The cluster internal URL of the Web SPA endpoint + displayName: Web SPA URL + name: WEB_SPA_URL + required: true +- description: The cluster internal URL of the Web MVC endpoint + displayName: Web MVC URL + name: WEB_MVC_URL + required: true +- description: The cluster internal URL of the Location API endpoint + displayName: Location API URL + name: LOCATION_API_URL + required: true +- description: The cluster internal URL of the Marketing API endpoint + displayName: Marketing API URL + name: MARKETING_API_URL + required: true +- description: The cluster internal URL of the Basket API endpoint + displayName: Basket API URL + name: BASKET_API_URL + required: true +- description: The cluster internal URL of the Ordering API endpoint + displayName: Ordering API URL + name: ORDERING_API_URL required: true -- description: The cluster internal URL of the Identity endpoint - displayName: Identity URL - name: IDENTITY_URL +- description: The cluster internal URL of the Mobile Shopping Aggregator endpoint + displayName: Mobile Shopping Aggregator URL + name: MOBILE_SHOPPING_AGGREGATOR_URL required: true -- description: The hostname of the Redis service - displayName: Redis Hostname - name: REDIS_HOSTNAME +- description: The cluster internal URL of the Web Shopping Aggregator endpoint + displayName: Web Shopping Aggregator URL + name: WEB_SHOPPING_AGGREGATOR_URL required: true -- description: The hostname of the RabbitMQ service - displayName: RabbitMQ Hostname - name: RABBITMQ_HOSTNAME +- description: The cluster internal URL of the Webhooks API endpoint + displayName: Webhooks API URL + name: WEBHOOKS_API_URL required: true +- description: The cluster internal URL of the Webhooks Client endpoint + displayName: Webhooks Client URL + name: WEBHOOKS_WEB_CLIENT_URL + required: true \ No newline at end of file