Serverless daim ntawv thov tau sai thiab yooj yim dua nrog OpenShift

Red Hat OpenShift Serverless yog cov txheej txheem ntawm Kubernetes cov khoom siv rau kev pabcuam microservices, ntim khoom, thiab Function-as-a-Service (FaaS) kev siv.

Serverless daim ntawv thov tau sai thiab yooj yim dua nrog OpenShift

Qhov kev daws teeb meem tawm ntawm lub thawv no suav nrog kev ruaj ntseg thiab kev khiav tsheb khiav thiab ua ke nrog Red Hat Operators, Riam ΠΈ Red Hat OpenShift kom khiav tsis muaj xeev thiab tsis muaj kev thauj khoom ntawm OpenShift platform hauv kev ntiag tug, pej xeem, hybrid thiab ntau huab ib puag ncig.

OpenShift Serverless tso cai rau cov neeg tsim khoom tsom mus rau kev tsim cov ntawv thov rau tiam tom ntej, muab ntau hom lus programming, lub moj khaum, kev txhim kho ib puag ncig thiab lwm yam cuab yeej los tsim thiab siv cov khoom lag luam tawm.

Cov yam ntxwv tseem ceeb ntawm Red Hat OpenShift Serverless:

  • Kev xaiv dav ntawm cov lus programming thiab lub sijhawm ua haujlwm rau kev siv serverless. Koj tuaj yeem xaiv raws nraim cov txheej txheem uas koj xav tau.
  • Tsis siv neeg kab rov tav scaling nyob ntawm qhov siv ntawm kev thov lossis cov xwm txheej kom tswj tau cov peev txheej raws li qhov tiag, tsis yog xav tau kev xav
  • Seamless kev koom ua ke nrog OpenShift Pipelines, Kubernetes-based nruam tsim thiab xa khoom (CI/CD) system powered by Tekton
  • Lub hauv paus yog nyob rau hauv daim ntawv ntawm Red Hat Operator, uas tso cai rau cov thawj coj kom ruaj ntseg tswj thiab hloov kho cov xwm txheej khiav, thiab tseem npaj lub neej voj voog ntawm kev siv xws li huab kev pabcuam.
  • Tsis tu ncua saib xyuas cov kev tshaj tawm tshiab hauv zej zog, suav nrog Knative 0.13 Kev Pabcuam, Kev tshwm sim thiab kn (tus nom CLI rau Knative) - nrog rau tag nrho lwm cov khoom siv Red Hat, qhov no txhais tau tias kev sim ua kom zoo thiab siv tau ntawm ntau yam OpenShift platforms thiab teeb tsa.

Tsis tas li ntawd, Red Hat koom tes nrog Serverless technologies nrog ntau tus neeg koom tes, nrog rau Microsoft ntawm Azure Functions thiab KEDA (kom paub meej ntxiv saib no). Tshwj xeeb, tus neeg teb xov tooj OpenShift tau lees paub twb muaj nyob ntawm TriggerMesh, thiab tsis ntev los no peb tau pib koom tes Serverless.comkom Serverless Framework tuaj yeem ua haujlwm nrog OpenShift Serverless thiab Knative. Cov kev sib koom tes no tuaj yeem pom tau tias yog ib qho kos npe ntawm kev loj hlob ntawm serverless thiab pib tsim kev lag luam ecosystem.

Yog tias koj yav tas los tau teeb tsa qhov kev saib ua ntej ntawm Red Hat OpenShift Serverless, koj tuaj yeem hloov kho nws mus rau qhov muaj GA version. Nyob rau hauv cov ntaub ntawv no, rau thev naus laus zis saib ua ntej version, koj yuav tsum tau teeb tsa OLM Subscription Update Channel, raws li qhia hauv daim duab. 1.

Serverless daim ntawv thov tau sai thiab yooj yim dua nrog OpenShift
Rice. 1. Hloov kho qhov kev tso npe channel.

Cov channel subscription yuav tsum tau hloov kho kom phim OpenShift Container Platform version 4.4 lossis 4.3.

Knative Services - cov kev pabcuam saum toj kawg nkaus

OpenShift 4.4 ua kom yooj yim rau kev xa tawm cov ntawv thov nrog OpenShift Serverless functionality, tso cai rau koj siv zog siv Knative Services ncaj qha los ntawm tus tsim tawm hom ntawm OpenShift web console.

