-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to deploy successfully to Cloud Foundry #2033
Comments
@cloudwheels, please ignore my previous comment. I think the better way to get this working is to add this line in
i.e.
I'll submit a PR to update the docs. Thanks for reporting this issue.
|
Thank you much @dhmlau -confirm this works - please see next comment for more succinct summary than this one... I have / had taken time to check the repo & issues & web generally before posting this issue, so I can see how hard you are all working and pressing issues such as reviewing & extending the deployment docs for various platforms are being dealt with via the monthly milestones. I'm sure you are aware there is little more frustrating to a developer than the cycle: My suggestion would be to start deployment documentation with the simplest (ping) starter with the assumption that developer has no working knowledge of IBM Cloud/cloud foundry/bluemix whatsoever (I'm coming from Google coud so I don't struggle with the concepts of PaaS, just IBMs silly names for the same things), so that the basics of setting up and deploying to a free tier can be understood and verified before moving to more complex examples. The deployment how to should also follow the same login / CLI tool installations and commands as the node.js SDK starter app on CF (ie using the I have seen that the ability to use a local explorer is now live and partially documented: with the redirected version I get a probable CORS error from the cloud foundry app (and in my 'local' google cloud shell environment where I have no control over CORS). I would be helpful to know whether I need to get involved with the 'api' section of the cloud foundry console: 'expose manged api' etc. to manage CORS for the cf app and/or how this is relevant to loopback app running on cf and how to deal with this issue. I will attempt to turn these comments into more granular / useful contributions to existing specific issues when I have some time [update - see comments below], so apologies this is a bit of an unstructured record of my experience / rant, and many thanks for all the excellent work on this exciting project and the help getting over this little hurdle. |
So, tldr;
I have just written this as an aide-memoir so will work through and check that it works :) & comment back... Could a 'Deploy to IBM cloud?' option be added to the generator to automatically install the 2 necessary dependencies and generate a modified src/index.ts to include the cfenv variables? (and going forward run the |
Related open issues: #1709 In any event adding hosted cloudant URL to the cloudant datasource connector and using the same database for local and cloud versions for the time being is a lot simpler to describe and understand as a temporary development step (no need to even add the cloudant service to the app in the console - the benefits of doing so can be explained later), and avoids having to use the docker environment which has other complications: |
@cloudwheels, thanks for your feedback and the feature proposal! I agree that the how-to guide should contain more detailed information (perhaps with screenshots especially for the IBM Cloud side). We've investigated there are additional steps required if the LoopBack application is using other IBM Cloud service for persistence, so think that it would be useful to include it as well. Based on your feedback, I'd like to propose the following to move things forward:
Thoughts? |
@dhmlau - thank for the swift reply :) I confirm I now have todo running on the IBM cloud by making these changes (but no docker database or connected services, just a connection string from the cloudant connector shared by both environments - simples! - I was guided in this by I think the docs for the github sample (which didn't build for me btw and is probs a bit outdated also)). With some minor level of familiarity now I was able to just update the manifest to upload the todo example over the ping starter: Your plan sounds good. Absolutely - step by step breakdowns where poss - get a ping (starter + deployment), add a simple controller (hello), add more complex (todo)/related (todoList) models & controllers, get external api stuff (github stargazer), persist data in memory, persist to single hosted cloudant, setup cloudant dev in docker, add authentication etc. etc. User can always jump to the most complex example and run that first if they want or are returning / progressing their experience: each should work as a unit. Then, yes, see it all working all ultimately as one pagers / clickers for the best ux. (ref. google cloud where for many examples a button click in the product overview will pull code into the console from git, build & deployed for you, apis enabled etc with a bit of entering your email address.) I would say trying to align / integrate it to the current process on the IBM (Bluemix / whatever) console for creating a node.js sdk app, with the prefilled copy-pasta commands, with 'setup as a loopback app' being an option from here to provide relevant instructions from a single point that the user has to go to in order to set up the node app anyway (no duplication of documentation) [does that make sense]. Please also go with one CLI tool for this across all example documentation if that is workable (seems to be) i.e. the one currently referred to in these node.js docs, and clarify which commands of Hope that helps! Look forward to following progress :) |
ie.
|
see PR #3254. |
@cloudwheels, since it's similar to the other issue you created #2072, I'd like to close this issue and continue the discussion over there. Thanks. |
Description / Steps to reproduce / Feature proposal
cf
(as per deployment docks),ibmcloud cf
bx
(as per the cloud foundry node.js documentation after setting up an app. There are very few examples of this process around and those that exist seem to be conflicting, although they all seem to achieve the same results.Depending on which you choose and what prompts you receive, it can take some time to work out exactly what the required 'endpoint', 'org' and 'space' parameters for logging in and settings app endpoints. This is not covered at all in the deployment documentation.
bx
and specifying app name seemed to negate the need for this.Current Behavior
The app seems to build, start successfully and then crash, most lately / consistently with exit code 137 (which may possibly indicate memory problems with the cf container?).
The app's routes are not available in the cloud.
Extract of log, my package.json & node version below.
Please help - this has been driving me mental for 24hours, I've had plenty of stabs at different approaches but it just doesn't seem to work. I must be missing something really obvious but I have the fear that this version is all a bit bleeding edge right now and things seems to be in a state of flux with the IBM CLI tools!
The text was updated successfully, but these errors were encountered: