[ovirt-users] Docker images for oVirt engine

Juan Hernández jhernand at redhat.com
Thu May 18 07:15:04 UTC 2017


On 05/18/2017 05:29 AM, Leni Kadali Mutungi wrote:
> On 5/15/17, Juan Hernández <jhernand at redhat.com> wrote:
>> The tool that builds and deploy the containers to the OpenShift cluster
>> is a program written in Go. It is compiled when you run 'make ...'. That
>> means that you need to have the go development environment installed.
>> For example, in CentOS or Fedora:
>>
>>   yum -y install golang
>>
>> Once you have it installed, try again 'make build' and 'make deploy'.
>>
>> I'll try to update the documentation to explain that.
> 
> Installed Go. For some reason, building still refuses to work.
> 
> user at localhost:~/ovirt-containers$ sudo make build
> for godep in gopkg.in/ini.v1 ; do \
>         GOPATH=""/tools"" go get ${godep}; \
> done
> GOPATH=""/tools"" go install ovirt/cmd/build
> can't load package: package ovirt/cmd/build: cannot find package
> "ovirt/cmd/build" in any of:
>         /usr/lib/go-1.7/src/ovirt/cmd/build (from $GOROOT)
>         /tools/src/ovirt/cmd/build (from $GOPATH)
> Makefile:40: recipe for target 'tools/bin/build' failed
> make: *** [tools/bin/build] Error 1
> 
> I looked at the tools/src/ovirt/cmd/build directory and it had the
> build.go file. I don't have the ovirt subdirectory in the
> /usr/lib/go-1.7/src/ directory. Any ideas on how to get it there?
> 

The problem is that the Makefile uses the current working directory to
setup the GOPATH. When you use 'sudo' the current working directory is
the home of the root user, hence the Makefile won't work. Please try to
run the build with a non-root user, just go into the the source
directory and type 'make build'.

You will also need to make sure that the user has docker permissions, if
you didn't do it yet. To do so just add it to the 'docker' group. For
example, in Fedora or RHEL:

  usermod -aG docker youruser

Note that once you do that you will need to re-login to make it effective.


More information about the Users mailing list