Thaum ntxiv ib daim ntawv thov tshiab rau ib qhov project, nws yog txaus los qhia qhov Knative Service pab hom rau nws, yog li tam sim ntawd qhib lub OpenShift Serverless functionality thiab ua kom scaling rau xoom nyob rau hauv standby hom, raws li qhia nyob rau hauv daim duab. 2.

Serverless daim ntawv thov tau sai thiab yooj yim dua nrog OpenShift
Rice. 2. Xaiv Knative Service raws li hom kev pab.

Ib qho yooj yim installation siv Kourier

Raws li peb twb sau rau hauv Tshaj tawm ntawm OpenShift Serverless 1.5.0 Tech Saib ua ntej, siv Courier ua kom nws ua tau kom txo qis cov npe ntawm cov cai thaum txhim kho Serverless ntawm OpenShift, thiab hauv GA version cov kev cai no tau dhau los ua me dua. Tag nrho cov no txo ​​cov peev txheej siv, ua kom lub zog txias pib ntawm daim ntawv thov, thiab tseem tshem tawm qhov cuam tshuam ntawm cov khoom siv tsis tu ncua, tsis muaj serverless khiav hauv tib lub npe.

Feem ntau, cov kev txhim kho no, nrog rau kev txhim kho hauv OpenShift 4.3.5, ua kom cov kev tsim cov ntawv thov los ntawm lub thawv ua ntej los ntawm 40-50%, nyob ntawm seb cov duab loj.
Yuav ua li cas txhua yam tshwm sim yam tsis siv Kourier tuaj yeem pom hauv daim duab 3:

Serverless daim ntawv thov tau sai thiab yooj yim dua nrog OpenShift
Rice. 3. Daim ntawv thov tsim lub sijhawm nyob rau hauv rooj plaub uas Kourier tsis siv.

Yuav ua li cas txhua yam tshwm sim thaum siv Kourier tuaj yeem pom hauv daim duab 4:

Serverless daim ntawv thov tau sai thiab yooj yim dua nrog OpenShift
Rice. 4. Daim ntawv thov tsim lub sijhawm thaum siv Kourier.

TLS/SSL hauv hom tsis siv neeg

OpenShift Serverless tam sim no tuaj yeem tsim thiab siv TLS / SSL rau koj Knative Service's OpenShift Route, yog li koj tsis tas yuav txhawj xeeb txog kev siv thiab tswj cov yam ntxwv no thaum ua haujlwm ntawm koj daim ntawv thov. Nyob rau hauv lwm yam lus, Serverless relieves tus tsim tawm ntawm cov complexities txuam nrog TSL, thaum tuav lub siab ntawm kev ruaj ntseg uas txhua leej txhua tus tau txais los ntawm Red Hat OpenShift.

OpenShift Serverless Command Line Interface

Hauv OpenShift Serverless nws yog hu ua kn thiab muaj ncaj qha hauv OpenShift console ntawm nplooj ntawv hais kom ua kab, raws li qhia hauv daim duab. 5:

Serverless daim ntawv thov tau sai thiab yooj yim dua nrog OpenShift
Rice. 5. OpenShift Serverless CLI download nplooj ntawv.

Thaum koj rub tawm los ntawm nplooj ntawv no, koj tau txais ib qho version ntawm kn rau MacOS, Windows, lossis Linux uas tau txheeb xyuas los ntawm Red Hat thiab lav tias tsis muaj malware.

Hauv daim duab. Daim duab 6 qhia tau hais tias yuav ua li cas hauv kn koj tuaj yeem xa cov kev pabcuam nrog tsuas yog ib qho lus txib los tsim ib daim ntawv thov piv txwv ntawm OpenShift platform nrog kev nkag ntawm URL hauv ib lub vib nas this:

Serverless daim ntawv thov tau sai thiab yooj yim dua nrog OpenShift
Rice. 6. Siv kn command kab interface.

Cov cuab yeej no tso cai rau koj los tswj hwm Serverless Serving thiab Eventing cov peev txheej yam tsis tas yuav saib lossis hloov kho YAML teeb tsa.

Txhim kho Topology saib nyob rau hauv Developer hom ntawm lub console

