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

Why external Ruby? #7

Open
TJM opened this issue Jun 12, 2019 · 8 comments
Open

Why external Ruby? #7

TJM opened this issue Jun 12, 2019 · 8 comments

Comments

@TJM
Copy link
Contributor

TJM commented Jun 12, 2019

Why are we installing external ruby, when PDK comes with its own embedded Ruby, probably with most the needed components already? Ideally, the gems that we are using would be part of PDK anyhow. (eventually)

@ccaum
Copy link
Contributor

ccaum commented Jun 13, 2019

The Rakefile included in this image doesn't use the PDK Ruby. PDK can include multiple Rubies and we need one set one to use for the non-PDK content in the image.

@TJM
Copy link
Contributor Author

TJM commented Jun 24, 2019

Can we not just pick one (most recent) included in the PDK? As I noted, "ideally the gems we are using would be part of PDK anyhow" ... but if they are not, they could easily be added just like they are added to the SCL Ruby, right?

@TJM TJM changed the title External Ruby? Why external Ruby? Jun 26, 2019
@TJM
Copy link
Contributor Author

TJM commented Jun 26, 2019

I have made some effort on this. I have been trying to "trick" PDK into installing the extra gems, but it then tries to install a newer version of puppet which requires ffi (native) and that means I need a bunch of development tools again.

I had a process to create a simple test module, add a .sync.yml to it then run pdk update, but if I can't remove all the compilers and nonsense, then it defeats the purpose. I was able to strip out ~280MB by removing all that stuff, but then ran into the issue above that I am trying to sort through.

Gemfile:
  required:
    ':development':
      - gem: onceover
      - gem: ra10ke

@TJM TJM mentioned this issue Jun 26, 2019
@TJM
Copy link
Contributor Author

TJM commented Aug 13, 2019

Maybe the tools required are more intense, but we could try doing like they have done here to install gems into the PDK ruby: https://github.com/puppetlabs/pdk-docker/blob/fcaf898d166316e9a2623f7f50066fb62101e3e9/Dockerfile#L16-L17

Haven't put any effort into testing this yet, but just noticed it the other day in the PDK Dockerfile :)

@genebean
Copy link
Contributor

This looks interesting to me... I may give it a try in my fork tomorrow.

@ccaum
Copy link
Contributor

ccaum commented Mar 25, 2021

Did you end up trying this, @genebean? If we can remove the system ruby, we could shrink the size of the image considerably.

@genebean
Copy link
Contributor

I did not but am happy to revisit

@TJM
Copy link
Contributor Author

TJM commented Mar 29, 2021

I haven't looked at this for over a year, but I would still like to reduce the size of this image, if possible.

EDIT ... if possible, without creating a complete nightmare to support ;)

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

No branches or pull requests

3 participants