jenkinsci / juseppe

Jenkins Update Site Embedded for Plugin Publishing Easily
https://hub.docker.com/r/lanwen/juseppe/
Apache License 2.0
56 stars 20 forks source link

Can't run Juseppe on localhost #43

Closed mfuxi closed 5 years ago

mfuxi commented 6 years ago

I followed the basic steps of raising Juseppe using this command: docker run --init --name juseppe -v /juseppe/:/juseppe/plugins/ -e JUSEPPE_BASE_URI=http://my.company.com -p 80:8080 lanwen/juseppe The container is running and I see the message: UpdateSite will be available at http://my.company.com/update-center.json

But when I try to browse to http://127.0.0.1/update-center.json or the URL above I see nothing..

What am I missing here?

Thanks!

sathomps commented 6 years ago

I know that localhost should resolve to 127.0.0.1 but have you tried that? http://localhost/update-center.json

You can also specify the host that juseppe binds to using the following param

JUSEPPE_BIND_HOST (juseppe.jetty.host)

mfuxi commented 6 years ago

Tried 127.0.0.1 as well and it didn't work, also tried to pass the JUSEPPE_BIND_HOST var and it also didn't work..

Does it work for you?

sathomps commented 6 years ago

I haven't tried running it via docker. There was an issue with the docker build on the previous merge due to tests failing.

Let me try and get another clean docker build to run and I'll test it out locally.

@lanwen can you give me admin rights to the project? If you don't have time nor the desire to maintain this anymore it'd be easier then me forking it and figuring out all the hooks.

lanwen commented 6 years ago

probably we should ask @jenkinsci about moving this project into this org where anyone can get admin right and maintain it properly. Fow now please just turn off tests on package phase and I'll retrigger the build

sathomps commented 6 years ago

Let me redo that merge request - something bad happened.

lanwen commented 6 years ago

@sathomps you have collaborator badge which means you have write access. I'll really appreciate if you will start this thread on jenkins-dev group

sathomps commented 6 years ago

Ok somehow I screwed up the merge request and it was pulling from the original fork. I'll redo it and then start up the conversation. Thanks for your help.

sathomps commented 6 years ago

The Docker image was built successfully

https://hub.docker.com/r/lanwen/juseppe/builds/bgtw8cadyb6vn2dzdcpjudi/

Want to try and install & run it again? I'm currently trying to configure Docker on Windows 10 using WSL to test it myself.

sathomps commented 6 years ago

@lanwen Before I post anything on the jenkins-dev group, I wanted to make sure you're aware that Jenkins does support internal update sites but you have to pay for it. I don't see this getting official support as they know it's a necessity and want people to pay for it - nothing wrong with that.

https://www.cloudbees.com/products/cloudbees-jenkins-platform/enterprise-edition/features/custom-update-center-plugin

lanwen commented 6 years ago

Thats another thing. Its cloudbees platform based on jenkins. Thats unrelated to whats happening in jenkinsci org and jenkins-dev group

sathomps commented 6 years ago

I guess we'll see what kind of response comes back as there's some overlap between the two.

mfuxi commented 6 years ago

Pulled the latest image and still doesn't work, from within the container everything is working fine if I type the following command: curl http://localhost:8080/update-center.json I'm getting the .json in the terminal.

BTW: If I docker inspect <containerID> and I use the IPAddress which is written there still nothing happens.

lanwen commented 6 years ago

There is issue on your side with mapping if it works properly within container

mfuxi commented 6 years ago

I'm adding the docker inspect data, I also tried binding it to port 80 by changing the variable JUSEPPE_BIND_PORT

