Linux中bamboo服务端安装配置
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Linux中bamboo服务端安装配置相关的知识,希望对你有一定的参考价值。
官方安装文档:
https://confluence.atlassian.com/display/BAMBOO/Getting+started+with+Bamboo
Linux安装bamboo
https://confluence.atlassian.com/display/BAMBOO/Installing+Bamboo+on+Linux
1 安装bamboo服务端
1.1 系统环境
[[email protected] ~]# cat /etc/redhat-release CentOS release 6.6 (Final) [[email protected] ~]# uname -r 2.6.32-504.el6.x86_64
1.2安装maven包
[[email protected] ~]#wget http://mirrors.cnnic.cn/apache/maven/maven-3/3.0.5/binaries/apache-maven-3.0.5-bin.tar.gz #下载到服务器上[[email protected] ~]#tar zxf apache-maven-3.0.5-bin.tar.gz -C /data/ #解压到/data/目录下[[email protected] ~]#vim /etc/profile #编辑/etc/profile文件,添加下面一行内容PATH=$PATH:/data/apache-maven-3.0.5/bin [[email protected] apache-maven-3.0.5]# source /etc/profile #让配置文件立即生效[[email protected] apache-maven-3.0.5]# mvn –v #验证是否安装成功Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 21:51:28+0800) Maven home: /data/apache-maven-3.0.5 Java version: 1.8.0_77, vendor: Oracle Corporation Java home: /usr/java/jdk1.8.0_77/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "2.6.32-504.el6.x86_64", arch: "amd64", family: "unix"
1.3 安装JDK包
[[email protected] soft]# yum install jdk-8u25-linux-x64.rpm #安装jdk[[email protected] soft]# java –version #验证是否安装成功java version "1.8.0_77" Java(TM) SE Runtime Environment (build 1.8.0_77-b03) Java HotSpot(TM) 64-Bit Server VM (build 25.77-b03, mixed mode)
1.4下载bamboo安装包
https://www.atlassian.com/software/bamboo/download #需要翻墙[[email protected] soft]# rz –y #我这边直接把包从本地上传到服务端[[email protected] soft]# ls atlassian-bamboo-5.9.2.tar.gz jemalloc-3.4.0.tar.bz2 memcached-1.2.0.tar.gz mysql-5.6.22.tar.gz supervisor-3.2.3.tar.gz jdk-8u77-linux-x64.rpm libevent-1.2.tar.gz mysql-5.6.22 php-5.6.19.tar.gz tengine-2.0.3.tar.gz
1.5 安装bamboo
[[email protected] soft]# tar zxf atlassian-bamboo-5.9.2.tar.gz -C /data/ #解压到/data目录下[[email protected] data]# cd /data/atlassian-bamboo-5.9.2/ #进入解压bamboo目录[[email protected] soft]# cd /data/atlassian-bamboo-5.9.2/atlassian-bamboo/WEB-INF/classes/ [[email protected] classes]# vim bamboo-init.properties bamboo.home=/data/bamboo-home [[email protected] atlassian-bamboo-5.9.2]# sh bamboo.sh #运行安装包脚本[[email protected] atlassian-bamboo-5.9.2]# sh ./bin/start-bamboo.sh #运行启动脚本To run Bamboo in the foreground, start the server with start-bamboo.sh -fg Server startup logs are located in /data/atlassian-bamboo-5.9.2/logs/catalina.out Bamboo Server Edition Version : 5.9.2 Detecting JVM PermGen support... PermGen switch is supported. Setting to 256m If you encounter issues starting or stopping Bamboo Server, please see the Troubleshooting guide at https://confluence.atlassian.com/display/BAMBOO/Installing+and+upgrading+Bamboo Using CATALINA_BASE: /data/atlassian-bamboo-5.9.2 Using CATALINA_HOME: /data/atlassian-bamboo-5.9.2 Using CATALINA_TMPDIR: /data/atlassian-bamboo-5.9.2/temp Using JRE_HOME: /usr Using CLASSPATH: /data/atlassian-bamboo-5.9.2/bin/bootstrap.jar:/data/atlassian-bamboo-5.9.2/bin/tomcat-juli.jar Tomcat started.
[[email protected] atlassian-bamboo-5.9.2]# lsof -i :8085 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME java 4821 root 40u IPv6 27409 0t0 TCP *:8085 (LISTEN)
1.6 在浏览器输入服务端的ip:8085端口(默认为8085)
1.7 注册bamboo
1.7.1 复制server ID
1.7.2 打开注册链接
1.7.3 登陆atlassian (这里的账号需要自己注册)
https://www.atlassian.com/legal/customer-agreement?_ga=1.17805049.1102781017.1461728687
1.5.4 选中bamboo server、填写server ID
1.5.5 复制license key
1.5.6 正在安装
1.5.7 填写用户信息
1.5.8 完成安装
2 创建一个新的项目
2.1 创建plan
2.2 填写相关信息
2.3 添加该项目所需的依赖服务
2.4 编译包
一个服务对应一个checkout与maven3.x
2.5 添加工件信息
2.6 开始编译打包
2.7 查看jar包
3 安装所需要服务
3.1 安装rsync服务
[[email protected] ~]# yum install rsync xinetd #安装rsync[[email protected] ~]# vim /etc/rsyncd.conf #编辑配置文件use chroot = false strict modes = false hosts allow = 192.168.0.0/255.255.0.0 host deny = * log file = rsyncd.log uid=0 gid=0 list=no # Module definitions # Remember cygwin naming conventions : c:\work becomes /cygwin/c/work [hotel-wechat-service] #添加共享模块path = /data/bamboo-home/xml-data/build-dir/1474562-1638401 transfer logging = yes [[email protected] ~]# /etc/init.d/xinetd start #启动服务[[email protected] ~]# lsof -i:873 #查看监听端口COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME xinetd 9396 root 5u IPv6 320876 0t0 TCP *:rsync (LISTEN)DEV环境机器上[[email protected] /]# yum install rsync #安装rsync服务
3.2安装supervisor服务
DEV环境机器上
[[email protected] /]# wget https://pypi.python.org/packages/92/9e/d3ad406ff1eb968c03f52adf7fd5439fe2f105049d6fa006738e677bedec/supervisor-3.2.3.tar.gz #下载软件包[[email protected] /]#tar -zxf supervisor-3.2.3.tar.gz -C /data/ #解压到指定目录[[email protected] /]# cd /data/supervisor-3.2.3/
[[email protected] /]# python setup.py install #安装[[email protected] /]# echo_supervisord_conf >/etc/supervisord.conf [[email protected] /]#vim /etc/init.d/supervisord #编辑服务启动文件,添加以下内容PROGNAME=supervisord DAEMON=/usr/bin/$PROGNAME CONFIG=/etc/$PROGNAME.conf PIDFILE=/tmp/$PROGNAME.pid DESC="supervisord daemon" SCRIPTNAME=/etc/init.d/$PROGNAME # Gracefully exit if the package has been removed. test -x $DAEMON || exit 0 start() { echo -n "Starting $DESC: $PROGNAME" $DAEMON -c $CONFIG echo "..." } stop() { echo -n "Stopping $DESC: $PROGNAME" supervisor_pid=`ps -ef | grep supervisord | grep -v grep | awk ‘{print $2}‘` kill -15 $supervisor_pid echo "..." } case "$1" in start) start ;; stop) stop ;; restart) stop sleep 3 start ;; *) echo "Usage: $SCRIPTNAME {start|stop|restart}" >&2 exit 1 ;; esac exit 0 [[email protected] /]#chmod +x /etc/init.d/supervisord [[email protected] /]#vim /etc/supervisord.conf #修改以下几行,去掉前面的注释“;”[unix_http_server] file=/tmp/supervisor.sock ; (the path to the socket file) chmod=0700 ; socket file mode (default 0700) ;chown=nobody:nogroup ; socket file uid:gid owner username=user ; (default is no username (open server)) password=123 ; (default is no password (open server)) [inet_http_server] ; inet (TCP) server disabled by default port=0.0.0.0:9001 ; (ip_address:port specifier, *:port for all iface) username=user ; (default is no username (open server)) password=123 ; (default is no password (open server)) [include] files = /etc/supervisor.conf/*.conf [[email protected] /]# cd /etc/supervisor.conf/ [[email protected] supervisor.conf]# vim hotel-wechat-service.conf #创建需要托管服务的配置文件,添加以下内容[program:hotel-wechat-service] command= java -jar -Dziztour.service.gateway=http://192.168.1.240/api hotel-wechat-service.jar autostart=true ; supervisord守护程序启动时自动启动tornadoautorestart=true redirect_stderr=true ; 将stderr重定向到stdoutuser=root directory=/www/hotel-wechat-service/ ; cd 到应用目录stdout_logfile = /data/log/hotel-wechat-service.log startretries=3 [[email protected] ~]# /etc/init.d/supervisord start #启动supervisor服务[[email protected] ~]# lsof -i:9001 #查看监听端口COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME superviso 51982 root 4u IPv4 148930 0t0 TCP *:etlservicemgr (LISTEN)
4 创建deploy
4.1 填写发布项目信息
4.2 添加一个环境
4.3 添加执行过程
4.4 发布
本文出自 “蔡超” 博客,请务必保留此出处http://caicai2009.blog.51cto.com/3678925/1943424
以上是关于Linux中bamboo服务端安装配置的主要内容,如果未能解决你的问题,请参考以下文章
是否可以在单台计算机上为 Atlassian Bamboo 安装多个远程代理?
SpringCloud系列四:Eureka 服务发现框架(定义 Eureka 服务端Eureka 服务信息Eureka 发现管理Eureka 安全配置Eureka-HA(高可用) 机制Eur(代码片段