Skip to content

Commit

Permalink
Failing Initial Stab at #1 (MySQL comm packages)
Browse files Browse the repository at this point in the history
After hours and hours of troubleshooting, this is the initial (failing) stab at getting Bamboo to communicate with MySQL 5.7, upon performing the _Setting Up Database_ steps during the basic Bamboo configuration guide, we keep getting these errors in MySQL server:

    2022-09-12T19:02:41.813374Z 5 [Note] Aborted connection 5 to db: 'bamboo' user: 'bamboouser' host: '172.20.0.3' (Got an error reading communication packets)
    2022-09-12T19:02:43.815778Z 6 [Note] Aborted connection 6 to db: 'bamboo' user: 'bamboouser' host: '172.20.0.3' (Got an error reading communication packets)
    ...

This is the error detail at maximum error log verbosity, and Bamboo fails without clear error message and redirects back to the _Configure Database Connection Parameters Form_.

We should proceed with using Postgres as database instead, and see if we can make the Python Pandas abstract away the RDBMS differences.
  • Loading branch information
mblomdahl committed Sep 12, 2022
1 parent 2905ff5 commit cefc565
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,12 @@ dmypy.json

# IntelliJ
.idea

# Binaries
*.tar
*.tar.gz
*.tgz

# Temp files
temp
tmp
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ e.g. excessive retention of build results, inefficient use of build artifacts

## Getting Started

Create a local Bamboo-MySQL deployment using Docker:

docker-compose up -d
docker ps # Verify Bamboo and MySQL are both up and healthy

Have Python 3.8+ installed on MacOS or Linux and create a virtualenv:

python3 -m venv venv
Expand Down
5 changes: 5 additions & 0 deletions bamboo_server/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM atlassian/bamboo-server:8.2.5

RUN curl -sL https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.30.tar.gz | tar xvz -C /tmp \
&& cp -va /tmp/mysql-connector-java-8.0.30/mysql-connector-java-8.0.30.jar /opt/atlassian/bamboo/lib/ \
&& rm -rf /tmp/mysql-connector-java-8.0.30*
51 changes: 51 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
version: '3.3'

services:
bamboo_server:
image: bamboo_server
build: ./bamboo_server
container_name: bamboo_server
depends_on:
- mysql_server
ports:
- target: 8085
published: 8085
protocol: tcp
mode: host
environment:
- ATL_PROXY_NAME=mblomdahl-mkdevops-se-bamboo-ci-health-7gwq6wr562p5qw-8085.githubpreview.dev
- ATL_PROXY_PORT=443
- ATL_LICENSE=AAA...02kc
- ATL_JDBC_URL=jdbc:mysql://bamboo_mysql:3306/bamboo?autoReconnect=true&useUnicode=true&characterEncoding=utf8&sessionVariables=storage_engine=InnoDB
- ATL_JDBC_USER=bamboouser
- ATL_JDBC_PASSWORD=password
- ATL_JDBC_TYPE=mysql
volumes:
- bamboo_server:/var/atlassian/application/application-data/bamboo:rw

mysql_server:
image: mysql:5.7
container_name: bamboo_mysql
command: --default-authentication-plugin=mysql_native_password --character-set-server=utf8 --collation-server=utf8_bin --skip-ssl --default-time-zone=+00:00 --max-allowed-packet=2048M --connect-timeout=6000 --log-error-verbosity=3 --verbose
ports:
- target: 3306
published: 3306
protocol: tcp
mode: host
environment:
- MYSQL_HOST=%
- MYSQL_DATABASE=bamboo
- MYSQL_USER=bamboouser
- MYSQL_PASSWORD=password
- MYSQL_ALLOW_EMPTY_PASSWORD=yes
# https://community.atlassian.com/t5/Jira-Software-questions/Connection-problem-with-MySQL-5-7-Got-an-error-reading/qaq-p/1399490
- MYSQL_INITDB_SKIP_TZINFO=yes
- TZ=+00:00
volumes:
- bamboo_mysql:/var/lib/mysql:rw

volumes:
bamboo_server:
driver: local
bamboo_mysql:
driver: local

0 comments on commit cefc565

Please sign in to comment.