selinux configs and volume for microshift-containerized - #457
Conversation
9a3a23e to
663af0e
Compare
|
podman systemd file was created out of following command. The volumes mounted are:
|
|
@rootfs @oglok how are these two secrets created?
When a so But this doesn't The only difference is host-dir vs host-vol |
|
A little more information. There are some subtle differences in the mounts when doing podman inspect microshift standard directory mount podman volume |
|
I have narrowed down to the serving secrets |
|
There was a problem hiding this comment.
| ExecStartPre=/bin/bash /usr/bin/microshift-containerized-configure-selinux # not autogenerated | |
| ExecStartPre=/bin/bash /usr/bin/microshift-containerized-configure-selinux # not autogenerated |
We should not do this, it's a lengthy process. ( installing, compiling, etc...)
Let's assume that people will download the rpms for microshift via dnf, which will include both microshift-containerized + the selinux modules compiled.
We can keep the script available just in case.
| ExecStartPre=/bin/bash /usr/bin/microshift-containerized-configure-selinux # not autogenerated |
There was a problem hiding this comment.
There was a problem hiding this comment.
This still has
-v /var/lib/microshift:/var/lib/microshift:rw,rshared
right?
There was a problem hiding this comment.
Yes. We are going ahead with /var/lib/microshift:/var/lib/microshift:rw,rshared instead of microshift-data:/var/lib/microshift:rw,rshared
|
@mangelajo Ready for review |
There was a problem hiding this comment.
Can we fold this file completely into the microshift-containerized.service, such that the UX is like we document in https://microshift.io/docs/getting-started/ ?
There was a problem hiding this comment.
Is this file still needed / up-to-date?
If we're running containerized, only the crio.sock should be bind-mounted from the host (plus the /var/lib/microshift datadir if we're using hostdir instead of voliumes). So why do we still need to create these other dirs and adjust SELinux policies?
There was a problem hiding this comment.
We don't need to adjust the selinux anymore. From @mangelajo comment
"Let's assume that people will download the rpms for microshift via dnf, which will include both microshift-containerized + the selinux modules compiled."
.It was based on the assumption that the users didn't download the rpms and would be only using the microshift-containerized.service. I will remove the files as well.
There was a problem hiding this comment.
Wait... I think we're confusing deployment models here:
The containerised deployment is for users who want to deploy MIcroShift at runtime on top of a R4E container host. That is, they cannot dynamically install an .RPM (that would need to be baked into the rpm-ostree).
There was a problem hiding this comment.
Yes, they can't dynamically install it, but if you want to bake it, then we need it also to be in the RPM?.
In any case I don't think we should be running make for the selinux files on installation, or downloading seliux-policy-devel etc... in that case we should probably provide the selinux compiled policy, if that's standard across kernel versions, which I don't know.
May be the container itself should be built by installing the RPM we have?, then the user just downloads the .service file? Can we install an selinux policy from inside a privileged container?
There was a problem hiding this comment.
According to this, can’t just people install an rpm? We made a subpackage for the microshift container service which will also pull the selinux defs: https://developers.redhat.com/blog/2020/03/12/how-to-customize-fedora-coreos-for-dedicated-workloads-with-ostree
There was a problem hiding this comment.
What I meant is we have two deployment models:
- The .rpm-based installation, which is for embedding into rpm-ostrees and runs MicroShift as binary on the host / non-containerized. We have corresponding SELinux rules for that.
- The containerized deployment, which is for users who don't want to embed into an rpm-ostree but instead use a container host and add/remove MicroShift at runtime - without reboot. This is where it doesn't make sense to install the sytemd unit via an .rpm. Instead, it'll need to be created via configuration management resp. from the application management agent.
|
/ok-to-test |
3463749 to
fec91b1
Compare
|
@fzdarsky consolidated everything in microshift-containerized.service |
|
/retest |
3 similar comments
|
/retest |
|
/retest |
|
/retest |
4079fda to
9484ba1
Compare
@husky-parul I think having this in the /lgtm |
Signed-off-by: Parul <parsingh@redhat.com>
9484ba1 to
395b74e
Compare
Signed-off-by: Parul <parsingh@redhat.com>
|
/retest |
|
/lgtm |
|
/ok-to-test |
|
/retest |
5 similar comments
|
/retest |
|
/retest |
|
/retest |
|
/retest |
|
/retest |
|
/LGTM |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cooktheryan, fzdarsky The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Woot woot!!!!! |
Signed-off-by: Parul Singh parsingh@redhat.com
Which issue(s) this PR addresses:
For podman deployment:
Closes #434, #433, #432