Unofficial utility to setup a development DB2 LUW server quickly and easily on plain Linux or Github Actions
Note
This is still in early development.
| Badge | Description | Service |
|---|---|---|
| Code style | Prettier | |
| Commit style | Conventional Commits | |
| Dependencies | Renovate | |
| CI pipeline | GitHub Actions |
Ensure that:
- You agree to the license agreement that comes with the DB2 OCI image
- SELinux is disabled (sorry)
- Docker or Podman is installed
- If you're using Podman, you're running the script as root
To start up DB2 LUW:
# If you're using Docker:
$ ./start-db2.sh -l accept
# If you're using Podman (must run as root):
$ sudo su -c './start-db2.sh -l accept -c podman'
Starting DB2...
Note: This script will attempt to clean up when terminated.
Waiting for DB2 to initialize (Timeout: 5 mins)..............................................................................
DB2 initialize complete!
Waiting for DB2 to restart (Timeout: 5 mins)..........
DB2 restart complete!
DB2 ready!Run ./start-db2.sh -h for a full list of options.
Minimal setup with a Node.js application:
on: [push, pull]
jobs:
test-ghaction:
name: Test
runs-on: ubuntu-latest
- name: Start DB2 Server
uses: achrinza/setup-db2@v0
with:
db2-license: accept
db2-version: latest
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- name: Bootstrap Dependencies
run: npm ci
- name: Run Tests
run: npm testor take inspiration from this repo's own ci.yaml workflow.
- Does not work with SELinux enforcement enabled
- Podman must run as root
- Does not work as-is on GitHub-hosted runners
- No Windows script (macOS untested)
- Does not support configuring certain DB2 features: a. No BLU support b. No HADR support c. No clustering support
- All limitations of
start-db2.sh(except 1-3) - No support to spin up multiple intances
- No OCI image caching
This repository uses multiple licenses. The general guideline is as follows:
| Document type | License |
|---|---|
| Source code | MIT |
| Configuration | FSFAP |
| Documentation | FSFAP |
This repository complies with REUSE. Consult the respective file's header or *.license file for more information.