Netflix Job cpe-niro-test-build
Building and Deploying Netflix's Niro Assistance with Jenkins and even Kubernetes
Introduction
Netflix's Niro assistance is a dispersed, scalable, and highly available platform regarding managing and digesting video content. To be able to ensure the dependability and efficiency associated with Niro, Netflix employs Jenkins for steady integration and Kubernetes for container orchestration. This article provides a detailed direct on how to build and deploy the Niro service using Jenkins and even Kubernetes.
Prerequisites
To follow this guide, you can need the right after:
- A Linux or maybe macOS machine using Docker and Kubernetes installed
- A Jenkins server
- The Kubernetes cluster along with a load dnoncer configured
- A GitHub bank account with access for you to the Niro repository
Building Niro with Jenkins
1. Make a Jenkins Pipeline
- Create a new new Jenkins job and select the particular " Pipeline" alternative.
- Name the pipeline " cpe-niro-test-build".
3. Configure the Pipe
- In typically the " Pipeline" segment, paste the following code:
canal agent any stages stage('Build') steps sh 'git clone https://github.com/netflix/niro.git' sh 'cd niro && docker build -t netflix/niro .' stage('Push') steps sh 'docker push netflix/niro' - This specific code defines a two-stage pipeline:
- The " Build" stage imitations the Niro repository and builds this Docker image.
- The " Push" stage pushes the built look to the Docker registry.
3. Parameterize the Pipeline
Click the " Parameters" case and add some sort of new parameter:
- Brand:
IMAGE_TAG - Type:
String - Default Value:
newest
- Brand:
This parameter permits you to identify the tag associated with the Docker photo to build plus push.
Implementing Niro with Kubernetes
1. Create a new Deployment
- Generate a Kubernetes deployment for Niro. In this article is an instance deployment configuration:
apiVersion: apps/v1 form: Deployment metadata: label: niro spec: selectivo: matchLabels: app: niro replicas: 3 design template: metadata: labels: application: niro spec: pots: - name: niro image: netflix/niro: $ IMAGE_TAG ports: rapid containerPort: 8080 - Replace
$ IMAGE_TAGwith the particular image tag anyone want to deploy.
2. Create a Service
- Create a Kubernetes service for Niro. Here is a great example service setup:
apiVersion: v1 kind: Service metadata: name: niro spec: selector: app: niro ports: - slot: 80 targetPort: 8080 Integrating Jenkins using Kubernetes
1. Put in the Kubernetes Wordpress plugin
- Install typically the " Kubernetes Plugin" on your Jenkins server.
a couple of. Create a Kubernetes Credential
- Create a Kubernetes abilities in Jenkins by means of providing the kubeconfig file of your current cluster.
several. Configure the Kubernetes Job
- Inside your Jenkins canal, add the pursuing stage to set up Niro to Kubernetes:
stage('Deploy') steps kubernetesDeploy( name: 'niro-deploy', serverUrl: '', credentialsId: 'kubernetes-credential', namespace: 'default', resourceDefinitions: 'deployments/niro.yaml,services/niro.yaml' ) - Replace
< serverUrl>along with the URL associated with your Kubernetes chaos.
Conclusion
This guide gives a step-by-step procedure for building in addition to deploying Netflix's Niro service using Jenkins and Kubernetes. Simply by leveraging the features of these tools, Netflix ensures the particular automation and dependability of Niro's ongoing integration and application process.