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

Feat/containerize application #24

Merged
merged 11 commits into from
Apr 29, 2024
Merged

Conversation

boekhorstb1
Copy link
Contributor

@boekhorstb1 boekhorstb1 commented Mar 4, 2024

NOTE: this is currently dependent on #23

  • added Dockerfile for rookify: python3-rados is installed within the ceph container
  • added Makefile to build and run container of rookify
  • added Makefile command to setup venv locally

ISSUE:

  • ceph container works with python3.6, in centos I could not find python bindings for rados with 3.9

Closes: #2

@boekhorstb1 boekhorstb1 self-assigned this Mar 4, 2024
@boekhorstb1 boekhorstb1 mentioned this pull request Mar 4, 2024
@boekhorstb1 boekhorstb1 requested a review from yeoldegrove March 4, 2024 13:14
@boekhorstb1 boekhorstb1 force-pushed the feat/containerize-application branch from 23ef34e to 62e3ae1 Compare March 5, 2024 11:08
Dockerfile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
@boekhorstb1 boekhorstb1 force-pushed the feat/containerize-application branch 3 times, most recently from 62a3f3f to 1f5572c Compare March 6, 2024 14:30
Dockerfile Outdated Show resolved Hide resolved
@boekhorstb1 boekhorstb1 force-pushed the feat/containerize-application branch from 1f5572c to 248d6b5 Compare March 7, 2024 12:23
@boekhorstb1
Copy link
Contributor Author

ok in the last commit I just added I changed some bigger things (please review):

  • using ceph container now (quincy v17.2.7), note: runs on python3.6 but has rados2.0.0
  • added some more information to pyproject.toml because build would not run otherwise
  • adapted Makefile a little (this MR will have most important changes)
  • remove rados from requirements.txt because the ceph container will contain it

@NotTheEvilOne @brueggemann

@boekhorstb1 boekhorstb1 force-pushed the feat/containerize-application branch from cf9375f to b28c22e Compare March 13, 2024 15:37
boekhorstb1 and others added 5 commits March 14, 2024 15:57
Dockerfile to manually install python3-rados when version is correct

Signed-off-by: R.A. te Boekhorst <[email protected]>
…o pyproject.toml, adapt Makefile and remove unnecessary methods and also add more clear tag

Signed-off-by: R.A. te Boekhorst <[email protected]>
@boekhorstb1 boekhorstb1 force-pushed the feat/containerize-application branch from b28c22e to 4c0f64e Compare March 14, 2024 15:22
@boekhorstb1
Copy link
Contributor Author

ok so set the tag differently in the makefile as requested.
Also set container to latest ceph image. Small annoyance (but I think nothing critical): python version in the container is still 3.6. But the build is works. After installing python 3.9 librados.so.2.0.0 is found anyhow.

@boekhorstb1 boekhorstb1 marked this pull request as ready for review March 14, 2024 15:27
@boekhorstb1
Copy link
Contributor Author

ok tested some more. Interestingly enough, the build works fine, but running rookify in the container does not work, because it cannot find rados for python 3.9.
Problem is here: as far as I know, there are simply no ceph containers that use a higher python version than 3.6.
Furthermore I could not find an rpm in the centos repos for python3-rados that offers interfaces for python 3.9 or higher.

@b1-luettje
Copy link

Since we're having a little bit of an chicken-egg-problem by either using the official ceph container image or the official python image we've decided to (try to) target ubuntu:24.04 (and its corresponding official packages) instead.

Pros:

  • Canonical "ensures" that import rados should always work after installing the official packages
  • 24.04 is a LTS release

Cons:

  • No (more) explicit control over ceph and python versions but 3.12 is perfectly fine and librados2 seems very settled and therefore unlikely to change drastically in the next years. If necessary, we can always include upstream ceph repositories to upgrade ceph/librados2.

@NotTheEvilOne
Copy link
Contributor

I've now updated Dockerfile to reflect the changes @b1-luettje described above and merged main to fix a TODO while working on it. It's ready to get merged in my eyes. Please have a look again @brueggemann and @yeoldegrove :)

@NotTheEvilOne NotTheEvilOne force-pushed the feat/containerize-application branch from 8ff6b76 to ef78db2 Compare April 17, 2024 18:04
@NotTheEvilOne NotTheEvilOne force-pushed the feat/containerize-application branch from ef78db2 to 723a972 Compare April 17, 2024 18:13
@NotTheEvilOne NotTheEvilOne force-pushed the feat/containerize-application branch from 5a5c958 to 7e6027b Compare April 17, 2024 18:16
Copy link
Contributor

@yeoldegrove yeoldegrove left a comment

Choose a reason for hiding this comment

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

Looks like a sane approach now from my side.
Not sure if this already makes sense, but now that we have the container image we can already mention it in the README.
Also, if I just build it and start it, in complains about a missing config.yaml and there is no hint on how to create one.

@brueggemann brueggemann merged commit 5f34579 into main Apr 29, 2024
2 checks passed
@brueggemann brueggemann deleted the feat/containerize-application branch April 29, 2024 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[framework] dockerize
5 participants