需要查看秘钥,
然后在 **.16.200.22和**.16.200.28服务器的目录下面将Jenkins秘钥放到~/.ssh/authorized_keys文件里。
3:Jenkins自动化部署到多台服务器脚本
library 'lib-base@master'
def map = [:]
//######传参########
map.put('GIT_URL','http://172.16.0.1/FN-PM0091/cdd.git')
map.put('GIT_BRANCH','master')
map.put('GIT_CRED_ID','jenkins')
def archivelist=[]
archivelist.add('job-excutor/target/cdd1.jar')
map.put('ARCHIVE_FILE',archivelist)
// skywalking 服务目录
def SKYWALKING_DIR = '/usr/local/apps/apache-skywalking-apm-bin-es7'
// skywalking oap 服务地址
def SKYWALKING_OAP_IP = '172.16.200.54'
def SKYWALKING_OAP_PORT = 11800
def deploylist=[]
deploylist.add("runjar -f 'cdd-service/target/cdd1.jar' -v '/data/cddm' -j '-Xms512m -Xmx512m' -h **.16.200.28")
deploylist.add("runjar -f 'report-executor/target/cdd1.jar' -v '/data/cddm' -j '-Dnacos.logging.default.config.enabled=false -Xms512m -Xmx512m' -h **.16.200.22")
map.put('DEPLOY_RUN',deploylist)
//################
DockerBuild("maven",map)
1、自动完成安装,基本配置2、通过提示输入网段、子网掩码、网关、DNS、IP起止地址等信息完成作用域的添加
【方法一】:
#!/bin/bash
conf="/etc/dhcpd.conf"
rpm -q dhcp &>/dev/null
if [ $? -ne 0 ]then
yum -y install dhcp
fi
grep "subnet" $conf &>/dev/null
if [ $? -ne 0 ]then
echo "
ddns-update-style interim
ignore client-updates
default-lease-time 21600
max-lease-time 43200
" >$conf
fi
read -p "please input network:" network
read -p "please input netmask:" netmask
read -p "please input gateway:" gateway
read -p "please input DNS:" dns
read -p "please input start_ip:" start_ip
read -p "please input end_ip:" end_ip
echo "
subnet $network netmask $netmask {
option routers $gateway
option subnet-mask $netmask
URL地址:
option domain-name-servers $dns
range dynamic-bootp $start_ip $end_ip
}
" >>$conf
service dhcpd restart
【方法二】:
#!/bin/bash
dhcpconf=/etc/dhcpd.conf
rpm -q dhcp &>/dev/null
if [ $? -ne 0 ]then
yum -y install dhcp
fi
grep "subnet" $dhcpconf &>/dev/null
if [ $? -ne 0 ]then
echo "ddns-update-style interim
ignore client-updates
default-lease-time 21600
max-lease-time 43200" >$dhcpconf
fi
while true
do
read -p "please input Network:" network
read -p "please input Netmask:" netmask
read -p "please input Gateway:" gateway
read -p "please input DNS:" dns
read -p "please input Start_IP:" start_ip
read -p "please input End_IP:" end_ip
grep $network $dhcpconf &>/dev/null
if [ $? -ne 0 ]then
echo "subnet $network netmask $netmask {
option routers $gateway
option subnet-mask $netmask
option domain-name-servers $dns
range dynamic-bootp $start_ip $end_ip
}" >>$dhcpconf
read -p "continue to do (yes/no)?" yn
if [ $yn = "no" ]then
service dhcpd status &>/dev/null
if [ $? -ne 0 ]then
service dhcpd start &>/dev/null
else
service dhcpd reload &>/dev/null
fi
exit 0
fi
fi
done
1.希望你们认真看一下楼主的要求PC机100台像一楼这位大哥说的,便宜几千块服务器。。。你觉得这种机器能保证100台的运行吗?人家既然有100台客户端,同时在线的肯定也比较多,你这个配置不是太坑爹?2.服务器的选购对于你们的系统具体要求是很重要的,这一点一楼说到一点,你们系统的计算性、复杂性、要求 都是相关的。这一点 需要贵公司/单位 配置一个较好的服务器,在目前来说,IBM/DELL和配置不错,具体配置尽量好,个人认为5W比较正常,服务器的硬盘不是关键,因为这种服务器重要性是它的运算速度,如果条件允许,可以考虑把中间层/域控制器/数据服务器分配到三台服务器上,这样每台承受的压力较小,运算速度更好,服务器的网络接口尽量是1000M。3.另外、一个客户端的运行因素很多,不光是服务器,你们的网络保证,客户端PC配置情况也同样重要。至于二楼这位打广告的 就别来了希望对你有帮助欢迎分享,转载请注明来源:夏雨云
评论列表(0条)