breeze 可视安装 k8s 集群

官方文档:
https://github.com/wise2c-devops/breeze/blob/master/BreezeManual-CN.md

breeze 主机初始化

breeze.sh
#!/bin/bash

#取消SELINUX设定及放开防火墙
systemctl enable firewalld.service
systemctl restart firewalld.service
setenforce 0
sed --follow-symlinks -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config
firewall-cmd --set-default-zone=trusted
firewall-cmd --complete-reload

# 设置 yum repository
yum install -y yum-utils \
device-mapper-persistent-data \
lvm2
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

# 安装并启动 docker
yum install -y docker-ce-18.09.8 docker-ce-cli-18.09.8 containerd.io

mkdir -p /etc/docker/
cat > /etc/docker/daemon.json <<EOF
{
  "registry-mirrors": ["http://hub-mirror.c.163.com"]
}
EOF

systemctl enable docker
systemctl start docker

#安装docker-compose命令
yum install -y docker-compose

#下载对应版本的docker-compose文件
#curl -L https://raw.githubusercontent.com/wise2c-devops/breeze/v1.15.4/docker-compose-centos.yml -o docker-compose.yml

#导入离线镜像
#docker load -i breeze.tar

#运行docker-compose
#docker-compose up -d

#ssh免密登录 & 生成秘钥
#ssh-keygen -t rsa
#发送秘钥
#ssh-copy-id 192.168.6.190

#open chrome  IP:88
docker-compose.yml
version: '2'
services:
  deploy:
    container_name: deploy-main
    image: wise2c/pagoda:v1.2.0
    restart: always
    entrypoint: sh
    command:
    - -c
    - "/root/pagoda -logtostderr -v 4 -w /workspace"
    ports:
    - 88:80
    - 8088:8080
    volumes:
    - $HOME/.ssh:/root/.ssh
    - $PWD/deploy:/deploy
    volumes_from:
    - playbook
  ui:
    container_name: deploy-ui
    image: wise2c/deploy-ui:v1.6
    restart: always
    network_mode: "service:deploy"
  playbook:
    container_name: deploy-playbook
    image: wise2c/playbook:v1.15.4
    volumes:
    - playbook:/workspace
  yum-repo:
    container_name: deploy-yumrepo
    image: wise2c/yum-repo:v1.15.4
    ports:
    - 2009:2009 
    restart: always
volumes:
  playbook:
    external: false
Logo

K8S/Kubernetes社区为您提供最前沿的新闻资讯和知识内容

更多推荐