Menyesuaikan rencana migrasi untuk workload WebSphere
Sebelum memulai
Dokumen ini mengasumsikan bahwa Anda telah membuat migrasi dan memiliki file rencana migrasi.
Mengedit rencana migrasi
Setelah menyalin sistem file dan menganalisisnya, Anda dapat menemukan
rencana migrasi di direktori baru yang dibuat di jalur output
yang ditentukan: ANALYSIS_OUTPUT_PATH/config.yaml.
Edit rencana migrasi sesuai kebutuhan dan simpan perubahan.
Tinjau detail rencana migrasi dan komentar panduan untuk menambahkan informasi sesuai kebutuhan.
Secara khusus, pertimbangkan pengeditan di sekitar bagian berikut.
Struktur rencana migrasi
Rencana migrasi untuk workload WebSphere memiliki struktur berikut, yang dapat Anda sesuaikan seperti yang dijelaskan di bagian berikut.
# List of discovered WebSphere application servers and how to migrate their
# hosted applications to containers.
webSphereApplicationServers:
# The application server installation path.
- home: /opt/ibm/wlp
  applicationServerInfo:
    name: WebSphere Application Server
    profile: Liberty
    version: 23.0.0.4
    edition: Base
    # List of Java installations available to the application server.
    javaDevelopmentKits:
    - home: /opt/ibm/java
      vendor: IBM Corporation
      version:
        jdk: java version 1.8.0_361
        jre: Java(TM) SE Runtime Environment
        jvm: IBM J9 VM
  # List of hosted applications and how to migrate them to containers.
  applications:
  - path: /opt/ibm/wlp/usr/servers/defaultServer/apps/app.war
    # Application archives to be migrated into the target container.
    archives:
    - /opt/ibm/wlp/usr/servers/defaultServer/apps/app.war
    # Application configuration files to be migrated into the target container.
    configurations:
      serverXML: /opt/ibm/wlp/usr/servers/defaultServer/server.xml
      serverEnv:
      - /opt/ibm/wlp/usr/servers/defaultServer/server.env
      bootstrapProperties:
      - /opt/ibm/wlp/usr/servers/defaultServer/bootstrap.properties
      variableProperties:
      - /opt/ibm/wlp/usr/servers/defaultServer/variables/variable.properties
      jvmOptions:
      - /opt/ibm/wlp/usr/servers/defaultServer/jvm.options
    # Application resource files to be migrated into the target container.
    resources:
      locations:
      - /opt/ibm/wlp/usr/servers/defaultServer/resources/ports.xml
      libraries:
      - /opt/ibm/wlp/usr/servers/defaultServer/resources/postgresql.jar
      keystores:
      - /opt/ibm/wlp/output/defaultServer/resources/security/key.p12
      sharedResources:
        - /opt/ibm/wlp/usr/shared/resources/jdbc.jar
      additionalResources:
      - /opt/ibm/wlp/output/defaultServer/resources/mongodb.jar
    javaRuntime:
      se: SE8
      ee: EE7
      vendor: IBM Corporation
    targetJavaRuntime:
      se: SE8
      ee: EE7
      vendor: IBM Corporation
    targetApplicationServer:
      profile: Liberty
      version: 23.0.0.4
      edition: Base
    targetContainer:
      # The target container base image name.
      baseImage: ibmcom/websphere-liberty:full-java8-ibmjava-ubi
      # The application server installation path within the target container
      # base image.
      home: /opt/ibm/wlp
      # The application server default server name.
      server: defaultServer
      # The UID or name of the user configured within the target container
      # base image. Defaults to 1001 for Liberty profile.
      user: "1001"
      # The GID or name of the group configured within the target container
      # base image. Defaults to 0 for Liberty profile.
      group: "0"
      # Application ports to be exposed in Kubernetes artifacts.
      ports:
      - name: http-tcp-9080
        port: 9080
        protocol: TCP
      - name: https-tcp-9443
        port: 9443
        protocol: TCP
      # Specify whether discovered keystores are automatically converted to
      # Kubernetes secrets. Defaults to true.
      enableSecrets: true
Mengecualikan aplikasi
Untuk mengecualikan aplikasi dari migrasi, hapus aplikasi tersebut dari daftar applications.
  applications:
  # Exclude app1.war:
  # - path: app1.war
  #  ...
  - path: app2.war
Mengontrol file aplikasi
Untuk mengontrol file aplikasi yang disertakan atau dikecualikan dari migrasi,
perbarui kolom configurations dan resources.
  applications:
  - path: app.war
    resources:
      keystores:
      # Exclude key1.p12:
      # - key1.p12
      # Include key2.p12:
      - key2.p12
      additionalResources:
      # Exclude resource1.xml:
      # - resource1.xml
      # Include resource2.xml:
      - resource2.xml
Menyesuaikan runtime Java target
Untuk menyesuaikan runtime Java target untuk aplikasi, perbarui kolom targetJavaRuntime.
  applications:
  - path: app.war
    targetJavaRuntime:
      se: SE
      ee: EE
      vendor: VENDOR
Ganti kode berikut:
- SE: versi Java SE. Format: [SE8|SE11|SE17].
- EE: versi Java EE atau Jakarta EE. Format: [EE7|EE8|EE9|EE10].
- VENDOR: vendor Java. Format: [IBM Corporation|Oracle Corporation].
Menyesuaikan server aplikasi target
Untuk menyesuaikan server aplikasi target untuk aplikasi, perbarui kolom targetApplicationServer.
  applications:
  - path: app.war
    targetApplicationServer:
      profile: PROFILE
      version: VERSION
      edition: EDITION
Ganti kode berikut:
- PROFILE: profil WebSphere. Format: [Liberty|Traditional].
- TARGET_VERSION: versi WebSphere.
- TARGET_EDITION: edisi WebSphere. Format: [Base|Core|Open|ND].
Menyesuaikan penampung target
Untuk menyesuaikan penampung target yang akan digunakan untuk aplikasi, perbarui kolom targetContainer.
  applications:
  - path: app.war
    targetContainer:
      baseImage: BASE_IMAGE
      home: HOME
      server: SERVER
      user: USER
      group: GROUP
Menyesuaikan secret Kubernetes
Secara default, file yang tercantum di kolom keystores dimigrasikan ke secret
Kubernetes. Untuk memigrasikan file ini apa adanya, Anda dapat menonaktifkan fitur ini.
  applications:
  - path: app.war
    resources:
      keystores:
      - key.p12
    targetContainer:
      # Do not migrate keystores to Kubernetes secrets:
      enableSecrets: false
Menyesuaikan port Kubernetes
Untuk mengontrol port yang diekspos oleh Pod dan Layanan Kubernetes, perbarui kolom ports.
  applications:
  - path: app.war
    targetContainer:
      ports:
      # Exclude http-tcp-9080:
      # - name: http-tcp-9080
      #   port: 9080
      #   protocol: TCP
      # Include https-tcp-9443:
      - name: https-tcp-9443
        port: 9443
        protocol: TCP
Langkah selanjutnya
- Pelajari cara menjalankan migrasi.