共倒金荷家万里
English
往期整理
  •   文章分类
  •   文章标签
共倒金荷家万里
Article
44
Category
2
Tags
6
English
往期整理
文章分类
文章标签
work
jenkins-on-k8s
Post on: 2024-9-30
Last edited: 2024-9-30
Views
Kubernetes
type
status
date
slug
summary
tags
category
icon
password

使用Docker Desktop安装kind

Install Docker Desktop on Mac
get docker desktop VM IP
e.g.
Install kubectl on macOS
Install kind on macOS
Creating a kubernetes cluster
get kubernetes cluster master IP
e.g.

安装Jenkins

Installing Jenkins in Docker
Customize the official Jenkins Docker image, by executing the following two steps:
Create a Dockerfile with the following content:
Build a new docker image from this Dockerfile, and assign the image a meaningful name, such as "myjenkins-blueocean:2.426.3-1":
docker build -t myjenkins-blueocean:2.426.3-1 .
Run your own myjenkins-blueocean:2.426.3-1 image as a container in Docker using the following docker run command:
get jenkins IP
e.g.
Unlocking Jenkins

使用jenkins

  1. jenkins提供多种任务模式,可以理解为不同语法的脚本(Jenkinsfile),包括freestyle project、pipeline、multi configuration pipeline等
  1. Jenkinsfile可以直接编辑文档,也可以通过UI生成,下一代UI blue ocean可以通过表单直接生成multi configuration pipeline类型的Jenkinsfile
  1. jenkins任务运行在所谓agent,有多种方式临时部署agent:docker container、kubernetes POD、node。如果将docker engine或者kubernetes cluster添加成cloud,貌似他们是以node方式部署agent,如何以container或者POD方式部署agent有待研究
e.g.
将kubernetes cluster添加成cloud
将docker engine添加成cloud
将docker engine添加成cloud这里有一个问题,macOS+docker desktop环境下,docker engine port无法通过daemon.json或者docker.service文件配置暴露,比较简单的一个办法是创建一个container将docker engine所在VM的port映射出来,比如我们创建一个IP为172.18.0.4的container:
创建一个POD template(定义当需要一个agent时,如何启动一个node)
notion image
notion image
创建一个pipeline
notion image
创建一个step
notion image
notion image
notion image
运行pipeline
notion image
结果
notion image
  • Author:共倒金荷家万里
  • URL:https://tangly1024.com/article/11140ef0-3786-8011-bc82-e4da7deb9049
  • Copyright:All articles in this blog, except for special statements, adopt BY-NC-SA agreement. Please indicate the source!
Relate Posts
istio-on-k8s
fluentd&fluentbit-on-k8s
prometheus-on-k8s
contour-on-k8s
kafka-on-k8s
EFK-on-k8s
minio-on-k8smetallb-deployment
Loading...
Catalog
0%
使用Docker Desktop安装kind安装Jenkins使用jenkins
共倒金荷家万里
共倒金荷家万里
何日把酒言欢
Article
44
Category
2
Tags
6
Latest posts
RAGFlow practice
RAGFlow practice
2025-4-7
Dify practice
Dify practice
2025-4-7
DBMotion deployment
DBMotion deployment
2024-12-10
datebase deployment(on laptop)
datebase deployment(on laptop)
2024-11-8
mysql shell migrate mysql
mysql shell migrate mysql
2024-11-6
wordpress+mysql+minio development(on cloud service)
wordpress+mysql+minio development(on cloud service)
2024-11-6
Announcement
实践是检验真理的唯一标准
 
Catalog
0%
使用Docker Desktop安装kind安装Jenkins使用jenkins
2021-2025 共倒金荷家万里.

共倒金荷家万里 | 何日把酒言欢

Powered by NotionNext 4.7.3.