自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(283)
  • 收藏
  • 关注

原创 12306抢票

git clone https://gitee.com/pingfanrenbiji/ticket-12306/d/PycharmProjects/ticket-12306 (master)pip3 install -r requirements.txt配置文件ticket-12306/TickerConfig.py需要配置的配置项:出发日期 预售放票时间购买车次触发城市到达城市座位类型乘车人姓名12306登录账号(tk、RAIL_DEVICEID)tkRAIL_

2021-04-17 19:25:40 148

原创 k8s部署sonarqube

下载sonarqube、postgres镜像docker pull sonarqube:ltsdocker tag sonarqube:lts harbor.uat.venusgroup.com.cn/uat/sonarqube:ltsdocker push harbor.uat.venusgroup.com.cn/uat/sonarqube:ltsdocker pull postgres:11.4docker tag postgres:11.4 harbor.uat.venusgroup.co

2021-12-05 19:06:03 125

原创 k8s部署nexus

下载nexus镜像docker pull sonatype/nexus3:3.30.0docker tag sonatype/nexus3:3.30.0 harbor.uat.venusgroup.com.cn/uat/nexus3:3.30.0docker push harbor.uat.venusgroup.com.cn/uat/nexus3:3.30.0创建nexus数据目录mkdir /devops/nexuschmod 777 /devops/nexus资源配置清单vim ne

2021-12-05 09:35:30 124

原创 k8s部署gitlab

下载gitlab镜像docker pull gitlab/gitlab-ce:latestdocker tag gitlab/gitlab-ce:latest harbor.uat.wuxingge.com.cn/uat/gitlab-ce:latestdocker push harbor.uat.wuxingge.com.cn/uat/gitlab-ce:latestnfs中创建gitlab数据目录mkdir -p /devops/gitlab/datamkdir -p /devops/gi

2021-12-04 09:51:38 197

原创 k8s部署jenkins

下载jenkins镜像docker pull jenkins/jenkins:2.277.4DockerfileFROM jenkins/jenkins:2.277.4USER rootRUN /bin/cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime &&\ echo 'Asia/Shanghai' >/etc/timezoneADD id_rsa /root/.ssh/id_rsaADD config.

2021-12-04 09:38:23 114

原创 Jenkins连接rancher中的k8s集群

rancher kubeconfigk8s地址token(secret)jenkins secret配置secretjenkins 连接k8s

2021-11-17 13:39:04 524

转载 harbor证书过期

参考https://www.cnblogs.com/gandefeng/p/14291452.htmldocker-compose downcd harbor# 过期替换证书要重新执行prepare 否则只重启替换证书不生效 客户端仍然报证书过期./preparedocker-compose up -d

2021-10-22 17:20:06 24

原创 交互式 Web 应用-PyWebIO

参考https://mp.weixin.qq.com/s/w4geqzmuqAXvE78257jQ2Q#pip install pywebiobmi.pyfrom pywebio import start_serverfrom pywebio.input import input, FLOATfrom pywebio.output import put_textdef bmi(): height = input("请输入你的身高(cm):", type=FLOAT) wei

2021-10-21 11:00:09 216

原创 CentOS6-Base.repo

CentOS-Base.repo[base]name=CentOS-6.10 - Base - mirrors.aliyun.comfailovermethod=prioritybaseurl=http://mirrors.aliyun.com/centos-vault/6.10/os/$basearch/gpgcheck=1gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6 #released update

2021-10-20 14:27:08 19

原创 nginx ingress controller X-Forwarded-For配置

Kubernets中获取客户端真实IPkubectl edit cm -n ingress-nginx nginx-configuration加入以下配置data: compute-full-forwarded-for: "true" forwarded-for-header: "X-Forwarded-For" use-forwarded-headers: "true"示例apiVersion: v1data: compute-full-forwarded-for: "tru

2021-10-18 17:28:47 80

原创 nginx支持websocket

参考http://nginx.org/en/docs/http/websocket.htmlhttps://blog.csdn.net/weixin_39669147/article/details/111282088nginx配置nginx.conf http { ... map $http_upgrade $connection_upgrade { default 'upgrade'; '' 'close'; } ... }ng

2021-10-14 18:07:22 19

原创 eureka删除节点 config刷新配置

eureka删除节点curl -u admin:xxx -X DELETE http://ip:port/eureka/apps/服务名/注册名config刷新配置#http://config服务ip:端口/vcloud-zuul/release/release 找不到修改的配置,执行以下命令刷新curl -X POST http://config服务ip:端口/refresh...

2021-10-11 14:58:48 20

原创 Kubernetes1.18.3 部署nginx-ingress

参考https://blog.csdn.net/hzh839900/article/details/107696118下载nginx-ingress包https://github.com/kubernetes/ingress-nginx/archive/nginx-0.11.0.tar.gz修改default-backend.yaml,修改镜像地址修改with-rbac.yaml,修改镜像地址,deployment修改为Daemonset创建nginx-ingress服务vim service

