Introduction to MLOps : Introduction to MLOps MLOps Resources by GitHub: Machine Learning Ops CDF MLOps : ml-ops.org MlOps Tools Landscape: Machine Learning Tools Landscape v2 (+84 new tools) MLOps - CD and Automation Pipelines in ML by Google : MLOps: Continuous delivery and automation pipelines in machine learning | Cloud Architecture Center | Google Cloud
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
metadata: | |
annotations: | |
argocd-image-updater.argoproj.io/git-branch: main | |
argocd-image-updater.argoproj.io/image-list: myimage=xxxxxx/vote | |
argocd-image-updater.argoproj.io/myimage.allow-tags: regexp:^[0-9a-f]{7}$ | |
argocd-image-updater.argoproj.io/myimage.ignore-tags: latest, dev | |
argocd-image-updater.argoproj.io/myimage.update-strategy: latest | |
argocd-image-updater.argoproj.io/myimage.kustomize.image-name: schoolofdevops/vote | |
argocd-image-updater.argoproj.io/myimage.force-update: "true" | |
argocd-image-updater.argoproj.io/write-back-method: git:secret:argocd/git-creds |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pipeline { | |
agent none | |
stages { | |
stage('Run on multiple nodes') { | |
matrix { | |
axes { | |
axis { | |
name 'AGENT' | |
values 'node1', 'node2', 'node3' | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pipeline { | |
agent { | |
kubernetes {} | |
} | |
stages { | |
stage('Test') { | |
steps { | |
sh 'echo Hello from Kubernetes Agent!' | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM maven:3.9.6-eclipse-temurin-17 AS build | |
WORKDIR /app | |
COPY . . | |
RUN mvn package -DskipTests | |
RUN mv /app/target/sysfoo-*.jar sysfoo.jar | |
EXPOSE 8080 | |
CMD ["java", "-jar", "sysfoo.jar"] |
Approach to Avoid Redundant Jenkins Builds
- Use GitHub Merge Commit Validation When PR1 is merged into the base branch, instead of manually merging it into PR2, you can let Jenkins handle it through merge commit validation. This ensures that Jenkins checks are only triggered if the combination of PR2 + base branch requires validation. Solution:
Configure Jenkins to trigger builds only on the merge of the PR branch with the latest base branch. Example: PR2 will be validated only for changes introduced in its branch + any new changes from the main branch after PR1's merge. Jenkinsfile Example:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from kubernetes import client, config | |
from prettytable import PrettyTable | |
# Load kube config from the default location (~/.kube/config) | |
config.load_kube_config() | |
# Initialize the Kubernetes API client | |
v1 = client.CoreV1Api() | |
# Create a table for displaying the output |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
creationTimestamp: null | |
labels: | |
role: vote | |
name: vote | |
spec: | |
replicas: 4 | |
selector: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
creationTimestamp: null | |
labels: | |
role: vote | |
name: vote | |
spec: | |
replicas: 4 | |
selector: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: networking.k8s.io/v1 | |
kind: Ingress | |
metadata: | |
name: vote | |
namespace: instavote | |
spec: | |
ingressClassName: nginx | |
rules: | |
- host: vote.example.com |