Wayne管理k8s集群

1:系统:

[root@server1 docker-compose]# cat /etc/redhat-release

CentOS Linux release 7.6.1810 (Core)

2:安装docker和docker-compose

安装docker:

删除老版本:

sudo yum remove docker \

                  docker-client \

                  docker-client-latest \

                  docker-common \

                  docker-latest \

                  docker-latest-logrotate \

                  docker-logrotate \

                  docker-selinux \

                  docker-engine-selinux \

                  docker-engine

安装包

sudo yum install -y yum-utils \

  device-mapper-persistent-data \

  lvm2

下载repo源

sudo yum-config-manager \

    --add-repo \

    https://download.docker.com/linux/centos/docker-ce.repo

yum安装docker-ce

 sudo yum install docker-ce

启动docker-ce

systemctl start docker

卸载docker-ce

sudo yum remove docker-ce

sudo rm -rf /var/lib/docker

安装docker-compose

下载docker-compose二进制文件包

sudo curl -L https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose

赋予权限

sudo chmod +x /usr/local/bin/docker-compose

卸载docker-compose

sudo rm /usr/local/bin/docker-compose

3:获取代码:

git clone https://github.com/Qihoo360/wayne.git

cd wayne;git submodule update --init --recursive

4:启动mysql

cd  /software/wayne/wayne/hack/docker-compose

[root@server1 docker-compose]# docker-compose up -d mysql

5:创建数据库配置文件

[root@server1 docker-compose]# cat /tmp/dev.conf

DBName = wayne

DBTns = tcp(172.29.0.11:3306)

DBUser = root

DBPasswd = root

6:启动wayne服务

docker run -d  -e GOPATH=/go -v /tmp/dev.conf:/opt/wayne/conf/dev.conf -p 42000:8080 360cloud/wayne /opt/wayne/backend apiserver

7:启动结果

http://119.28.239.201:42000/admin    用户名/密码: admin/admin

8:添加集群配置信息,kubeConfig的信息使用ll /root/.kube/config     

你可能感兴趣的:(Wayne管理k8s集群)