#50202 Ticket 50197 - Container init tools
Closed by spichugi. Opened by firstyear.
firstyear/389-ds-base 50197-container-integration  into  master

Download 50202.patch

Bug Description: It's important that 389 Directory Server
has a functional, correct, and high quality container integration
system. After years of work on the server core and lib389, this is
nearly possible.

Importantly, containers have certain requirements we must understand.
All state must be in external-filesystem volumes. We can not assume
that we have an instance installed, so must create one on launch.
If one exists, we need to expose it. We don't have the ability to
ask questions, so we need to use environment, or work with no
input at all. We can't make assumptions about backends. Finally,
we need to assume that we could be a new version of the server -
we don't know about anything else.

Fix Description: This adds a dscontainer wrapper tool that is
intended for operation inside of containers. It handles and binds
many of the existing parts of lib389 for container support. I have
cleaned up past container support realising how it was done wasn't
as elegant as this.

The dscontainer tool is intended to be the entry point from a
dockerfile, IE the CMD directive.

There are still some avenues to explore. For example, we could
attempt to override the storage paths for logs and db rather than
relying on dockerfile system links. (this may break apparmor though).

https://pagure.io/389-ds-base/issue/50197

Author: William Brown william@blackhats.net.au

Review by: ???

rebased onto 33ddf56f8505c4462da8fd2f8520211b92f73852

@spichugi or @mreynolds did you want to take a look at this since you are both involved in cli-tool business now :)

It would be nice to add '--help', '-h' flags, becuase it is not user friendly now... Maybe you can add the usage example (docker file) to the '-h'?

I was thinking about this. This isn't really a tool meant for general use, it's meant for docker container builders so I was wondering about adding -h but also a "--ireallyknowwhatiamdoing" or similar.

2 new commits added

  • Ticket 50197 - Container integration part 2
  • Ticket 50197 - Container init tools

Okay, I've added a --help, and a -r flag fro "really runit", so you can't run this by accident.

@spichugi Can you check this again please :)

Build failed...

Checking for unpackaged file(s): /usr/lib/rpm/check-files /builddir/build/BUILDROOT/389-ds-base-1.4.1.1-20190215git4eb6905f4.fc29.x86_64
BUILDSTDERR: error: Installed (but unpackaged) file(s) found:
BUILDSTDERR:    /usr/sbin/dscontainer
RPM build errors:
BUILDSTDERR:     Installed (but unpackaged) file(s) found:
BUILDSTDERR:    /usr/sbin/dscontainer
Child return code was: 1
EXCEPTION: [Error()]

2 new commits added

  • Ticket 50197 - Container integration part 2
  • Ticket 50197 - Container init tools

Fixed

I think we really should have a design doc for how we want to approach containers first. I understand you, William, have it thought through but we all need to have a better picture of where we're heading. This PR is full of TODO comments, "magic", and not very uniform code - there should be an amount of tiding up. Indeed we need this feature, however, conducted in more transparent way.

@mhonek I can write up a design doc, but this is actually the last piece needed to have containers working at this point. It's pretty late in the process (mainly because no one else has been interested in the process or those changes ....)

https://www.port389.org/docs/389ds/design/docker.html it's here, but the wiki is broken and refuses to render that page. Maybe it's a markdown error? Ruby is broken on SUSE atm so I can't build myself.

You can see the source at https://www.port389.org/docs/389ds/design/docker.md though if that helps,

https://www.port389.org/docs/389ds/design/docker.html it's here, but the wiki is broken and refuses to render that page. Maybe it's a markdown error?

I did a fresh commit to the wiki and now the doc is present.

Thanks @mreynolds :)

@mhonek The doc has been up are there any comments?

@mhonek @mreynolds @spichugi Any reviews on this please? I would really like to get it commited so that I can progress on developing a docker image thanks.

Thanks for the write up, and this LGTM

Go for it. And sorry for the delay.

rebased onto fb5ae2ca6326f1da8902ee0e62d904cc72ef8c43

Pull-Request has been merged by firstyear

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This pull request has been cloned to Github as issue and is available here:
- https://github.com/389ds/389-ds-base/issues/3261

If you want to continue to work on the PR, please navigate to the github issue,
download the patch from the attachments and file a new pull request.

Thank you for understanding. We apologize for all inconvenience.

Pull-Request has been closed by spichugi

Metadata