own-app-yml's
+253 · 8 files changed
-
guestbook/deploy-own-app/cd-pipeline/bluegreen-pipeline.yml+53 −0 -
guestbook/deploy-own-app/cd-pipeline/canary-pipeline.yml+75 −0 -
guestbook/deploy-own-app/cd-pipeline/environment.yml+9 −0 -
guestbook/deploy-own-app/cd-pipeline/github-connector.yml+22 −0 -
guestbook/deploy-own-app/cd-pipeline/infrastructure-definition.yml+15 −0 -
guestbook/deploy-own-app/cd-pipeline/kubernetes-connector.yml+12 −0 -
guestbook/deploy-own-app/cd-pipeline/rolling-pipeline.yml+46 −0 -
guestbook/deploy-own-app/cd-pipeline/service.yml+21 −0
@@ -0,0 +1,53 @@ +pipeline: + name: ownapp_bluegreen_pipeline + identifier: ownapp_bluegreen_pipeline + projectIdentifier: default_project + orgIdentifier: default + tags: {} + stages: + - stage: + name: deploy-ownapp + identifier: deployownapp + description: "" + type: Deployment + spec: + deploymentType: Kubernetes + service: + serviceRef: ownappservice + environment: + environmentRef: ownappdevenv + deployToAll: false + infrastructureDefinitions: + - identifier: ownappk8sinfra + execution: + steps: + - step: + name: Stage Deployment + identifier: stageDeployment + type: K8sBlueGreenDeploy + timeout: 10m + spec: + skipDryRun: false + pruningEnabled: false + - step: + name: Swap primary with stage service + identifier: bgSwapServices + type: K8sBGSwapServices + timeout: 10m + spec: + skipDryRun: false + rollbackSteps: + - step: + name: Swap primary with stage service + identifier: rollbackBgSwapServices + type: K8sBGSwapServices + timeout: 10m + spec: + skipDryRun: false + tags: {} + failureStrategies: + - onFailure: + errors: + - AllErrors + action: + type: StageRollback @@ -0,0 +1,75 @@ +pipeline: + name: ownapp_canary_pipeline + identifier: ownapp_canary_pipeline + projectIdentifier: default_project + orgIdentifier: default + tags: {} + stages: + - stage: + name: deploy-ownapp + identifier: deployownapp + description: "" + type: Deployment + spec: + deploymentType: Kubernetes + service: + serviceRef: ownappservice + environment: + environmentRef: ownappdevenv + deployToAll: false + infrastructureDefinitions: + - identifier: ownappk8sinfra + execution: + steps: + - stepGroup: + name: Canary Deployment + identifier: canaryDepoyment + steps: + - step: + name: Canary Deployment + identifier: canaryDeployment + type: K8sCanaryDeploy + timeout: 10m + spec: + instanceSelection: + type: Count + spec: + count: 1 + skipDryRun: false + - step: + name: Canary Delete + identifier: canaryDelete + type: K8sCanaryDelete + timeout: 10m + spec: {} + - stepGroup: + name: Primary Deployment + identifier: primaryDepoyment + steps: + - step: + name: Rolling Deployment + identifier: rollingDeployment + type: K8sRollingDeploy + timeout: 10m + spec: + skipDryRun: false + rollbackSteps: + - step: + name: Canary Delete + identifier: rollbackCanaryDelete + type: K8sCanaryDelete + timeout: 10m + spec: {} + - step: + name: Rolling Rollback + identifier: rollingRollback + type: K8sRollingRollback + timeout: 10m + spec: {} + tags: {} + failureStrategies: + - onFailure: + errors: + - AllErrors + action: + type: StageRollback @@ -0,0 +1,9 @@ +environment: +name: ownappdevenv +identifier: ownappdevenv +description: "" +tags: {} +type: PreProduction +orgIdentifier: default +projectIdentifier: default_project +variables: [] \ No newline at end of file @@ -0,0 +1,22 @@ +connector: +name: ownapp_gitconnector +identifier: ownappgitconnector +description: "" +orgIdentifier: default +projectIdentifier: default_project +type: Github +spec: + url: https://github.com/microservices-demo/microservices-demo + authentication: + type: Http + spec: + type: UsernameToken + spec: + username: GITHUB_USERNAME + tokenRef: harness_gitpat + apiAccess: + type: Token + spec: + tokenRef: harness_gitpat + executeOnDelegate: false + type: Repo \ No newline at end of file @@ -0,0 +1,15 @@ +infrastructureDefinition: +name: ownapp_k8sinfra +identifier: ownappk8sinfra +description: "" +tags: {} +orgIdentifier: default +projectIdentifier: default_project +environmentRef: ownappdevenv +deploymentType: Kubernetes +type: KubernetesDirect +spec: + connectorRef: ownappk8sconnector + namespace: default + releaseName: release-<+INFRA_KEY> +allowSimultaneousDeployments: false \ No newline at end of file @@ -0,0 +1,12 @@ +connector: +name: ownapp_k8sconnector +identifier: ownappk8sconnector +description: "" +orgIdentifier: default +projectIdentifier: default_project +type: K8sCluster +spec: + credential: + type: InheritFromDelegate + delegateSelectors: + - DELEGATE_NAME \ No newline at end of file @@ -0,0 +1,46 @@ +pipeline: + name: ownapp_rolling_pipeline + identifier: ownapp_rolling_pipeline + projectIdentifier: default_project + orgIdentifier: default + tags: {} + stages: + - stage: + name: deploy-ownapp + identifier: deployownapp + description: "" + type: Deployment + spec: + deploymentType: Kubernetes + service: + serviceRef: ownappservice + environment: + environmentRef: ownappdevenv + deployToAll: false + infrastructureDefinitions: + - identifier: ownappk8sinfra + execution: + steps: + - step: + name: Rollout Deployment + identifier: rolloutDeployment + type: K8sRollingDeploy + timeout: 10m + spec: + skipDryRun: false + pruningEnabled: false + rollbackSteps: + - step: + name: Rollback Rollout Deployment + identifier: rollbackRolloutDeployment + type: K8sRollingRollback + timeout: 10m + spec: + pruningEnabled: false + tags: {} + failureStrategies: + - onFailure: + errors: + - AllErrors + action: + type: StageRollback @@ -0,0 +1,21 @@ +service: + name: ownapp_service + identifier: ownappservice + serviceDefinition: + type: Kubernetes + spec: + manifests: + - manifest: + identifier: ownapp + type: K8sManifest + spec: + store: + type: Github + spec: + connectorRef: ownappgitconnector + gitFetchType: Branch + paths: + - deploy/kubernetes/complete-demo.yaml + branch: master + skipResourceVersioning: false + enableDeclarativeRollback: false \ No newline at end of file