How to deploy a Go application to Bluemix?

不问归期 提交于 2019-12-11 08:25:30

问题


I am using Bluemix to run app, I can deploy Java app to Bluemix, does anyone know how to deploy a Go App to Bluemix?


回答1:


You can deploy a Go application to Bluemix, but need to supply -b with the Go Buildpack URL.

There is a sample application you can take a look: https://github.com/acostry/Go-on-Bluemix




回答2:


You need to use a custom buildpack to deploy a Go web application. So, login to your cloud and run the cf command below from the root folder of your application:

cf push appname -b https://github.com/cloudfoundry/cloudfoundry-buildpack-go



回答3:


Actually, Bluemix now includes the Cloud Foundry Go buildpack https://github.com/cloudfoundry/go-buildpack in its catalog. Hence, it should be unnecessary to resort to use of the BYOB feature.

API endpoint: https://api.ng.bluemix.net (API version: 2.19.0)

mbp:utils cbf$ cf buildpacks
Getting buildpacks...

buildpack                              position   enabled   locked   filename   
liberty-for-java                       1          true      false    buildpack_liberty-for-java_v1.15-20150402-1422-yp.zip   
sdk-for-nodejs                         2          true      false    buildpack_sdk-for-nodejs_v1.15-20150331-2231-yp.zip   
noop-buildpack                         3          true      false    noop-buildpack-20140311-1519.zip   
java_buildpack                         4          true      false    java-buildpack-v2.6.zip   
ruby_buildpack                         5          true      false    ruby_buildpack-offline-v1.2.0.zip   
nodejs_buildpack                       6          true      false    nodejs_buildpack-offline-v1.1.1.zip   
go_buildpack                           7          true      false    go_buildpack-offline-v1.1.1.zip   
python_buildpack                       8          true      false    python_buildpack-offline-v1.1.1.zip   
php_buildpack                          9          true      false    php_buildpack-offline-v1.0.2.zip   
liberty-for-java_v1-14-20150319-1159   10         true      false    buildpack_liberty-for-java_v1.14-20150319-1159-yp.zip   
sdk-for-nodejs_v1-14-20150309-1555     11         true      false    buildpack_sdk-for-nodejs_v1.14-20150309-1555-yp.zip



回答4:


Just to be clear the full command would be the following.

cf push appname -b https://github.com/cloudfoundry/go-buildpack.git




回答5:


You have to include "-b" option while pushing your go app on Bluemix cloud.

cf push app_name -b buildpack_URL

For any other types of app, you can refer below link for pushing app on bluemix:

https://www.ng.bluemix.net/docs/#starters/byob.html.




回答6:


Issue the following command with the -b option to deploy your application with your own buildpack, in which buildpack_URL is the URL of the buildpack:

$ cf push app_name -b buildpack_URL

More specifically

cf push app_name -b https://github.com/cloudfoundry/go-buildpack.git

more info is below:

https://www.ng.bluemix.net/docs/#starters/byob.html.




回答7:


Deploying the app to Bluemix is pretty much the same as deploying any other app, with the exception of a command-line flag to set the custom buildpack the platform should use to provision the runtime.

Log in to your Bluemix account and run this command from the root folder of your application, where appname represents a unique name for your Bluemix-hosted app:

cf push appname -b url

More details regrading creating/pushing/deploying/connecting can be found at http://www.ibm.com/developerworks/cloud/library/cl-bluemix-go-app/



来源:https://stackoverflow.com/questions/27170698/how-to-deploy-a-go-application-to-bluemix

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!