smarterclayton / openshift-go-cart Goto Github PK
View Code? Open in Web Editor NEWGo cartridge for OpenShift Origin
License: Other
Go cartridge for OpenShift Origin
License: Other
Is it possible to deploy only golang compiled app binary (built somewhere) using this cartridge? I don't want git support and don't want to compile app source in openshift box.
I have been working with the go cartridge and it is excellent, thank you for the work. I think I have found a problem where on the install of an application the .openshift directory gets removed from $OPENSHIFT_REPO_DIR
I have setup a cron directory in .openshift and installed the cron cartridge and created the directories and git pushed to openshift:
When I then go into the $OPENSHIFT_REPO_DIR from where the cron files are run there is no .openshift directory:
I think line 91 in compile might be the offending line:
rm -rf $build/.openshift # this removes the constructed $GOPATH
But I am unsure of what further effect this might have. I will have a go and fix it but thought some one might have a quick solution to the bug.
@smarterclayton I love Open Shift Online by RadHat as it enables me to use SqLite or even BoltDB with GoLang and yet I am not burdened with full VPS and related administration. Now when can we expect support for GoLang 1.5 that was just freshly released? Any road-map would be greatly appreciated.
The every time i push the code .godir value github.com/smarterclayton/sample reverting back even after editing in the file in repo.
please give me solution.
Thank you.
Hello,
I'm successfully testing this gear, binding just like the sample with
bind := fmt.Sprintf("%s:%s", os.Getenv("OPENSHIFT_GO_IP"), os.Getenv("OPENSHIFT_GO_PORT"))
I see my webapp responds both on HTTP and HTTPS this way. Is it possible for me to understand, in my handlers, if the request comes over the one or the other?
I tried monitoring http.Request.TLS, but it's always nil - also for HTTPS requests.
I don't think that's because I'm using a free gear, with a shared certificate, is it?
Thanks for any help,
al.
Can you please upgrade the cartridge to support go 1.6?
Hi,
Thanks for your excellent job on this cartridge.
How should we upgrade our gears (scalable ones in my case), for example: from go-1.4 to go-1.4.1 as there's no upgrade script in /bin ?
Thanks for your help.
First of all, thank you for the great work :)
I'm trying to run a go web service on Openshift Origin (local environment). When creating the application, I always receive an error:
The initial build for the application failed: Shell command '/sbin/runuser -s /bin/sh 54cf69e6653e8ab21500005f -c "exec /usr/bin/runcon 'unconfined_u:system_r:openshift_t:s0:c5,c114' /bin/sh -c \"gear postreceive --init >> /tmp/initial-build.log 2>&1\""' returned an error. rc=255 .Last 10 kB of build output: Warning: Application 'web' server exists without a pid file. Use force-stop to kill. Repairing links for 1 deployments Building git ref 'master', commit 96532e0 First download, may take several minutes -----> Installing Go 1.4.1... done Installing Virtualenv... done Installing Mercurial... done Installing Bazaar... done -----> Running: go get -tags openshift ./... # github.com/ory-platform/uuid-server ./server.go:6: imported and not used: "flag" An error occurred executing 'gear postreceive' (exit code: 2) Error message: CLIENT_ERROR: Failed to execute: 'control build' for /var/lib/openshift/54cf69e6653e8ab21500005f/go For more details about the problem, try running the command again with the '--trace' option.
Here are my settings:
The repository I'm using is: https://github.com/ory-platform/uuid-server.git
I have added the go cartridge to origin (I want every user to see the go cartridge when creating an application!) by doing:
> oo-admin-ctl-cartridge -c import -u https://cartreflect-claytondev.rhcloud.com/reflect?github=smarterclayton/openshift-go-cart
> oo-admin-ctl-cartridge -c import-node -u https://cartreflect-claytondev.rhcloud.com/reflect?github=smarterclayton/openshift-go-cart
> oo-admin-ctl-cartridge -c activate --ids smarterclayton-go-1.4.1
I've used both import
and import-node
, because I was unsure which of those is the right one for this task.
When I leave the repository field empty, the application gets created, but I don't understand how I can get my application running.
ping @tacurran
Hi,
i read in your doc its about http requests, is it totally restricted to it or can i run a different kind of service ? (i m looking to test some dht/bep44 app)
thanks
What can we do in go to be able to accept port 443 requests when to load balancer will forward all data at the OPENSHIFT_GO_PORT (8080). Most of the websocket libs will reject if it detects that the client doesn't come in at port 443.
All of a sudden i am getting this error during . I can't install anything now.
I know it has something to do with Go 1.7.3
If so, is there an example of how a cartridge may look in openshift?
When I create an application with Web Load Balancer, the application does not start by complaining that the port 8080 is in use. It works well when Web Load Balancer is not selected.
Trying to add the cartridge.
Creating application 'mygo' ... Invalid cartridge, error downloading from url 'https://cartreflect-claytondev.rhcloud.com/reflect?github=smarterclayton/openshift-go-cart
Am i missing something ?
Hello,
I have a project with the following configuration :
/
web.go -> with import "mylib/mypackage"
src/mylib/package
Whatever the configuration i put in .godir or .gopath (mylib or ./mylib, ...)
the compilation fail because of "unrecognized import path"
I really don't understand the way you copy the files before the compilation ...
I build successufly my project on my computer, and everything is fine, but Openshift doesn't support the conventionnal GOPATH stuff apparently :/.
How can I call my own package on openshift ?
Is there a magic trick ? or we have to put the stuff on github so it's downloaded whit the go get ? (That lib contains some configuration and DB password so ...).
Thanks.
I was reading https://developers.openshift.com/faq/troubleshooting.html#_how_do_i_redirect_traffic_to_https
but I am not sure how to apply this for Go Lang? Do I need to create a redirect function with Go Lang?
Hi,
Sorry for the noob issue, but I'm playing with openshift, and I'm stuck on scaling.
With a regular app (not scalable), everything is fine, and the app starts as expected.
With a scalable app, the first gear will start correctly, but not the others.
I have managed to ssh on the failing gear, and I can see some vars are not set correctly:
[...]> export | grep PORT
declare -x OPENSHIFT_GO_PORT="8080"
declare -x OPENSHIFT_GO_PROXY_PORT="46411"
And on the first gear:
[...]> export | grep PORT
declare -x OPENSHIFT_GO_PORT="8080"
declare -x OPENSHIFT_GO_PROXY_PORT="39846"
declare -x OPENSHIFT_HAPROXY_PORT="8080"
declare -x OPENSHIFT_HAPROXY_PROXY_PORT="39847"
declare -x OPENSHIFT_HAPROXY_STATUS_PORT="8080"
declare -x PORT="8080"
My app is starting on a default port (3000) and haproxy can't access it of course.
Thanks
myfirstapp/web.go
myfirstapp/lib/func1.go
in my main web.go if I do an import "myfirstapp/lib" i can access to functions inside func1.go . However, when I deploy to openshift it doesn't compile right. What should I do?
How easy is it to add support for Go 1.2?
I have created a basic go rest webservice here. I tested it in my local linux box on go 1.2. The application works fine. But when I uploaded the same app in openshift and tried to run it after compilation in go 1.1 it fails to run as expected. It just exits from the main method and stops instead of listening to the port specified.
What is wrong with the go cartridge in openshift? Is it broken or am I missing something here?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.