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

add debian support #184

Merged
merged 2 commits into from
Jan 29, 2018
Merged

add debian support #184

merged 2 commits into from
Jan 29, 2018

Conversation

mdellweg
Copy link
Member

No description provided.

Copy link
Member

@sean797 sean797 left a comment

Choose a reason for hiding this comment

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

That template is currently only used as a post install script in the RPM it generates and is also left on /pub What do plan the bootstrap process for Debian clients be?

@@ -31,6 +31,17 @@ then

# configure rhsm
# the config command was introduced in rhsm 0.96.6
subscription-manager config \
Copy link
Member

Choose a reason for hiding this comment

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

can we DRY this? Maybe wrap just BASEURL= foo around an if else?

Copy link
Member Author

Choose a reason for hiding this comment

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

sure

--server.port="$PORT" \
--rhsm.repo_ca_cert="%(ca_cert_dir)s$KATELLO_SERVER_CA_CERT" \
--rhsm.baseurl="$BASEURL"
elif uname -v | grep -qi debian
Copy link
Member

Choose a reason for hiding this comment

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

Can we use /etc/os-release or a fact for this? Though I don't want to add another dependency.

Copy link
Member Author

Choose a reason for hiding this comment

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

ATM we transform the built RPM into a DEB. That way we can install and run the script.

@mdellweg
Copy link
Member Author

On a second thought, i'm not so sure, the DRY-ing was worth it, because there are some specialities going on around older rhel versions. I kept it on a separate commit to ease the comparison.

@sean797
Copy link
Member

sean797 commented Nov 30, 2017

ATM we transform the built RPM into a DEB. That way we can install and run the script.

Are you suggesting that is the official documented way for users to register Debian clients?

@mdellweg
Copy link
Member Author

No, i'd prefer a proper debian package of course. Or considering, that this packet really only contains one script that is run on install, we could just run /pub/katello-rhsm-consumer from the katello-server directly.

@sean797
Copy link
Member

sean797 commented Jan 3, 2018

Sorry I never got round to looking at this again earlier. Yes I agree, lets remove that second commit.

I think there is a discussion to have around how to we register clients, I'm thinking we should change to running /pub/katello-rhsm-consumer on a client and deprecate the RPM method. I think this means that we can stop using the dependence's and tooling we need to generate the RPM without adding more for generating an DEP and keeping the method for registering clients the same.

I'm not suggesting this PR deprecates RPM, just that I think the method on both systems should be the same, if not very similar.

@ehelms @jlsherrill @ekohl others; agree? disagree? any other views?

@ekohl
Copy link
Member

ekohl commented Jan 3, 2018

I'm not that familiar with the subscription manager workflow.

@jlsherrill
Copy link
Contributor

@sean797 I think what you said makes sense, I'm just not sure how users would react? I think that if i were an admin i would prefer an rpm, but mainly because i tend to not want to run random scripts from a webserver. With the rpm I can sign it with a gpg key from my company, i can't as easily do that with a random script.

In reality I'm not sure if users actually care. The script was added to support atomic hosts (who can't install an rpm), but it does make sense to try to reduce the bootstrap steps to a single set of instructions.

Copy link
Member

@sean797 sean797 left a comment

Choose a reason for hiding this comment

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

@jlsherrill the rpm method and the script method both provide the same security, though I feel users might perceive the RPM method to be more secure than curl https:foo/pub/bar | bash

The RPM method, like you say, can be made more secure be signing the RPM, though I've never seen anyone actually do that.

ACK, for now lets discuss removing the RPM method more at a later date. Thanks @mdellweg 👍

@ekohl
Copy link
Member

ekohl commented Jan 10, 2018

The RPM method, like you say, can be made more secure be signing the RPM, though I've never seen anyone actually do that.

Isn't that the goal of #188?

@PaulSD
Copy link

PaulSD commented Jan 10, 2018

No, the goal of #188 is to facilitate signing/verifying the repo metadata that is generated by Pulp, not the RPMs themselves. It is assumed that the RPMs served by Pulp will already be signed when Pulp retrieves them from the upstream repo ... So Pulp doesn't need to re-sign the RPMs, it only needs to sign the new metadata that Pulp itself generates.

In addition, #188 updates this bootstrap RPM so that it will install the GPG key generated by #188, so clients are unlikely to trust that GPG key until after this bootstrap RPM is installed, so it won't help to sign this bootstrap RPM with that key...

@ekohl
Copy link
Member

ekohl commented Jan 10, 2018

@PaulSD thanks for explaining that distinction. I'll get back to reviewing it tomorrow.

@ekohl
Copy link
Member

ekohl commented Jan 26, 2018

I'm leaning to including this in #192. @stbenjam could you have a look as well?

@ekohl ekohl merged commit 771e116 into theforeman:master Jan 29, 2018
@ekohl
Copy link
Member

ekohl commented Jan 29, 2018

Thanks!

@mdellweg mdellweg deleted the debian_support branch January 29, 2018 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants