The CI/CD (Steady Integration/Steady Deployment) is a star of the fashionable Devops setting. It lets you automate the constructing, testing, and deployment of functions. With Steady Integration (CI), techniques will set off the construct supply and run take a look at suites on every change or code checked in. If the construct is handed in any respect the levels, it mechanically deploys to a number of levels similar to staging or manufacturing environments utilizing a launch pipeline. It’s known as Steady Supply (CD). You may add a number of levels of software program bundle validation.
The Cloud foundry is an open supply platform for cloud computing developed by VMWare however now it owned by Pivotal Software program. The Cloud foundry lets you deploy, scale and keep your utility quicker and safe and simpler. It may be referred as PaaS (Platform as a Service). A lot of the cloud similar to Azure, IBM, and so forth. help Cloud foundry utility. It offers a alternative of underlying infrastructure together with Kubernetes.
On this article, I’ll reveal learn how to deploy an utility to Cloud Foundry utilizing Azure steady supply pipeline. I’m taking an instance of IBM Cloud Foundry utility.
Putting in Cloud Foundry Extension to Azure DevOps
The Cloud Foundry extension lets you push our utility construct to any Cloud Foundry platform.
By default, Might Foundry extension not be accessible on Azure DevOps portal. It may be put in from Azure DevOps market. To put in it, click on on “purchasing bag” icon to proper nook of portal and choose “Browse market”.
It redirects you to market place the place you possibly can search and set up Cloud Foundry extension.
Click on on “Get it free” to put in Cloud Foundry extension. When click on this button it asks to pick out the group and click on on obtain.
It downloads and set up CF extension for chosen group after which click on on “Proceed to group”.
Configure Service Endpoint for Cloud Foundry extension
The service endpoint is a connection of exterior and distant service to execute activity for a distant deployment. To create service endpoint, click on on “Undertaking settings” >> “Service connections” and click on on “New service connection”.
There are a lot of built-in service connections can be found similar to Azure basic, Azure Service bus, docker host, and so forth. Choose “Generic” service connection and click on on Subsequent button.
Now, you want to enter the next data associated to your Cloud Foundry utility
- Service URL: it’s the endpoint the place you need to push your utility
- Username / Password: optionally present the consumer identify/password to attach distant service
- Service Connection identify: identify of the connection
- Description: optionally present a service description
Click on on save to save lots of the service configuration.
Create a Launch Pipeline
To create a brand new launch pipeline, click on on Pipelines >> Releases and choose “New launch pipeline”.
It redirects to a template display the place you possibly can choose the template. To customise the template, choose “Empty job”. Right here, you possibly can choose artifacts and levels. The artifact is a deployable part of the appliance and it may be produced by your construct pipeline (Steady Integration). The discharge pipeline deploys your artifact to a number of levels (additionally refer as environments similar to staging, manufacturing, and so forth.)
So as to add an artifact, click on on “Add an artifact” and you want to present the next data.
- Supply sort: it’s a supply of the artifact. There are a number of choices for supply sorts similar to Construct, Azure Repos, Github, ect. Right here, I’ve chosen the “Construct” possibility.
- Undertaking: The identify of the mission comprises the artifacts
- Supply (construct pipeline): Title of the construct pipeline
- Default model: default model that deploys on levels
- Supply alias: identify of the identifier
Click on on the “Add” button so as to add an artifact.
The subsequent step is so as to add a job and activity to the Stage. One job below the stage has been created by default. You may add a number of jobs and a number of duties below the job. To edit the default job, click on the job hyperlink below the stage.
You may add a number of duties below the agent job. So as to add a activity, click on on “+” on the agent job part.
To run the Cloud Foundry command similar to “CF login”, “CF push” and so forth. , Might Foundry CLI (Command-line interface) should set up on the construct machine so your activity could be put in Cloud Foundry CLI. This activity is part of the Cloud Foundry extension.
Subsequent, the duty is to configure “Push to Cloud Foundry”. Within the “Push to Cloud Foundry” activity, you want to configure the next settings.
- Show identify: activity identify
- Cloud Foundry Endpoint: service endpoint that you’ve created for Cloud Foundry
- Menifest file: it’s a path of the manifest file containing Cloud Foundry deployment choices.
- Working Listing: path for construct listing
Now click on on “Save” to save lots of the stage data and settings. You may take a look at your launch pipeline on an outdated construct. To run the discharge pipeline manually, click on on the “Create launch” button.
Once you set off the discharge pipeline manually, it’s important to outline sure properties such because the artifact model after which click on on the “Create” button.
When you created a launch, you possibly can see the present standing on the stage.
It’s also possible to view the logs and standing of every activity of launch. To view log and standing, click on on “Logs”. This feature is out there on the hover of the stage. Right here, you possibly can see the default activity and customized activity with their standing. The log is essential for analysis.
As soon as all duties below the job have run efficiently, your utility is hosted on IBM Cloud Foundry.
On this article, you discovered learn how to create a launch pipeline utilizing Azure DevOps and host your utility to IBM Cloud Foundry. Nonetheless, this course of is sort of the identical for all cloud that helps Cloud Foundry.