Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement MySQL server ROCK with rockcraft #4

Merged
merged 5 commits into from
Jan 20, 2023

Conversation

jardon
Copy link
Contributor

@jardon jardon commented Jan 13, 2023

Issue

The ROCK is created using docker and lacks CI.

Solution

This PR migrates the tooling from docker to rockcraft and adds the supporting CI components for building and publishing. This also addresses privilege dropping for running mysqld as the mysql user.

Context

MySQL Operation
Rockcraft
Github Actions
setpriv manpage

Testing

This is a draft and is untested :)

Release Notes

  • Migrate image to rockcraft tooling
  • Add github actions CI for building/publishing
  • drop root privileges to mysql user

Copy link
Contributor

@taurus-forever taurus-forever left a comment

Choose a reason for hiding this comment

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

Nice, we need to move branch and change the name.
Let's use "charmed-" for fat OCI/snaps.

.github/workflows/publish.yaml Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
rockcraft.yaml Outdated Show resolved Hide resolved
rockcraft.yaml Outdated Show resolved Hide resolved
rockcraft.yaml Outdated Show resolved Hide resolved
@jardon jardon changed the base branch from 8.0-20.04 to 8.0-22.04 January 17, 2023 20:02
@jardon jardon marked this pull request as ready for review January 17, 2023 20:02
rockcraft.yaml Outdated
@@ -0,0 +1,46 @@
name: charmed-mysql # the name of your ROCK
base: ubuntu:22.04 # the base environment for this ROCK
version: '0.8.22-1' # just for humans. Semantic versioning is recommended
Copy link
Contributor

Choose a reason for hiding this comment

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

The current Dockerfile in branch 8.0-22.04 uses version 0.8.23-1,
however it is a version of package mysql-apt-config while the version of charmed-snap should represent the main payload component version mysql-server which has version 8.0.31-0ubuntu2 I would vote to use it here.

What do you think?

Copy link
Contributor Author

@jardon jardon Jan 19, 2023

Choose a reason for hiding this comment

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

I agree with this. To be clear, do we would want to set the version to 8.0.31-0ubuntu2 or 8.0.31 as thats the actual payload version and the rest of it is packaging info?

Copy link
Contributor

@taurus-forever taurus-forever left a comment

Choose a reason for hiding this comment

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

BTW, maybe we should also remove Dockerfile as we are going to build and publish ROCK OCI now... to avoid confusion what to edit, etc.

.gitignore Outdated Show resolved Hide resolved
.github/workflows/publish.yaml Show resolved Hide resolved
rockcraft.yaml Outdated Show resolved Hide resolved
rockcraft.yaml Outdated
after: [mysql-repo]
stage-packages:
- mysql-shell
- mysql-server-8.0
Copy link
Contributor

Choose a reason for hiding this comment

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

is there any way to version lock these packages? if i understand it correctly, we need the server, router and xtrabackup versions to be aligned for them to work correctly

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not that I have found in any of the documentation or on the forums. I've even played with some of the syntax to see if I could get it to work.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Playing around with this more, I found a way to do it, but I don't believe it is going to be useful as repos don't typically have various versions available of each deb package.

rockcraft.yaml Outdated Show resolved Hide resolved
rockcraft.yaml Outdated Show resolved Hide resolved
@jardon jardon merged commit 6ac9fba into canonical:8.0-22.04 Jan 20, 2023
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.

5 participants