2021-09-30 11:15:53 26

原创 groovy环境安装

配置jdk下载groovyhttps://mirrors.tuna.tsinghua.edu.cn/apache/groovy/3.0.9/distribution/配置环境变量GROOVY_HOME = D:\groovy-3.0.9Path 添加 D:\groovy-3.0.9\bin验证

2021-09-26 17:57:08 10

原创 jenkins构建 飞书通知

feishutongzhi.py#!/usr/bin/env python#-*- encoding:utf-8 -*-import sysimport requestsJOB_URL = sys.argv[1]url = '飞书机器人webhook'method = 'post'headers = { 'Content-Type': 'application/json'}json = { "msg_type": "interactive", "card":

2021-09-26 14:56:32 296

原创 zabbix5.0

zabbix源rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm安装zabbix-serveryum install zabbix-server-mysql zabbix-agent安装zabbix-webyum install centos-release-sclvim zabbix.repo[zabbix-frontend]...enabled=

2021-09-24 14:56:36 8

原创 zabbix告警-飞书机器人

创建飞书机器人发送告警信息脚本vim /usr/lib/zabbix/alertscripts/feishu.py#!/usr/bin/python3import requestsimport jsonimport sysimport osimport datetime# 你复制的webhook地址粘贴进url内url = "webhook地址"def send_message(message): payload_message = { "msg_typ

2021-09-24 11:12:55 142

原创 python操作k8s

pip安装kubernetes库pip3 install kubernetes连接k8s配置文件~/.kube/config 拷贝到 kubeconfig.yamlpython连接k8sfrom kubernetes import client, configconfig.kube_config.load_kube_config(config_file="kubeconfig.yaml")class Kubernetes: def __init__(self): self.Co

2021-09-22 10:58:34 17

原创 kubeadm安装的etcd备份恢复

安装etcdctl命令行etcd节点安装etcdctlyum install -y etcdecho 'export ETCDCTL_API=3' >> /etc/profileetcd集群查看列出成员etcdctl --endpoints=https://192.168.41.30:2379,https://192.168.41.31:2379,https://192.168.41.32:2379 --cert=/etc/kubernetes/pki/etcd/server.c

2021-09-12 08:36:14 17

原创 k8s1.18.3 添加节点

参考文档https://blog.csdn.net/qq_31677507/article/details/104847892获取certskubeadm init phase upload-certs --upload-certsI0910 10:50:38.007869 209649 version.go:252] remote version is much newer: v1.22.1; falling back to: stable-1.18W0910 10:50:39.410721

2021-09-10 11:16:41 20

原创 python读取ldap用户在Jenkins中授权

