{"id":4073,"date":"2021-11-28T18:55:15","date_gmt":"2021-11-28T10:55:15","guid":{"rendered":"http:\/\/123.57.164.21\/?p=4073"},"modified":"2021-11-28T18:55:15","modified_gmt":"2021-11-28T10:55:15","slug":"cloud-native-%e4%b8%8e-spring-cloud_%e5%85%a5%e9%97%a8_4_%e9%83%a8%e7%bd%b2%e5%88%b0openshift","status":"publish","type":"post","link":"https:\/\/92it.top\/?p=4073","title":{"rendered":"Cloud native \u4e0e Spring Cloud_\u5165\u95e8_4_\u90e8\u7f72\u5230OpenShift"},"content":{"rendered":"\n<h5 class=\"wp-block-heading\">1. \u767b\u5f55 IBM Cloud<a href=\"https:\/\/doc-jrecloud-dev.roks-iip-48-2029222ed72d9643e3d07091333056f5-0000.jp-tok.containers.appdomain.cloud\/docs\/getting-started\/openshift#1-\u767b\u5f55-ibm-cloud\">\u200b<\/a><\/h5>\n\n\n\n<ul><li>\u767b\u5f55<a rel=\"noreferrer noopener\" href=\"https:\/\/cloud.ibm.com\" target=\"_blank\">https:\/\/cloud.ibm.com<\/a>, \u5207\u6362\u8d26\u53f7\u4e3a <code>xxx Cloud Sandbox<\/code><\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2021\/11\/image-38-1024x793.png\" alt=\"\" class=\"wp-image-4074\" width=\"552\" height=\"427\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2021\/11\/image-38-1024x793.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2021\/11\/image-38-300x232.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2021\/11\/image-38-768x595.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2021\/11\/image-38-830x643.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2021\/11\/image-38-230x178.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2021\/11\/image-38-350x271.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2021\/11\/image-38-480x372.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2021\/11\/image-38.png 1500w\" sizes=\"(max-width: 552px) 100vw, 552px\" \/><\/figure><\/div>\n\n\n\n<ul><li>\u9009\u62e9 cluster: <code>roks-iip-48<\/code><\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2021\/11\/image-40-1024x618.png\" alt=\"\" class=\"wp-image-4076\" width=\"617\" height=\"372\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2021\/11\/image-40-1024x618.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2021\/11\/image-40-300x181.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2021\/11\/image-40-768x464.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2021\/11\/image-40-830x501.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2021\/11\/image-40-230x139.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2021\/11\/image-40-350x211.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2021\/11\/image-40-480x290.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2021\/11\/image-40.png 1514w\" sizes=\"(max-width: 617px) 100vw, 617px\" \/><\/figure><\/div>\n\n\n\n<ul><li>\u70b9\u51fb OpenShift web console<\/li><\/ul>\n\n\n\n<h5 class=\"wp-block-heading\">2. \u90e8\u7f72 Demo API<\/h5>\n\n\n\n<ul><li><a href=\"https:\/\/doc-jrecloud-dev.roks-iip-48-2029222ed72d9643e3d07091333056f5-0000.jp-tok.containers.appdomain.cloud\/docs\/getting-started\/openshift#2-\u90e8\u7f72-demo-api\">\u200b<\/a>\u5207\u6362\u5230 Developer \u89c6\u56fe\uff0c \u70b9\u51fb <strong>+Add > From Git<\/strong><\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2021\/11\/image-41.png\" alt=\"\" class=\"wp-image-4078\" width=\"199\" height=\"54\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2021\/11\/image-41.png 260w, https:\/\/92it.top\/wp-content\/uploads\/2021\/11\/image-41-230x62.png 230w\" sizes=\"(max-width: 199px) 100vw, 199px\" \/><\/figure><\/div>\n\n\n\n<p>Repo URL: <code>git@github.ibm.com:iiplab\/xxx  Cloud.git<\/code><\/p>\n\n\n\n<ul><li>\u70b9\u51fb Show advanced Git options<\/li><\/ul>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">Context dir \u8f93\u5165 \/microservices\/demo-api<\/pre>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2021\/11\/image-42.png\" alt=\"\" class=\"wp-image-4079\" width=\"126\" height=\"35\"\/><\/figure><\/div>\n\n\n\n<ul><li>Source Secret \u9009\u62e9 <code>repo-at-gitibm<\/code><\/li><li>Builder Image \u9009\u62e9 <code>Java<\/code>, Version \u9009\u62e9<code>openjdk-11-el7<\/code><\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2021\/11\/image-43.png\" alt=\"\" class=\"wp-image-4081\" width=\"130\" height=\"39\"\/><\/figure><\/div>\n\n\n\n<ul><li>Application(group) \u9009\u62e9 <code>xxxCloud<\/code><\/li><li>Name \u8f93\u5165 <code>demo<\/code><\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2021\/11\/image-44-1024x401.png\" alt=\"\" class=\"wp-image-4082\" width=\"529\" height=\"206\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2021\/11\/image-44-1024x401.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2021\/11\/image-44-300x117.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2021\/11\/image-44-768x300.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2021\/11\/image-44-830x325.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2021\/11\/image-44-230x90.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2021\/11\/image-44-350x137.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2021\/11\/image-44-480x188.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2021\/11\/image-44.png 1232w\" sizes=\"(max-width: 529px) 100vw, 529px\" \/><\/figure><\/div>\n\n\n\n<ul><li>Resouces \u9009\u62e9 DeploymentConfig<\/li><li>Advanced options\uff0c <strong>\u4e0d\u8981<\/strong> \u9009\u62e9 Create a route to the Application ( \u53d6\u6d88\u9009\u62e9)<\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2021\/11\/image-45-1024x933.png\" alt=\"\" class=\"wp-image-4083\" width=\"539\" height=\"491\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2021\/11\/image-45-1024x933.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2021\/11\/image-45-300x273.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2021\/11\/image-45-768x700.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2021\/11\/image-45-830x756.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2021\/11\/image-45-230x210.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2021\/11\/image-45-350x319.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2021\/11\/image-45-480x437.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2021\/11\/image-45.png 1284w\" sizes=\"(max-width: 539px) 100vw, 539px\" \/><\/figure><\/div>\n\n\n\n<ul><li>\u70b9\u51fb Deployment \u8d85\u94fe\u63a5\uff0c\u5982\u4e0b\u8bbe\u7f6e\u9879\u76ee\u542f\u52a8\u53c2\u6570\uff0c\u7136\u540e\u70b9\u51fb Create \u6309\u94ae\u3002<\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2021\/11\/image-46.png\" alt=\"\" class=\"wp-image-4084\" width=\"169\" height=\"43\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2021\/11\/image-46.png 286w, https:\/\/92it.top\/wp-content\/uploads\/2021\/11\/image-46-230x58.png 230w\" sizes=\"(max-width: 169px) 100vw, 169px\" \/><\/figure><\/div>\n\n\n\n<ul><li>\u63a5\u4e0b\u6765\uff0c \u5728 Topology \u4e0b \u70b9\u51fb demo<\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2021\/11\/image-47-1024x661.png\" alt=\"\" class=\"wp-image-4085\" width=\"588\" height=\"379\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2021\/11\/image-47-1024x661.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2021\/11\/image-47-300x194.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2021\/11\/image-47-768x495.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2021\/11\/image-47-830x535.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2021\/11\/image-47-230x148.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2021\/11\/image-47-350x226.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2021\/11\/image-47-480x310.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2021\/11\/image-47.png 1302w\" sizes=\"(max-width: 588px) 100vw, 588px\" \/><\/figure><\/div>\n\n\n\n<ul><li>\u7136\u540e\u70b9\u51fb Builds \u4e0b <code>View logs<\/code><\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2021\/11\/image-48.png\" alt=\"\" class=\"wp-image-4086\" width=\"155\" height=\"42\"\/><\/figure><\/div>\n\n\n\n<ul><li>\u5982\u679c\u770b\u5230 \u4e0b\u9762\u7684\u8bdd\uff0c\u8868\u660e Build \u6210\u529f\u3002<\/li><\/ul>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>Successfully pushed image-registry.openshift-image-registry.svc:5000\/jrecloud-dev\/demo<\/p><\/blockquote>\n\n\n\n<ul><li>\u63a5\u4e0b\u6765\u5728 Topology \u4e0b \u70b9\u51fb demo\uff0c\u7136\u540e\u70b9\u51fb Pods \u4e0b <code>View logs<\/code>\uff0c \u5982\u679c\u770b\u5230\u4e0b\u9762\u7684\u8bdd\uff0c\u8868\u9762\u8868\u660e Deploy \u6210\u529f\u3002<\/li><\/ul>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>Tomcat started on port(s): 8080 (http) with context path &#8221;<\/p><p>Started DemoApiApplication in 5.18 seconds (JVM running for 6.415)<\/p><\/blockquote>\n\n\n\n<h5 class=\"wp-block-heading\">3. \u4fee\u6539 K8s Service \u7aef\u53e3\u53f7\u4e3a 80(\u6682\u4e0d\u4fee\u6539)<\/h5>\n\n\n\n<p><a href=\"https:\/\/doc-jrecloud-dev.roks-iip-48-2029222ed72d9643e3d07091333056f5-0000.jp-tok.containers.appdomain.cloud\/docs\/getting-started\/openshift#3-\u4fee\u6539-k8s-service-\u7aef\u53e3\u53f7\u4e3a-80\u6682\u4e0d\u4fee\u6539\">\u200b<\/a>\u6682\u7f13<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">4. \u5728\u96c6\u7fa4\u5185\u6d4b\u8bd5 Demo API<\/h5>\n\n\n\n<p><a href=\"https:\/\/doc-jrecloud-dev.roks-iip-48-2029222ed72d9643e3d07091333056f5-0000.jp-tok.containers.appdomain.cloud\/docs\/getting-started\/openshift#4-\u5728\u96c6\u7fa4\u5185\u6d4b\u8bd5-demo-api\">\u200b<\/a>\u4e3a\u5b89\u5168\u8d77\u89c1\uff0c\u6240\u6709\u7684\u5fae\u670d\u52a1\u5bf9\u5916\u90fd\u4e0d\u53ef\u89c1\uff0c \u7528\u6237\u53ea\u80fd\u901a\u8fc7\u7edf\u4e00\u7684\u670d\u52a1\u7f51\u5173\u8bbf\u95ee\u5fae\u670d\u52a1\uff08\u89c1\u4e0b\u4e00\u8282\uff09\uff0c\u4f46\u662f\uff0c\u96c6\u7fa4\u5185\u7684\u5fae\u670d\u52a1\u4e4b\u95f4\u662f\u53ef\u4ee5\u76f8\u4e92\u8bbf\u95ee\u7684\uff0c \u6211\u4eec\u53ef\u4ee5\u5c1d\u8bd5\u5728 product \u670d\u52a1\u5185\u8bbf\u95ee demo api\uff0c \u5982\u4e0b\uff1a<\/p>\n\n\n\n<ul><li>Topology \u70b9\u51fb product, \u70b9\u51fb Pods \u4e0b View logs<\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2021\/11\/image-49-1024x522.png\" alt=\"\" class=\"wp-image-4088\" width=\"537\" height=\"274\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2021\/11\/image-49-1024x522.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2021\/11\/image-49-300x153.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2021\/11\/image-49-768x392.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2021\/11\/image-49-830x423.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2021\/11\/image-49-230x117.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2021\/11\/image-49-350x179.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2021\/11\/image-49-480x245.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2021\/11\/image-49.png 1274w\" sizes=\"(max-width: 537px) 100vw, 537px\" \/><\/figure><\/div>\n\n\n\n<ul><li>\u70b9\u51fb Terminal \u6807\u7b7e\u9875\uff0c\u8f93\u5165<code>curl -si http:\/\/demo:8080\/api\/v1\/demos\/health<\/code>, \u8fd4\u56de <code>Demo works<\/code>.\u8868\u660e\u5fae\u670d\u52a1\u95f4(product -> demo)\u53ef\u4ee5\u901a\u8fc7 kube proxy \u6b63\u5e38\u901a\u4fe1\u3002<\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>1. \u767b\u5f55 IBM Cloud\u200b \u767b\u5f55https:\/\/cloud.ibm.com, \u5207\u6362\u8d26\u53f7\u4e3a xxx Clo [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25],"tags":[],"_links":{"self":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/4073"}],"collection":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4073"}],"version-history":[{"count":4,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/4073\/revisions"}],"predecessor-version":[{"id":4089,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/4073\/revisions\/4089"}],"wp:attachment":[{"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4073"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4073"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4073"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}