[ { "Id": "77f124c27aa3178dfd82aba77922f61f81ba031b94e19eb8bcf4107e723a5b0c", "Created": "2018-10-15T17:17:32.62698058Z", "Path": "java", "Args": [ "-jar", "juseppe-cli/target/juseppe.jar", "-w", "serve" ], "State": { "Status": "running", "Running": true, "Paused": false, "Restarting": false, "OOMKilled": false, "Dead": false, "Pid": 23795, "ExitCode": 0, "Error": "", "StartedAt": "2018-10-15T17:17:33.243648871Z", "FinishedAt": "0001-01-01T00:00:00Z" }, "Image": "sha256:bbe7f300c1dff5589aea0e4877dccc9b79b39dc11136fd8aa48696c1ffea05d2", "ResolvConfPath": "/var/lib/docker/containers/77f124c27aa3178dfd82aba77922f61f81ba031b94e19eb8bcf4107e723a5b0c/resolv.conf", "HostnamePath": "/var/lib/docker/containers/77f124c27aa3178dfd82aba77922f61f81ba031b94e19eb8bcf4107e723a5b0c/hostname", "HostsPath": "/var/lib/docker/containers/77f124c27aa3178dfd82aba77922f61f81ba031b94e19eb8bcf4107e723a5b0c/hosts", "LogPath": "/var/lib/docker/containers/77f124c27aa3178dfd82aba77922f61f81ba031b94e19eb8bcf4107e723a5b0c/77f124c27aa3178dfd82aba77922f61f81ba031b94e19eb8bcf4107e723a5b0c-json.log", "Name": "/juseppe", "RestartCount": 0, "Driver": "aufs", "Platform": "linux", "MountLabel": "", "ProcessLabel": "", "AppArmorProfile": "docker-default", "ExecIDs": null, "HostConfig": { "Binds": [ "/home/myuser/juseppe/:/juseppe/plugins/" ], "ContainerIDFile": "", "LogConfig": { "Type": "json-file", "Config": {} }, "NetworkMode": "default", "PortBindings": { "80/tcp": [ { "HostIp": "", "HostPort": "80" } ] }, "RestartPolicy": { "Name": "no", "MaximumRetryCount": 0 }, "AutoRemove": false, "VolumeDriver": "", "VolumesFrom": null, "CapAdd": null, "CapDrop": null, "Dns": [], "DnsOptions": [], "DnsSearch": [], "ExtraHosts": null, "GroupAdd": null, "IpcMode": "shareable", "Cgroup": "", "Links": null, "OomScoreAdj": 0, "PidMode": "", "Privileged": false, "PublishAllPorts": false, "ReadonlyRootfs": false, "SecurityOpt": null, "UTSMode": "", "UsernsMode": "", "ShmSize": 67108864, "Runtime": "runc", "ConsoleSize": [ 0, 0 ], "Isolation": "", "CpuShares": 0, "Memory": 0, "NanoCpus": 0, "CgroupParent": "", "BlkioWeight": 0, "BlkioWeightDevice": [], "BlkioDeviceReadBps": null, "BlkioDeviceWriteBps": null, "BlkioDeviceReadIOps": null, "BlkioDeviceWriteIOps": null, "CpuPeriod": 0, "CpuQuota": 0, "CpuRealtimePeriod": 0, "CpuRealtimeRuntime": 0, "CpusetCpus": "", "CpusetMems": "", "Devices": [], "DeviceCgroupRules": null, "DiskQuota": 0, "KernelMemory": 0, "MemoryReservation": 0, "MemorySwap": 0, "MemorySwappiness": null, "OomKillDisable": false, "PidsLimit": 0, "Ulimits": null, "CpuCount": 0, "CpuPercent": 0, "IOMaximumIOps": 0, "IOMaximumBandwidth": 0 }, "GraphDriver": { "Data": null, "Name": "aufs" }, "Mounts": [ { "Type": "bind", "Source": "/home/myuser/juseppe", "Destination": "/juseppe/plugins", "Mode": "", "RW": true, "Propagation": "rprivate" } ], "Config": { "Hostname": "77f124c27aa3", "Domainname": "", "User": "", "AttachStdin": false, "AttachStdout": true, "AttachStderr": true, "ExposedPorts": { "80/tcp": {}, "8080/tcp": {} }, "Tty": false, "OpenStdin": false, "StdinOnce": false, "Env": [ "JUSEPPE_BASE_URI=http://127.0.0.1", "JUSEPPE_BIND_PORT=80", "JUSEPPE_BIND_HOST=127.0.0.1", "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "LANG=C.UTF-8", "JAVA_HOME=/docker-java-home", "JAVA_VERSION=8u181", "JAVA_DEBIAN_VERSION=8u181-b13-1~deb9u1", "CA_CERTIFICATES_JAVA_VERSION=20170531+nmu1", "MAVEN_HOME=/usr/share/maven", "MAVEN_CONFIG=/root/.m2", "JUSEPPE_BASE_DIR=/juseppe", "JUSEPPE_CERT_DIR=/juseppe/cert", "JUSEPPE_CERT_PATH=/juseppe/cert/uc.crt", "JUSEPPE_PRIVATE_KEY_PATH=/juseppe/cert/uc.key", "JUSEPPE_PLUGINS_DIR=/juseppe/plugins", "JUSEPPE_SAVE_TO_DIR=/juseppe/json" ], "Cmd": [ "-w", "serve" ], "ArgsEscaped": true, "Image": "lanwen/juseppe", "Volumes": null, "WorkingDir": "/juseppe", "Entrypoint": [ "java", "-jar", "juseppe-cli/target/juseppe.jar" ], "OnBuild": null, "Labels": {} }, "NetworkSettings": { "Bridge": "", "SandboxID": "a723bb4477414a0e60cd15100baaf09a6048d4ecf000d205239e96f20a3d5e95", "HairpinMode": false, "LinkLocalIPv6Address": "", "LinkLocalIPv6PrefixLen": 0, "Ports": { "80/tcp": [ { "HostIp": "0.0.0.0", "HostPort": "80" } ], "8080/tcp": null }, "SandboxKey": "/var/run/docker/netns/a723bb447741", "SecondaryIPAddresses": null, "SecondaryIPv6Addresses": null, "EndpointID": "58a0c3b36361247c69f25b2bb8770b811a04162412529db2165ed4d6b85990b4", "Gateway": "172.17.0.1", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "IPAddress": "172.17.0.2", "IPPrefixLen": 16, "IPv6Gateway": "", "MacAddress": "", "Networks": { "bridge": { "IPAMConfig": null, "Links": null, "Aliases": null, "NetworkID": "e2fb514705f3756c00d4817143baad3cab87642394c395d4cbea5e669a123622", "EndpointID": "58a0c3b36361247c69f25b2bb8770b811a04162412529db2165ed4d6b85990b4", "Gateway": "172.17.0.1", "IPAddress": "172.17.0.2", "IPPrefixLen": 16, "IPv6Gateway": "", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "MacAddress": "", "DriverOpts": null } } } } ]

why is this empty? "PortBindings": { "80/tcp": [ { "HostIp": "",

mfuxi commented 6 years ago

OK, if I add to the docker run command from the README: docker run --name juseppe --network=host -v /your/plugins/dir/:/juseppe/plugins/ -e JUSEPPE_BASE_URI=http://my.company.com -p 80:8080 lanwen/juseppe

added: --network=host

Everything is working, but i'm not sure that's how it's supposed to be.

sathomps commented 5 years ago

Closing - please reopen if needed.