Qihoo360/wayne 部署教程
阿新 • • 發佈:2018-12-15
系統
[[email protected] wayne]# cat /etc/redhat-release
CentOS Linux release 7.5.1804 (Core)
部署步驟
安裝docker
請參考安裝docker 17.03.2.ce教程
docker 版本,安裝方法是一樣的
[[email protected] tmp]# docker version Client: Version: 18.09.0 API version: 1.39 Go version: go1.10.4 Git commit: 4d60db4 Built: Wed Nov 7 00:48:22 2018 OS/Arch: linux/amd64 Experimental: false Server: Docker Engine - Community Engine: Version: 18.09.0 API version: 1.39 (minimum version 1.12) Go version: go1.10.4 Git commit: 4d60db4 Built: Wed Nov 7 00:19:08 2018 OS/Arch: linux/amd64 Experimental: false
安裝docker-compose
yum install epel-release
yum install python-pip -y
pip install pip --upgrade
[[email protected] tmp]# docker-compose version
docker-compose version 1.23.1, build b02f130
docker-py version: 3.5.1
CPython version: 2.7.5
OpenSSL version: OpenSSL 1.0.2k-fips 26 Jan 2017
2.獲取程式碼
git clone https://github.com/Qihoo360/wayne.git
git submodule update --init --recursive
啟動mysql
# cd watne; docker-compose up -d mysql Starting wayne_mysql_1_780a202aa4f5 ... done Attaching to wayne_mysql_1_780a202aa4f5 mysql_1_780a202aa4f5 | Initializing database mysql_1_780a202aa4f5 | 2018-11-19 05:24:55 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). mysql_1_780a202aa4f5 | 2018-11-19 05:24:55 0 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap. mysql_1_780a202aa4f5 | 2018-11-19 05:24:55 0 [Note] /usr/sbin/mysqld (mysqld 5.6.41) starting as process 37 ... mysql_1_780a202aa4f5 | 2018-11-19 05:24:55 37 [Note] InnoDB: Using atomics to ref count buffer pool pages mysql_1_780a202aa4f5 | 2018-11-19 05:24:55 37 [Note] InnoDB: The InnoDB memory heap is disabled mysql_1_780a202aa4f5 | 2018-11-19 05:24:55 37 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins mysql_1_780a202aa4f5 | 2018-11-19 05:24:55 37 [Note] InnoDB: Memory barrier is not used mysql_1_780a202aa4f5 | 2018-11-19 05:24:55 37 [Note] InnoDB: Compressed tables use zlib 1.2.3 mysql_1_780a202aa4f5 | 2018-11-19 05:24:55 37 [Note] InnoDB: Using Linux native AIO
建立資料庫配置檔案
[[email protected] tmp]# cat /tmp/dev.conf
DBName = wayne
# MySQL address,如果MySQL是通過docker-compose啟動的,
# Mac OS 下無法直接通過127.0.0.1訪問,請修改為實際IP
DBTns = tcp(10.39.47.63:3306)
DBUser = root
DBPasswd = root
啟動wayne服務
$ docker run --rm -e GOPATH=/go -v /tmp/dev.conf:/opt/wayne/conf/dev.conf -p 8080:8080 360cloud/wayne /opt/wayne/backend apiserver
啟動結果
登入
您可以從通過 http://ip:8080/admin 訪問本地 Wayne, 預設管理員賬號admin:admin。
叢集配置
進入後臺
新增例子
搭建完成