Browse Source

init project

seamew 1 năm trước cách đây
commit
48d386f15f
63 tập tin đã thay đổi với 2491 bổ sung0 xóa
  1. BIN
      云平台项目/云平台安装文档/assets/20210509204813641.png
  2. BIN
      云平台项目/云平台安装文档/assets/image-20211108145729544.png
  3. BIN
      云平台项目/云平台安装文档/assets/image-20211108154405864.png
  4. BIN
      云平台项目/云平台安装文档/assets/image-20211110154335629.png
  5. BIN
      云平台项目/云平台安装文档/assets/image-20211110155332792.png
  6. BIN
      云平台项目/云平台安装文档/assets/image-20211110230053303.png
  7. BIN
      云平台项目/云平台安装文档/assets/image-20211110230128121.png
  8. BIN
      云平台项目/云平台安装文档/assets/image-20211110230429326.png
  9. BIN
      云平台项目/云平台安装文档/assets/image-20211110231108730-16365570741011.png
  10. BIN
      云平台项目/云平台安装文档/assets/image-20211110231108730.png
  11. BIN
      云平台项目/云平台安装文档/assets/image-20211110231233626.png
  12. BIN
      云平台项目/云平台安装文档/assets/image-20211110231456317.png
  13. BIN
      云平台项目/云平台安装文档/assets/image-20211110231532251.png
  14. BIN
      云平台项目/云平台安装文档/assets/image-20211110232452207.png
  15. BIN
      云平台项目/云平台安装文档/assets/image-20211110232708879.png
  16. BIN
      云平台项目/云平台安装文档/assets/image-20211111101212415.png
  17. BIN
      云平台项目/云平台安装文档/assets/image-20211111101337952.png
  18. BIN
      云平台项目/云平台安装文档/assets/image-20211111101803181.png
  19. BIN
      云平台项目/云平台安装文档/assets/image-20211111102250493.png
  20. BIN
      云平台项目/云平台安装文档/assets/image-20211111102801129.png
  21. BIN
      云平台项目/云平台安装文档/assets/image-20211111102817757.png
  22. BIN
      云平台项目/云平台安装文档/assets/image-20211115213927460.png
  23. BIN
      云平台项目/云平台安装文档/assets/image-20211115214619362.png
  24. BIN
      云平台项目/云平台安装文档/assets/image-20211115214723424.png
  25. BIN
      云平台项目/云平台安装文档/assets/image-20211115214817599.png
  26. BIN
      云平台项目/云平台安装文档/assets/image-20211115214846424.png
  27. BIN
      云平台项目/云平台安装文档/assets/image-20211115214912342.png
  28. BIN
      云平台项目/云平台安装文档/assets/image-20211115214937388.png
  29. BIN
      云平台项目/云平台安装文档/assets/image-20211118211440018.png
  30. BIN
      云平台项目/云平台安装文档/assets/image-20211118211533239.png
  31. BIN
      云平台项目/云平台安装文档/assets/image-20211118211659229.png
  32. BIN
      云平台项目/云平台安装文档/assets/image-20211118211733125.png
  33. BIN
      云平台项目/云平台安装文档/assets/image-20211123200112617.png
  34. BIN
      云平台项目/云平台安装文档/assets/image-20211207125209937.png
  35. BIN
      云平台项目/云平台安装文档/assets/image-20220313152413610.png
  36. BIN
      云平台项目/云平台安装文档/assets/image-20220316212717276.png
  37. BIN
      云平台项目/云平台安装文档/assets/image-20220317151709566.png
  38. BIN
      云平台项目/云平台安装文档/assets/image-20220317164430599.png
  39. 141 0
      云平台项目/云平台安装文档/云平台运行文档.md
  40. 785 0
      云平台项目/云平台安装文档/安装云平台环境.md
  41. BIN
      大数据项目/大数据平台安装文档/assets/image-20220320185243246.png
  42. 731 0
      大数据项目/大数据平台安装文档/大数据平台环境搭建.md
  43. 128 0
      大数据项目/大数据平台安装文档/大数据监控安装文档.md
  44. 23 0
      大数据项目/大数据平台安装文档/大数据运行文档.md
  45. 158 0
      大数据项目/大数据平台安装文档/脚本.md
  46. BIN
      算法平台项目/算法平台安装文档/assets/image-20220316185119154.png
  47. BIN
      算法平台项目/算法平台安装文档/assets/image-20220317204635163.png
  48. BIN
      算法平台项目/算法平台安装文档/assets/image-20220317204954859.png
  49. BIN
      算法平台项目/算法平台安装文档/assets/image-20220317205227206.png
  50. BIN
      算法平台项目/算法平台安装文档/assets/image-20220317205535260.png
  51. BIN
      算法平台项目/算法平台安装文档/assets/image-20220317205738403-16475218592261.png
  52. BIN
      算法平台项目/算法平台安装文档/assets/image-20220317205738403.png
  53. BIN
      算法平台项目/算法平台安装文档/assets/image-20220317210313188.png
  54. BIN
      算法平台项目/算法平台安装文档/assets/image20220309200518.png
  55. BIN
      算法平台项目/算法平台安装文档/assets/image20220309202338.png
  56. BIN
      算法平台项目/算法平台安装文档/assets/image20220309202557.png
  57. BIN
      算法平台项目/算法平台安装文档/assets/image20220309202909.png
  58. BIN
      算法平台项目/算法平台安装文档/assets/image20220309204832.png
  59. BIN
      算法平台项目/算法平台安装文档/assets/image20220309205028.png
  60. BIN
      算法平台项目/算法平台安装文档/assets/image20220309210150.png
  61. BIN
      算法平台项目/算法平台安装文档/assets/images20220309201941.png
  62. 331 0
      算法平台项目/算法平台安装文档/算法平台环境搭建.md
  63. 194 0
      算法平台项目/算法平台安装文档/算法平台运行文档.md

BIN
云平台项目/云平台安装文档/assets/20210509204813641.png


BIN
云平台项目/云平台安装文档/assets/image-20211108145729544.png


BIN
云平台项目/云平台安装文档/assets/image-20211108154405864.png


BIN
云平台项目/云平台安装文档/assets/image-20211110154335629.png


BIN
云平台项目/云平台安装文档/assets/image-20211110155332792.png


BIN
云平台项目/云平台安装文档/assets/image-20211110230053303.png


BIN
云平台项目/云平台安装文档/assets/image-20211110230128121.png


BIN
云平台项目/云平台安装文档/assets/image-20211110230429326.png


BIN
云平台项目/云平台安装文档/assets/image-20211110231108730-16365570741011.png


BIN
云平台项目/云平台安装文档/assets/image-20211110231108730.png


BIN
云平台项目/云平台安装文档/assets/image-20211110231233626.png


BIN
云平台项目/云平台安装文档/assets/image-20211110231456317.png


BIN
云平台项目/云平台安装文档/assets/image-20211110231532251.png


BIN
云平台项目/云平台安装文档/assets/image-20211110232452207.png


BIN
云平台项目/云平台安装文档/assets/image-20211110232708879.png


BIN
云平台项目/云平台安装文档/assets/image-20211111101212415.png


BIN
云平台项目/云平台安装文档/assets/image-20211111101337952.png


BIN
云平台项目/云平台安装文档/assets/image-20211111101803181.png


BIN
云平台项目/云平台安装文档/assets/image-20211111102250493.png


BIN
云平台项目/云平台安装文档/assets/image-20211111102801129.png


BIN
云平台项目/云平台安装文档/assets/image-20211111102817757.png


BIN
云平台项目/云平台安装文档/assets/image-20211115213927460.png


BIN
云平台项目/云平台安装文档/assets/image-20211115214619362.png


BIN
云平台项目/云平台安装文档/assets/image-20211115214723424.png


BIN
云平台项目/云平台安装文档/assets/image-20211115214817599.png


BIN
云平台项目/云平台安装文档/assets/image-20211115214846424.png


BIN
云平台项目/云平台安装文档/assets/image-20211115214912342.png


BIN
云平台项目/云平台安装文档/assets/image-20211115214937388.png


BIN
云平台项目/云平台安装文档/assets/image-20211118211440018.png


BIN
云平台项目/云平台安装文档/assets/image-20211118211533239.png


BIN
云平台项目/云平台安装文档/assets/image-20211118211659229.png


BIN
云平台项目/云平台安装文档/assets/image-20211118211733125.png


BIN
云平台项目/云平台安装文档/assets/image-20211123200112617.png


BIN
云平台项目/云平台安装文档/assets/image-20211207125209937.png


BIN
云平台项目/云平台安装文档/assets/image-20220313152413610.png


BIN
云平台项目/云平台安装文档/assets/image-20220316212717276.png


BIN
云平台项目/云平台安装文档/assets/image-20220317151709566.png


BIN
云平台项目/云平台安装文档/assets/image-20220317164430599.png


+ 141 - 0
云平台项目/云平台安装文档/云平台运行文档.md

@@ -0,0 +1,141 @@
+> [TOC]
+
+# 1.云平台运行准备工作
+
+1. 创建文件夹
+
+```shell
+mkdir /opt/mkcloud
+
+mkdir /home/mkcloud
+
+mkdir /home/algorithm
+```
+
+2. 新建数据库`mkcloud`并将数据库导入
+
+3. 将`mkcloud.jar`上传到`/opt/mkcloud`
+
+4. 在nginx中创建存放算法平台前端的文件夹
+
+  ```shell
+  mkdir /usr/local/nginx/html/mkcloud
+  ```
+
+5. 将云平台前端文件上传到该文件夹(共有三个,两个文件夹以及一个index.html)
+6. 上传基础镜像到harbor仓库
+
+```shell
+# 1.将python3_base.tar文件上传到安装harbor仓库的节点
+docker load  < python3_base.tar
+```
+
+![image-20220317151709566](assets/image-20220317151709566.png)
+
+```shell
+docker tag server.harbor.com:80/library/python3_base:v1.0 180.76.231.231:8088/library/python3_base:v1.0
+
+docker push 180.76.231.231:8088/library/python3_base:v1.0
+```
+
+# 2.云平台参数设置
+
+## 2.1将application.yml上传到/opt/mkcloud,并进行修改
+
+1. 修改host、host-username、host-password为kubesphere宿主机的ip、用户名和密码
+
+```yaml
+host: 10.168.57.11
+host-username: root
+host-password: root
+host-basepath: /opt/uploadFile
+host-port: 22
+```
+
+2. 修改相应的端口
+
+```yaml
+# 修改kubesphereUrl为kubesphere所在ip以及30881端口
+kubesphereUrl: http://42.192.195.253:30881
+
+# 修改harborUrl为harbor所在ip以及80端口
+harborUrl: 42.192.195.253:80
+
+# 修改Dockerfile和shell脚本暂存地址
+tempFileLocation: /home/mkcloud/algorithm
+```
+
+## 2.2将application-dev.yml上传到/opt/mkcloud,并进行修改
+
+修改spring:datasource:url、spring:datasource:username、spring:datasource:password为云平台数据库所在ip、用户名和密码
+
+```yaml
+url: jdbc:mysql://localhost:3306/mkcloud?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useSSL=false
+username: root
+password: root
+```
+修改多数据源配置,其中url为算法平台数据库所在ip
+
+```yaml
+dynamic:
+  datasource:
+slave2:
+  driver-class-name: com.mysql.cj.jdbc.Driver
+  url: jdbc:mysql://localhost:3306/renren_fast?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
+  username: root
+  password: root
+```
+修改hbase集群ip,其中hbase.zookeeper.quorum为hbase集群IP
+
+```yaml
+hbase:
+config:
+	hbase.zookeeper.quorum: 10.168.57.10,10.168.57.11,10.168.57.12
+	hbase.zookeeper.property.clientPort: 2181
+	zookeeper.znode.parent: /hbase
+	hbase.client.keyvalue.maxsize: 1048576000
+```
+修改minio:endpoint为搭建好的minio IP
+
+```yaml
+minio:
+  endpoint: http://150.158.138.99:9006
+  bucket: test0706
+  access-key: minio
+  secret-key: minio123
+```
+## 2.3修改nginx.conf配置文件,在server中添加
+
+```shell
+    location /mkcloud {
+                 alias  html/mkcloud;
+                 index  index.html index.htm;
+                 try_files  $uri  $uri/   /index.html;
+         }	
+	location  ^~ /kubesphereApi/ {
+		proxy_pass http://123.56.99.12:30881/;#这里的ip要改为kubesphere的ip
+		proxy_set_header Host $host;
+		proxy_set_header  X-Real-IP        $remote_addr;
+		proxy_set_header  X-Forwarded-For  $proxy_add_x_forwarded_for;
+		proxy_set_header X-NginX-Proxy true;
+	}
+	
+location ^~ /mkcloud/mkcloud/ {  
+	proxy_pass http://112.126.68.148:8085/mkcloud/;#这里的ip要改为云平台后端服务所在ip
+	proxy_set_header Host $host;
+	proxy_set_header  X-Real-IP        $remote_addr;
+	proxy_set_header  X-Forwarded-For  $proxy_add_x_forwarded_for;
+	proxy_set_header X-NginX-Proxy true;
+}
+```
+# 3.项目启动
+
+```shell
+nohup java -jar mkcloud.jar > log.file 2>&1 &
+
+cd/usr/local/nginx/sbin
+
+./nginx -s reload
+```
+
+启动后访问http://ip/mkcloud/#/login(这里的ip要改为nginx的ip)

+ 785 - 0
云平台项目/云平台安装文档/安装云平台环境.md

@@ -0,0 +1,785 @@
+> [TOC]
+
+# 1、安装前的准备工作
+
+## 1.1、准备三台服务器
+
+虚拟机的最低标准
+**master**
+至少4核心
+内存至少8G
+存储空间80G以上
+**node** 
+至少2核心
+内存至少4G
+存储空间60G以上
+
+
+需要准备三台服务器并设置静态IP,这里不再赘述。本文档的配置如下
+
+| 节点名称 | ip             |
+| -------- | -------------- |
+| master   | 192.168.238.20 |
+| node1    | 192.168.238.21 |
+| node2    | 192.168.238.22 |
+
+## 1.2、安装前的准备工作
+
+```sh
+# 关闭防火墙
+systemctl stop firewalld && systemctl disable firewalld
+
+# 关闭selinux
+sed -i 's/enforcing/disabled/' /etc/selinux/config  # 永久
+setenforce 0  # 临时
+cat /etc/selinux/config
+
+# 关闭swap
+swapoff -a  # 临时
+sed -ri 's/.*swap.*/#&/' /etc/fstab    # 永久
+free -m
+
+# 根据规划设置主机名
+hostnamectl set-hostname <hostname>
+
+# 在master添加hosts
+cat >> /etc/hosts << EOF
+192.168.238.20 master
+192.168.238.21 node1
+192.168.238.22 node2
+EOF
+
+# 将桥接的IPv4流量传递到iptables的链
+cat > /etc/sysctl.d/k8s.conf << EOF
+net.bridge.bridge-nf-call-ip6tables = 1
+net.bridge.bridge-nf-call-iptables = 1
+EOF
+sysctl --system  # 生效
+
+# 修改当前时间为北京时间
+# 查看当前系统时间 
+date
+# 修改当前系统时间 
+date -s "2018-2-22 19:10:30
+# 查看硬件时间 
+hwclock --show
+# 修改硬件时间 
+hwclock --set --date "2018-2-22 19:10:30"
+# 同步系统时间和硬件时间 
+hwclock --hctosys
+# 保存时钟 
+clock -w
+```
+
+上述操作执行完毕后重启
+```sh
+reboot
+```
+三台服务器,开始下一步的安装
+
+
+# 2、离线安装Docker及其相应组件(三台服务机都需要安装)
+
+## 2.1、离线安装Docker
+
+```sh
+# 1.创建目录存放相应的安装包
+mkdir -p /opt/package/docker
+
+# 2.上传安装包下的docker文件夹到上述的目录中
+
+# 3.进入目录,进行解压缩操作
+cd /opt/package/docker
+unzip docker19-rpm.zip
+
+# 4.安装docker
+rpm -ivh *.rpm  --force --nodeps
+systemctl enable docker && systemctl start docker
+
+# 5.查看是否安装成功
+docker --version
+```
+
+输出docker版本号表示安装成功
+![image-20220313152413610](assets/image-20220313152413610.png)
+
+## 2.2、离线安装Docker-compose
+
+将安装包目录下的docker-compose-linux-x86_64文件上传到服务机的```/opt/package```目录下使用命令
+```sh
+// 1.将下载好的文件传入linux系统中,并重命名未docker-compose
+mv docker-compose-linux-x86_64 docker-compose
+// 2.给予docker-compose文件可执行权限
+chmod u+x docker-compose
+// 3.将docker-compose文件移至/usr/local/bin
+mv docker-compose /usr/local/bin
+// 4.查看版本
+docker-compose --version
+```
+输出docker-compose版本号表示安装成功
+![image-20211108154405864](assets/image-20211108154405864.png)
+
+# 3、安装Harbor及相应的配置(只需要一台服务机安装)
+
+## 3.0、安装注意事项
+
+本文档Harbor安装在单独一台虚拟机上面,如果只有三台机器,请将下面的server.harbor.com换成固定的IP(这里的固定IP意思是安装harbor的虚拟机的IP),例如将harbor仓库安装在master节点就将server.harbor.com换为192.168.238.20。
+
+## 3.1、安装Harbor
+
+1. 将压缩包harbor-offline-installer-v2.1.5.tgz上传到
+```sh
+/opt/package/
+```
+目录下
+2. 解压该压缩包
+```sh
+tar xf harbor-offline-installer-v2.1.5.tgz
+```
+3. 修改harbor安装的配置文件
+
+首先备份一份压缩包
+```sh
+# 复制配置文件内容到harbor.yml 中(安装时只识别harbor.yml)
+cp harbor.yml.tmpl  harbor.yml         
+# 用于存放harbor的持久化数据
+mkdir -p /opt/package/harbor/data       
+
+# 用于存放harbor的日志
+mkdir -p /opt/package/harbor/log
+```
+
+其次对harbor.yml文件进行修改配置
+
+```
+# 需要修改为域名,如果没有单独的机器,请修改为IP
+hostname: server.harbor.com
+
+# http related config
+http:
+  port: 80
+# 需要全部注释
+# https related config
+# https:
+  # https port for harbor, default is 443
+  # port: 443
+  # The path of cert and key files for nginx
+  # certificate: /your/certificate/path
+  # private_key: /your/private/key/path
+  
+data_volume: /opt/package/harbor/data     # 需要添加一个自己的目录
+
+log:
+    location:  /opt/package/harbor/log  # 需要添加一个自己的目录
+```
+
+4. 安装并启动Harbor
+
+保证此时在harbor安装文件中,执行install.sh文件进行安装,命令为:
+``` 
+./install.sh
+```
+
+5. 访问harbor Web界面
+
+通过自己的ip+端口访问
+
+![image-20211207125209937](assets/image-20211207125209937.png)
+
+## 3.2、配置Docker访问Harbor(三台服务机都要配置)
+
+首先修改服务机的hosts,如果没有单独的harbor服务器,请忽略这一步
+```
+# 将下面的ip缓存harbor的ip
+echo "10.168.59.60  server.harbor.com">> /etc/hosts
+```
+
+docker添加harbor配置-----注意这里要加harbor的端口号,这里配置的端口号为上述harbor配置文件的端口号
+```sh
+mkdir -p /etc/docker
+
+tee /etc/docker/daemon.json <<-'EOF'
+{
+  "insecure-registries": ["server.harbor.com:80"]
+}
+EOF
+
+systemctl daemon-reload && systemctl restart docker
+
+# 如果是ip方式
+mkdir -p /etc/docker
+
+tee /etc/docker/daemon.json <<-'EOF'
+{
+  "insecure-registries": ["192.168.238.20:80", "192.168.238.20", "lab3", "la"]
+}
+EOF
+
+systemctl daemon-reload && systemctl restart docker
+```
+
+输入命令
+```sh
+# 重新启动harbor,因为docker重启但是harbor不能自动重启
+cd /opt/package/
+docker-compose start
+# 登录harbor
+docker login server.harbor.com:80
+```
+输入用户名:admin
+密码:Harbor12345
+![image-20211110155332792](assets/image-20211110155332792.png)
+至此,harbor配置完成
+
+# 4、K8S 离线安装及NFS配置(三台服务机都需要安装) 
+
+
+## 4.1 、上传kube1.9.0.tar.gz(以下简称kube1.9)到服务器
+
+```
+# 1.三台服务机创建目录
+mkdir -p /opt/package/k8s
+# 2.上传文件到指定目录
+scp -r kube1.9.0.tar.gz root@192.168.238.20:/opt/package/k8s
+scp -r kube1.9.0.tar.gz root@192.168.238.21:/opt/package/k8s
+scp -r kube1.9.0.tar.gz root@192.168.238.22:/opt/package/k8s
+```
+
+## 4.2 、解压安装主从
+
+```sh
+# 1.master下,进入/opt/package/k8s目录下解压,执行脚本
+tar -zxvf kube1.19.0.tar.gz
+cd kube/shell 
+chmod +x init.sh
+./init.sh
+
+# 2.等待init.sh执行完毕,之后执行
+chmod +x master.sh
+./master.sh
+
+# 3. node1和node2执行下面的命令
+cd /opt/package/k8s
+tar -zxvf kube1.9.0.tar.gz
+cd kube/shell 
+chmod +x init.sh
+./init.sh
+
+# 4. 进入master节点将/etc/kubernetes/admin.conf文件复制到node1节点和node2节点
+scp -r /etc/kubernetes/admin.conf node1:/etc/kubernetes/
+scp -r /etc/kubernetes/admin.conf node2:/etc/kubernetes/
+   
+```
+
+   
+
+## 4.3 、从节点加入主节点
+
+ 1. 在master节点生成token
+
+    ```sh
+    kubeadm token create --print-join-command
+    ```
+
+    效果如下
+
+    ```sh
+    [root@master shell]# kubeadm token create --print-join-command
+    W1009 17:15:31.782757   37720 configset.go:348] WARNING: kubeadm cannot validate component configs for API groups [kubelet.config.k8s.io kubeproxy.config.k8s.io]
+    kubeadm join 192.168.0.90:6443 --token ul68zs.dkkvpwfex9rpzo0d     --discovery-token-ca-cert-hash sha256:3e3ee481f5603621f216e707321aa26a68834939e440be91322c62eb8540ffce
+    ```
+
+   2. 在node1和node2中执行下面的命令------注意这里要上面生产的命令
+
+      ```sh
+      kubeadm join 192.168.0.90:6443 --token ul68zs.dkkvpwfex9rpzo0d     --discovery-token-ca-cert-hash sha256:3e3ee481f5603621f216e707321aa26a68834939e440be91322c62eb8540ffce
+      ```
+
+      结果如下
+
+      ```sh
+      [root@node1 shell]# kubeadm join 192.168.0.90:6443 --token ul68zs.dkkvpwfex9rpzo0d     --discovery-token-ca-cert-hash sha256:3e3ee481f5603621f216e707321aa26a68834939e440be91322c62eb8540ffce
+      [preflight] Running pre-flight checks
+      	[WARNING IsDockerSystemdCheck]: detected "cgroupfs" as the Docker cgroup driver. The recommended driver is "systemd". Please follow the guide at https://kubernetes.io/docs/setup/cri/
+      	[WARNING FileExisting-socat]: socat not found in system path
+      [preflight] Reading configuration from the cluster...
+      [preflight] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -oyaml'
+      [kubelet-start] Writing kubelet configuration to file "/var/lib/kubelet/config.yaml"
+      [kubelet-start] Writing kubelet environment file with flags to file "/var/lib/kubelet/kubeadm-flags.env"
+      [kubelet-start] Starting the kubelet
+      [kubelet-start] Waiting for the kubelet to perform the TLS Bootstrap...
+      
+      This node has joined the cluster:
+      * Certificate signing request was sent to apiserver and a response was received.
+      * The Kubelet was informed of the new secure connection details.
+      
+      Run 'kubectl get nodes' on the control-plane to see this node join the cluster.
+      ```
+      
+3. 给node1和node2添加执行权限
+
+```sh
+# 在node1和node2执行一下命令
+mkdir -p $HOME/.kube
+sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
+sudo chown $(id -u):$(id -g) $HOME/.kube/config
+kubectl get nodes
+# 注意上面的admin.conf是从master节点复制过来的
+```
+
+   
+
+
+## 4.4、 验证集群pod是否running,各节点是否ready
+
+watch kubectl get pod -n kube-system -o wide 
+效果如下	
+
+```sh
+   [root@master shell]# watch kubectl get pod -n kube-system -o wide
+   Every 2.0s: kubectl get pod -n kube-system -o wide                                                                                                                  Fri Oct  9 17:45:03 2020
+     NAME                                       READY   STATUS    RESTARTS   AGE   IP               NODE     NOMINATED NODE   READINESS GATES
+     calico-kube-controllers-5d7686f694-94fcc   1/1     Running   0          48m   100.89.161.131   master   <none>           <none>
+     calico-node-42bwj                          1/1     Running   0          48m   192.168.0.90     master   <none>           <none>
+     calico-node-k6k6d                          1/1     Running   0          27m   192.168.0.189    node2    <none>           <none>
+     calico-node-lgwwj                          1/1     Running   0          29m   192.168.0.68     node1    <none>           <none>
+     coredns-f9fd979d6-2ncmm                    1/1     Running   0          48m   100.89.161.130   master   <none>           <none>
+     coredns-f9fd979d6-5s4nw                    1/1     Running   0          48m   100.89.161.129   master   <none>           <none>
+     etcd-master                                1/1     Running   0          48m   192.168.0.90     master   <none>           <none>
+     kube-apiserver-master                      1/1     Running   0          48m   192.168.0.90     master   <none>           <none>
+     kube-controller-manager-master             1/1     Running   0          48m   192.168.0.90     master   <none>           <none>
+     kube-proxy-5g2ht                           1/1     Running   0          29m   192.168.0.68     node1    <none>           <none>
+     kube-proxy-wpf76                           1/1     Running   0          27m   192.168.0.189    node2    <none>           <none>
+     kube-proxy-zgcft                           1/1     Running   0          48m   192.168.0.90     master   <none>           <none>
+     kube-scheduler-master                      1/1     Running   0          48m   192.168.0.90     master   <none>           <none>
+```
+kubectl get nodes
+效果如下
+```sh
+   [root@master shell]# kubectl get nodes
+     NAME     STATUS   ROLES    AGE     VERSION
+     master   Ready    master   22m     v1.19.0
+     node1    Ready    <none>   2m17s   v1.19.0
+     node2    Ready    <none>   24s     v1.19.0
+```
+
+## 4.5、配置NFS
+
+| master | NFS服务端+NFS客户端 |
+| ------ | ------------------- |
+| node1  | NFS客户端           |
+| node2  | NFS客户端           |
+
+
+
+1. 将本地nfs离线包上传至服务器及各个节点的/opt/package/nfs文件夹下
+
+   ```sh
+   scp -r nfs master:/opt/package
+   scp -r nfs node1:/opt/package
+   scp -r nfs n:/opt/package
+   ```
+   
+2. 安装服务端(master节点操作)
+
+   ```sh
+   # 进入master节点内/opt/package/nfs文件夹内执行以下命令
+   # 进入/opt/package/nfs
+   cd /opt/package/nfs
+   # 安装nfs
+   rpm -ivh *.rpm  --force --nodeps # 注意如果不能安装选择  nfs.zip文件
+   # 执行命令 vi /etc/exports,创建 exports 文件,文件内容如下:
+   echo "/nfs/data/ *(insecure,rw,sync,no_root_squash)" > /etc/exports
+   # 执行以下命令,启动 nfs 服务
+   # 创建共享目录
+   mkdir -p /nfs/data
+   systemctl enable rpcbind
+   systemctl enable nfs-server
+   systemctl start rpcbind
+   systemctl start nfs-server
+   exportfs -r
+   # 检查配置是否生效
+   exportfs
+   # 输出结果如下所示
+   /nfs/data     	<world>
+   ```
+3. 安装NFS客户端(三台服务机操作)
+```sh
+# 进入node1,node2节点内/opt/package/nfs文件夹内执行以下命令
+cd /opt/package/nfs
+rpm -ivh *.rpm  --force --nodeps # 注意如果不能安装选择  nfs.zip文件
+systemctl start nfs && systemctl enable nfs
+```
+
+4. K8S中安装NFS(任意K8S节点,这里选择master节点)
+```sh
+# 1.进入/opt/package/nfs目录
+cd /opt/package/nfs
+# 2.载入docker镜像
+docker load < nfs-client-provisioner.tar.gz
+# 3.修改deployment.yaml文件
+vim /opt/package/nfs/deployment.yaml
+
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: nfs-client-provisioner
+  labels:
+    app: nfs-client-provisioner
+  # replace with namespace where provisioner is deployed
+  namespace: default
+spec:
+  replicas: 1
+  strategy:
+    type: Recreate
+  selector:
+    matchLabels:
+      app: nfs-client-provisioner
+  template:
+    metadata:
+      labels:
+        app: nfs-client-provisioner
+    spec:
+      serviceAccountName: nfs-client-provisioner
+      containers:
+        - name: nfs-client-provisioner
+          image: quay.io/external_storage/nfs-client-provisioner:latest ##默认是latest版本
+          imagePullPolicy: Never ## 这里选择从本地拉取
+          volumeMounts:
+            - name: nfs-client-root
+              mountPath: /persistentvolumes
+          env:
+            - name: PROVISIONER_NAME
+              value: fuseim.pri/ifs 
+            - name: NFS_SERVER
+              value: 192.168.238.20 ##这里写NFS服务器的IP地址
+            - name: NFS_PATH
+              value: /nfs/data ##这里写NFS服务器中的共享挂载目录(强调:这里的路径必须是目录中最后一层的文件夹,否则部署的应用将无权限创建目录导致Pending)
+      volumes:
+        - name: nfs-client-root
+          nfs:
+            server: 192.168.238.20  ##这里写NFS服务器的IP地址
+            path: /nfs/data ##NFS服务器中的共享挂载目录(强调:这里的路径必须是目录中最后一层的文件夹,否则部署的应用将无权限创建目录导致Pending)
+
+# 4、部署yaml文件
+[root@k8s-client nfs]# kubectl apply -f .
+
+# 5、查看服务
+[root@k8s-client nfs]# kubectl get pods
+NAME                                     READY   STATUS    RESTARTS   AGE
+nfs-client-provisioner-78697f488-5p52r   1/1     Running   0          16h
+ 
+# 6、列出你的集群中的StorageClass 
+[root@k8s-client nfs]# kubectl get storageclass
+NAME                  PROVISIONER      RECLAIMPOLICY   VOLUMEBINDINGMODE   ALLOWVOLUMEEXPANSION   AGE
+managed-nfs-storage   fuseim.pri/ifs   Delete          Immediate           false                  16h
+
+# 7、标记一个StorageClass为默认的 (是storageclass的名字也就是你部署的StorageClass名字是啥就写啥)
+[root@k8s-client nfs]# kubectl patch storageclass managed-nfs-storage -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
+storageclass.storage.k8s.io/managed-nfs-storage patched
+
+# 8、验证你选用为默认的StorageClass
+[root@k8s-client nfs]# kubectl get storageclass
+NAME                            PROVISIONER      RECLAIMPOLICY   VOLUMEBINDINGMODE   ALLOWVOLUMEEXPANSION   AGE
+managed-nfs-storage (default)   fuseim.pri/ifs   Delete          Immediate           false            
+```
+
+# 5、安装kubesphere及其相应的插件
+
+## 5.1、将离线包上传至harbor仓库(该操作只需在master节点进行)
+
+将安装包目录下的kubesphere文件夹上传至服务机master节点的
+```sh
+/opt/package/
+```
+目录下
+
+进入harbor仓库
+![image-20211110230053303](assets/image-20211110230053303.png)
+新建一个kubesphere项目
+![image-20211111101212415](assets/image-20211111101212415.png)
+
+```sh
+# 在服务机master节点中执行命令
+# 重新启动harbor,因为docker重启但是harbor不能自动重启
+cd /opt/package/harbor
+docker-compose start
+# 进入该路径
+cd /opt/package/kubesphere/
+
+# 上传安装包 这里的最后一行改成自己harbor仓库的ip+端口号+项目名称
+chmod +x offline-installation-tool.sh
+./offline-installation-tool.sh -l images-list.txt -d ./kubesphere-images -r server.harbor.com:80/kubesphere
+# 等待上传完毕
+```
+![image-20211110230429326](assets/image-20211110230429326.png)
+
+## 5.2、最小化安装kubesphere
+
+```sh
+# 执行以下命令
+# 1.编辑cluster-configuration.yaml添加您的私有镜像仓库
+vim cluster-configuration.yaml
+spec:
+  persistence:
+    storageClass: ""        
+  authentication:
+    jwtSecret: ""           
+  local_registry: server.harbor.com:80/kubesphere   #添加内容
+
+# 2.编辑完成后保存 cluster-configuration.yaml,使用以下命令将 ks-installer 替换为您自己仓库的地址---(本文的harbor安装地址server.harbor.com:80/kubesphere)
+sed -i "s#^\s*image: kubesphere.*/ks-installer:.*#        image: server.harbor.com:80/kubesphere/kubesphere/ks-installer:v3.1.1#" kubesphere-installer.yaml
+
+# 3.请按照如下先后顺序安装(必须)
+kubectl apply -f kubesphere-installer.yaml 
+kubectl get pods -A
+```
+![image-20211110231108730](assets/image-20211110231108730-16365570741011.png)
+![image-20211110231233626](assets/image-20211110231233626.png)
+
+```sh
+# 4.等待ks-installer容器运行完毕,执行
+kubectl apply -f cluster-configuration.yaml
+```
+
+## 5.3、检查安装日志
+
+```sh
+# 检查安装日志等待安装成功
+kubectl logs -n kubesphere-system $(kubectl get pod -n kubesphere-system -l app=ks-install -o jsonpath='{.items[0].metadata.name}') -f
+```
+如下图所示,则表示安装成功
+![image-20211111101337952](assets/image-20211111101337952.png)
+
+
+## 5.4、安装必要的插件
+
+本次需要安装额外的几个插件
+1. KubeSphere日志系统
+2. KubeSphere DevOps
+3. KubeSphere kubeedge
+
+```sh
+# 1.编辑cluster-configuration.yaml
+vim cluster-configuration.yaml
+
+devops:
+  enabled: true # 将“false”更改为“true”。
+
+kubeedge:          
+  enabled: true # 将“false”更改为“true”。
+
+logging:
+  enabled: true # 将“false”更改为“true”。
+
+# 2.执行以下命令开始安装
+kubectl apply -f cluster-configuration.yaml
+
+# 3.监控安装过程
+kubectl logs -n kubesphere-system $(kubectl get pod -n kubesphere-system -l app=ks-install -o jsonpath='{.items[0].metadata.name}') -f
+```
+如下图所示,表示安装成功
+![image-20211111102817757](assets/image-20211111102817757.png)
+![image-20211111102801129](assets/image-20211111102801129.png)
+
+## 5.5、开放30881端口(重要--master节点操作)
+
+```sh
+kubectl -n kubesphere-system patch svc ks-apiserver -p '{"spec":{"type":"NodePort","ports":[{"port":80,"protocal":"TCP","targetPort":9090,"nodePort":30881}]}}'
+```
+
+![image-20211115213927460](assets/image-20211115213927460.png)
+
+## 5.6、创建云平台的企业空间
+
+1. 登录kubesphere,输入http://10.168.59.60:30880/,端口号默认为30880,第一次进入需要修改初始密码为: MKcloud123
+![image-20211115214619362](assets/image-20211115214619362.png)
+2. 进入企业空间,创建新的企业空间为mkcloud
+![image-20211115214723424](assets/image-20211115214723424.png)
+3. 进入企业空间mkcloud,创建项目mkcloud
+![image-20211115214817599](assets/image-20211115214817599.png)
+4. 进入项目选择默认设置即可
+![image-20211115214846424](assets/image-20211115214846424.png)
+![image-20211115214912342](assets/image-20211115214912342.png)
+![image-20211115214937388](assets/image-20211115214937388.png)
+
+## 5.7、kubesphere添加Harbor仓库
+
+1. 进入当前项目
+![image-20211118211440018](assets/image-20211118211440018.png)
+2. 选择配置中心的密钥,选择添加密钥
+![image-20211118211533239](assets/image-20211118211533239.png)
+3. 密钥名称填写为harbor,仓库地址填写域名加端口号
+![image-20211118211659229](assets/image-20211118211659229.png)
+4. 添加成功会显示私有密钥
+![image-20211118211733125](assets/image-20211118211733125.png)
+
+# 6、卸载云平台环境
+
+***
+
+## 6.1、卸载K8S
+
+```shell
+kubeadm reset -f
+modprobe -r ipip
+lsmod
+rm -rf ~/.kube/
+rm -rf /etc/kubernetes/
+rm -rf /etc/systemd/system/kubelet.service.d
+rm -rf /etc/systemd/system/kubelet.service
+rm -rf /usr/bin/kube*
+rm -rf /etc/cni
+rm -rf /opt/cni
+rm -rf /var/lib/etcd
+rm -rf /var/etcd
+yum clean all
+yum remove kube*
+```
+
+## 6.2、卸载docker
+
+```shell
+# 1.停止docker
+sudo systemctl stop docker
+# 2.查询安装过的包
+yum list installed | grep docker
+# 3.删除安装的软件包
+yum -y remove docker*
+# 4.删除镜像/容器等
+rm -rf /var/lib/docker
+```
+
+# 7、目前遇见的BUG与解决方案
+
+***
+
+## 7.1、harbor仓库登录显示400错误
+
+![image-20211123200112617](assets/image-20211123200112617.png)
+```sh
+Error response from daemon: login attempt to https://server.harbor.com/v2/ failed with status: 400 Bad Request
+```
+
+查询相关文档发现是nginx的配置出现了问题
+[Docker 登录返回 400 错误请求](https://github.com/goharbor/harbor/issues/7159)
+
+```sh
+#修改方式如下
+#1.进入harbor仓库位置
+cd /opt/package/software/harbor
+#2.修改配置文件
+vim ./common/config/portal/nginx.conf
+#3.增加一个字段
+http {
+    client_body_temp_path /tmp/client_body_temp;
+    proxy_temp_path /tmp/proxy_temp;
+    fastcgi_temp_path /tmp/fastcgi_temp;
+    uwsgi_temp_path /tmp/uwsgi_temp;
+    scgi_temp_path /tmp/scgi_temp;
+    large_client_header_buffers 4 1k;  #增加的
+    
+#4.重启nginx即可
+docker ps 
+#执行的结果e939b007b6ca   goharbor/harbor-core:v2.3.2          "/harbor/entrypoint.…"
+
+docker restart e39629e9c2c4
+```
+
+## 7.2、单节点安装pod报错Pending
+
+![image-20220317164430599](assets/image-20220317164430599.png)
+
+```sh
+# 当创建单机版的 k8s 时,这个时候 master 节点是默认不允许调度 pod 的,需要执行
+kubectl taint nodes --all node-role.kubernetes.io/master-
+```
+
+## 7.3、kubesphere的api-server无法启动
+
+api-server显示报错---无法申请资源,原因是docker的进程数不够,增加一下的配置重启docker就行
+
+```shell
+echo "
+[Unit]
+Description=Docker Application Container Engine
+Documentation=https://docs.docker.com
+# BindsTo=containerd.service
+# After=network-online.target firewalld.service containerd.service
+After=network-online.target firewalld.service
+Wants=network-online.target
+# Requires=docker.socket
+
+[Service]
+Type=notify
+# the default is not to use systemd for cgroups because the delegate issues still
+# exists and systemd currently does not support the cgroup feature set required
+# for containers run by docker
+# ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
+ExecStart=/usr/local/bin/dockerd
+ExecReload=/bin/kill -s HUP $MAINPID
+TasksMax=infinity
+TimeoutSec=0
+RestartSec=2
+Restart=always
+
+# Note that StartLimit* options were moved from "Service" to "Unit" in systemd 229.
+# Both the old, and new location are accepted by systemd 229 and up, so using the old location
+# to make them work for either version of systemd.
+StartLimitBurst=3
+
+# Note that StartLimitInterval was renamed to StartLimitIntervalSec in systemd 230.
+# Both the old, and new name are accepted by systemd 230 and up, so using the old name to make
+# this option work for either version of systemd.
+StartLimitInterval=60s
+
+# Having non-zero Limit*s causes performance problems due to accounting overhead
+# in the kernel. We recommend using cgroups to do container-local accounting.
+LimitNOFILE=infinity
+LimitNPROC=infinity
+LimitCORE=infinity
+
+# Comment TasksMax if your systemd version does not support it.
+# Only systemd 226 and above support this option.
+# TasksMax=infinity
+
+# set delegate yes so that systemd does not reset the cgroups of docker containers
+Delegate=yes
+
+# kill only the docker process, not all processes in the cgroup
+KillMode=process
+
+[Install]
+WantedBy=multi-user.target
+" > /etc/systemd/system/docker.service
+
+# 重启docker
+systemctl daemon-reload && systemctl restart docker
+```
+
+## 7.4、k8s cgroup 内存泄漏
+
+**centos7.6及其以下版本,造成内存泄漏**
+
+```shell
+vim /boot/grub2/grub.cfg
+# 在 ro crashkernel=auto 后面添加 cgroup.memory=nokmem 
+# 重启电脑
+
+```
+
+![img](assets/20210509204813641.png)
+
+
+
+# 附录----安装软件的版本
+
+| 软件           | 版本    |
+| -------------- | ------- |
+| centos         | 7.7     |
+| docker         | 19.03.7 |
+| docker-compose | 2.1.0   |
+| Harbor         | 2.1.5   |
+| kubernetes     | 1.19.0  |
+| kubesphere     | 3.1.1   |
+

BIN
大数据项目/大数据平台安装文档/assets/image-20220320185243246.png


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 731 - 0
大数据项目/大数据平台安装文档/大数据平台环境搭建.md


+ 128 - 0
大数据项目/大数据平台安装文档/大数据监控安装文档.md

@@ -0,0 +1,128 @@
+> [TOC]
+
+# 监控安装文档
+
+# 1、 `prometheus`
+
+1. 上传`prometheus`安装包至`lab3`服务器`/opt/modules/`目录下并解压
+
+   ```shell
+   tar -zxf prometheus-2.32.1.linux-amd64.tar.gz
+   ```
+
+2. 进入`/opt/modules/prometheus-2.32.1`目录,修改`prometheus.yml`文件
+
+   ```shell
+   vi prometheus.yml
+   ```
+
+   将配置信息做如下修改
+
+   ```shell
+   scrape_configs:
+     # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
+     - job_name: "prometheus"
+   
+       # metrics_path defaults to '/metrics'
+       # scheme defaults to 'http'.
+   
+       static_configs:
+         - targets: ["lab3:9090"]
+     - job_name: "node exporter"
+   
+       # metrics_path defaults to '/metrics'
+       # scheme defaults to 'http'.
+   
+       static_configs:
+         - targets: ['lab1:8100', 'lab2:8100', 'lab3:8100']
+     - job_name: "kafka exporter"
+   
+       # metrics_path defaults to '/metrics'
+       # scheme defaults to 'http'.
+   
+       static_configs:
+         - targets: ['lab3:9308']
+   ```
+
+3. 在`/opt/modules/prometheus-2.32.1`目录下启动`prometheus`
+
+   ```shell
+   nohup ./prometheus --config.file=prometheus.yml > ./prometheus.log 2>&1 &
+   ```
+
+4. 查看`9090`端口状态或浏览器访问`http://lab3:9090`验证是否成功
+
+   ```shell
+   lsof -i:9090
+   ```
+
+# 2、`node_exporter`
+
+1. 上传`node_exporter`安装包至`lab3`服务器`/opt/modules/`目录下并解压
+
+   ```shell
+   tar -zxf node_exporter-1.3.1.linux-amd64.tar.gz
+   ```
+
+2. 进入`/opt/modules/node_exporter-1.3.1`目录,启动`node_exporter`
+
+   ```shell
+   nohup ./node_exporter --web.listen-address=:8100 &
+   ```
+
+3. 查看`8100`端口状态或浏览器访问`http://lab3:8100/metrics`验证是否成功
+
+   ```shell
+   lsof -i:8100
+   ```
+
+4. 在`lab1`和`lab2`上重复上述步骤
+
+# 3、 `kafka_exporter`
+
+1. 上传`kafka_exporter`安装包至`lab3`服务器`/opt/modules/`目录下并解压
+
+   ```shell
+   tar -zxf kafka_exporter-1.4.2.linux-amd64.tar.gz
+   ```
+
+2. 进入`/opt/modules/kafka_exporter-1.4.2`目录,启动`kafka_exporter`
+
+   ```shell
+   nohup ./kafka_exporter --kafka.server=lab3:9092 > kafka_exporter.log  --web.listen-address=:9308 &
+   ```
+
+3. 查看`9308`端口状态或浏览器访问`http://lab3:9308/metrics`验证是否成功
+
+   ```shell
+   lsof -i:9308
+   ```
+
+# 4、`grafana`
+
+1. 上传`grafana`至`lab3`服务器`/opt/modules/`目录
+
+2. 进入`/opt/modules/grafana-8.3.4`目录,启动`grafana`
+
+   ```shell
+   nohup ./bin/grafana-server web > ./grafana.log 2>&1 &
+   ```
+
+3. 查看`3000`端口状态或浏览器访问`http://lab3:3000/`验证是否成功
+
+   ```shell
+   lsof -i:3000
+   ```
+
+4. 访问`http://lab3:3000`, 用户和密码均为`admin`
+5. 进入左侧设置,配置`prometheus`数据源及`mysql`数据源
+
+# 附录
+
+| 软件           | 版本   | 安装位置         |
+| -------------- | ------ | ---------------- |
+| prometheus     | 2.32.1 | lab3             |
+| node_exporter  | 1.3.1  | lab1,lab2,lab3 |
+| kafka_exporter | 1.4.2  | lab3             |
+| grafana        | 8.3.4  | lab3             |
+

+ 23 - 0
大数据项目/大数据平台安装文档/大数据运行文档.md

@@ -0,0 +1,23 @@
+> [TOC]
+
+# 1、部署后端
+
+```shell
+# 将jar包上传到lab1服务器
+nohup java -jar bigdata-0.0.1-SNAPSHOT.jar >log.txt &
+
+# 运行lab2上面的jar包
+
+```
+
+
+
+# 3、部署前端
+
+```shell
+# 将配置文件复制到指定目录
+mv nginx.conf /usr/local/nginx/conf
+```
+
+
+

+ 158 - 0
大数据项目/大数据平台安装文档/脚本.md

@@ -0,0 +1,158 @@
+# 修改ssh配置
+
+```shell
+cd /etc
+chmod 777 sudoers
+vim sudoers
+# 注释掉 Default requiretty 一行    ------  第56行
+chmod 600 sudoers
+```
+
+# 环境变量
+
+```shell
+cd /etc/profile.d
+vim myenv.sh
+# JAVA
+export JAVA_HOME=/opt/modules/java
+export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/jre/lib/rt.jar
+export PATH=$PATH:$JAVA_HOME/bin
+
+# spark
+export SPARK_HOME=/opt/modules/spark-3.1.2
+export PATH=$PATH:$SPARK_HOME/bin
+
+# scala
+export SCALA_HOME=/opt/modules/scala-2.12.15
+export PATH=$PATH:$SCALA_HOME/bin
+
+# minio
+export MINIO_ROOT_USER=minio
+export MINIO_ROOT_PASSWORD=minio123
+
+# HADOOP_HOME
+export HADOOP_HOME=/opt/modules/hadoop-3.1.3
+export PATH=$PATH:$HADOOP_HOME/bin
+export PATH=$PATH:$HADOOP_HOME/sbin
+
+# HIVE_HOME
+export HIVE_HOME=/opt/modules/hive
+export PATH=$PATH:$HIVE_HOME/bin
+
+# ZOOKEEPER_HOME
+export ZOOKEEPER_HOME=/opt/modules/zookeeper-3.4.14
+export PATH=$PATH:$ZOOKEEPER_HOME/bin
+
+# KAFKA_HOME
+export KAFKA_HOME=/opt/modules/kafka_2.11-2.1.1
+export PATH=$PATH:$KAFKA_HOME/bin
+
+# MYSQL_HOME
+export MYSQL_HOME=/opt/modules/mysql
+export PATH=$PATH:$MYSQL_HOME/bin
+
+# HBASE_HOME
+export HBASE_HOME=/opt/modules/hbase-2.2.6
+export PATH=$PATH:$HBASE_HOME/bin
+export HBASE_LIBRARY_PATH=/opt/modules/hbase-2.2.6/lib/native/Linux-amd64-64
+```
+
+> **不要忘了source一下!不要忘了source一下!不要忘了source一下!**
+>
+> **不要忘了source一下!不要忘了source一下!不要忘了source一下!**
+>
+> **不要忘了source一下!不要忘了source一下!不要忘了source一下!**
+>
+> `source /etc/profile`
+
+# 启动脚本---(脚本名字随便取,务必以sh结尾,eg start.sh)
+
+```shell
+#! /bin/bash
+
+## 三台机器都有环境变量是前提,否则修改脚本中启动命令为全路径
+## start zookeeper cluster 
+ssh lab1 zkServer.sh start
+ssh lab2 zkServer.sh start
+ssh lab3 zkServer.sh start
+
+## start hdfs
+start-dfs.sh
+
+## start yarn
+ssh lab2 start-yarn.sh
+
+## start hbase
+start-hbase.sh
+
+## start kafka
+ssh lab1 kafka-server-start.sh -daemon /opt/modules/kafka_2.11-2.1.1/config/server.properties
+ssh lab2 kafka-server-start.sh -daemon /opt/modules/kafka_2.11-2.1.1/config/server.properties
+ssh lab3 kafka-server-start.sh -daemon /opt/modules/kafka_2.11-2.1.1/config/server.properties
+
+## start solr---------需要修改ssh配置
+ssh lab1 sudo -i -u solr /opt/modules/solr/bin/solr start
+ssh lab2 sudo -i -u solr /opt/modules/solr/bin/solr start
+ssh lab3 sudo -i -u solr /opt/modules/solr/bin/solr start
+
+# start atlas
+ssh lab2 /opt/modules/atlas-2.2.0/bin/atlas_start.py
+```
+
+# 关闭脚本---(脚本名字随便取,务必以sh结尾,eg stop.sh)
+
+```shell
+#! /bin/bash
+## 三台机器都有环境变量是前提,否则修改脚本中启动命令为全路径
+
+# stop atlas
+ssh lab2 /opt/modules/atlas-2.2.0/bin/atlas_start.py
+
+ssh lab1 sudo -i -u solr /opt/modules/solr/bin/solr stop
+ssh lab2 sudo -i -u solr /opt/modules/solr/bin/solr stop
+ssh lab3 sudo -i -u solr /opt/modules/solr/bin/solr stop
+
+
+## stop kafka
+ssh lab1 kafka-server-stop.sh
+ssh lab2 kafka-server-stop.sh
+ssh lab3 kafka-server-stop.sh
+
+## stop hbase
+stop-hbase.sh
+
+## stop yarn
+ssh lab2 stop-yarn.sh
+
+## stop hdfs
+stop-dfs.sh
+
+## stop zookeeper cluster 
+ssh lab1 zkServer.sh stop
+ssh lab2 zkServer.sh stop
+ssh lab3 zkServer.sh stop
+```
+
+# 监控脚本
+
+```shell
+cd /usr/local/bin
+touch jpsall
+chmod +x jpsall
+vim jpsall
+
+#!/bin/bash
+# 执行jps命令查询每台服务器上的节点状态
+echo ======================集群节点状态====================
+
+for i in lab1 lab2 lab3
+do
+        echo ====================== $i ====================
+        ssh root@$i '/opt/modules/java/bin/jps'
+done
+echo ======================执行完毕====================
+
+```
+
+
+

BIN
算法平台项目/算法平台安装文档/assets/image-20220316185119154.png


BIN
算法平台项目/算法平台安装文档/assets/image-20220317204635163.png


BIN
算法平台项目/算法平台安装文档/assets/image-20220317204954859.png


BIN
算法平台项目/算法平台安装文档/assets/image-20220317205227206.png


BIN
算法平台项目/算法平台安装文档/assets/image-20220317205535260.png


BIN
算法平台项目/算法平台安装文档/assets/image-20220317205738403-16475218592261.png


BIN
算法平台项目/算法平台安装文档/assets/image-20220317205738403.png


BIN
算法平台项目/算法平台安装文档/assets/image-20220317210313188.png


BIN
算法平台项目/算法平台安装文档/assets/image20220309200518.png


BIN
算法平台项目/算法平台安装文档/assets/image20220309202338.png


BIN
算法平台项目/算法平台安装文档/assets/image20220309202557.png


BIN
算法平台项目/算法平台安装文档/assets/image20220309202909.png


BIN
算法平台项目/算法平台安装文档/assets/image20220309204832.png


BIN
算法平台项目/算法平台安装文档/assets/image20220309205028.png


BIN
算法平台项目/算法平台安装文档/assets/image20220309210150.png


BIN
算法平台项目/算法平台安装文档/assets/images20220309201941.png


+ 331 - 0
算法平台项目/算法平台安装文档/算法平台环境搭建.md

@@ -0,0 +1,331 @@
+> [TOC]
+
+# 1、离线安装unzip
+
+
+```shell
+# 1.新建unzip文件夹
+mkdir /opt/modules/unzip
+# 2.将unzip-6.0-19.el7.x86_64.rpm上传到/opt/modules/unzip下安装unzip
+rpm -Uvh unzip-6.0-19.el7.x86_64.rpm 
+
+# 3.查看是否安装成功
+rpm -qa | grep unzip
+```
+**输出unzip版本号表示安装成功**
+
+![image20220309200518](assets/image20220309200518.png)
+
+# 2、离线安装docker
+
+```shell
+# 1.新建docker文件夹
+mkdir /opt/modules/docker
+
+# 2.将docker19-rpm.zip上传到/opt/modules/docker下,进入目录,进行解压缩操作
+cd /opt/modules/docker
+
+unzip docker19-rpm.zip
+
+# 3.安装docker
+rpm -ivh *.rpm --force --nodeps
+
+# 4.启动docker并设置开机自启
+systemctl enable docker && systemctl start docker
+# 5.查看是否安装成功
+docker --version
+```
+
+**输出docker版本号表示安装成功**
+
+![images20220309201941](assets/images20220309201941.png)
+# 3、开启docker远程访问端口
+## 3.1、进入/etc/docker目录,生成ca秘钥和证书
+```shell
+cd /etc/docker
+
+read -s PASSWORD
+```
+
+**输入上条命令后,命令行会空一行,此时自行定义一个密码变量**
+
+![image20220309202338](assets/image20220309202338.png)
+
+```shell
+read -s SERVER
+```
+
+**输入上条命令后,命令行会空一行,此时输入当前服务器ip**
+
+![image20220309202557](assets/image20220309202557.png)
+
+```shell
+openssl genrsa -aes256 -passout pass:$PASSWORD  -out ca-key.pem 2048
+```
+
+**生成ca证书,填写配置信息**
+
+```shell
+openssl req -new -x509 -passin "pass:$PASSWORD" -days 365 -key ca-key.pem -sha256 -out ca.pem
+```
+
+![image20220309202909](assets/image20220309202909.png)
+
+
+## 3.2、生成server密钥和证书
+**生成server证书私钥文件**
+
+```shell
+openssl genrsa -out server-key.pem 2048
+```
+
+**生成server证书请求文件**
+
+```shell
+openssl req -subj "/CN=$SERVER" -new -key server-key.pem -out server.csr
+```
+
+**使用CA证书及CA密钥以及上面的server证书请求文件进行签发,生成server自签证书**
+
+```shell
+openssl x509 -req -days 365 -in server.csr -CA ca.pem -CAkey ca-key.pem -passin "pass:$PASSWORD" -CAcreateserial  -out server-cert.pem
+```
+
+## 3.3、生成client密钥和证书
+
+**生成client证书RSA私钥文件**
+
+```shell
+openssl genrsa -out key.pem 2048
+```
+
+**生成client证书请求文件**
+
+```shell
+openssl req -subj '/CN=client' -new -key key.pem -out client.csr
+
+sh -c 'echo "extendedKeyUsage=clientAuth" > extfile.cnf'
+```
+
+**生成client自签证书(根据上面的client私钥文件、client证书请求文件生成)**
+
+```shell
+openssl x509 -req -days 365 -in client.csr -CA ca.pem -CAkey ca-key.pem  -passin "pass:$PASSWORD" -CAcreateserial -out cert.pem  -extfile extfile.cnf
+```
+
+## 3.4、更改密钥权限,删除无用文件
+```shell
+chmod 0400 ca-key.pem key.pem server-key.pem
+
+chmod 0444 ca.pem server-cert.pem cert.pem
+
+rm client.csr server.csr
+```
+
+## 3.5、修改ExecStart属性
+```shell
+vim /usr/lib/systemd/system/docker.service
+
+ExecStart=/usr/bin/dockerd \
+    --tlsverify \
+    --tlscacert=/etc/docker/ca.pem \
+    --tlscert=/etc/docker/server-cert.pem \
+    --tlskey=/etc/docker/server-key.pem \
+    -H tcp://0.0.0.0:2376 \
+    -H unix:///var/run/docker.sock \
+     -H fd:// --containerd=/run/containerd/containerd.sock
+```
+## 3.6、重启docker服务
+```shell
+# c
+systemctl daemon-reload && systemctl restart docker
+
+# 验证docker服务已经具备了被远程访问的能力
+```
+
+![image-20220316185119154](assets/image-20220316185119154.png)
+
+# 4、上传docker镜像
+
+```shell
+# 1.将pythonimages.tar上传至服务器,并执行命令:
+docker load < pythonimage.tar
+
+# 2.将tensorflowimages.tar上传至服务器,并执行命令:
+docker load < tensorflowimage.tar
+
+# 3.查看已有镜像
+docker images
+```
+
+# 5、安装minio
+
+```shell
+### 创建目录
+mkdir /opt/modules/minio
+
+mkdir /opt/modules/minio/data
+
+### 进入目录
+cd /opt/modules/minio
+
+
+### 将minio安装文件上传到/opt/modules/minio下
+
+### 赋权
+chmod +x minio
+
+
+### /etc/profile文件添加环境变量
+vim /etc/profile
+
+export MINIO_ROOT_USER=minio
+export MINIO_ROOT_PASSWORD=minio123
+
+### 使环境变量命令参数详解生效
+source /etc/profile
+
+### 后台启动minio(--address参数为端口号设置)
+nohup /opt/modules/minio/minio server --address 0.0.0.0:9000 /opt/modules/minio/data/ > /opt/modules/minio/minio.log 2>&1 &
+```
+
+**浏览器输入服务器ip:9000,成功进入minio页面,安装成**
+
+![image20220309204832](assets/image20220309204832.png)
+
+```shell
+### 输入用户名minio,密码minio123后进入minio控制台,依次创建存储
+
+
+”algmode,”algorithm”,”algtemplate”,”dataset”,”publishedalgorithm”,”tensorboardfile”,”visiarguartifact”.
+```
+
+![image20220309205028](assets/image20220309205028.png)
+
+# 6、安装argo
+
+## 6.1、安装etcd---(如果有请忽略)
+
+![image-20220317204635163](assets/image-20220317204635163.png)
+
+```shell
+# 将etcd安装文件上传到/opt/modules/argo下,解压,并将文件放入系统路径中
+mkdir /opt/modules/argo
+cd /opt/modules/argo
+tar zxvf etcd-v3.5.1-linux-amd64.tar.gz
+cd etcd-v3.5.1-linux-amd64
+cp etcd /usr/bin/
+cp etcdctl /usr/bin/
+
+# 创建一个服务描述文件,放入systemd的服务目录
+# 进入目录
+
+cd /usr/lib/systemd/system
+
+vim etcd.service # 添加如下内容
+
+[Unit]
+Description=Etcd Server
+After=network.target
+
+[Service]
+Type=simple
+WorkingDirectory=/var/lib/etcd/
+EnvironmentFile=-/etc/etcd/etcd.conf
+ExecStart=/usr/bin/etcd
+
+[Install]
+WantedBy=multi-user.target
+```
+
+## 6.2、安装argo
+
+1. 将 argo-linux-amd64.gz  文件上传至/opt/modules/argo目录下
+
+```shell
+# 执行命令 
+gunzip argo-linux-amd64.gz 
+chmod +x argo-linux-amd64 
+mv ./argo-linux-amd64 /usr/local/bin/argo 
+
+# 查看:
+argo version
+```
+
+![image-20220317204954859](assets/image-20220317204954859.png)
+
+2. 创建命名空间 
+
+```shell
+kubectl create ns argo
+```
+
+3. 安装argo
+
+```shell
+# 1.将argo安装文件quick-start-postgres.yaml和argo-images.tar 上传到/opt/modules/argo下
+docker load -i argo-images.tar
+
+# 共5个
+# argoproj/argocli:v3.0.3
+# minio/minio:RELEASE.2019-12-17T23-16-33Z 
+# postgres:12-alpine 
+# argoproj/argoexec:v3.0.3
+# argoproj/workflow-controller:v3.0.3
+
+# 2.执行命令进行安装
+
+kubectl apply -n argo -f quick-start-postgres.yaml
+
+# (卸载方式:kubectl delete -n argo -f quick-start-postgres.yaml)
+
+# 3.查看服务
+kubectl get pods -n argo
+```
+
+![image-20220317205227206](assets/image-20220317205227206.png)
+
+4. 角色绑定
+
+```shell
+# 当集群是基于RBAC(Role-Based Access Control,基于角色的访问控制)时,默认账户有很多的限制,比如不能支持组件,输出等等。执行以下命令授权默认的服务账户在默认的namespace中拥有admin的权限
+kubectl create rolebinding default-admin --clusterrole=admin --serviceaccount=default:default
+```
+
+5. 端口映射
+
+```shell
+kubectl patch svc argo-server -n argo -p '{"spec": {"type": "LoadBalancer"}}'
+
+kubectl patch svc minio -n argo -p '{"spec": {"type": "LoadBalancer"}}'
+
+# 通过kubectl get svc -n argo查看服务 ,查看映射后的端口(红框选中)
+# 根据 IP+argo-server端口的方式访问 argo ui界面,根据Ip+minio端口的方式访问argo-minio界面,用户名为admin,密码为password
+```
+
+![image-20220317205535260](assets/image-20220317205535260.png)
+
+# 7、目前遇见的BUG与解决方案
+
+## 7.1、argo无法正常启动
+
+若出现argo-server,postgres及workflow-controller Pod 状态出现问题。
+
+![image-20220317205738403](assets/image-20220317205738403-16475218592261.png)
+
+```shell
+# 解决方案:将hugepages关闭。将所有的节点hugepage关闭,pg中参数huge_page=try会默认不选择hugepage,因此能够运行成功。
+# 执行命令:
+echo "vm.nr_hugepages=0" >> /etc/sysctl.conf
+# 生效:(执行如下命令,或者执行/sbin/sysctl -p )
+sysctl -p
+# 查看
+kubectl get pod -o wide -l app=postgres -n argo
+```
+
+# 附录----安装软件的版本
+
+| 软件  | 版本                 |
+| ----- | -------------------- |
+| minio | 2021-06-17T00:10:46Z |
+| argo  | v3.0.2               |

+ 194 - 0
算法平台项目/算法平台安装文档/算法平台运行文档.md

@@ -0,0 +1,194 @@
+> [TOC]
+
+# 1、算法平台运行准备工作
+## 1.1、创建文件夹
+
+```shell
+mkdir /opt/uploadFile
+
+mkdir /opt/aiplat
+
+mkdir /opt/aiplat/docker_ca
+
+mkdir /opt/aiplat/test0708/testPython.py
+
+mkdir /opt/aiplat/demoCSV
+
+mkdir /opt/aiplat/dataPreProcess
+```
+
+## 1.2、将生成的docker远程连接证书复制到/opt/aiplat/docker_ca下
+
+```shell
+cp /etc/docker/* /opt/aiplat/docker_ca/
+```
+
+## 1.3、新建数据库renren_fast并将数据库导入
+
+## 1.4、将renren-fast.jar上传到/opt/aiplat
+
+## 1.5、在nginx中创建存放算法平台前端的文件夹
+
+```shell
+mkdir /usr/local/nginx/html/aiplat
+```
+
+将算法平台前端文件上传到该文件夹(共有三个,两个文件夹以及一个index.html)
+# 2、算法平台参数设置
+
+## 2.1、将application.yml上传到/opt/aiplat,并进行修改
+
+修改minio:endpoint为搭建好的minio IP
+
+```yaml
+minio:
+  endpoint: http://150.158.138.99:9006
+  bucket: test0706
+  access-key: minio
+  secret-key: minio123
+```
+修改docker:url为搭建好的docker所在IP
+
+```yaml
+docker:
+  url: https://10.168.57.11:2376
+```
+修改host、host-username、host-password为docker宿主机的ip、用户名和密码
+
+```yaml
+host: 10.168.57.11
+host-username: root
+host-password: root
+host-basepath: /opt/uploadFile
+host-port: 22
+```
+修改docker证书存放路径
+
+```yaml
+docker_ca: /opt/aiplat/docker_ca
+```
+修改获取kafka实时数据ip与端口,此ip为集群的kafkaIP
+    
+```yaml
+realTimeKafka1: 10.168.57.10:9092
+realTimeKafka2: 10.168.57.11:9092
+realTimeKafka3: 10.168.57.12:9092
+```
+修改算法结果入库模板ip(注:需提前将该ip所指服务器的hbase开启thrift服务,开启命令为./bin/hbase-daemon.sh start thrift)
+
+```yaml
+resultToDB: 10.168.57.10
+```
+修改数据预处理数据集存放文件夹
+
+```yaml
+datasetLocation: /opt/aiplat/demoCSV
+```
+
+修改数据预处理python文件存放文件夹
+
+```yaml
+dataPreProcessLocation: /opt/aiplat/dataPreProcess
+```
+###2.2将application-dev.yml上传到/opt/aiplat,并进行修改
+修改spring:datasource:url、spring:datasource:username、spring:datasource:password为算法平台数据库所在ip、用户名和密码
+
+```yaml
+url: jdbc:mysql://localhost:3306/renren_fast?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useSSL=false
+username: root
+password: root
+```
+修改多数据源配置,其中url要改为大数据平台数据库所在ip
+
+```yaml
+dynamic:
+  datasource:
+	bigData:
+		url: jdbc:mysql://localhost:3306/hebing?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useSSL=false
+		username: root
+		password: root
+		driver-class-name: com.mysql.jdbc.Driver
+```
+修改hbase集群ip,其中hbase.zookeeper.quorum为hbase集群IP
+
+```yaml
+hbase:
+config:
+	hbase.zookeeper.quorum: 10.168.57.10,10.168.57.11,10.168.57.12
+	hbase.zookeeper.property.clientPort: 2181
+	zookeeper.znode.parent: /hbase
+	hbase.client.keyvalue.maxsize: 1048576000
+```
+
+## 2.2、argo
+
+1. 修改renren-fast代码src/main/resources/application.yml如下部分
+
+```shell
+1.argo下 basepath为7.2 端口映射部分argo-server对应的端口,具体值为  https://ip:端口(注意此处为https,端口为红框标记端口)
+
+2.argo下minioendpoint为7.2 端口映射部分minio对应的端口,具体值为http://ip:端口(端口为红框标记端口)
+
+3.argo下 minioAccess-key 为 admin
+
+4.argo下 minioSecret-key 为 password
+
+5.argo下spark 相关参数暂时先不改,具体环境还未确定。
+```
+
+2. Akubenetes
+
+```shell
+1.Akubenete下basepath 值为 kubernetes环境 ip+端口,具体值为 https://ip:6443。(此处为https)
+
+2.Akubenete下kubeconfig-path 值为 kubernetes环境配置文件,需从部署k8s环境的服务器上下载,该配置文件在服务器上的地址为/root/.kube/config。 并将此处地址改为存放该config文件的具体地址。
+
+```
+
+![image-20220317210313188](assets/image-20220317210313188.png)
+
+```yaml
+renren-fast 
+src/main/resources/application.yml
+需更改如下部分
+
+#Argo
+argo:
+  basepath: http://192.168.222.100:32639
+  minioendpoint: http://192.168.222.100:31471
+  #  minioAccess-key: admin
+  minioAccess-key: vzZBapBXei60zI1t6oPl
+  #  minioSecret-key: password
+  minioSecret-key: nkjkRpJLkpb2THUpGKtdMBPPEi3XdmllnOctF8yS
+  sparkMasterRest: spark://10.168.57.10:16066
+  sparkMaster: spark://10.168.57.10:7077
+  sparkHdfsurl: hdfs://10.168.57.10:9000
+#kubenetes  Argo部分获取pod日志
+Akubenetes:
+  basepath: https://192.168.222.100:6443
+  kubeconfig-path: D:\\zhang\\VSCodeProjects\\0209\\config
+```
+
+
+
+## 2.3、修改nginx.conf配置文件,在server中添加
+
+```shell
+    location /aiplat {
+       		 alias  html/aiplat;
+                 index  index.html index.htm;
+                 try_files  $uri  $uri/   /index.html;
+        }
+```
+
+# 3、项目启动
+
+```shell
+nohup java -jar renren-fast.jar > log.file 2>&1 &
+
+cd/usr/local/nginx/sbin
+
+./nginx -s reload
+```
+
+启动后访问http://ip/aiplat/#/login(这里的ip要改为nginx的ip)

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác