Mengelola proyek analisis
Gunakan bobctl understand cli untuk mengelola proyek analisis Z Understand dan menyalin file sumber ke dalam workload.
Perintah bobctl understand cli menyediakan antarmuka command-line untuk mengelola proyek analisis. Perintah ini menjalankan perintah di dalam pod Z Understand langsung dari lingkungan lokalmu.
./bobctl understand cli| Flag | Deskripsi |
|---|---|
-a | Membuka sesi shell bash interaktif di dalam pod Z Understand. |
<args> | Argumen yang diteruskan langsung ke skrip cli-tunnel.sh yang berjalan di dalam pod Z Understand. |
Contoh umum:
./bobctl understand cli --list-projects # daftar proyek
./bobctl understand cli -b MyProject # build proyek
./bobctl understand cli -c COBOL.ini MyProject # buat proyek dari file inisialisasi
./bobctl understand cli -si -api-key <key> MyProject # buat semantic index
./bobctl understand cli -doc -api-key <key> MyProject # buat dokumentasi
./bobctl understand cli -a # buka shell interaktifMembuat proyek dari file ini
Flag -c mengharuskan file .ini sudah ada di direktori proyek pod. Contoh file .ini disediakan di subdirektori samples.
Buka shell interaktif di dalam pod Z Understand:
oc exec -it <pod-name> -n <instance-namespace> -- bashSalin contoh file .ini ke direktori proyek:
cp "/bobz-understand/storage/IBM Application Discovery Build Client CLI/config/projects/samples/new_proj_db2.ini" \
"/bobz-understand/IBM Application Discovery Build Client CLI/config/projects/new_proj_db2.ini"Saat menggunakan Db2 sebagai database proyek, file .ini harus menentukan nilai DBName yang unik. Setiap proyek memerlukan DBName tersendiri. Jika nilai yang ada digunakan kembali, pembuatan proyek akan diblokir. Buka file .ini yang telah disalin dan tetapkan nilai unik ke DBName sebelum melanjutkan.
Untuk proyek SQL Server, parameter DBName tidak diperlukan dalam file .ini. Nama proyek akan digunakan secara otomatis sebagai nama database.
Keluar dari shell interaktif:
exitBuat proyek menggunakan file .ini:
./bobctl understand project create -c <path-to-ini>Menyalin file sumber ke dalam proyek
Sebelum mem-build proyek, salin file sumber aplikasi ke direktori proyek yang sesuai. Setiap proyek berisi subdirektori spesifik sumber, seperti:
CobolJCLPL1Assembler
Untuk meninjau struktur proyek dan menyalin file sumber:
Buka shell interaktif di pod Z Understand:
./bobctl understand cli -aAmbil nama pod:
oc get pods \
-n <instance-namespace> \
-l app=ibm-bobz-understand \
-o nameSalin file atau direktori individual menggunakan oc cp:
oc cp \
/local/path/to/sources \
<pod-name>:/bobz-understand/projects/<project-name>/<subfolder>/ \
-n <instance-namespace>Atau, gunakan oc rsync untuk sinkronisasi berulang pada suatu direktori:
oc rsync \
/local/path/to/sources/ \
<pod-name>:/bobz-understand/projects/<project-name>/<subfolder>/ \
-n <instance-namespace>