TencentBlueKing / bk-hcm

蓝鲸云管理平台(BK-HCM)
https://bk.tencent.com
Other
48 stars 23 forks source link

按照readme中的安装部署方法,有以下几个问题 #788

Open dingling136 opened 1 month ago

dingling136 commented 1 month ago
  1. 数据库初始化 执行bash migrate.sh -i报错,传-t参数也是 [root@localhost install]# bash migrate.sh -t 1.4.3 using db root@192.168.153.151:3306/hcm mysql: [Warning] Using a password on the command line interface can be insecure. target=1.4.3 current=v1.4.0 [ERROR] current(v1.4.0) >= target(1.4.3) [root@localhost install]# [root@localhost install]# [root@localhost install]# bash migrate.sh -t 1.4.0 using db root@192.168.153.151:3306/hcm mysql: [Warning] Using a password on the command line interface can be insecure. target=1.4.0 current=v1.4.0 [ERROR] current(v1.4.0) >= target(1.4.0) [root@localhost install]# [root@localhost install]# [root@localhost install]# [root@localhost install]# bash migrate.sh -t 1.5.0 using db root@192.168.153.151:3306/hcm mysql: [Warning] Using a password on the command line interface can be insecure. target=1.5.0 current=v1.4.0 [ERROR] current(v1.4.0) >= target(1.5.0) [root@localhost install]# [root@localhost install]# [root@localhost install]# bash migrate.sh -i
    using db root@192.168.153.151:3306/hcm [ERROR] Fail to get target version! Please use -t to specify version, or -a to specify version file.

2、所以服务均正常运行后,但是无法正常访问系统 [root@localhost ~]# ps -ef | grep bk-hcm root 5328 4914 0 16:47 pts/0 00:00:07 bin/bk-hcm-dataservice --bind-ip 192.168.153.151 l root 5337 4983 0 16:47 pts/1 00:00:03 bin/bk-hcm-hcservice --bind-ip 192.168.153.151 -- root 5346 5046 0 16:47 pts/2 00:00:03 bin/bk-hcm-authserver --bind-ip 192.168.153.151 ---disable-auth root 5356 5109 0 16:47 pts/3 00:00:05 bin/bk-hcm-cloudserver --bind-ip 192.168.153.151 l root 5365 5172 0 16:47 pts/4 00:00:00 bin/bk-hcm-apiserver --bind-ip 192.168.153.151 --disable-jwt root 5382 5235 0 16:47 pts/5 00:00:00 bin/bk-hcm-webserver --bind-ip 192.168.153.151 -- root 12334 12264 0 17:36 pts/8 00:00:00 grep --color=auto bk-hcm [root@localhost ~]# ps -ef | grep etcd root 2124 1 2 16:29 ? 00:01:24 etcd --listen-client-urls http://192.168.153.151://192.168.153.151:2379 --auto-compaction-retention 1 --quota-backend-bytes 8589934592 root 12336 12264 0 17:36 pts/8 00:00:00 grep --color=auto etcd

访问http://192.168.153.151/地址,返回信息为 the template don't exists

编译后可执行文件目录如下: ./api └── api-server ├── bk_apigw_resources_bk-hcm.yaml └── zh.tgz ./bin ├── bk-hcm-apiserver ├── bk-hcm-authserver ├── bk-hcm-cloudserver ├── bk-hcm-dataservice ├── bk-hcm-hcservice ├── bk-hcm-taskserver └── bk-hcm-webserver ./bk-hcm-apiserver ├── bk-hcm-apiserver ├── bk-hcm-apiserver.sh └── etc ├── api_gw_public.key └── api_server.yaml ./bk-hcm-authserver ├── bk-hcm-authserver ├── bk-hcm-authserver.sh └── etc └── auth_server.yaml ./bk-hcm-cloudserver ├── bk-hcm-cloudserver ├── bk-hcm-cloudserver.sh ├── etc │   └── cloud_server.yaml └── plugin └── algorithm ./bk-hcm-dataservice ├── bk-hcm-dataservice ├── bk-hcm-dataservice.sh └── etc └── data_service.yaml ./bk-hcm-hcservice ├── bk-hcm-hcservice ├── bk-hcm-hcservice.sh └── etc └── hc_service.yaml ./bk-hcm-taskserver ├── bk-hcm-taskserver ├── bk-hcm-taskserver.sh └── etc └── task_server.yaml ./bk-hcm-webserver ├── bk-hcm-webserver ├── bk-hcm-webserver.sh └── etc └── web_server.yaml ./CHANGELOG.md [error opening dir] ./default.etcd └── member ├── snap │   └── db └── wal ├── 0000000000000000-0000000000000000.wal └── 0.tmp ./etc ├── apiserver_api_gw_public.key ├── api_server.yaml ├── auth_server.yaml ├── cloud_server.yaml ├── data_service.yaml ├── hc_service.yaml ├── task_server.yaml └── web_server.yaml ./front ├── css │   ├── 150.6b21ca8.css │   ├── 187.e75b132.css │   ├── 218.803d92f.css │   ├── 388.4cdee03.css │   ├── 400.8043c4d.css │   ├── 476.d6563e7.css │   ├── 477.bc438c2.css │   ├── 479.fba8605.css │   ├── 557.4c3a4f0.css │   ├── 589.74152a8.css │   ├── 625.0a6217a.css │   ├── 634.e3163a1.css │   ├── 726.830c679.css │   ├── 744.5f738da.css │   ├── 759.93800fa.css │   ├── 791.8237fdc.css │   ├── 813.a9dc511.css │   ├── 844.be72118.css │   ├── 859.a9dc511.css │   ├── 867.fa82012.css │   ├── 874.e39217b.css │   ├── 889.5568f5a.css │   ├── 900.1a37123.css │   ├── 929.4e21ad7.css │   ├── main.4021d9f.css │   └── vendors.c4b0d5a.css ├── dist │   ├── css │   │   ├── 150.6b21ca8.css │   │   ├── 187.e75b132.css │   │   ├── 218.803d92f.css │   │   ├── 388.4cdee03.css │   │   ├── 400.8043c4d.css │   │   ├── 476.d6563e7.css │   │   ├── 477.bc438c2.css │   │   ├── 479.fba8605.css │   │   ├── 557.4c3a4f0.css │   │   ├── 589.74152a8.css │   │   ├── 625.0a6217a.css │   │   ├── 634.e3163a1.css │   │   ├── 726.830c679.css │   │   ├── 744.5f738da.css │   │   ├── 759.93800fa.css │   │   ├── 791.8237fdc.css │   │   ├── 813.a9dc511.css │   │   ├── 844.be72118.css │   │   ├── 859.a9dc511.css │   │   ├── 867.fa82012.css │   │   ├── 874.e39217b.css │   │   ├── 889.5568f5a.css │   │   ├── 900.1a37123.css │   │   ├── 929.4e21ad7.css │   │   ├── main.4021d9f.css │   │   └── vendors.c4b0d5a.css │   ├── favicon2.ico │   ├── favicon.ico │   ├── font │   │   ├── iconcool.59f4f6e..woff │   │   ├── iconcool.880175b..ttf │   │   └── iconcool.a5c65ac..eot │   ├── img │   │   ├── 403.3add64f..png │   │   ├── iconcool.4a46c8e..svg │   │   ├── logo.8362fb4..png │   │   ├── scheme-blank-1.254495c..png │   │   └── scheme-blank-2.d5a8836..png │   ├── index.html │   ├── js │   │   ├── 150.b615a6c57c15a13c45e3.js │   │   ├── 187.62844c05778749a7ee7e.js │   │   ├── 218.b0c2da0a09839f052fde.js │   │   ├── 221.5d6efd8699aa9d6bce6b.js │   │   ├── 222.a3127f5435363901324f.js │   │   ├── 222.a3127f5435363901324f.js.LICENSE.txt │   │   ├── 303.0e32455c125e9b5f23d0.js │   │   ├── 361.2bf46c36b1faa9a3048b.js │   │   ├── 388.ea92ed9fe9a233da7841.js │   │   ├── 400.0e7092ff0c0017b83153.js │   │   ├── 476.001277bc6aa1a0f3469a.js │   │   ├── 477.3607b03989f26dea44fb.js │   │   ├── 479.561108e6d2636e4828fc.js │   │   ├── 557.06ea6fe7c367d06e8e06.js │   │   ├── 589.c83e4cd35deac876aa3b.js │   │   ├── 595.788318251680874a649d.js │   │   ├── 595.788318251680874a649d.js.LICENSE.txt │   │   ├── 625.b5aee4138332a18d0cdd.js │   │   ├── 627.fbe5a77e352c775fb14d.js │   │   ├── 634.9eb46273d0762dee19be.js │   │   ├── 643.166c6bb8578fdeac4be1.js │   │   ├── 643.166c6bb8578fdeac4be1.js.LICENSE.txt │   │   ├── 646.d67be390641dfdeed999.js │   │   ├── 726.3099db7285106282728f.js │   │   ├── 744.d4afcc503c5ae1a2c6f4.js │   │   ├── 759.6fa08baf3b8bdf7d8978.js │   │   ├── 762.0811beecab86ee4cccab.js │   │   ├── 762.0811beecab86ee4cccab.js.LICENSE.txt │   │   ├── 789.dec97a647660e9d758ea.js │   │   ├── 791.de1d01813836e5a6ac24.js │   │   ├── 813.1db3286630b22a45734d.js │   │   ├── 844.1ab49e7faea936ebd0e2.js │   │   ├── 859.171ef68098e194695e73.js │   │   ├── 867.b9b398e06d106fc789c7.js │   │   ├── 874.009779303817690cb5aa.js │   │   ├── 889.571143211e5819c19e9b.js │   │   ├── 900.6b89806d92c8db8a8076.js │   │   ├── 929.cda1f8f200549208be67.js │   │   ├── 9.63e73c19402d7bf55552.js │   │   ├── 9.63e73c19402d7bf55552.js.LICENSE.txt │   │   ├── main.a744268d481fa8f8f59b.js │   │   ├── runtime.3775280e82467bb12d78.js │   │   ├── vendors.3aadc273c944910fa397.js │   │   └── vendors.3aadc273c944910fa397.js.LICENSE.txt │   └── login_success.html ├── favicon2.ico ├── favicon.ico ├── font │   ├── iconcool.59f4f6e..woff │   ├── iconcool.880175b..ttf │   └── iconcool.a5c65ac..eot ├── img │   ├── 403.3add64f..png │   ├── iconcool.4a46c8e..svg │   ├── logo.8362fb4..png │   ├── scheme-blank-1.254495c..png │   └── scheme-blank-2.d5a8836..png ├── index.html ├── js │   ├── 150.b615a6c57c15a13c45e3.js │   ├── 187.62844c05778749a7ee7e.js │   ├── 218.b0c2da0a09839f052fde.js │   ├── 221.5d6efd8699aa9d6bce6b.js │   ├── 222.a3127f5435363901324f.js │   ├── 222.a3127f5435363901324f.js.LICENSE.txt │   ├── 303.0e32455c125e9b5f23d0.js │   ├── 361.2bf46c36b1faa9a3048b.js │   ├── 388.ea92ed9fe9a233da7841.js │   ├── 400.0e7092ff0c0017b83153.js │   ├── 476.001277bc6aa1a0f3469a.js │   ├── 477.3607b03989f26dea44fb.js │   ├── 479.561108e6d2636e4828fc.js │   ├── 557.06ea6fe7c367d06e8e06.js │   ├── 589.c83e4cd35deac876aa3b.js │   ├── 595.788318251680874a649d.js │   ├── 595.788318251680874a649d.js.LICENSE.txt │   ├── 625.b5aee4138332a18d0cdd.js │   ├── 627.fbe5a77e352c775fb14d.js │   ├── 634.9eb46273d0762dee19be.js │   ├── 643.166c6bb8578fdeac4be1.js │   ├── 643.166c6bb8578fdeac4be1.js.LICENSE.txt │   ├── 646.d67be390641dfdeed999.js │   ├── 726.3099db7285106282728f.js │   ├── 744.d4afcc503c5ae1a2c6f4.js │   ├── 759.6fa08baf3b8bdf7d8978.js │   ├── 762.0811beecab86ee4cccab.js │   ├── 762.0811beecab86ee4cccab.js.LICENSE.txt │   ├── 789.dec97a647660e9d758ea.js │   ├── 791.de1d01813836e5a6ac24.js │   ├── 813.1db3286630b22a45734d.js │   ├── 844.1ab49e7faea936ebd0e2.js │   ├── 859.171ef68098e194695e73.js │   ├── 867.b9b398e06d106fc789c7.js │   ├── 874.009779303817690cb5aa.js │   ├── 889.571143211e5819c19e9b.js │   ├── 900.6b89806d92c8db8a8076.js │   ├── 929.cda1f8f200549208be67.js │   ├── 9.63e73c19402d7bf55552.js │   ├── 9.63e73c19402d7bf55552.js.LICENSE.txt │   ├── main.a744268d481fa8f8f59b.js │   ├── runtime.3775280e82467bb12d78.js │   ├── vendors.3aadc273c944910fa397.js │   └── vendors.3aadc273c944910fa397.js.LICENSE.txt └── login_success.html ./install ├── default.etcd │   └── member │   ├── snap │   │   └── db │   └── wal │   └── 0000000000000000-0000000000000000.wal ├── migrate.sh ├── nohup.out └── sql ├── 0001_20230227_2045_init_db.sql ├── 0002_20230329_1510.sql ├── 0003_20230516_1600.sql ├── 0004_20230526_1410.sql ├── 0005_20230530_2100.sql ├── 0006_20230710_1600.sql ├── 0007_20230727_1040.sql ├── 0008_20230727_1922.sql ├── 0009_20230731_1117.sql ├── 0010_20230821_1949.sql ├── 0011_20231019_2010.sql ├── 0012_20231130_1604.sql ├── 0013_20231211_1015.sql ├── 0014_20231228_1601.sql └── 0015_20240305_1000_argument_template.sql ./log ├── bk-hcm-apiserver.INFO -> bk-hcm-apiserver.localhost.root.log.INFO.20240510-084738.5365 ├── bk-hcm-apiserver.localhost.root.log.INFO.20240510-083742.2479 ├── bk-hcm-apiserver.localhost.root.log.INFO.20240510-084738.5365 ├── bk-hcm-authserver.INFO -> bk-hcm-authserver.localhost.root.log.INFO.20240510-084721.5346 ├── bk-hcm-authserver.localhost.root.log.INFO.20240510-083742.2472 ├── bk-hcm-authserver.localhost.root.log.INFO.20240510-084721.5346 ├── bk-hcm-cloudserver.INFO -> bk-hcm-cloudserver.localhost.root.log.INFO.20240510-084730.5356 ├── bk-hcm-cloudserver.localhost.root.log.INFO.20240510-083742.2473 ├── bk-hcm-cloudserver.localhost.root.log.INFO.20240510-084730.5356 ├── bk-hcm-dataservice.INFO -> bk-hcm-dataservice.localhost.root.log.INFO.20240510-084703.5328 ├── bk-hcm-dataservice.localhost.root.log.INFO.20240510-083742.2465 ├── bk-hcm-dataservice.localhost.root.log.INFO.20240510-083919.2563 ├── bk-hcm-dataservice.localhost.root.log.INFO.20240510-084243.4794 ├── bk-hcm-dataservice.localhost.root.log.INFO.20240510-084255.4804 ├── bk-hcm-dataservice.localhost.root.log.INFO.20240510-084703.5328 ├── bk-hcm-hcservice.INFO -> bk-hcm-hcservice.localhost.root.log.INFO.20240510-084712.5337 ├── bk-hcm-hcservice.localhost.root.log.INFO.20240510-083742.2466 ├── bk-hcm-hcservice.localhost.root.log.INFO.20240510-084712.5337 ├── bk-hcm-webserver.INFO -> bk-hcm-webserver.localhost.root.log.INFO.20240510-084748.5382 ├── bk-hcm-webserver.localhost.root.log.INFO.20240510-083743.2510 └── bk-hcm-webserver.localhost.root.log.INFO.20240510-084748.5382 ./nohup.out [error opening dir] ./plugin └── algorithm ./suite-test ├── cloud-server.test ├── hc-service.test ├── README.md ├── start.sh └── testhelper ./VERSION [error opening dir]