工程目录结构jenkinsrole.pyimport requestsimport jsonclass JenkinsRole: def __init__(self, host, username, port=8080, password=None, token=None, ssl=False): """ password和token使用其中一个即可 :param host: Jenkins主机 :param usernam

2021-09-07 14:11:20 57

原创 python操作openldap

from ldap3 import Server, Connection, ALLimport jsonserver = Server('192.168.41.13', get_info=ALL)conn = Connection(server, 'cn=admin,cn=manager,dc=pre,dc=venusgroup,dc=com,dc=cn', 'root@123', auto_bind=True)conn.search('ou=employee,dc=pre,dc=venusgrou

2021-09-05 09:52:02 30

原创 python操作Jenkins权限

参考文章https://www.guji.work/?p=248管理员设置tokenpython调用Jenkins API 需要使用token生成并记录token(生成token只显示一次)python操作Jenkins权限import requestsimport jsonclass JenkinsRole: def __init__(self, host, username, port=8080, password=None, token=None, ssl=False):

2021-09-02 17:03:24 39

原创 python操作Jenkins

安装python-jenkinspip3 install python-jenkins登录jenkins,获取Jenkins版本import jenkins# 登录jenkins,获取Jenkins版本server = jenkins.Jenkins('http://192.168.41.29:8080', username='5010905', password='ABCabc123')user = server.get_whoami()version = server.get_vers

2021-09-02 11:30:07 13

原创 jenkins集成ldap

安装ldap插件配置Jenkins

2021-09-01 09:38:33 35

原创 Jenkins pipeline

配置连接gitlab凭据pipelinedef git_address = "http://192.168.41.26/vcloud/vcloud-config.git"def git_auth = "gitlab-auth"node { stage('拉取代码') { git branch: "$Branch",credentialsId: "$git_auth", url: "$git_address" } }...

2021-08-30 15:37:38 66

原创 Jenkins权限管理

安装插件Role-based Authorization Strategy开启权限全局安全配置角色管理管理角色分配角色

2021-08-24 10:42:37 18

原创 k8s1.18.3部署Metrics-Server监控服务

参考https://www.jianshu.com/p/82b91109a443下载并解压Metrics-Serverwget https://github.com/kubernetes-sigs/metrics-server/archive/v0.3.6.tar.gztar xf v0.3.6.tar.gz修改配置文件cd metrics-server-0.3.6/deploy/1.8+sed -i 's#k8s.gcr.io/metrics-server-amd64:v0.3.6#mir

2021-08-18 14:03:14 93

原创 rancher添加外部k8s集群

自签证书(umask 077;openssl genrsa -out rancher.wuxingge.com.key 2048)openssl req -new -key rancher.wuxingge.com.key -out rancher.wuxingge.com.csr -subj "/CN=10.10.111.201"echo subjectAltName = IP:10.10.111.201 > extfile.cnfopenssl x509 -req -in rancher.

2021-08-18 09:49:45 64

原创 K8s Namespace无法删除解决办法

参考https://blog.csdn.net/Jerry_Pan1990/article/details/103633627情况:Kubectl delete ns XXXX 后, namespace 一直处于 Terminating 状态。使用:kubectl delete ns monitoring --grace-period=0 –force也无法删除解决过程如下:开启代理kubectl proxy &将此命名空间以 json文件的形式导出kubectl get

2021-08-17 18:27:48 59

原创 k8s配置storage-class

nfs服务器cat /etc/exports/data *(insecure,rw,sync,no_root_squash)创建serveraccountvi rbac.yamlapiVersion: v1kind: ServiceAccountmetadata: name: nfs-client-provisioner # replace with namespace where provisioner is deployed namespace: default

2021-08-17 15:37:45 228

原创 K8S 1.18.3 安装dashboard2.0

参考https://blog.csdn.net/l1028386804/article/details/105904557/创建dashboard证书(umask 077;openssl genrsa -out dashboard.wuxingge.com.key 2048)openssl req -new -key dashboard.wuxingge.com.key -out dashboard.wuxingge.com.csr -subj "/CN=dashboard.wuxingge.com

2021-08-15 11:44:55 53

原创 Kubernetes 1.18.3 部署 Traefik2

参考https://www.cnblogs.com/heian99/p/14608414.html创建命名空间kubectl create ns ingress-traefik创建CRD资源Traefik 2.0版本后开始使用CRD来对资源进行管理配置,先创建CRD资源traefik-crd.yaml## IngressRouteapiVersion: apiextensions.k8s.io/v1beta1kind: CustomResourceDefinitionmetadata:

2021-08-14 13:15:36 66

原创 Jenkins部署nacos到k8s集群

nginx-ingress.yamlapiVersion: v1kind: Namespacemetadata: name: ingress-nginx---kind: ConfigMapapiVersion: v1metadata: name: nginx-configuration namespace: ingress-nginx labels: app.kubernetes.io/name: ingress-nginx app.kubernetes.io

2021-08-11 10:41:59 114

原创 jenkins 连接k8s 集群

1.jenkins 添加kubernetes plugin2.点击系统管理->系统设置-添加一个云,在下拉菜单中选择kubernets并添加3.填写云kubernetes配置内容

2021-08-08 14:49:04 77

原创 kubeadm安装k8s高可用集群

hosts文件10.10.109.154 k8s-master-110.10.108.232 k8s-master-210.10.110.16 k8s-master-310.10.111.159 k8s-node-110.10.110.195 k8s-node-210.10.111.170 k8s-node-3安装dockeryum install -y yum-utils device-mapper-persistent-data lvm2 wgetwget -O /etc/yum.

2021-08-06 20:37:16 96

原创 keepalived

keepalived所有主机配置VIP 192.168.41.35安装yum install -y keepalived配置文件keepalived.conf! Configuration File for keepalivedglobal_defs { router_id rediscluster1}vrrp_script chk_rediscluster { script "/etc/keepalived/check_all.sh" interval 5

2021-06-28 10:02:05 27

原创 nacos集群

jdk配置tar xf jdk-8u221-linux-x64.tar.gz -C /usr/local/ln -s /usr/local/jdk1.8.0_221 /usr/local/jdkvim /etc/profile.d/java.shexport JAVA_HOME=/usr/local/jdkexport PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATHexport CLASSPATH=.$CLASSPATH:$JAVA_HOME/lib:

2021-06-16 18:18:55 49

原创 OpenLDAP主从

参考https://blog.csdn.net/oyym_mv/article/details/94639020安装至少两个ldap节点参考https://blog.csdn.net/wuxingge/article/details/117780560主节点配置(192.168.41.13),添加模块syncprovvim mod_syncprov.ldifdn: cn=module,cn=configobjectClass: olcModuleListcn: moduleolcModu

2021-06-14 09:13:24 61 2

原创 openldap编译安装

参考资料官网:http://www.openldap.org/https://www.linuxidc.com/Linux/2016-08/134225.htmhttp://v.colinlee.fish/posts/openldap-on-centos-7-speedy-tutorial.html安装berkeley-dbwget http://download.oracle.com/berkeley-db/db-5.1.29.tar.gz ----openldap2.4.46版本只支持bdb4

2021-06-10 15:28:47 167

空空如也

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人 TA的粉丝

提示
确定要删除当前文章?
取消 删除