fabric8io / gofabric8

CLI used when working with fabric8 running on Kubernetes or OpenShift
https://fabric8.io/
Apache License 2.0
147 stars 72 forks source link

Wrong path used for template downloads on Windows #71

Closed gashcrumb closed 8 years ago

gashcrumb commented 8 years ago

Just trying out minishift, installing the app templates fail:

Created fabric8 console
Installing templates!
Downloading apps from: https://repo1.maven.org/maven2/io/fabric8/forge/distro/distro/2.2.227/distro-2.2.227-templates.zip
Install DevOps templates......................................................✘ open /tmp/fabric8-template-distros.tar.gz: The system cannot find the path specified.
Downloading apps from: https://repo1.maven.org/maven2/io/fabric8/ipaas/distro/distro/2.2.145/distro-2.2.145-templates.zip
Install iPaaS templates.......................................................✘ open /tmp/fabric8-template-distros.tar.gz: The system cannot find the path specified.
Downloading apps from: https://repo1.maven.org/maven2/io/fabric8/kubeflix/distro/distro/1.0.17/distro-1.0.17-templates.zip
Install Kubeflix templates....................................................✘ open /tmp/fabric8-template-distros.tar.gz: The system cannot find the path specified.
Downloading apps from: https://repo1.maven.org/maven2/io/fabric8/zipkin/packages/distro/0.0.8/distro-0.0.8-templates.zip
Install Zipkin templates......................................................✘ open /tmp/fabric8-template-distros.tar.gz: The system cannot find the path specified.

Installing: cd-pipeline

Failed to load app cd-pipeline................................................✘ templates "cd-pipeline" not found
Cannot get cd-pipeline template to deploy. error: unexpected end of JSON input

Wonder if there's a better cross-platform location to use, even on non-Windows platforms /tmp isn't always the most ideal location.

nagarajasr commented 8 years ago

is there any workaround for this issue?

nagarajasr commented 8 years ago

i ended up building gofabric8 from source, modifying the cmds/deploy.go by replacing the hardcoded path "/tmp/" with a path on my machine. the source code has too many hardcoded path references to "/tmp", so i guess a more robust, permanent solution is non-trivial

jimmidyson commented 8 years ago

We should be able to reference paths relative to platform specific temp dirs, or even better preferably via streams without saving to disk at all.

jstrachan commented 8 years ago

I've just tried a workaround - any chance someone (@gashcrumb @nagarajasr?) on windows could try it out (0.4.48 or later) to see if it fixes the issue? https://github.com/fabric8io/gofabric8/releases

gashcrumb commented 8 years ago

@jstrachan workaround seems to work fine for me!

gashcrumb commented 8 years ago

@jstrachan Tried the latest binary, gogs starts up fine now too out of the box...

jstrachan commented 8 years ago

Awesome! @gashcrumb it did the chmod in /data too right?

gashcrumb commented 8 years ago

yep!

On Tue, Sep 6, 2016 at 2:58 PM, James Strachan notifications@github.com wrote:

Awesome! @gashcrumb https://github.com/gashcrumb it did the chmod in /data too right?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/fabric8io/gofabric8/issues/71#issuecomment-245053522, or mute the thread https://github.com/notifications/unsubscribe-auth/AAVdrEO2xjBAbya7rDGnbceZg1rpJTCHks5qnbe-gaJpZM4JNdv5 .

jstrachan commented 8 years ago

Yay!!!