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

[build] Use docker to manage dependencies #13347

Closed
wants to merge 1 commit into from

Conversation

jbudz
Copy link
Member

@jbudz jbudz commented Aug 4, 2017

The goal of this is to move dependency management under direct control of kibana, instead of relying on the host machine.

This attempts to fix several issues:

  • windows specific checks
  • the possibility of spawning programs that don't exist - wc, shasum, zip, etc.
  • version management
  • global conflicts on the host machine

With docker and docker-compose installed, building should work the same as it did previously.

npm run build
npm run build -- --skip-os-packages
npm run build -- --skip-archives

@jbudz
Copy link
Member Author

jbudz commented Aug 7, 2017

Before: node_modules/.bin/grunt build 6:35.95 total
After: npm run build 14:41.78 total

@jbudz
Copy link
Member Author

jbudz commented Aug 7, 2017

I'm going to revert the change that runs this on CI so we can unblock this. For now it can be considered ease of use utility.

@jbudz jbudz force-pushed the build/docker branch 2 times, most recently from ccc128d to 7055ee5 Compare August 7, 2017 20:33
@tylersmalley tylersmalley self-requested a review August 8, 2017 16:53
@tylersmalley
Copy link
Contributor

I would like to get this running on CI to avoid having multiple paths this could go through. I also think that getting Docker in CI will allow us to utilize it more in the future.

@jbudz
Copy link
Member Author

jbudz commented Sep 7, 2017

jenkins, test it

@jbudz jbudz force-pushed the build/docker branch 2 times, most recently from cf1ae79 to 2327063 Compare September 7, 2017 18:10
CONTRIBUTING.md Outdated
@@ -306,12 +306,9 @@ npm run test:browser -- --dev # remove the --dev flag to run them once and close

### Building OS packages

Packages are built using fpm, pleaserun, dpkg, and rpm. fpm and pleaserun can be installed using gem. Package building has only been tested on Linux and is not supported on any other platform.
Packages are built in a Docker container.
Copy link
Contributor

Choose a reason for hiding this comment

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

We should note Docker being a dependency for creating builds.

@jbudz jbudz force-pushed the build/docker branch 2 times, most recently from 92cd7f2 to 5a1c7d5 Compare September 18, 2017 21:04
@jbudz
Copy link
Member Author

jbudz commented Sep 18, 2017

jenkins, test it

@jbudz
Copy link
Member Author

jbudz commented Sep 19, 2017

This should be good to go now. Finally.

@@ -0,0 +1,35 @@
ARG node_version
FROM node:$node_version
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe there are alpine images available for this, just append -alpine.

Copy link
Member Author

Choose a reason for hiding this comment

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

can't yet. the node image is based on 3.4 and rpm isn't available https://pkgs.alpinelinux.org/packages?name=rpm&branch=&repo=&arch=&maintainer=

@tylersmalley
Copy link
Contributor

tylersmalley commented Oct 27, 2017

I have been playing around with this off-and-on, and I am not sure about doubling the build times.

Thoughts on having a task to build and publish the container to our docker repository? I am curious how much time that will shave off or how close it would get to the current build time.

@jbudz
Copy link
Member Author

jbudz commented Oct 27, 2017

We could, but we'd have to remove

 +RUN bundle install --deployment
 +RUN npm install

so we don't end up with wrong versions. I'll do some timing on this and see if there's other options too.

@jbudz
Copy link
Member Author

jbudz commented Nov 29, 2017

Closing until I revisit, I haven't been working on this.

@jbudz jbudz closed this Nov 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review Team:Operations Team label for Operations Team updates_needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants