You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

pcm_deploy.md 4.1 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. ## 1 安装部署kubekey
  2. 通过以下的命令,可以下载 KubeKey 的最新版本。您可以更改命令中的版本号来下载特定的版本。
  3. ```shell
  4. export KKZONE=cn
  5. curl -sfL https://get-kk.kubesphere.io | VERSION=v3.0.7 sh -
  6. ```
  7. ## 2 mysql部署及数据导入
  8. #### 卸载已有的mariadb
  9. `yum remove -y mariadb-server mariadb mariadb-libs`
  10. #### 下载对应系统版本的mysql包
  11. wget https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-8.0.36-1.el7.x86_64.rpm-bundle.tar
  12. ##### 解压
  13. `tar -xvf mysql-8.0.36-1.el7.x86_64.rpm-bundle.tar`
  14. ##### 安装
  15. ```shell
  16. rpm -ivh mysql-community-libs-8.0.36-1.el7.x86_64.rpm
  17. rpm -ivh mysql-community-libs-compat-8.0.36-1.el7.x86_64.rpm
  18. rpm -ivh mysql-community-client-plugins-8.0.36-1.el7.x86_64.rpm
  19. rpm -ivh mysql-community-client-8.0.36-1.el7.x86_64.rpm
  20. rpm -ivh mysql-community-common-8.0.36-1.el7.x86_64.rpm
  21. rpm -ivh mysql-community-debuginfo-8.0.36-1.el7.x86_64.rpm
  22. rpm -ivh mysql-community-devel-8.0.36-1.el7.x86_64.rpm
  23. rpm -ivh mysql-community-server-8.0.36-1.el7.x86_64.rpm
  24. ```
  25. ##### 启动服务
  26. `systemctl start mysqld`
  27. ##### 查看初始密码
  28. `grep 'temporary password' /var/log/mysqld.log`
  29. 使用mysql -u root -p 登录
  30. ##### 修改密码
  31. `ALTER USER 'root'@'localhost' IDENTIFIED BY 'Nudt!123';`
  32. ##### 配置外部访问
  33. ```sql
  34. use mysql;
  35. update user set host = '%' where user = 'root';
  36. flush privileges;
  37. ```
  38. ##### 创建数据库
  39. ```sql
  40. create database pcm;
  41. create database pcm_auth;
  42. ```
  43. ##### 关闭防火墙
  44. `systemctl stop firewalld`
  45. ##### 下载脚本
  46. `wget -O pcm_auth.sql https://www.gitlink.org.cn/attachments/entries/get_file?download_url=https://www.gitlink.org.cn/api/JointCloud/pcm-coordinator/raw/deploy%2Fpcm-auth.sql?ref=master`
  47. `wget -O pcm.sql https://www.gitlink.org.cn/attachments/entries/get_file?download_url=https://www.gitlink.org.cn/api/JointCloud/pcm-coordinator/raw/deploy%2Fpcm.sql?ref=master`
  48. ##### 执行sql脚本导入数据
  49. `mysql -u root -p pcm < pcm.sql`
  50. `mysql -u root -p pcm_auth < pcm_auth.sql`
  51. ## 3 安装部署k8s集群
  52. ```
  53. export KKZONE=cn
  54. sudo ./kk create cluster
  55. ```
  56. 执行可能会提示部分软件未安装,直接yum安装即可
  57. eg:
  58. `sudo yum install -y conntrack`
  59. `sudo yum install -y socat`
  60. ![](/api/attachments/3f8b9884-03b3-4e84-b408-d2ec451a533b)
  61. 然后重新执行创建集群命令,执行成功后可以执行kubectl get pod 验证环境
  62. ![](/api/attachments/2e282429-d3ae-4019-8280-d6409da50b80)
  63. ## 3 部署鉴权、pcm-coordinator、前端服务
  64. ### 3.1 yaml文件下载
  65. pcm所有服务的yaml文件包下载地址在[这里](https://www.gitlink.org.cn/attachments/entries/get_file?download_url=https://www.gitlink.org.cn/api/JointCloud/pcm-coordinator/raw/deploy%2Fpcm-yaml.zip?ref=master "这里")
  66. 或者在服务器上直接执行
  67. ```shell
  68. wget -O yaml.zip https://www.gitlink.org.cn/attachments/entries/get_file?download_url=https://www.gitlink.org.cn/api/JointCloud/pcm-coordinator/raw/deploy%2Fpcm-yaml.zip?ref=master
  69. ```
  70. 下载完成解压
  71. ```shell
  72. unzip yaml.zip
  73. ```
  74. ### 3.2 yaml执行完成服务、负载、配置文件的部署
  75. #### 修改地址
  76. 需要修改配置文件中的数据库地址为mysql服务安装的地址
  77. #### 一次性部署所有的文件
  78. ```shell
  79. kubectl apply -f .
  80. ```
  81. #### 或者单模块部署
  82. ##### 鉴权:
  83. `kubectl apply -f pcm-auth.yaml`
  84. ##### C端:
  85. `kubectl apply -f pcm-core-api.yaml`
  86. `kubectl apply -f pcm-core-rpc.yaml`
  87. ##### 前端:
  88. `kubectl apply -f pcm-rip.yaml`
  89. 部署情况可以通过以下命令查看
  90. `kubectl get pod`
  91. ![](/api/attachments/644de412-1155-4e07-a90d-367f63260a81)
  92. ## 4 配置驱动器、集群信息
  93. 此时前端服务可以通过服务器ip的31149端口访问到
  94. 默认账号密码为admin/Nudt@123
  95. 新建一个适配器,配置成功后可以获取到对应的adapterId
  96. ![](/api/attachments/ad8e33d9-7155-4030-a813-227bb019c6e0)
  97. 将对应的id填写到对应的P端配置信息中(configmap 内容)
  98. ![](/api/attachments/f0d8ee8d-f94f-40c7-8785-58ce09c89ba0)
  99. ## 5 部署P端服务
  100. ### HPC服务端:
  101. kubectl apply -f pcm-hpc.yaml
  102. ### kubernetes适配器:
  103. kubectl apply -f pcm-kubernetes.yaml
  104. ## 7.系统使用

PCM is positioned as Software stack over Cloud, aiming to build the standards and ecology of heterogeneous cloud collaboration for JCC in a non intrusive and autonomous peer-to-peer manner.