Hi Oliver,

I am not the expert here but I have built origin. If you are making changes to 
the actual router code then you need to build the binary and then build the 
images.

It looks like you are building on Mac based on your output so you will have to 
build in containers. Make sure you have Docker for Mac installed and then run 
from the top level of the repository:

$ hack/env make build

This will build the entire project in a container and then copy out the 
binaries to the _output directory.

$ hack/build-local-images.py

This will build all of the images and put them in your local docker images.

There are ways to build only the router binaries and images but I have not done 
that before. For more information read the HACKING.md document in the 
repository.

-Jason

From: <dev-boun...@lists.openshift.redhat.com> on behalf of Oliver Guggenbühl 
<o.guggenbu...@gmail.com>
Date: Saturday, March 24, 2018 at 8:51 AM
To: "dev@lists.openshift.redhat.com" <dev@lists.openshift.redhat.com>
Subject: who to build origin-haproxy-router binary only ?

Hi 

I want to tweak the origin-haproxy-router. But I don't know how to just build 
the router binary.


Can you give me some advice?


This doesn't work.

# 1 This doesn't work.
./build-local-images.py openshift/origin-haproxy-router
[INFO] Building haproxy-router...
Traceback (most recent call last):
  File "./build-local-images.py", line 244, in <module>
    container_destination=config["binaries"][binary]
  File "./build-local-images.py", line 202, in add_to_context
    copy(source, absolute_destination)
  File 
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", 
line 133, in copy
    copyfile(src, dst)
  File 
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", 
line 96, in copyfile
    with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: 
'/Users/guo/router_patch/origin/_output/local/bin/linux/amd64/openshift'

# 2 This doesn't work.
origin/pkg/cmd/infra/router

go build -v -o router.go router.go
...
 command-line-arguments
./router.go:72:49: undefined: isTrue
./router.go:73:57: undefined: factory.DefaultResyncInterval
./router.go:75:57: undefined: isTrue
./router.go:83:64: undefined: isTrue
./router.go:84:87: undefined: isTrue
./router.go:85:51: undefined: isTrue
./router.go:86:61: undefined: isTrue
./router.go:232:64: too many arguments in call to 
factory.NewDefaultRouterControllerFactory
        have 
("http://github.com/openshift/origin/pkg/route/generated/internalclientset".Interface,
 
"http://github.com/openshift/origin/pkg/project/generated/internalclientset/typed/project/internalversion".ProjectResourceInterface,
 
"http://k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset".Interface)
        want 
("http://github.com/openshift/origin/pkg/route/generated/internalclientset/typed/route/internalversion".RoutesGetter,
 
"http://github.com/openshift/origin/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset".Interface)
./router.go:233:9: factory.LabelSelector undefined (type 
*factory.RouterControllerFactory has no field or method LabelSelector)
./router.go:234:9: factory.FieldSelector undefined (type 
*factory.RouterControllerFactory has no field or method FieldSelector)
./router.go:234:9: too many errors


cheers oliver

https://github.com/bigg01/



_______________________________________________
dev mailing list
dev@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/dev

Reply via email to