Table of Contents |
---|
Info |
---|
본 설치 가이드는 Bitbucket 7.6.0 기준으로 작성 되었습니다. |
사전 준비
1. NFS 설정
NFS 설정 참조
2. Elasticsearch 설정
3. Apache Load Balancer 설정
...
Code Block | ||
---|---|---|
| ||
$ cd /etc/apach2/sites-available $ sudo a2enmod headers proxy_balancer proxy_http proxy lbmethod_byrequests slotmem_shm ## 모듈 활성화 $ vi dcbitbucket.twoseed.co.kr.conf ## 원하는 이름으로 .conf 파일 생성 --------------------------- <VirtualHost *:80> ServerName dcbitbucket.twoseed.co.kr Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/" env=BALANCER_ROUTE_CHANGED <Proxy balancer://bitbucketcluster> BalancerMember http://14.36***.***.48.220:6990 route=node1 BalancerMember http://175.197***.***.124.236:6990 route=node2 </Proxy> ProxyPass / balancer://bitbucketcluster/ lbmethod=byrequests stickysession=ROUTEID ProxyPreserveHost On </VirtualHost> ---------------------------- $ sudo a2ensite dcbitbucket.twoseed.co.kr.conf ## 사이트 활성화 $ sudo service apache2 reload ## apach 서버 다시 시작 |
...
Bitbucket Setup Wizard 실행
Bitbucket 서비스 계정 변경
Code Block language bash $ cd /opt/datacenter/atlassian/ $ sudo chown -R twoseed:twoseed bitbucket $ cd /home/datacenter/atlassian/ $ sudo chown -R twoseed:twoseed bitbucket
Bitbucket 인스턴스 시작
Code Block language bash $ cd /opt/datacenter/atlassian/bitbucket/bin/ $ ./start-bitbucket.sh
The Bitbucket webapp has been started. 메시지 출력 후 http://<server ip>:6990 접속
Language 및 Database 선택
“Test” 버튼 클릭하여 Database 연결 상태 확인 후 “Next” 클릭
Note |
---|
MySQL 데이터베이스 엔진에서 부하가 높을 때 발생할 수 있는 고유한 교착 상태 때문에 현재로서는 Bitbucket Data Center에서 MySQL를 지원하지 않습니다. |
Application Title, Base URL, License key 입력
Bitbucket Internal Admin 계정 생성
Internal Admin 계정이므로 정보 입력 후 “Go to Bitbucket” 버튼 클릭
공유폴더 설정
Bitbucket 인스턴스 종료
Code Block language bash $ cd /opt/datacenter/atlassian/bitbucket/bin/ $ ./stop-bitbucket.sh
Home 디렉토리의 shared 폴더를 NFS 로 복사
Code Block language bash $ cd /home/datacenter/atlassian/bitbucket/ $ mv shared /home/share/atlassian/bitbucket/ $ ln -sf /home/share/atlassian/bitbucket/shared shared
Node 설정
Node 이름 설정
Code Block language bash $ cd /opt/datacenter/atlassian/bitbucket/bin/ $ vi _start-webapp.sh --------------------------- ... JVM_SUPPORT_RECOMMENDED_ARGS="-Dcluster.node.name=node1" ... ---------------------------
bitbucket.properties 파일에 Node 관련 설정 추가
Code Block language bash $ cd /home/share/atlassian/bitbucket/shared $ vi bitbucket.properties -------------------------- # Use multicast to discover cluster nodes (recommended). hazelcast.network.multicast=false # If your network does not support multicast, you may uncomment the following lines and substitute # the IP addresses of some or all of your cluster nodes. (Not all of the cluster nodes have to be # listed here but at least one of them has to be active when a new node joins.) hazelcast.network.tcpip=true hazelcast.port=5705 hazelcast.network.tcpip.members=14.36.48.220:5703,175.197***.***.124.47:5705,***.***.124.2369:57015705 # The following should uniquely identify your cluster on the LAN. hazelcast.group.name=Twoseed-cluster hazelcast.group.password=Twoseed-cluster hazelcast.node.authentication.enabled=false --------------------------
...
Remote Elasticsearch 설정
Code Block language bash $ cd /home/share/atlassian/bitbucket/shared $ vi bitbucket.properties -------------------------- plugin.search.elasticsearch.baseurl=http://14.36***.***.48.220:69919200/ ## Elasticsearch URL plugin.search.elasticsearch.username=twoseed ## buckler.yml에 지정한 username plugin.search.elasticsearch.password=admin ## buckler.yml에 지정한 password --------------------------
Install, Home directory 백업 및 node2에 복사
Code Block $ cd /opt/datacenter/atlassian $ tar cvfz bitbucket_install.tgz bitbucket/ $ cd /home/datacenter/atlassian $ tar cvfz bitbucket_home.tgz bitbucket/
Bitbucket 인스턴스 시작
Code Block $ cd /opt/datacenter/atlassian/bitbucket/bin/ $ ./start-bitbucket.sh --no-search ## 번들 Elasticsearch가 실행되지 않도록 옵션 추가
...