Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign updeploying a loopback 4 application to kubernetes on the IBM Cloud #2160
Conversation
dremond71
requested review from
bajtos
and
raymondfeng
as
code owners
Dec 14, 2018
This comment has been minimized.
This comment has been minimized.
originated from : #1606 |
This comment has been minimized.
This comment has been minimized.
Hi @dremond71, thank you for the pull request. Please sign our CLA here: Next, make sure The commit message is not following our guidelines, but that can be fixed at the end. |
bajtos
reviewed
Dec 14, 2018
Awesome content. I am not familiar with Kubernetes myself, but the guide is so detailed that I am pretty confident I'll be able to deploy LB4 to Kubernetes now. I wish the process could be more automated and required less steps, but that's out of scope of this pull request. Great work! |
# References | ||
[Getting started with the IBM Cloud CLI](https://cloud.ibm.com/docs/cli/index.html#overview) |
This comment has been minimized.
This comment has been minimized.
bajtos
Dec 14, 2018
Member
Please reformat this section as a list of bullet points, e.g.
- [Getting started with the IBM Cloud CLI](...url...) will help you to install all the CLIs you will need
- [Kubernetes CLI (kubectl)](...url...)
- etc.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
bajtos
Jan 7, 2019
Member
done
I see the old version here (no list of bullet points), could you @emonddr please check?
raymondfeng
reviewed
Dec 14, 2018
|
||
## Step 1: Scaffold LoopBack 4 app | ||
|
||
Run ````lb4 app```` command. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
raymondfeng
reviewed
Dec 14, 2018
|
||
Run ````lb4 app```` command. | ||
|
||
```` |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
raymondfeng
reviewed
Dec 14, 2018
|
||
It is important for the host to be ````'0.0.0.0'```` and the port to be consistent in several places. We will use a port of ````8080````. | ||
|
||
```` |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@dremond71 Thank you for the PR. Please |
raymondfeng
reviewed
Dec 14, 2018
if (!options.rest) options.rest = {}; | ||
options.rest.port = 8080; | ||
options.rest.host = "0.0.0.0"; | ||
// ---------------------------------------- |
This comment has been minimized.
This comment has been minimized.
raymondfeng
Dec 14, 2018
Member
We have configured options in index.js
as part of step 2. Is step 3 still needed?
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
emonddr
Jan 23, 2019
Contributor
I've finally had the chance to experiment with this a bit more. It turns out @raymondfeng is correct. "Modify deploy-test/src/index.ts" is not needed if I have done "Modify deploy-test/index.js".
This comment has been minimized.
This comment has been minimized.
raymondfeng
reviewed
Dec 14, 2018
```` | ||
|
||
Make sure there are no errors before continuing to the next step. | ||
|
This comment has been minimized.
This comment has been minimized.
raymondfeng
Dec 14, 2018
Member
Why do you want remove prestart
and manually run npm run build
before npm start
?
This comment has been minimized.
This comment has been minimized.
emonddr
Dec 16, 2018
Contributor
This was a step suggested in
https://medium.com/loopback/deploy-your-first-loopback4-application-to-ibm-cloud-2e671ac06b6c
published by @dhmlau .
I figured there was a good reason to do this, so I copied the instruction.
This comment has been minimized.
This comment has been minimized.
emonddr
Jan 23, 2019
Contributor
@raymondfeng , I just spoke with @b-admike , and he suggested I don't need to remove this from the package.json for the purposes of this how-to article. But it may be something the user would do to save time publish to production level.
raymondfeng
reviewed
Dec 14, 2018
``` | ||
lb4-simple-web-app latest 7d26df6c1561 | ||
``` | ||
|
This comment has been minimized.
This comment has been minimized.
raymondfeng
Dec 14, 2018
Member
The docker related files can be added as part of lb4 app
if we add such feature, for example, lb4 app my-app --docker
. Consider to submit another PR for that.
This comment has been minimized.
This comment has been minimized.
@dremond71 Great tutorial! I look forward to automating some of the key steps into @hacksparrow ^^^ |
This comment has been minimized.
This comment has been minimized.
@dremond71, got some info from @rmg on CLA. Looks like the PR is created by |
This comment has been minimized.
This comment has been minimized.
I want to thank everyone for the positive comments :) |
This comment has been minimized.
This comment has been minimized.
I am trying to build the HTML, to test out some includes, as mentioned in https://loopback.io/doc/en/contrib/alerts.html#types-of-alerts in my MD file, Deploying_to_ibm_cloud_kubernetes.md I am running ./bin/build-docs-site.sh and I cannot get past this:
Any help is appreciated. I am on Mac OSX |
This comment has been minimized.
This comment has been minimized.
Running with sudo seems to have gotten it farther... sudo ./bin/build-docs-site.sh |
This comment has been minimized.
This comment has been minimized.
@bajtos , after generating the HTML, when I view my file
I do not see the images I have placed in my MD file:
Is this normal? Please advise. Thanks |
This comment has been minimized.
This comment has been minimized.
./bin/build_docs_site.sh works to completion on my machine without error. But : npm run test eventually fails:
|
This comment has been minimized.
This comment has been minimized.
Try running |
This comment has been minimized.
This comment has been minimized.
I am not sure if the generated HTML files can be viewed directly. I was always starting Jekyll in an interactive & incremental mode and accessing the website via HTTP. IIRC, the first step is to run
This looks like a problem in the way how Ruby is set on your system. I am using Homebrew for installing global dev tools including Ruby, it sets the filesystem permissions on such way that no root access ( |
bajtos
added
Docs
feature
labels
Jan 7, 2019
bajtos
reviewed
Jan 7, 2019
# References | ||
[Getting started with the IBM Cloud CLI](https://cloud.ibm.com/docs/cli/index.html#overview) |
This comment has been minimized.
This comment has been minimized.
bajtos
Jan 7, 2019
Member
done
I see the old version here (no list of bullet points), could you @emonddr please check?
added a commit
to dremond71/loopback-next
that referenced
this pull request
Jan 7, 2019
This comment has been minimized.
This comment has been minimized.
The Jekyll generated HTML should be viewable directly since Jekyll is meant to produce static sites that can be hosted on any static http server. That's why there are so many restrictions on how content is organized. That said, the workarounds for those limitations might introduce browser JS that trips over CORS and related issues when trying to render a local file. |
This comment has been minimized.
This comment has been minimized.
Reminder for myself: I created Then I build the documentation from the main directory /loopback-next using
This creates content in the directory: /loopback-next/sandbox/loopback.io My generated HTML file is: /loopback-next/sandbox/loopback.io/_site/doc/en/lb4/deploying_to_ibm_cloud_kubernetes.html Loading this file in a browser, as-is, the images don't resolve since the image urls are now: and located in /loopback-next/sandbox/loopback.io/_site/pages/en/lb4/imgs/lb4_k8s_ibm_cloud_container_registry_1.png To view my HTML document with the images, I must go into the directory /loopback-next/sandbox/loopback.io and run
This loads the HTML in a local server instance, and now my document shows the images as properly resolved. |
This comment has been minimized.
This comment has been minimized.
@emonddr use the standard Markdown image tag for including images in all LB4 docs.
-- from PR #2226 |
This comment has been minimized.
This comment has been minimized.
See also what our docs say on this topic here: https://loopback.io/doc/en/contrib/images.html |
bajtos
approved these changes
Jan 10, 2019
LGTM as far as I am concerned. Please work with @raymondfeng to address his unresolved comments too. Once done, please clean up the git history - squash all commits into a single one, make sure the commit message is following our Commit message guidelines and rebase the change on top of the latest master via I am looking forward to see this great guide online in our docs! |
added a commit
to dremond71/loopback-next
that referenced
this pull request
Jan 23, 2019
emonddr
force-pushed the
dremond71:master
branch
2 times, most recently
from
f3db9df
to
48c7464
Jan 23, 2019
This comment has been minimized.
This comment has been minimized.
@bajtos and @raymondfeng , I have squashed all the commits into 1 commit, and rebased with master. |
dremond71 commentedDec 14, 2018
•
edited by emonddr
Checklist
npm test
passes on your machinepackages/cli
were updatedexamples/*
were updated