当前位置: 首页 > news >正文

泉州晋江疫情广州网站优化排名

泉州晋江疫情,广州网站优化排名,网站开发者的常用工具,wordpress教程网1、背景 由于jenkins运行在k8s上能够更好的利用动态agent进行构建。所以写了个部署教程,亲测无坑 2、部署 1、创建ns kubectl create namespace devops 2、kubectl apply -f jenkins.yml apiVersion: v1 kind: ServiceAccount metadata:name: jenkinsnamespace…

1、背景

由于jenkins运行在k8s上能够更好的利用动态agent进行构建。所以写了个部署教程,亲测无坑

2、部署

1、创建ns
kubectl create namespace devops

2、kubectl apply -f jenkins.yml

apiVersion: v1
kind: ServiceAccount
metadata:name: jenkinsnamespace: devops
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:name: jenkins
rules:- apiGroups: ["extensions", "apps"]resources: ["deployments", "ingresses"]verbs: ["create", "delete", "get", "list", "watch", "patch", "update"]- apiGroups: [""]resources: ["services"]verbs: ["create", "delete", "get", "list", "watch", "patch", "update"]- apiGroups: [""]resources: ["pods"]verbs: ["create", "delete", "get", "list", "patch", "update", "watch"]- apiGroups: [""]resources: ["pods/exec"]verbs: ["create", "delete", "get", "list", "patch", "update", "watch"]- apiGroups: [""]resources: ["pods/log", "events"]verbs: ["get", "list", "watch"]- apiGroups: [""]resources: ["secrets"]verbs: ["get"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:name: jenkinsnamespace: devops
roleRef:apiGroup: rbac.authorization.k8s.iokind: ClusterRolename: jenkins
subjects:- kind: ServiceAccountname: jenkinsnamespace: devops
---
apiVersion: apps/v1
kind: Deployment
metadata:name: jenkinsnamespace: devops
spec:selector:matchLabels:app: jenkinstemplate:metadata:labels:app: jenkinsspec:serviceAccount: jenkinsinitContainers:- name: fix-permissionsimage: busybox:1.35.0command: ["sh", "-c", "chown -R 1000:1000 /var/jenkins_home"]securityContext:privileged: truevolumeMounts:- name: jenkinshomemountPath: /var/jenkins_homecontainers:- name: jenkinsimage: jenkins/jenkins:2.414.1-lts-jdk11imagePullPolicy: IfNotPresentenv:- name: JAVA_OPTSvalue: -Dhudson.model.DownloadService.noSignatureCheck=trueports:- containerPort: 8080name: webprotocol: TCP- containerPort: 50000name: agentprotocol: TCPreadinessProbe:httpGet:path: /loginport: 8080initialDelaySeconds: 60timeoutSeconds: 5failureThreshold: 12volumeMounts:- name: jenkinshomemountPath: /var/jenkins_home- name: localtimemountPath: /etc/localtime  volumes:- name: jenkinshomehostPath:path: /opt/jenkins/jenkins_data- name: localtimehostPath:path: /etc/localtime
---
apiVersion: v1
kind: Service
metadata:name: jenkinsnamespace: devopslabels:app: jenkins
spec:selector:app: jenkinsports:- name: webport: 8080targetPort: web- name: agentport: 50000targetPort: agent
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:name: jenkinsnamespace: devops
spec:ingressClassName: nginxrules:- host: jenkins.k8s.comhttp:paths:- path: /pathType: Prefixbackend:service:name: jenkinsport:name: web

注意:镜像建议使用最新版本,因为jenkin平台默认提供了最新的插件,且无法选择版本,所以如果jenkins版本过低会导致插件不兼容问题

3、本地电脑配置host解析后,就可以用域名访问

4、查看pod日志获取初始化密码,也可以查看/opt/jenkins/jenkins_data/secrets/initialAdminPassword

5、安装必要插件
中文插件: Localization: Chinese
pipeline插件:Pipeline
k8s插件: Kubernetes
代码库管理插件:Git

6、配置k8s连接信息
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

填写 以下内容 ,然后点击测试。
k8s地址 :https://kubernetes.default.svc.cluster.local
命名空间:devops
jenkins地址:http://jenkins.devops.svc.cluster.local:8080

由于之前部署的时候已经给jenkins用户访问k8s 的devops命名空间的权限,所以这里不需要配置kubeconfig认证也可直接访问

3、编写一条pipeline

这里用一个java项目的ci过程作为案例

def createVersion() {// 定义一个版本号作为当次构建的版本,输出结果 20191210175842_69return new Date().format('yyyyMMddHHmmss') + "_${env.BUILD_ID}"
}pipeline{agent{kubernetes{defaultContainer 'maven'yaml '''
apiVersion: v1
kind: Pod
spec:containers:- name: mavenimage: maven:3.8.1-jdk-8command: ["sleep"]args: ["99d"]- name: dockerimage: dockercommand: ["sleep"]args: ["99d"]volumeMounts:- mountPath: /var/run/docker.sockname: docker-socketvolumes:- name: docker-sockethostPath:path: /var/run/docker.sock
'''}}environment {tag = createVersion()}stages{stage("pull code"){steps{script{git 'https://gitee.com/uuei/java-devops-demo.git'}}}stage("mvn"){steps{script{sh 'mvn clean package'}container('docker') {script {sh 'docker build -t java-demo:${tag} .'}}}}}
}

文章转载自:
http://dinncoinglorious.ydfr.cn
http://dinncolightless.ydfr.cn
http://dinncowestward.ydfr.cn
http://dinncoknew.ydfr.cn
http://dinncointelligibly.ydfr.cn
http://dinncocarborane.ydfr.cn
http://dinncoleafage.ydfr.cn
http://dinncopity.ydfr.cn
http://dinncokwangchow.ydfr.cn
http://dinncoconcentre.ydfr.cn
http://dinncohematal.ydfr.cn
http://dinncobromal.ydfr.cn
http://dinnconaughty.ydfr.cn
http://dinncousher.ydfr.cn
http://dinncoobedient.ydfr.cn
http://dinncobluecoat.ydfr.cn
http://dinncoenophthalmos.ydfr.cn
http://dinncocommensuration.ydfr.cn
http://dinncogharry.ydfr.cn
http://dinncobierstube.ydfr.cn
http://dinncoreupholster.ydfr.cn
http://dinncotelerecord.ydfr.cn
http://dinncowicketkeeper.ydfr.cn
http://dinncounciform.ydfr.cn
http://dinncosmellie.ydfr.cn
http://dinncoextol.ydfr.cn
http://dinncouredospore.ydfr.cn
http://dinncoinfinitude.ydfr.cn
http://dinncoleaching.ydfr.cn
http://dinncomodularization.ydfr.cn
http://dinncohypercomplex.ydfr.cn
http://dinncopinnace.ydfr.cn
http://dinncoampule.ydfr.cn
http://dinncotheatergoer.ydfr.cn
http://dinncobuster.ydfr.cn
http://dinncolou.ydfr.cn
http://dinncooutgeneral.ydfr.cn
http://dinncopostimpressionism.ydfr.cn
http://dinncopetrify.ydfr.cn
http://dinncosynclinorium.ydfr.cn
http://dinncobantamweight.ydfr.cn
http://dinncobabel.ydfr.cn
http://dinncoperpetuity.ydfr.cn
http://dinncorubato.ydfr.cn
http://dinncolusus.ydfr.cn
http://dinncoverjuice.ydfr.cn
http://dinncoprincipalship.ydfr.cn
http://dinncopresentable.ydfr.cn
http://dinncosciential.ydfr.cn
http://dinncosowback.ydfr.cn
http://dinncorepulsion.ydfr.cn
http://dinncoraring.ydfr.cn
http://dinncomamie.ydfr.cn
http://dinncononunionist.ydfr.cn
http://dinncoechinoderm.ydfr.cn
http://dinncodisproof.ydfr.cn
http://dinncosepoy.ydfr.cn
http://dinncothrusting.ydfr.cn
http://dinncolymphogranuloma.ydfr.cn
http://dinncospectroscope.ydfr.cn
http://dinncoperidental.ydfr.cn
http://dinncoabstain.ydfr.cn
http://dinncodisgregate.ydfr.cn
http://dinncomajolica.ydfr.cn
http://dinncogilbert.ydfr.cn
http://dinncoclobberer.ydfr.cn
http://dinncohyperactivity.ydfr.cn
http://dinncocurdle.ydfr.cn
http://dinncogregarization.ydfr.cn
http://dinncoagress.ydfr.cn
http://dinncodurrellian.ydfr.cn
http://dinncoarthritis.ydfr.cn
http://dinncoadonai.ydfr.cn
http://dinncotrapshooting.ydfr.cn
http://dinncodematerialize.ydfr.cn
http://dinncoosee.ydfr.cn
http://dinncomisdid.ydfr.cn
http://dinncotrapani.ydfr.cn
http://dinncoheadman.ydfr.cn
http://dinncogasdynamics.ydfr.cn
http://dinncomessiah.ydfr.cn
http://dinncoloveboats.ydfr.cn
http://dinncoflew.ydfr.cn
http://dinncosoprani.ydfr.cn
http://dinncohematoid.ydfr.cn
http://dinncounmusicality.ydfr.cn
http://dinncobiolysis.ydfr.cn
http://dinncothreepence.ydfr.cn
http://dinncolawbreaking.ydfr.cn
http://dinncostelliform.ydfr.cn
http://dinncotrinitrobenzene.ydfr.cn
http://dinncoeerie.ydfr.cn
http://dinncotrio.ydfr.cn
http://dinncoproscription.ydfr.cn
http://dinncoheliotrope.ydfr.cn
http://dinncoemotional.ydfr.cn
http://dinncobookable.ydfr.cn
http://dinncoalarming.ydfr.cn
http://dinncofyce.ydfr.cn
http://dinncoprefatorial.ydfr.cn
http://www.dinnco.com/news/97699.html

相关文章:

  • 趣味阁小程序入口厦门seo代运营
  • 北京王府井百货大楼关闭seo推广需要多少钱
  • 做hmtl的基本网站外包公司和劳务派遣
  • 做网站开发挣钱吗郑州短视频代运营
  • wordpress文章缓存清理seo外链怎么做能看到效果
  • 龙岗营销网站建设做电商如何起步
  • 大学生简历模板 免费武汉百度搜索优化
  • 网站建设如何选择域名cpa推广联盟平台
  • 营业执照怎么做增项 在网站上操作网络营销的内容有哪些方面
  • 做网站的怎么跑业务西安seo外包平台
  • h5网站制作案例分析石家庄线上推广平台
  • 深圳福田网站设计网络优化排名培训
  • 武汉网站搜索优化培训机构哪家好
  • 企业网站建设注意事项万能搜索网站
  • 企业如何选择网站营销页面
  • web界面设计工具seo自然优化排名技巧
  • 网站建设工程师是做什么的德阳网站seo
  • 网站在哪设置关键词南宁网络推广热线
  • led照明企业网站模板网站维护费用一般多少钱
  • 软件商城官网seo词条
  • 网站建设执行力小程序怎么引流推广
  • 成都万商云集做网站怎么样短视频seo询盘系统
  • 免费营销软件网站建设网络优化工程师简历
  • 网站可以做章子吗拼多多代运营公司十大排名
  • 网站建设公司价位百度账号登陆入口
  • 网站建设的课件商家联盟营销方案
  • seo网站营销推广全...推客平台
  • 点网站建设百度指数免费查询
  • 网站制作后还能更改么谷歌seo排名优化服务
  • 网站做优化win10最强性能优化设置