Terraform CICD pipeline GCP - github

I am new to terraform and I want set up a CI/CD pipeline to GCP with github to replace a current system that use's jenkins, as we want to increase automation of deployments. What would be the best way or architecture to do this.

One of the primary products related to CI/CD is Google's Cloud Build.
https://cloud.google.com/build
It's one liner reads:
Build, test, and deploy on our serverless CI/CD platform.
It has built in triggers that include GitHub integration meaning that when events occur on GitHub, Cloud Build runs its prescribed recipes.
I'd suggest reading the documenation found at the above page and also correlate against the curated documentation found on GCP Weekly here:
Tag: CI
Tag: Cloud Build

Related

Best practice for automating cloudformation stack in github actions when repository holds cloud formation templates of multiple services

We have a repository in GitLab which stores the cloud formation templates of IAM roles, permissions, security groups and Route 53 of multiple micro-services. Previously we used a separate repositories to handle the deployment from the repo above using Circle CI and Python scripts, to write ONLY the modified artifacts to s3 and then trigger Cloud formation stack to do the deployment after confirmation. for a visual representation, it looks something like this.
I am currently migrating this to GitHub and moving away from Circle CI, and would like to update the CI/CD here to follow best practices and to use GitHub Actions to do the deployment of the infra. What would be the best means to do so?

Deploy to Azure Extension - Only Allows Creation of Github Actions Workflow. Wont Allow GitHub + Azure Pipelines Flow Creation

I am following the steps outlined here. I am using the Deploy to Azure Extension
https://learn.microsoft.com/en-us/azure/devops/pipelines/targets/deploy-to-azure-vscode?view=azure-devops#github--azure-pipelines
I have done the following steps.
I have managed to create a simple react app and then got the GitHub + GitHub Actions portion to work no problem.
Now, I want to get GitHub Plus Azure Pipeline to work. So, I deleted the GitHub Actions/Workflow files, and starting over with the CICD setup.
Next, I have enabled Use Azure Pipelines for GitHub in the extension.
Then, as per the steps/pictures outlined in the above microsoft documentation link, I have begun the configure CICD option from the command palette.
Selected the Visual Studio Subscription
Selected the target web app
Now, at this point, as per the linked tutorial, it is supposed to ask me to choose a azure devops organization, so that the azure pipeline YAML file can kick in. This step never happens.
instead, VS Code will proceed to generate a GitHub Actions Workflow just as it did before.
What should I do to the GitHub to Azure Pipeline working from this extension?
Update 1
In case anyone is curious, I have raised a issue on the visual studio community forum. You can find that here
https://developercommunity.visualstudio.com/content/problem/1182952/github-azure-pipelines-falls-back-to-github-github.html
As of now, there is an ongoing discussion but no solution yet.
You can try reinstalling Deploy to Azure Extension and enable Use Azure Pipelines for GitHub, and then configure CI/CD option again. If the issue persists, you can report this issue here.
You can create a pipeline directly in your azure devops project. Check out below tutorial
Build, test, and deploy JavaScript and Node.js apps
You will also need to create an Azure Resource Manager service connection to deploy to your azure resource from azure devops pipeline.
Deploy an Azure Web App (Linux)

Azure pipeline - How do I deploy code to Preregistered application

Our devops team have created an application (ex:athena) and registered with AD. They also have given us Service Principle.
The question I have is , how do I deploy my code in GitHub to the application (athena) that the devops team created for me using the “Deploy to kubernetes service” configuration template ?
Apologies in advance, as I am not proficient in Azure and this shows my gap in understanding.
The Information I have are :
Repository - GitHub (I have done the appropriate authorisation and can see the repository)
Service Principle (create by devops team)
Application (created by devops team)
I have created a Container Registry and Kubernetes service using azure portal
Now, I want to use the “Deploy to kubernetes service” configuration template.
Help much appreciated.
If you want to use this Deploy to kubernetes service, you must get two service connection : Azure Resource Manager and Kubernetes Service Connection.
So, first, you need to configure the connection between Azure Kubernetes, ARM and Azure Devops. Enter project setting->service connection, open New Service Connection and select Kubernetes. Input the relevant configure according to your Azure:
And so do with Azure Resource Manager, you can follow this doc to configure it. Here is my ARM connection you can refer:
Then, you can begin your build and release pipeline.
Deploy to kubernetes service task used in release pipeline. In build pipeline, you must run docker build, push task to finish pushing to Azure registry Container.
And then, run this deploy task in release. You can refer to this blog which written by Azure DevOps Labs: Deploying a multi-container application to Azure Kubernetes Services. It has detailed steps you can refer.
In addition, there has two build source type. One is you import your github repos into Azure Devops repos. So the build can be trigger by Azure Devops Repos. And the other is select Github as your build source, in this type, you can triggered directly by your github instead of use Azure Devops repos:
And also, this need you get the service connection with your Github first. Then, authorize it during the build pipeline.

How to Azure DevOps CI/CD Pipeline for PowerBuilder 2017 R3 project, is it even possible?

Summary
Recently migrated PB126 apps to PB2017 and changed source control to Azure DevOps Git.
Now, I'd like to integrate Azure DevOps CI/CD Build Pipeline to the app dev life-cycle.
jenkins
I know it's feasible to configure jenkins CI server so it builds PB2017 projects.
Continuous Integration with PowerBuilder 2017, Bonobo Git and Jenkins
My problem here's I can't get it to work on a local Docker container and make it accessible to the outside world (Internet) so Azure DevOps can trigger its build action. Supposedly, it's a Docker for Windows thing which Docker handles differently from the Linux-based Docker.
Azure DevOps Pipeline
As per this link, Azure Pipelines is the CI/CD solution for any language, any platform, any cloud, it says any language, which makes me believe it's feasible to build PB2017 projects using Azure DevOps Pipelines.
The fact is that I'm totally new to CI/CD in terms of implementing it myself. I've experienced it in many projects where I wasn't responsible to implement it. Now I am. I've been on it since a few days now, and I do want it to work.
Any help appreciated.
The Appeon offical user forum: https://community.appeon.com/index.php/qna/q-a

Creating kubernetes deployment in gitlab pipeline

I have a private gitlab instance with multiple projects and Gitlab CI enabled. The infrastructure is provided by Google Cloud Platform and Gitlab Pipeline Runner is configured in Kubernetes cluster.
This setup works very well for basic pipelines running tests etc. Now I'd like to start with CD and to do that I need some manual acceptance on the pipeline which means the person reviewing it needs to have the access to the current state of the app.
What I'm thinking is having a kubernetes deployment for the pipeline that would be executed once you try to access it (so we don't waste cluster resources) and would be destroyed once the reviewer accepts the pipeline or after some threshold.
So the deployment would be executed in the same cluster as Gitlab Runner (or different?) and would be accessible by unique URI (we're mostly talking about web-server apps) e.g. https://pipeline-58949526.git.mydomain.com
While in theory, it all makes sense to me, I don't really know how to set this up properly.
Does anyone have a similar setup? Is my view on this topic too simple? Let me know!
Thanks
If you want to see how to automate CI/CD with multiple environments on GKE using GitOps for promotion between environments and Preview Environments on Pull Requests you might wanna check out my recent talk on Jenkins X at DevOxx UK where I do a live demo of this on GKE.