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

openshift: 1.3.2 -> 1.5.0 #25369

Merged
merged 2 commits into from May 1, 2017
Merged

openshift: 1.3.2 -> 1.5.0 #25369

merged 2 commits into from May 1, 2017

Conversation

bachp
Copy link
Member

@bachp bachp commented Apr 30, 2017

Motivation for this change

Update to latest openshift version and reduce closure size by using removeReferencesTo go.

Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@mention-bot
Copy link

@bachp, thanks for your PR! By analyzing the history of the files in this pull request, we identified @offlinehacker to be a potential reviewer.

};

buildInputs = [ go which ];
buildInputs = [ go which removeReferencesTo makeWrapper ];
Copy link
Member

Choose a reason for hiding this comment

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

Was buildGoPackage an option here? This will remove the go dependency automatically.

Copy link
Member Author

Choose a reason for hiding this comment

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

I haven't tried with 1.5.0 but as far as I remember for 1.3.x there was a lot going on in the makefiles.

Copy link
Member

Choose a reason for hiding this comment

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

this should not be an issue if buildPhase is overriden.

Copy link
Member Author

Choose a reason for hiding this comment

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

@Mic92 I tried replacing stdenv.mkDerivation with buildGoPackage and adding goPackagePath = "golang.org/x/tools"; but I get the following error when trying to build:

...
./hack/verify-open-ports.sh: interpreter directive changed from "/bin/bash" to "/nix/store/53h800j8kgpj0a349f7wxa5hgkj1vby2-bash-4.4-p12/bin/bash"
./hack/verify-upstream-commits.sh: interpreter directive changed from "/bin/bash" to "/nix/store/53h800j8kgpj0a349f7wxa5hgkj1vby2-bash-4.4-p12/bin/bash"
configuring
grep: Invalid range end
building
make: *** No rule to make target 'build'.  Stop.
builder for ‘/nix/store/pf9pqx8a8hh1b2l6nsmsv3apwk1478z5-openshift-origin-1.5.0.drv’ failed with exit code 2

Copy link
Member

@Mic92 Mic92 May 1, 2017

Choose a reason for hiding this comment

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

fixed. to goPackagePath was not correct anyway.

@Mic92 Mic92 merged commit b99007d into NixOS:master May 1, 2017
@bachp bachp deleted the openshift-1.5.0 branch May 1, 2017 20:14
@Mic92
Copy link
Member

Mic92 commented May 2, 2017

Looks like the package is too big for nixos: https://hydra.nixos.org/build/52313947
I don't know if splitting up the package works.

@7c6f434c
Copy link
Member

7c6f434c commented May 2, 2017

Is the build computation-intensive? Because if it is IO-bound, I would advise meta.hydraPlatforms=[];

@Mic92
Copy link
Member

Mic92 commented May 2, 2017

On my laptop:

hack/build-go.sh took 210 seconds

the whole build probably takes probably twice the time (fixup takes a while).

$ du -h bin/*
1,1M    host-local
59M     kube-apiserver
59M     kube-controller-manager
59M     kubectl
59M     kubelet
59M     kube-proxy
59M     kubernetes
59M     kube-scheduler
1,1M    loopback
59M     oadm
25M     oc
59M     openshift
59M     openshift-deploy
59M     openshift-docker-build
59M     openshift-recycle
59M     openshift-router
59M     openshift-sti-build
59M     origin
59M     osadm
59M     osc
2,4M    sdn-cni-plugin
1019M   total

so it is a mix of computation and i/o

@7c6f434c
Copy link
Member

7c6f434c commented May 2, 2017

7 minutes for a gigabyte of result? Not literally IO bound, but I would just set empty hydraPlatforms

@Mic92
Copy link
Member

Mic92 commented May 2, 2017

Go seems to be pretty efficient when it comes messing with your ssd space.

@bachp
Copy link
Member Author

bachp commented May 2, 2017

I think until now most people only use the oc binary. Which is the client for OpenShift v3.

Me too I also only checked if the binaries can be executed but never actually setup an OpenShift cluster on NixOS. But I don't know how this could be split up to be smaller.

@bachp
Copy link
Member Author

bachp commented May 4, 2017

Does somebody know if it is possible to split the binaries into a client and a server part so they can be installed separatly?

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

Successfully merging this pull request may close these issues.

None yet

4 participants