chenjr15 commented 1 month ago

感谢您的反馈,这边假设您部署的是v1.4.3 ,如果不是请修改为对应的版本。

  1. 关于数据库初始化问题,版本前面需要增加一个v前缀,如v1.4.0 而不是 1.4.0。如果是空数据库更新到 v1.4.3 版本的话尝试使用bash migrate.sh -i -t v1.4.3 效果是将sql目录下的全部sql文件 按顺序执行一遍。
  2. the template don't exists 问题应该是web_server.yaml配置文件中的web下的 staticFileDirPath配置错了,可以尝试改成./front或者front文件夹的绝对目录
dingling136 commented 1 month ago

感谢您的反馈,这边假设您部署的是v1.4.3 ,如果不是请修改为对应的版本。

  1. 关于数据库初始化问题,版本前面需要增加一个v前缀,如v1.4.0 而不是 1.4.0。如果是空数据库更新到 v1.4.3 版本的话尝试使用bash migrate.sh -i -t v1.4.3 效果是将sql目录下的全部sql文件 按顺序执行一遍。
  2. the template don't exists 问题应该是web_server.yaml配置文件中的web下的 staticFileDirPath配置错了,可以尝试改成./front或者front文件夹的绝对目录

感谢,按照以上方法已经修改好了。

但是在访问系统时会重定向到pass.bk.com系统;在/etc/*.yaml文件中有许多pass.bk.com、itsm.bk.com等域名,这是不是还需要部署相应的pass、itsm平台后,才可以访问此系统?

chenjr15 commented 1 month ago

前端鉴权依赖蓝鲸统一登录,录入账号需要依赖itsm