随笔分类 -  自动化

ansble && jenkins
摘要:Ansible 进阶技巧 原文 http://www.ibm.com/developerworks/cn/linux/1608_lih_ansible/index.html?ca=drs- 简介# Ansible 是一个系统自动化工具,可以用来做系统配管理,批量对远程主机执行操作指令。我自己使用 A 阅读全文
posted @ 2021-07-10 00:07 清风木 阅读(161) 评论(0) 推荐(0) 编辑
摘要:0、启动redis_exporter redis_exporter: version: '2'services: redis_exporter: image: oliver006/redis_exporter container_name: redis_exporter_test ports: - 阅读全文
posted @ 2018-12-19 18:48 清风木 阅读(1323) 评论(0) 推荐(0) 编辑
摘要:centos 7.4.x consul 1.2.2 list: 172.16.16.103 172.16.16.112 172.16.16.115 下载: #cd /usr/local/ #wget https://releases.hashicorp.com/consul/1.2.2/consul 阅读全文
posted @ 2018-09-06 00:14 清风木 阅读(168) 评论(0) 推荐(0) 编辑
摘要:#!/usr/bin/pythonimport sys, timeimport shutil, commands#coding=utf-8 import sysreload(sys)sys.setdefaultencoding('utf-8')import jenkins config_file = 阅读全文
posted @ 2018-07-09 19:25 清风木 阅读(1058) 评论(0) 推荐(0) 编辑
摘要:#!/bin/bash if [ $# != 2 ];then echo "bash $0 old_hostname new_hostname" exit 0 fi old_hostname=$1new_hostname=$2 echo `hostname $new_hostname` sed -i 阅读全文
posted @ 2018-07-09 19:14 清风木 阅读(202) 评论(0) 推荐(0) 编辑
摘要:list: centos 6.5 x86_64 172.18.39.28 mast.test.com 172.18.39.27 mini.test.com master:#sudo yum install https://repo.saltstack.com/yum/redhat/salt-repo 阅读全文
posted @ 2018-07-09 19:05 清风木 阅读(153) 评论(0) 推荐(0) 编辑
摘要:saltstack实战2--远程执行之模块(Modules) 本来转自http://www.cnblogs.com/MacoLee/p/5753640.html 版权归原作者所有 说明salt '*' sys.list_modules #列出当前版本支持的模块API原理是通过调用master cli 阅读全文
posted @ 2018-07-09 19:04 清风木 阅读(286) 评论(0) 推荐(0) 编辑
摘要:playbook介绍 一. 为什么引入playbook 我们完成一个任务,例如安装部署一个httpd服务,我们需要多个模块(一个模块也可以称之为task)提供功能来完成。而playbook就是组织多个task的容器,他的实质就是一个文件,有着特定的组织格式,它采用的语法格式是YAML(Yet Ano 阅读全文
posted @ 2018-07-09 13:06 清风木 阅读(1796) 评论(0) 推荐(0) 编辑
摘要:创建软链:file: - name: create link hosts: "{{hosts_ip}}" tasks: - name: create link file: src={{src_path}} dest={{dest_link_path}} state=link 运行脚本: - name 阅读全文
posted @ 2018-07-04 17:01 清风木 阅读(1440) 评论(0) 推荐(0) 编辑
摘要:#cat jia.yml - hosts: test-gfs user: dev gather_facts: true vars: PORT: "3306" MESAGE: "wangrenqing" IP_local: "{{ansible_default_ipv4.address}}" IP_l 阅读全文
posted @ 2018-07-04 16:57 清风木 阅读(188) 评论(0) 推荐(0) 编辑
摘要:修改cat /etc/ansible/hosts [test]10.27.235.108 host_name=test_host_name - hosts: test user: root gather_facts: true tasks: - name: rsync dir filebeat ho 阅读全文
posted @ 2018-07-04 16:56 清风木 阅读(4954) 评论(0) 推荐(1) 编辑
摘要:软件: centos 7.x java jenkins Pipeline ansible 1、安装请看上一文 2、主要是讲部署() 目的:实现 参数化发布 说明 :构建jar包是由gitlab-ci 生成,代码 是从test服务器拉取(jenkins另外 一个任务拉) 安装插件: active ch 阅读全文
posted @ 2018-07-04 15:42 清风木 阅读(260) 评论(0) 推荐(0) 编辑
摘要:添加Jenkins的源(repository): #sudo wget -O /etc/yum.repos.d/jenkins.repo http://jenkins-ci.org/redhat/jenkins.repo #sudo rpm --import http://pkg.jenkins-c 阅读全文
posted @ 2018-07-04 15:29 清风木 阅读(240) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示