Tam sim no cia saib yuav ua li cas qhov kev txhim kho Topology saib ua rau nws yooj yim dua los tswj Knative Services.

Knative Service – Centered Visualization

Knative Services ntawm nplooj ntawv Topology saib yog tso tawm ua ib lub duab plaub uas muaj tag nrho cov kev hloov kho, raws li pom hauv daim duab 7:

Serverless daim ntawv thov tau sai thiab yooj yim dua nrog OpenShift
Rice. 7. Knative Services ntawm nplooj ntawv saib Topology.

Ntawm no koj tuaj yeem pom tam sim no feem pua ​​​​ntawm Knative Service kev faib tawm, thiab pab pawg Knative Services nyob rau hauv ib pab pawg neeg thov kom pom tau yooj yim saib xyuas dab tsi tshwm sim hauv pawg xaiv.

Kaw cov npe OpenShift Knative Services

Txuas ntxiv cov ntsiab lus ntawm kev sib koom ua ke, nws yuav tsum tau hais tias hauv OpenShift 4.4 koj tuaj yeem tsoo Knative Services nyob rau hauv ib pab pawg neeg thov kom yooj yim dua saib thiab tswj cov kev pabcuam thaum muaj ntau daim ntawv thov siv hauv qhov project.

Knative Service nyob rau hauv kom meej

OpenShift 4.4 kuj tseem txhim kho lub sidebar rau Knative Services. Ib qho Kev Pabcuam tab tau tshwm sim rau ntawm nws, qhov chaw pabcuam cov khoom xws li Pods, Kev Hloov Kho thiab Txoj Haujlwm tau tshwm sim. Cov Cheebtsam no tseem muab kev ceev thiab yooj yim navigation rau ib tus neeg lub plhaub taum.

Lub Topology saib kuj qhia txog kev faib tsheb feem pua ​​thiab txawm tso cai rau koj hloov pauv sai sai. Yog li, koj tuaj yeem tshawb pom sai sai ntawm kev faib tsheb mus rau qhov kev xaiv Knative Service nyob rau lub sijhawm tiag tiag los ntawm tus naj npawb ntawm cov pods khiav rau qhov muab kho dua, raws li qhia hauv Fig. 8.

Serverless daim ntawv thov tau sai thiab yooj yim dua nrog OpenShift
Rice. 8. Knative Service tsheb faib.

Saib tob tob ntawm Serverless Revisions

Tsis tas li ntawd, Topology saib tam sim no tso cai rau koj los saib ntau qhov tob hauv qhov kev xaiv kho dua tshiab, piv txwv li, pom sai sai rau tag nrho nws cov pods thiab, yog tias tsim nyog, saib lawv cov cav. Tsis tas li ntawd, hauv qhov kev pom no koj tuaj yeem yooj yim nkag mus rau qhov kev hloov kho kev xa tawm thiab kev teeb tsa, nrog rau txoj hauv kev uas taw qhia ncaj qha rau qhov kev hloov kho, raws li qhia hauv daim duab 9. XNUMX:

Serverless daim ntawv thov tau sai thiab yooj yim dua nrog OpenShift
Rice. 9. Cov peev txheej cuam tshuam nrog kev tshuaj xyuas.

Peb cia siab tias cov kev tsim kho tshiab tau piav qhia saum toj no yuav muaj txiaj ntsig zoo rau koj thaum tsim thiab tswj cov ntawv thov tsis muaj server, thiab cov ntawv yav tom ntej yuav suav nrog cov yam ntxwv tseem ceeb tshaj rau cov neeg tsim khoom, piv txwv li, muaj peev xwm tsim cov xwm txheej thiab lwm yam.

txaus siab?

Sim OpenShift!

Cov lus teb tseem ceeb rau peb

Qhia rau kuvkoj xav li cas txog serverless. Koom nrog peb pawg Google OpenShift Developer Experience los koom nrog hauv Office Sijhawm kev sib tham thiab kev cob qhia, koom tes nrog peb thiab muab cov lus qhia thiab cov lus qhia.

Yog xav paub ntxiv,

Tshawb nrhiav ntxiv hais txog kev tsim cov ntawv thov OpenShift siv Red Hat cov peev txheej hauv qab no:

Tau qhov twg los: www.hab.com

Ntxiv ib saib