OpenShift Advent Calendar 2022 18æ¥ç® ã®æ稿ã§ãã
ããã«ã¡ããRed Hatã§OpenShiftã®Solution Architectãæ
å½ãã¦ããåå±± ( @spchilden ) ã§ãã
ãã¦ä»æ¥ã¯ãæ¢åã¢ããªãKubernetesã¸ã®ãããã¼ã±ã¿ã
ã±ã¿ã
ããã«ã¤ãã¦èªãããã¨æãã¾ãã
大äºãªãã¨ãªã®ã§å
ã«ãä¼ããã¦ããã¨ã12/21 - 12/23ã¨ã³ã¼ãã§ã©åç¾Liveãããã®ã§æ¯éåå ãã¾ãããã
ãSpecial Live 2022 -Back To Coachella-ã
ã¤ãåã³æ±ãããããTwelve-Factor Appã
ãã¦ããã®1å¹´OpenShiftãã¸ãã¹ã«æºãã£ã¦ããã¨ãã¢ãã³ãªã¯ã©ã¦ããã¤ãã£ãã¢ã¼ããã¯ãã£ã¨ãããããæ¢åã¢ããªã±ã¼ã·ã§ã³ã®ã³ã³ããåããå§ãã¦ããã¦ã¼ã¶ã¼ããã¨ä¼è©±ããã¦ãããæ©ä¼ã大ããå¢ãã¾ããã
ãããã«ã³ãã¥ããã£çéã§ã¯ãã¤ã¯ããµã¼ãã¹åãæ¨é²ãããããKafkaã使ã£ããã¼ã¿ã¹ããªã¼ãã³ã°ãChange Data Captureãæ´»ç¨ãããã¼ã¿ç§»è¡ãªã©ã主æµã§ãããç¾å ´ã§ã¯ãã¾ãä»ããã¢ããªã±ã¼ã·ã§ã³ãã¾ãã¯ã³ã³ããã«å¤ãã¦ãããã¨ããå§ãã¦ããã¦ã¼ã¶ã¼ããã大åãªæ°ããã¦ãã¾ããããããReplatformãã¨å¼ãã§ãããã¾ãã
2022/11ã«éå¬ãããCNDT 2022(Cloud NataiveDays Tokyo)ã§ãå°ããã®ä»¶ã«ã¤ãã¦è§¦ãããã¦ããã ãã¾ããã
ãªãããã°ã¤ã³ããã¨åç»ãè¦ãã¾ãã®ã§æ¯éã
Kubernetesã®å©ç¨ã浸éãã¦ãã¦ããä¸æ¹ã§ãã¨ããããæ¢åã®ä»®æ³ãã·ã³ä¸ã§åãã¦ããã¢ããªã±ã¼ã·ã§ã³ãã³ã³ããåããã°ããã¨ããçºæ³ã¯åé¿ããªãã¨ããã¾ããã
ã¤ã¾ããKubernetesã§ã¢ããªã±ã¼ã·ã§ã³ãåããããã«ã¯ããã®ããã»ã¹ã¯ãã¯ããTwelve-Factor Appãã«å¾ã£ã¦Replatformãããã¹ãã§ããããããªãã¨ãKubernetesä¸ã§éç¨ãã¦ãã¦ãéç¨ã®è¤éããå¢ãã°ããã§ãçµæã¨ãã¦ã³ã³ããå°å
¥ã¡ãªãããæããããªããªãã¾ãã
ãã ãããããã
è¨ãã¯æãè¡ãã¯é£ãã
å
¨é¨ã¢ããªã±ã¼ã·ã§ã³æ¹ä¿®ããäºç®ããã¦ãã¦ãããã°è¯ãã®ã§ãããããè¨ã£ã¦ãããªãã®ãã¨ã³ã¿ã¼ãã©ã¤ãºã®ä¸çã
ããããéçºè
ããã®æ©ã¿ã«å¿ããã®ããKonveyor Tackleãã§ãã
Konveyor Tackleã®æ¦è¦
ãKonveyor Tackleãã¨ã¯ãKubernetesã¸ã®ã¢ããªã±ã¼ã·ã§ã³ã®ReplatformãRefactoringãè©ä¾¡ãåªå
é ä½ä»ããã¦ãããããã¸ã§ã¯ãã§ãã
ã¯ããã¦ãã®ååãèãæ¹ãããã£ãããããããã¾ããããå®ã¯CNCFã«ãJOINãã¦ãããªã¼ãã³ã½ã¼ã¹ããã¸ã§ã¯ãã§ãã
ãã¾ã®ã¨ããJavaã¢ããªã±ã¼ã·ã§ã³ã対象ã¨ããã³ã³ããåã®è©ä¾¡ããããªã£ã¦ãã¾ãããã¢ããªã±ã¼ã·ã§ã³ä»¥å¤ã«ãããã¤ãã®ç§»è¡ãã¼ã«ãç¨æããã¦ãã¾ãã
ããã¸ã§ã¯ã | æ¦è¦ |
---|---|
Tackle Application Inventory | ã¢ããªã±ã¼ã·ã§ã³ã®è©ä¾¡(Tackle Pathfinder) ããã³åæ(windup)ã¸ã®ã²ã¼ãã¦ã§ã¤ |
Tackle Pathfinder | Kubernetesä¸ã«ã¢ããªããããã¤ããããã®é©åæ§ãè©ä¾¡ããã¢ã³ã±ã¼ããã¼ã¹ã®ãã¼ã« |
Tackle Controls | Application Inventoryã¨Pathfinderã®è©ä¾¡ã«ã¨ã³ãã£ãã£ãä»ãã¦ç®¡çãããã¼ã« |
Tackle Container Advisor | èªç¶è¨èªå¦çã使ç¨ãã¦ãã¢ããªã±ã¼ã·ã§ã³ã®è¨è¿°ãåæããã¢ããªã±ã¼ã·ã§ã³ãã³ã³ããåããã®ã«æé©ãªã³ã³ããã¼ã¤ã¡ã¼ã¸ãææ¡ |
Tackle Data Intensive Validity Advisor (DiVA) | ã¢ããªã±ã¼ã·ã§ã³ã®ãã¼ã¿ ã¬ã¤ã¤ã¼ãåæãããã¾ãã¾ãªãã¼ã¿ ã¹ãã¢ãåæ£ãã©ã³ã¶ã¯ã·ã§ã³ã¸ã®ä¾åé¢ä¿ãæ¤åº |
Tackle-DiVA Database Operator Adaption (DiVA-DOA) | Kubernetesã®ãããã§ã¹ã(YAML)ãçæãã¦ãã¬ã¬ã·ã¼DBMSã·ã¹ãã ã使ç¨ããã¢ããªã±ã¼ã·ã§ã³ããHA DB ã¯ã©ã¹ã¿ã¼ã§åä½ã§ããããã«ç§»è¡ãæ¯æ´ |
Tackle Test Generator | ã¢ããã¤ãºãããå¾ã®ã¢ããªã±ã¼ã·ã§ã³ãåãããã«åä½ãã¦ãããã¨ãç¢ºèª |
Tackle Data Gravity Insights | ã¢ããªã·ãã¯ã¢ããªã±ã¼ã·ã§ã³ã®ã³ã¼ããæ´å¯ãããã¡ã¤ã³é§ååãã¤ã¯ããµã¼ãã¹ã«ãªãã¡ã¯ã¿ãªã³ã°ãæ¯æ´ |
ãã£ã±ãããã¾ããã
ä»åã¯ãã®ä¸ããã¢ããªã±ã¼ã·ã§ã³ã®åæ(windup)ããç´¹ä»ãã¾ãã
Konveyor Tackleã®ã¤ã³ã¹ãã¼ã«
ä»åã¯ãTackle Operatorããæ´»ç¨ãã¦ãTackle v2()ãOpenShift v4.11ä¸ã«ã¤ã³ã¹ãã¼ã«ãã¾ãã
äºåæºå
Tackleãã¤ã³ã¹ãã¼ã«ããã«ã¯ãåè¨5ã¤ã®æ°¸ç¶ããªã¥ã¼ã (PV) ãå¿ è¦ã§ããPVC ãä»ãã¦3ã¤ã® RWO ããªã¥ã¼ã ã¨2ã¤ã®RWX ããªã¥ã¼ã ãè¦æ±ããã¾ãã
Name | Default Size | Access Mode | Description |
---|---|---|---|
hub database | 5Gi | RWO | Hub DB |
hub bucket | 100Gi | RWX | Hub file storage |
keycloak postgresql | 1Gi | RWO | Keycloak backend DB |
pathfinder postgresql | 1Gi | RWO | Pathfinder backend DB |
maven | 100Gi | RWX | maven m2 repository |
ããã§æ¸æã£ã¡ããã®ããRWXããªã¥ã¼ã ãâ¦æ®éç¡ãã§ãããã
ã¨ãããã¨ã§ãäºåã«ä¸è½ã¹ãã¬ã¼ã¸ãOpenShift Data Fundation(ODF)ããã¤ã³ã¹ãã¼ã«ãã¦ããã¾ãã
(1) Operator HubãããODFããæ¤ç´¢ãã¦ã¤ã³ã¹ãã¼ã«
(2) Operatorã®Subscriptionãå®ç¾©ãã¦ã¤ã³ã¹ãã¼ã«å®è¡
詳細ã¯ãã¡ã
第2章 動的ストレージデバイスを使用した OpenShift Data Foundation のデプロイ Red Hat OpenShift Data Foundation 4.11 | Red Hat Customer Portal
失æããªãããã®ç§è¨£ã¯ãInstallå¾ã«å¾
ã¤ãã¨ãODFã¯æ§ã
ãªã³ã³ãã¼ãã³ãããåºæ¥ã¦ããããããInstalledãã®è¡¨è¨ã«é ¼ããå¿èå¼·ãå¾
ã¡ã¾ãããã
(3) CustomResource(Storage System)ã®ä½æ
Operatorã®ã¤ã³ã¹ãã¼ã«ãçµãã£ãããä»åº¦ã¯CR(Storage System)ãä½æãã¦ODFã¯ã©ã¹ã¿ãä½ãã¾ãã
詳細ã¯ãã¡ã
2.4. OpenShift Data Foundation クラスターの作成 Red Hat OpenShift Data Foundation 4.11 | Red Hat Customer Portal
ä»åã¯ä»¥ä¸ã®CRå 容ã§æ¤è¨¼ãã¾ãããCRãä½æããå¾ãå¿èå¼·ãå¾ ã¡ã¾ãããã
**Backing storage** Deployment type: Full deployment Backing storage type: gp2 **Capacity and nodes** Cluster capacity: 2 TiB Selected nodes: 3 node CPU and memory: 48 CPU and 181.7 GiB memory Zone: 1 zone Taint nodes: Disabled Security and network Encryption: Disabled Network: Default (SDN)
(4) ODFã¯ã©ã¹ã¿ã®ç¢ºèª
OpenShiftãã¼ã¿ã«ã®Administrator Perspectiveãã[Storage]>[Data Fundation]ãé¸æãã以ä¸ã®è¡¨è¨ã«å¤ããã°ã¯ã©ã¹ã¿ä½æã¯å®äºã§ãã
ODFã¯ã©ã¹ã¿ãç«ã¡ä¸ãã£ã¦ãã®ããªã¥ã¼ã ãå©ç¨ã§ããã¾ã§10åãããå¾
ã¡ã¾ãã
Tackle Operatorã®ã¤ã³ã¹ãã¼ã«
ããªã¥ã¼ã ãç¨æã§ãããã次ã«Tackle Operatorãã¤ã³ã¹ãã¼ã«ãã¦ããã¾ãã
詳細ã¯ãã¡ã
GitHub - konveyor/tackle2-operator: Tackle Operator fully manages the deployment and life cycle of Tackle on Kubernetes and OpenShift.
(1) Operator HubãããTackle Operatorããæ¤ç´¢ãã¦ã¤ã³ã¹ãã¼ã«
(2) Operatorã®Subscriptionãå®ç¾©ãã¦ã¤ã³ã¹ãã¼ã«å®è¡
(3) CustomResource(Tackle)ã®ä½æ
Tackle Operatorã«ã¯ãCR(Tackle)ã®ä½æå¿
é ã§ããOperatorã®ã¤ã³ã¹ãã¼ã«ä½æ¥ãçµããã¨ããã«ä½ãããã«æ±ãããã¾ãã
ã¾ããé常éã[Operaors]>[Installed Operators]ãããTackle Operatorããé¸æãã[Tackle]ã¿ãã«ãããCreate Tackleããããè¨å®ãå¯è½ã§ãã
ããã§æ³¨æãããã¨ã¯ãå
ã»ã©ä½æããODFã®é åãRWXã¹ãã¬ã¼ã¸é åã¨ãã¦å²ãå½ã¦ããã¨ã§ããé常ã§ããã°ãã©ã¼ã ããä½æãã¾ããããã©ã¼ã ã«ã¹ãã¬ã¼ã¸ãè¨å®ããé
ç®ããªãããä»åã¯YAMLå½¢å¼ã§CRãè¨è¼ãã¦ãã ããã
CRã«ã¯ãhub_bucket_storage_class
ã«ODFã§ä½æãããRWXã®ã¹ãã¬ã¼ã¸ã¯ã©ã¹(ocs-storagecluster-cephfs
)ãè¨å®ãã¾ãã
ãªããCRã®è©³ç´°ã¯ãã¡ãããã確èªä¸ããã
apiVersion: tackle.konveyor.io/v1alpha1 kind: Tackle metadata: name: tackle namespace: konveyor-tackle spec: feature_auth_required: 'true' hub_bucket_volume_size: "50Gi" hub_bucket_storage_class: "ocs-storagecluster-cephfs" cache_data_volume_size: "50Gi"
(4) Tackle UIã®ç¢ºèª
CR(Tackle)ã«ãã£ã¦ã¤ã³ã¹ãã¼ã«ãçµããã¨ãProject[konveyor-tackle]ã®Routeã«Tackle UIã¸ã®æ¥ç¶URLãæãåºããã¾ãã
OpenShiftãã¼ã¿ã«ã®Administrator Perspectiveãã[Networking]>[Routes]ãé¸æãã[Tackle]ã®URLã«ãã©ã¦ã¶ããæ¥ç¶ãã¦ä»¥ä¸ã表示ããããå®äºã§ãã
ããã§ã®ããã©ã«ãã®ã¦ã¼ã¶ã¼åã¨ãã¹ã¯ã¼ãã¯ä»¥ä¸ã®ã¨ããã§ãã
Username: admin
Password: Passw0rd!
ãã°ã¤ã³ããã¨ãå§ãã«ãã¹ã¯ã¼ãã®å¤æ´ãæ±ãããã¾ãã
Tackle Controlsã«ããã¨ã³ãã£ãã£ç»é²
Tackleã®ãã¼ã¿ã«ã«ã¯ãApplication InventoryããReportsããControlsãã表示ããã¾ããã¾ãã¯ãTackle Controlsãããè©ä¾¡å¯¾è±¡ã®æ§æè¦ç´ ãä½æãã¦ããã¾ãã
Tackle Controlsã¯Application Inventoryã§å©ç¨ãããã¨ã³ãã£ãã£ã®ç®¡çã§ãããããã¯Stakeholders(å©å®³é¢ä¿è
)ãStakeholder groups(å©å®³é¢ä¿è
ã°ã«ã¼ã)ãJob functions(è·å)ãBusiness Service(ãã¸ãã¹ãµã¼ãã¹)ãTags(ã¿ã° ã¿ã¤ã)ã§æ§æããã¦ãã¾ãã
ä»åã¯ãµã³ãã«ã®ã¢ããªã±ã¼ã·ã§ã³ç»é²ã®ãããå¿ è¦ããªãå ´åã¯ãã¨ã³ãã£ãã£ç»é²ãã¯ä¸æ¦ã¹ããããã¦ããã ãã¦ãæ§ãã¾ããã
(1) Stekeholders(å©å®³é¢ä¿è )ã®ç»é²
対象ã¢ããªã±ã¼ã·ã§ã³ã«æºããé¢ä¿è ã¨ãã®å±æ§ãç»é²ãã¾ããTackle Controlsã®[Stakeholders] ã¿ããã[Create new] ãé¸æãã¦æ å ±ãç»é²ãã¾ãã
(2) Stekeholder groups(å©å®³é¢ä¿è ã°ã«ã¼ã)ã®ç»é²
次ã«å½¼ãã®ã°ã«ã¼ããç»é²ãã¾ããTackle Controlsã®[Stakeholder groups] ã¿ããã[Create new] ãé¸æãã¦æ å ±ãç»é²ãã¾ãã
å¿ è¦ã«å¿ãã¦ãå ç¨ç»é²ããStakeholdersãã¡ã³ãã¼ã«å ãã¦ããã¾ãã
(3) Business Service(ãã¸ãã¹ãµã¼ãã¹)ã®ç»é²
次ã«ãã¸ãã¹ãµã¼ãã¹åãç»é²ãã¾ããTackle Controlsã®[Business Service] ã¿ããã[Create new] ãé¸æãã¦æ å ±ãç»é²ãã¾ãã
å¿
è¦ã«å¿ãã¦ãå
ç¨ç»é²ããStakeholdersãã¡ã³ãã¼ã«å ãã¦ããã¾ãã
以ä¸ã§æå°ã®ç»é²ã¯å®äºã§ãã
Windupã«ãããAnalyze(åæ)ã
次ã«Windupã使ã£ã¦ã¢ããªã±ã¼ã·ã§ã³ãåæãã¦ã¿ã¾ãããã
Application Inventryã¯ãTackle Pathfinderã«ããè©ä¾¡(Assessment)ã¨Windupã«ããåæ(Analysis)ã®ã¤ã³ã¿ã¼ãã§ã¤ã¹ã§ããåæ¹è¡ãã¾ãããä»åã¯åæã®æ¹ãç´¹ä»ãã¾ãã
(1) Applicationã®ç»é²
ã¾ãã¯ãTackle Application Inventryã®[Analysis]ã¿ããã[Create new]ãé¸æãã¦ä»¥ä¸ã®æ å ±ãç»é²ãã¾ãã
Name: Customer
Description: Legacy Customers management service
Business Service: Retail
Tags: Tomcat
, Java
Applicationã®ç»é²ãå®äºããã¨Application Inventoryã®ãã¼ã¸ã«ä¸åº¦æ»ãã¾ãã[Assessment]ã[Analysis]ã®åæ¹ã«Applicationãç»é²ããã¦ããã°å®äºã§ãã
(2) Analysis(åæ)ã®éå§
Tackle Application Inventryã®[Analysis]ã¿ãããç»é²ããApplicationãé¸æãã[Analysis]ãã¿ã³ãæ¼ãã¾ãã
(3) Analysis Mode
ç«ã¡ä¸ãã£ããããã¢ããããAnalysisã®å¯¾è±¡ãç»é²ãã¾ãã
ããã§ã¯ãã¼ã«ã«ã®ãµã³ãã«ãã¢ãããã¼ããããããUpload a local binaryããé¸æãã¦ãã ããã
ãµã³ãã«ã«ä½¿ç¨ãããã¤ããªãã¡ã¤ã«(.war)ã¯ãäºåã«ãããããã¦ã³ãã¼ããã¦ããã¾ãã*1
ãã¦ã³ãã¼ãããcustomers-tomcat.war
ãã¡ã¤ã«ããã©ãã°ã¢ã³ããããããããããã¼ã«ã« ãã¡ã¤ã« ã·ã¹ãã ããã¢ãããã¼ããã¾ãã
ã¢ãããã¼ããå®äºããã¾ã§ãããããæ°ç§ãããã¾ãããSuccess: Uploaded binary file.ãã®è¡¨ç¤ºãåºãã¾ã§å°ãå¾ ã¡ã¾ããããç»é²ãå®äºããããNextããæ¼ãã¦æ¬¡ã«è¡ãã¾ãã
(4) Set Targets
次ã¯å¤æå
ã®ã¿ã¼ã²ãããªãã·ã§ã³ã表示ããã¾ããããã§ã¯ã移è¡ãããã¯ããã¸ã¼ãé¸æãã¾ãã
ãµã³ãã«ã¯ Linuxã³ã³ãããã¿ã¼ã²ããã¨ãã¦ãç¬èªJDKãã£ã¹ãã¼ã·ã§ã³ã®ä¾åãåãé¤ããããContainerization
ãLinux
ã OracleJDK to OpenJDK
ãã¿ã¼ã²ããã¨ãã¦é¸æãã¾ãã
ç»é²ãå®äºããããNextããæ¼ãã¦æ¬¡ã«è¡ãã¾ãã
(5) Application Scope
診æããã¢ããªã±ã¼ã·ã§ã³ã«é¢ããä¾åé¢ä¿ã®ã¹ã³ã¼ããé¸ã¹ã¾ãã
ä»åã¯ã¢ããªã±ã¼ã·ã§ã³å
é¨ã®ã©ã¤ãã©ãªã ãã§è¯ããããApplication and internal dependencies only
ãé¸æãã¦ãã ããã ãã
ãããç»é²ãå®äºããããNextããæ¼ãã¦æ¬¡ã«è¡ãã¾ãã
(6) Application Scope
åæã«ã¯ãã«ã¹ã¿ã ã«ã¼ã«ã¨ã³ã¸ã³ã使ç¨ããã¦ããã移è¡ã¿ã¼ã²ããã«å¿ãã¦å¤ãã®ã«ã¼ã«ãä»å±ããã¦ãã¾ãã
ã¾ãã«ã¹ã¿ã ã«ã¼ã«ãXMLã§ç¬èªã«ä½æãããã¨ã§æ¡å¼µãå¯è½ã§ãã
ããã§ã¯ã¢ããªã§ä½¿ç¨ããã¦ããç¹å®ã®ã©ã¤ãã©ãªã®ä½¿ç¨ãæ¤åºããåé¤ãææ¡ããã«ã¹ã¿ã ã«ã¼ã«ãæä¾ãã¦ã¿ã¾ãã
ãµã³ãã«ã«ä½¿ç¨ããã«ã¹ã¿ã ã«ã¼ã«ãã¡ã¤ã«(.xml)ã¯ãäºåã«ãããããã¦ã³ãã¼ããã¦ããã¾ãã *2
ãã¦ã³ãã¼ãããã«ã¹ã¿ã ã«ã¼ã«ãã¡ã¤ã«ããã©ãã° ã¢ã³ã ãããããããããã¼ã«ã« ãã¡ã¤ã« ã·ã¹ãã ããã¢ãããã¼ããã¾ãã
ã«ã¹ã¿ã ã«ã¼ã«ã®ç»é²ã確èªã§ããããNextããæ¼ãã¦æ¬¡ã«è¡ãã¾ãã
(7) Options
åæã微調æ´ããããã®ãªãã·ã§ã³ã表示ããã¾ãããä»åã¯ããã©ã«ãã®ã¾ã¾ä½¿ç¨ãã¾ãã ãNextããæ¼ãã¦æ¬¡ã«è¡ãã¾ãã
(8) Reviews
æå¾ã«å ¨ä½ã®ç¢ºèªãè¡ãã¾ããããã¾ã§ç»é²ã§ããã¨ä»¥ä¸ã表示ããã¦ãã¾ãã
Review analysis details Review the information below, then run the analysis. Applications: Customer Mode: Upload a local binary Targets: - openjdk - linux - cloud-readiness Sources: - java Scope: Application and internal dependencies Included packages: Excluded packages: Custom rules: - corporate-framework-config.windup.xml Excluded rules tags: Transaction Report: Disabled
確èªãã¦åé¡ããªããã°[Run]ãæ¼ãã¦åæãå®è¡ãã¾ãã
åæãå®è¡ããåã«ãWindupç¨ã®ã³ã³ããã¤ã¡ã¼ã¸ããã«ããå¿
è¦ããããããåæã«ã¯æ°åãããå ´åãããã¾ãã
Windupã«ãããAnalyze(åæ)ãçµæã¬ãã¼ã
ã¬ãã¼ããå®æãããããªã³ã¯ãã¯ãªãã¯ãã¦ã¬ãã¼ãã«ã¢ã¯ã»ã¹ããã¢ããªã±ã¼ã·ã§ã³(customers-tomcat.war)ãã¯ãªãã¯ãã¾ãã
ã¬ãã¼ãã®Dashboardã«ã¯ã¢ããªã±ã¼ã·ã§ã³ã使ç¨ãããã¯ããã¸ãä¾åé¢ä¿ãªã©ããããæ
å ±ãæä¾ããã¾ãããä¿®æ£ãå¿
è¦ãªç¹ã¯ãIssuesãã¿ãã«è¨è¼ããã¦ãã¾ãã
å¿
é ã®ä¿®æ£ç®æã¯ä»¥ä¸ã®4件ã§ãã
- Legacy configuration - 2件
- Hard coded IP address - 1件
- File system - Java IO - 1件
ããããã®ãªã³ã¯ã辿ããªãããç°¡åã«è©³ç´°ãè¦ã¦ããã¾ãããã
(1) Legacy configuration
ããã¯å ç¨ã«ã¹ã¿ã ã«ã¼ã«ã§å®ç¾©ãã課é¡ãã½ã¼ã¹ã³ã¼ãããè¦ã¤ãã£ããã¨ã示ãã¦ãã¾ãã
å
容ã¨ãã¦ã¯ãå¾æ¥ã®ApplicationConfigurationã¯ã©ã¹ã使ç¨ããã¦ãããã¨ãææããã¦ãã¾ããSpringã®@PropertySource
ã¢ããã¼ã·ã§ã³ã¨Environment
ã¯ã©ã¹ã使ç¨ããã¢ããã¼ãã«ç½®ãæããããæ¨å¥¨ããã¦ãã¾ãã
Kubernetesãå©ç¨ããã¢ããªã±ã¼ã·ã§ã³ã§ã¯ãå
é¨ã§ãã©ã¡ã¼ã¿è¨å®ãè¡ãã®ã§ã¯ãªãConfigMapãSecretãªã©ã§ç°å¢å¤æ°ã¨ãã¦åãæ±ããã¨ãæ¨å¥¨ããã¦ãã¾ãã
åé ã®CNDT 2022ã®è³æã¨ãåããã¦ç¢ºèªãã¦ãã ããã
(2) Hard coded IP address
次ã¯ãã½ã¼ã¹ã³ã¼ãã«DBã«æ¥ç¶ããããã®IPã¢ãã¬ã¹ãå®ç¾©ããã¦ãããã¨ãææããã¦ãã¾ãã
ããããã£ãã¡ã¤ã«(WEB-INF/classes/persistence.properties)ã«ãã¢ãã¬ã¹ãè¨è¼ããã¦ãããããKubernetesã§ã¯ãµã¼ãã¹åãªã©ã«ç½®ãæããå¿ è¦ãããã¾ãã
(3) File system - Java IO
æå¾ã¯ãã¼ã«ã«ã«ããããããã£ãã¡ã¤ã«(/opt/config/persistence.properties)ãå¼ã³åºãã¦ãããã¨ãææããã¦ãã¾ãã
Kubernetesä¸ã§ã¯ãã¼ã«ã«ãã¹ãã«ç½®ããããã¡ã¤ã«ããã¦ã³ããããã¨ã¯æ¨å¥¨ããã¦ããªããããConfigMapãªã©ãæ´»ç¨ãã¦è¨å®æ å ±ãåãæ±ã£ã¦ãã ããã
ã¾ã¨ã
Konveryor Tackleãããã§ããã§ãããããä»åã¯ç°¡åãªã¢ããªã±ã¼ã·ã§ã³ã診æã«ããã¦ã¿ã¾ããã
ã¯ã©ã¦ããã¤ãã£ãã«ãã¤ã¯ããµã¼ãã¹åãããã¨ãéè¦ãªãã¨ã§ã¯ããã¾ãããã¾ãã¯Replatformã«ãã£ã¦ã³ã³ããåããã¨ããããå§ãã¦ã¿ã¾ãããã
ãã®é¸æè¢ã®ä¸ã¤ã¨ãã¦ãKonveryor Tackleã使ã£ã¦ã¿ã¦ã¯ãããã§ããããã
æå¾ã«ã大äºãªãã¨ãã ä¸åº¦ãä¼ããã¦ããã¨ã12/21 - 12/23ã¨ã³ã¼ãã§ã©åç¾Liveãããã®ã§æ¯é楽ãã¿ã¾ãããã ãSpecial Live 2022 -Back To Coachella-ã
*1:ããã¯ãRed Hat Modern Application Development Workshopã§å©ç¨ãããåæç¨ã®ãµã³ãã«ãã¡ã¤ã«ã§ãã
*2:ããã¯ãRed Hat Modern Application Development Workshopã§å©ç¨ãããåæç¨ã®ãµã³ãã«ãã¡ã¤ã«ã§ãã