Skip to content

feat: Added MySQL example#380

Merged
danielvallance merged 1 commit into
mainfrom
dragosg/feat/mysql-example
Jun 10, 2026
Merged

feat: Added MySQL example#380
danielvallance merged 1 commit into
mainfrom
dragosg/feat/mysql-example

Conversation

@dragosgheorghioiu

@dragosgheorghioiu dragosgheorghioiu commented May 22, 2026

Copy link
Copy Markdown
Contributor

Closes: FIELD-500

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new MySQL example to the Unikraft Cloud examples repository, including packaging (Dockerfile + Kraftfile), a usage guide, and an end-to-end pytest that validates the deployment via a TLS-wrapped port mapping.

Changes:

  • Add mysql/ example with a scratch-based rootfs and a startup wrapper that initializes and launches mysqld.
  • Add mysql/README.md with deployment and connectivity instructions (including socat tunneling).
  • Add mysql/test_mysql.py end-to-end test and link the new example from the top-level README.md.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
README.md Adds the MySQL example to the examples table.
mysql/Dockerfile Builds a minimal scratch rootfs containing MySQL binaries/libs and the wrapper script.
mysql/Kraftfile Declares runtime/rootfs and sets the command to the wrapper script.
mysql/README.md Documents how to build, deploy, connect (via socat), and use volumes.
mysql/test_mysql.py Adds an end-to-end test that deploys MySQL and runs basic SQL checks.
mysql/wrapper.sh Initializes the datadir, generates init SQL, and starts mysqld.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread mysql/wrapper.sh Outdated
Comment thread mysql/wrapper.sh Outdated
Comment thread mysql/wrapper.sh Outdated
Comment thread mysql/wrapper.sh Outdated
Comment thread mysql/wrapper.sh Outdated
Comment thread mysql/wrapper.sh Outdated
Comment on lines +24 to +26
echo "Starting MySQL process..."

exec /usr/sbin/mysqld --user=root --log-bin --init-file=/tmp/dynamic_init.sql
Comment thread mysql/Dockerfile
Comment thread mysql/README.md
Comment thread mysql/README.md Outdated
@dragosgheorghioiu dragosgheorghioiu force-pushed the dragosg/feat/mysql-example branch 5 times, most recently from 48062f1 to c16ab5d Compare May 29, 2026 06:46
Comment thread mysql/Dockerfile
Comment thread mysql/README.md Outdated
Comment thread mysql/README.md Outdated
Comment thread mysql/README.md
Comment thread mysql/README.md
Comment thread mysql/README.md Outdated
Comment thread mysql/Dockerfile
Comment thread mysql/README.md Outdated
Comment thread mysql/README.md Outdated
Comment thread mysql/README.md Outdated
Comment thread mysql/README.md

@nurof3n nurof3n left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Reviewed-by: Alex-Andrei Cioc andrei.cioc@unikraft.io
Approved-by: Alex-Andrei Cioc andrei.cioc@unikraft.io

Comment thread mysql/Dockerfile Outdated
COPY --from=build /lib/x86_64-linux-gnu/libpcre2-8.so.0 \
/lib/x86_64-linux-gnu/libselinux.so.1 \
/lib/x86_64-linux-gnu/libtinfo.so.6 \
/lib/x86_64-linux-gnu/libacl.so.1 \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation

Comment thread mysql/Dockerfile

# User database
COPY --from=build /etc/passwd /etc/passwd
COPY --from=build /etc/shadow /etc/shadow

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spacing is inconsistent here

Comment thread mysql/README.md Outdated

**Using the legacy kraft CLI**
```bash title="kraft"
kraft cloud deploy --scale-to-zero idle --scale-to-zero-cooldown 1s --scale-to-zero-stateful -p 443:8080/tls+http -M 1Gi .

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This command does not match the unikraft command

Signed-off-by: Dragos Gheorghioiu <dragosg@unikraft.com>
@dragosgheorghioiu dragosgheorghioiu force-pushed the dragosg/feat/mysql-example branch from 2a747ef to 886b714 Compare June 10, 2026 07:44
@danielvallance danielvallance merged commit b667029 into main Jun 10, 2026
94 of 95 checks passed
@danielvallance danielvallance deleted the dragosg/feat/mysql-example branch June 10, 2026 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants