Skip to content

qiaofeng1227/jd

Repository files navigation

rainbond 平台安装应用实现自动化

  1. 操作系统升级内核
    ubuntu20.04内核足够新,centos系统需要升级

  2. 安装docker

curl sh.rainbond.com/install_docker | bash
  1. 安装
yum -y install nfs-utils    # Cenots系统
apt-get install nfs-common  # ubuntu系统
  1. 运行控制台
docker run -d -p 7070:7070 --name=rainbond-allinone --restart=always -v ~/.ssh:/root/.ssh -v ~/rainbonddata:/app/data registry.cn-beijing.aliyuncs.com/quyc/rainbond-allinone:v1.2
  1. 安装k8s 准备:
ssh-keygen
wget http://sh.rainbond.com/init_node && chmod +x init_node
export SSH_RSA=$(cat ~/.ssh/id_rsa.pub)  && ./init_node

上传rke文件到 /usr/bin/rke 上传cluster.yml文件到 /root/cluster.yml

chmod +x /usr/bin/rke 
rke up
wget https://grstatic.oss-cn-shanghai.aliyuncs.com/binary/kubectl -O /usr/bin/kubectl
chmod +x /usr/bin/kubectl
mkdir /root/.kube && cp kube_config_cluster.yml /root/.kube/config
wget https://pkg.goodrain.com/pkg/helm && chmod +x helm && mv helm /usr/local/bin/
kubectl get node
  1. 进入控制台 image

image

image

  1. 手动创建tomcat应用,开放外部端口并挂载路径/usr/local/tomcat
  2. 记录token和集群ID image

image

  1. 安装grctl命令
docker run -it --rm -v /:/rootfs registry.cn-beijing.aliyuncs.com/quyc/rainbond-grctl:v1.2 copy && mv /usr/local/bin/rainbond-grctl /usr/local/bin/grctl && grctl install
  1. init service
grctl replace ip --ip=$public_ip --domain=$public_ip:7070 --token=<token值> --n=< 集群id> --s=true