码迷,mamicode.com
首页 > 其他好文 > 详细

一、Walle部署系统

时间:2018-11-12 14:50:51      阅读:606      评论:0      收藏:0      [点我收藏+]

标签:tab   tor   writing   local   检查   avatar   回滚   img   防火墙   

 Walle 一个web部署系统工具,配置简单、功能完善、界面流畅、开箱即用!支持git、svn版本管理,支持各种web代码发布,PHP,Python,JAVA等代码的发布、回滚,可以通过web来一键完成。

实验系统:CentOS 6.8_64bit
实验前提:防火墙和selinux都关闭

实验环境:

[root@m1 walle-web]# httpd -v
Server version: Apache/2.2.15 (Unix)
Server built:   Jun 19 2018 15:45:13

[root@m1 walle-web]# mysql
Server version: 5.1.73 

[root@m1 walle-web]# php -v
PHP 5.6.38 (cli) (built: Sep 15 2018 09:50:52) 

参考官网:https://www.walle-web.io/docs/index.html

 

一、下载软件

1、安装git

yum install git -y

2、下载walle

#创建目录

mkdir -p /data/www && cd /data/www

 

#下载walle软件

[root@m1 ~]# git clone https://github.com/meolu/walle-web.git walle-web
Initialized empty Git repository in /root/walle-web/.git/
remote: Enumerating objects: 204, done.
remote: Counting objects: 100% (204/204), done.
remote: Compressing objects: 100% (149/149), done.
remote: Total 5333 (delta 139), reused 109 (delta 55), pack-reused 5129
Receiving objects: 100% (5333/5333), 14.35 MiB | 2.33 MiB/s, done.
Resolving deltas: 100% (3113/3113), done.
[root@m1 ~]# ll
drwxr-xr-x 19 root root    4096 Nov 12 12:33 walle-web
[root@m1 ~]# cd walle-web
[root@m1 walle-web]# ll
total 220
drwxr-xr-x 2 root root   4096 Nov 12 12:33 assets
drwxr-xr-x 2 root root   4096 Nov 12 12:33 components
-rw-r--r-- 1 root root    983 Nov 12 12:33 composer.json
-rw-r--r-- 1 root root 120300 Nov 12 12:33 composer.lock
drwxr-xr-x 2 root root   4096 Nov 12 12:33 config
drwxr-xr-x 3 root root   4096 Nov 12 12:33 console
drwxr-xr-x 2 root root   4096 Nov 12 12:33 controllers
drwxr-xr-x 2 root root   4096 Nov 12 12:33 docker
-rw-r--r-- 1 root root    848 Nov 12 12:33 Dockerfile
drwxr-xr-x 2 root root   4096 Nov 12 12:33 docs
-rw-r--r-- 1 root root  10255 Nov 12 12:33 LICENSE
drwxr-xr-x 3 root root   4096 Nov 12 12:33 mail
drwxr-xr-x 4 root root   4096 Nov 12 12:33 messages
drwxr-xr-x 2 root root   4096 Nov 12 12:33 migrations
drwxr-xr-x 5 root root   4096 Nov 12 12:33 models
-rw-r--r-- 1 root root   5781 Nov 12 12:33 README.md
drwxr-xr-x 2 root root   4096 Nov 12 12:33 runtime
drwxr-xr-x 3 root root   4096 Nov 12 12:33 tests
drwxr-xr-x 8 root root   4096 Nov 12 12:33 views
drwxr-xr-x 5 root root   4096 Nov 12 12:33 web
drwxr-xr-x 2 root root   4096 Nov 12 12:33 widgets
-rwxr-xr-x 1 root root    793 Nov 12 12:33 yii  

2、安装软件环境:LNMP环境

#安装http 和mysql
yum install httpd mysql-server -y 

#启服务
service httpd start
service mysqld startll

#配置epel源 2.Centos 5.X rpm -Uvh http://mirror.webtatic.com/yum/el5/latest.rpm CentOs 6.x rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm CentOs 7.X rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm #清缓存 yum clean all yum makecache [root@m1 yum.repos.d]# yum list installed | grep php php56w-common.x86_64 5.6.38-1.w6 @webtatic php56w-fpm.x86_64 5.6.38-1.w6 @webtatic #install php yum install php56w php56w-mbstring.x86_64 php56w-mbstring.x86_64 -y #检查 [root@m1 ~]# php -v PHP 5.6.38 (cli) (built: Sep 15 2018 09:50:52) Copyright (c) 1997-2016 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies

3、加入php页面支持

vim /etc/httpd/conf/httpd.conf

DirectoryIndex index.php index.html index.html.var     //增加index.php

4、mysql创建数据库并修改root密码:

mysql

CREATE DATABASE walle;
UPDATE mysql.user SET Password=PASSWORD(123456) WHERE User=‘root‘;
FLUSH PRIVILEGES;
quit

二、安装walle-web

1.修改配置文件,连接数据库:(备注:搜db,仅需添加密码,其它默认配置即可)

vim /data/www/walle-web/config/local.php
--------------------------------------------->
‘db‘ => [
            ‘dsn‘       => ‘mysql:host=127.0.0.1;dbname=walle‘,     //数据库地址与库名称
            ‘username‘  => ‘root‘,                                  //连接数据库用户
            ‘password‘  => ‘123456‘,                                //用户密码
        ],

 2.安装composer:

[root@m1 config]# curl -sS http://getcomposer.org/installer | php
Downloading...

Composer (version 1.7.3) successfully installed to: /data/www/walle-web/config/composer.phar
Use it: php composer.phar

Some settings on your machine may cause stability issues with Composer.
If you encounter issues, try to change the following:

Your PHP (5.3.3) is quite old, upgrading to PHP 5.3.4 or higher is recommended.
Composer works with 5.3.2+ for most people, but there might be edge case issues.

 

[root@m1 config]# mv composer.phar /usr/local/bin/composer

3、安装vendor

[root@m1 walle-web]# cd /data/www/walle-web
[root@m1 walle-web]# 
[root@m1 walle-web]# composer install --prefer-dist --no-dev --optimize-autoloader -vvvv
Reading ./composer.json
Loading config file ./composer.json
Checked CA file /etc/pki/tls/certs/ca-bundle.crt: valid
Executing command (/data/www/walle-web): git branch --no-color --no-abbrev -v
Executing command (/data/www/walle-web): git describe --exact-match --tags
Executing command (/data/www/walle-web): git log --pretty="%H" -n1 HEAD
Executing command (/data/www/walle-web): hg branch
Executing command (/data/www/walle-web): fossil branch list
Executing command (/data/www/walle-web): fossil tag list
Executing command (/data/www/walle-web): svn info --xml
Failed to initialize global composer: Composer could not find the config file: /root/.composer/composer.json
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
Running 1.7.3 (2018-11-01 10:05:06) with PHP 5.6.38 on Linux / 2.6.32-642.6.2.el6.x86_64
Reading ./composer.lock
Loading composer repositories with package information
Installing dependencies from lock file
Reading ./composer.lock
Resolving dependencies through SAT
Looking at all rules.

Dependency resolution completed in 0.000 seconds
Analyzed 61 packages to resolve dependencies
Analyzed 84 rules to resolve dependencies
Package operations: 12 installs, 0 updates, 0 removals
Installs: yiisoft/yii2-composer:2.0.6, bower-asset/jquery:3.2.1, bower-asset/inputmask:3.3.11, bower-asset/punycode:v1.3.2, bower-asset/yii2-pjax:2.0.7.1, cebe/markdown:1.1.2, ezyang/htmlpurifier:v4.10.0, yiisoft/yii2:2.0.15.1, bower-asset/bootstrap:v3.3.7, yiisoft/yii2-bootstrap:2.0.8, swiftmailer/swiftmailer:v5.4.9, yiisoft/yii2-swiftmailer:2.0.7
  - Installing yiisoft/yii2-composer (2.0.6): Downloading https://api.github.com/repos/yiisoft/yii2-composer/zipball/163419f1f197e02f015713b0d4f85598d8f8aa80
Downloading (connecting...)
Following redirect (2) https://codeload.github.com/yiisoft/yii2-composer/legacy.zip/163419f1f197e02f015713b0d4f85598d8f8aa80
Downloading https://codDownloading (100%)Writing /root/.composer/cache/files/yiisoft/yii2-composer/20b67991b06a9df33aaebafef278af9148a44dee.zip into cache from /data/www/walle-web/vendor/yiisoft/yii2-composer/6b5d15aad9af650208df1d56e7401a13

 Extracting archiveExecuting command (CWD): unzip -qq  ‘/data/www/walle-web/vendor/yiisoft/yii2-composer/6b5d15aad9af650208df1d56e7401a13‘ -d ‘/data/www/walle-web/vendor/composer/7253fa55‘
Loading plugin yii\composer\Plugin
    REASON: Required by the root package: Install command rule (install yiisoft/yii2-composer 2.0.6)

  - Installing bower-asset/jquery (3.2.1): Downloading https://api.github.com/repos/jquery/jquery-dist/zipball/77d2a51d0520d2ee44173afdf4e40a9201f5964e
Downloading (connecting...)
Following redirect (2) https://codeload.github.com/jquery/jquery-dist/legacy.zip/77d2a51d0520d2ee44173afdf4e40a9201f5964e
Downloading https://codeloDownloading (100%)Writing /root/.composer/cache/files/bower-asset/jquery/da2d9b9cec42cc780b0b896c590e2177db070974.zip into cache from /data/www/walle-web/vendor/bower-asset/jquery/fdeeeff710966d750a115b12d61af8c3

 Extracting archiveExecuting command (CWD): unzip -qq  ‘/data/www/walle-web/vendor/bower-asset/jquery/fdeeeff710966d750a115b12d61af8c3‘ -d ‘/data/www/walle-web/vendor/composer/2620559e‘
    REASON: Required by the root package: Install command rule (install bower-asset/jquery 3.2.1)

  - Installing bower-asset/inputmask (3.3.11): Downloading https://api.github.com/repos/RobinHerbots/Inputmask/zipball/5e670ad62f50c738388d4dcec78d2888505ad77b
Downloading (connecting...)
Following redirect (2) https://codeload.github.com/RobinHerbots/Inputmask/legacy.zip/5e670ad62f50c738388d4dcec78d2888505ad77b
Downloading https://coDownloading (100%)Writing /root/.composer/cache/files/bower-asset/inputmask/50bd53bf21eb2ba67054168d72958aab6ca3851d.zip into cache from /data/www/walle-web/vendor/bower-asset/inputmask/691b8cc7e485ce264f4569aacb6008b5

 Extracting archiveExecuting command (CWD): unzip -qq  ‘/data/www/walle-web/vendor/bower-asset/inputmask/691b8cc7e485ce264f4569aacb6008b5‘ -d ‘/data/www/walle-web/vendor/composer/7ce13a05‘
    REASON: Required by the root package: Install command rule (install bower-asset/inputmask 3.3.11)

  - Installing bower-asset/punycode (v1.3.2): Downloading https://api.github.com/repos/bestiejs/punycode.js/zipball/38c8d3131a82567bfef18da09f7f4db68c84f8a3
Downloading (connecting...)
Following redirect (2) https://codeload.github.com/bestiejs/punycode.js/legacy.zip/38c8d3131a82567bfef18da09f7f4db68c84f8a3
Downloading https://codeDownloading (100%)Writing /root/.composer/cache/files/bower-asset/punycode/61d859b2c5445500f3f4518e35e5d57d6dac72c6.zip into cache from /data/www/walle-web/vendor/bower-asset/punycode/2187054f646b83d3b8d8fa777a106f82

 Extracting archiveExecuting command (CWD): unzip -qq  ‘/data/www/walle-web/vendor/bower-asset/punycode/2187054f646b83d3b8d8fa777a106f82‘ -d ‘/data/www/walle-web/vendor/composer/6d599be1‘
    REASON: Required by the root package: Install command rule (install bower-asset/punycode v1.3.2)

  - Installing bower-asset/yii2-pjax (2.0.7.1): Downloading https://api.github.com/repos/yiisoft/jquery-pjax/zipball/aef7b953107264f00234902a3880eb50dafc48be
Downloading (connecting...)
Following redirect (2) https://codeload.github.com/yiisoft/jquery-pjax/legacy.zip/aef7b953107264f00234902a3880eb50dafc48be
Downloading https://codelDownloading (100%)Writing /root/.composer/cache/files/bower-asset/yii2-pjax/8e4d0a4410fcf51730b83d0f8407f1b2bd6d12a0.zip into cache from /data/www/walle-web/vendor/bower-asset/yii2-pjax/bdcf8dc1493cf6e5816ecac2da02fab5

 Extracting archiveExecuting command (CWD): unzip -qq  ‘/data/www/walle-web/vendor/bower-asset/yii2-pjax/bdcf8dc1493cf6e5816ecac2da02fab5‘ -d ‘/data/www/walle-web/vendor/composer/57bd6857‘
    REASON: Required by the root package: Install command rule (install bower-asset/yii2-pjax 2.0.7.1)

  - Installing cebe/markdown (1.1.2): Downloading https://api.github.com/repos/cebe/markdown/zipball/25b28bae8a6f185b5030673af77b32e1163d5c6e
Downloading (connecting...)
Following redirect (2) https://codeload.github.com/cebe/markdown/legacy.zip/25b28bae8a6f185b5030673af77b32e1163d5c6e
Downloading https://codeload.giDownloading (100%)Writing /root/.composer/cache/files/cebe/markdown/6ce847ed025694faf38dd2ae48a2439d40201de8.zip into cache from /data/www/walle-web/vendor/cebe/markdown/1ec336f1a1396b402f97e07786a560de

 Extracting archiveExecuting command (CWD): unzip -qq  ‘/data/www/walle-web/vendor/cebe/markdown/1ec336f1a1396b402f97e07786a560de‘ -d ‘/data/www/walle-web/vendor/composer/2f664fd5‘
    REASON: Required by the root package: Install command rule (install cebe/markdown 1.1.2)

  - Installing ezyang/htmlpurifier (v4.10.0): Downloading https://api.github.com/repos/ezyang/htmlpurifier/zipball/d85d39da4576a6934b72480be6978fb10c860021
Downloading (connecting...)
Following redirect (2) https://codeload.github.com/ezyang/htmlpurifier/legacy.zip/d85d39da4576a6934b72480be6978fb10c860021
Downloading https://codelDownloading (100%)Writing /root/.composer/cache/files/ezyang/htmlpurifier/9094c8cacee4c5e83b26958923c168968573bf7c.zip into cache from /data/www/walle-web/vendor/ezyang/htmlpurifier/6afbab73b5b0a7177b782a6fc224103b

 Extracting archiveExecuting command (CWD): unzip -qq  ‘/data/www/walle-web/vendor/ezyang/htmlpurifier/6afbab73b5b0a7177b782a6fc224103b‘ -d ‘/data/www/walle-web/vendor/composer/dda5463f‘
    REASON: Required by the root package: Install command rule (install ezyang/htmlpurifier v4.10.0)

  - Installing yiisoft/yii2 (2.0.15.1): Downloading https://api.github.com/repos/yiisoft/yii2-framework/zipball/ed3a9e1c4abe206e1c3ce48a6b3624119b79850d
Downloading (connecting...)
Following redirect (2) https://codeload.github.com/yiisoft/yii2-framework/legacy.zip/ed3a9e1c4abe206e1c3ce48a6b3624119b79850d
Downloading https://coDownloading (100%)Writing /root/.composer/cache/files/yiisoft/yii2/3a5b8bec8d672945cbbad1395a59c119fc36adfe.zip into cache from /data/www/walle-web/vendor/yiisoft/yii2/adf65beb0ca052c535cc2cfeb19a0dac

 Extracting archiveExecuting command (CWD): unzip -qq  ‘/data/www/walle-web/vendor/yiisoft/yii2/adf65beb0ca052c535cc2cfeb19a0dac‘ -d ‘/data/www/walle-web/vendor/composer/59782610‘
    REASON: Required by the root package: Install command rule (install yiisoft/yii2 2.0.15.1)

  - Installing bower-asset/bootstrap (v3.3.7): Downloading https://api.github.com/repos/twbs/bootstrap/zipball/0b9c4a4007c44201dce9a6cc1a38407005c26c86
Downloading (connecting...)
Following redirect (2) https://codeload.github.com/twbs/bootstrap/legacy.zip/0b9c4a4007c44201dce9a6cc1a38407005c26c86
Downloading https://codeload.gDownloading (100%)Writing /root/.composer/cache/files/bower-asset/bootstrap/c68106f50814723042ca0a9121fd7198db5c1b17.zip into cache from /data/www/walle-web/vendor/bower-asset/bootstrap/fa51dca6320c54c6f9493c79a1ec2184

 Extracting archiveExecuting command (CWD): unzip -qq  ‘/data/www/walle-web/vendor/bower-asset/bootstrap/fa51dca6320c54c6f9493c79a1ec2184‘ -d ‘/data/www/walle-web/vendor/composer/9db955da‘
    REASON: Required by the root package: Install command rule (install bower-asset/bootstrap v3.3.7)

  - Installing yiisoft/yii2-bootstrap (2.0.8): Downloading https://api.github.com/repos/yiisoft/yii2-bootstrap/zipball/3f49c47924bb9fa5363c3fc7b073d954168cf438
Downloading (connecting...)
Following redirect (2) https://codeload.github.com/yiisoft/yii2-bootstrap/legacy.zip/3f49c47924bb9fa5363c3fc7b073d954168cf438
Downloading https://coDownloading (100%)Writing /root/.composer/cache/files/yiisoft/yii2-bootstrap/0a63e788064cc5a061150024424c15492f705950.zip into cache from /data/www/walle-web/vendor/yiisoft/yii2-bootstrap/6c8aef6490f5dadf3804e6279996bfa2

 Extracting archiveExecuting command (CWD): unzip -qq  ‘/data/www/walle-web/vendor/yiisoft/yii2-bootstrap/6c8aef6490f5dadf3804e6279996bfa2‘ -d ‘/data/www/walle-web/vendor/composer/027cb6cf‘
    REASON: Required by the root package: Install command rule (install yiisoft/yii2-bootstrap 2.0.8)

  - Installing swiftmailer/swiftmailer (v5.4.9): Downloading https://api.github.com/repos/swiftmailer/swiftmailer/zipball/7ffc1ea296ed14bf8260b6ef11b80208dbadba91
Downloading (connecting...)
Following redirect (2) https://codeload.github.com/swiftmailer/swiftmailer/legacy.zip/7ffc1ea296ed14bf8260b6ef11b80208dbadba91
Downloading https://cDownloading (100%)Writing /root/.composer/cache/files/swiftmailer/swiftmailer/27dbca4454f3a4a359046ed1999fb06ab80def81.zip into cache from /data/www/walle-web/vendor/swiftmailer/swiftmailer/1caa831a627234787372725b9ebc6fa1

 Extracting archiveExecuting command (CWD): unzip -qq  ‘/data/www/walle-web/vendor/swiftmailer/swiftmailer/1caa831a627234787372725b9ebc6fa1‘ -d ‘/data/www/walle-web/vendor/composer/db4e6ccb‘
    REASON: Required by the root package: Install command rule (install swiftmailer/swiftmailer v5.4.9)

  - Installing yiisoft/yii2-swiftmailer (2.0.7): Downloading https://api.github.com/repos/yiisoft/yii2-swiftmailer/zipball/8a03a62cbcb82e7697d3002eb43a8d2637f566ec
Downloading (connecting...)
Following redirect (2) https://codeload.github.com/yiisoft/yii2-swiftmailer/legacy.zip/8a03a62cbcb82e7697d3002eb43a8d2637f566ec
Downloading https://Downloading (100%)Writing /root/.composer/cache/files/yiisoft/yii2-swiftmailer/af874fc8bbc5d68679b400eca844243fe7a0172c.zip into cache from /data/www/walle-web/vendor/yiisoft/yii2-swiftmailer/8f9064a3ad3cdeba46a45ee230d4fdc0

 Extracting archiveExecuting command (CWD): unzip -qq  ‘/data/www/walle-web/vendor/yiisoft/yii2-swiftmailer/8f9064a3ad3cdeba46a45ee230d4fdc0‘ -d ‘/data/www/walle-web/vendor/composer/a794dcf2‘
    REASON: Required by the root package: Install command rule (install yiisoft/yii2-swiftmailer 2.0.7)

Generating optimized autoload files

3、初始化项目(备注:执行初始化命令后,执行yes)

[root@m1 walle-web]# cd /data/www/walle-web
[root@m1 walle-web]#  
[root@m1 walle-web]# ./yii walle/setup
create dir 创建目录...
mkdiring dir: /tmp/walle/
mkdiring dir: /data/www/walle-web/runtime/ansible_hosts/
mkdiring dir: /data/www/walle-web/vendor/bower/jquery/dist
set writable 设置可写权限...
Setting writable: /data/www/walle-web/runtime
Setting writable: /data/www/walle-web/web/assets
Setting writable: /tmp/walle/
Setting writable: /data/www/walle-web/runtime/ansible_hosts/
set executable 设置可执行权限...
Setting executable: /data/www/walle-web/yii
update database 更新数据库: yii migrate/up ...
Yii Migration Tool (based on Yii v2.0.15.1)

Creating migration history table "migration"...Done.
Total 17 new migrations to be applied:
	m140328_144900_init
	m150926_151034_init_user
	m150927_061454_alter_conf_to_mysql
	m150929_004629_change_record_action
	m150929_034627_session_to_mysql
	m150929_115951_project_user_group
	m151005_001053_alter_conf_2_project
	m151010_050344_group_user_admin
	m151011_054352_task_need_more_long
	m151012_135612_task_add_branch
	m151014_115546_add_pre_release_task
	m151018_032238_support_svn
	m151027_063246_keep_version_num
	m160307_082032_ansible
	m160402_173643_add_post_release_delay
	m160418_035413_user_status_migrate
	m160420_015223_add_file_transmission_mode

Apply the above migrations? (yes|no) [no]:yes
*** applying m140328_144900_init
    > create table user ... done (time: 0.011s)
    > create table conf ... done (time: 0.007s)
    > create table task ... done (time: 0.007s)
    > create table record ... done (time: 0.007s)
*** applied m140328_144900_init (time: 0.034s)

*** applying m150926_151034_init_user
    > insert into {{%user}} ... done (time: 0.003s)
    > insert into {{%user}} ... done (time: 0.005s)
*** applied m150926_151034_init_user (time: 0.014s)

*** applying m150927_061454_alter_conf_to_mysql
    > drop column conf from table conf ... done (time: 0.013s)
    > add column git_url string(200) DEFAULT "" COMMENT "git地址" to table conf ... done (time: 0.012s)
    > add column deploy_from string(200) NOT NULL COMMENT "宿主机存放clone出来的文件" to table conf ... done (time: 0.012s)
    > add column excludes string(500) DEFAULT "" COMMENT "要排除的文件" to table conf ... done (time: 0.011s)
    > add column release_user string(50) NOT NULL COMMENT "目标机器用户" to table conf ... done (time: 0.014s)
    > add column release_to string(200) NOT NULL COMMENT "目标机器的目录,相当于nginx的root,可直接web访问" to table conf ... done (time: 0.014s)
    > add column release_library string(200) NOT NULL COMMENT "目标机器版本发布库" to table conf ... done (time: 0.012s)
    > add column hosts string(500) NOT NULL COMMENT "目标机器列表" to table conf ... done (time: 0.011s)
    > add column pre_deploy string(500) DEFAULT "" COMMENT "部署前置任务" to table conf ... done (time: 0.013s)
    > add column post_deploy string(500) DEFAULT "" COMMENT "同步之前任务" to table conf ... done (time: 0.013s)
    > add column post_release string(500) DEFAULT "" COMMENT "同步之后任务" to table conf ... done (time: 0.013s)
    > add column git_type string(50) DEFAULT "branch" COMMENT "两种上线方式,分支、tag" to table conf ... done (time: 0.015s)
    > add column audit smallint(1) DEFAULT 0 COMMENT "是否需要审核任务0不需要,1需要" to table conf ... done (time: 0.013s)
    > drop column created_at from table conf ... done (time: 0.015s)
    > add column created_at datetime COMMENT "创建时间" after audit to table conf ... done (time: 0.016s)
    > add column updated_at datetime COMMENT "修改时间" to table conf ... done (time: 0.012s)
    > drop column created_at from table task ... done (time: 0.012s)
    > add column created_at datetime COMMENT "创建时间" to table task ... done (time: 0.011s)
    > add column updated_at datetime COMMENT "修改时间" to table task ... done (time: 0.011s)
*** applied m150927_061454_alter_conf_to_mysql (time: 0.245s)

*** applying m150929_004629_change_record_action
    > alter column action in table record to integer(3) unsigned DEFAULT 10 COMMENT "任务执行到的阶段" ... done (time: 0.012s)
*** applied m150929_004629_change_record_action (time: 0.013s)

*** applying m150929_034627_session_to_mysql
    > create table session ... done (time: 0.006s)
*** applied m150929_034627_session_to_mysql (time: 0.007s)

*** applying m150929_115951_project_user_group
    > create table group ... done (time: 0.008s)
    > add column avatar string(100) DEFAULT "default.jpg" COMMENT "头像图片地址" AFTER email to table {{%user}} ... done (time: 0.013s)
*** applied m150929_115951_project_user_group (time: 0.023s)

*** applying m151005_001053_alter_conf_2_project
    > rename table conf to project ... done (time: 0.001s)
*** applied m151005_001053_alter_conf_2_project (time: 0.003s)

*** applying m151010_050344_group_user_admin
    > add column type smallint(1) DEFAULT 0 COMMENT "用户在项目中的关系类型 0普通用户, 1管理员" to table group ... done (time: 0.007s)
    > alter column user_id in table group to integer(32) NOT NULL COMMENT "用户id" ... done (time: 0.008s)
*** applied m151010_050344_group_user_admin (time: 0.017s)

*** applying m151011_054352_task_need_more_long
    > alter column excludes in table project to text COMMENT "要排除的文件" ... done (time: 0.013s)
    > alter column hosts in table project to text COMMENT "目标机器列表" ... done (time: 0.012s)
    > alter column pre_deploy in table project to text COMMENT "部署前置任务" ... done (time: 0.010s)
    > alter column post_deploy in table project to text COMMENT "同步之前任务" ... done (time: 0.012s)
    > alter column post_release in table project to text COMMENT "同步之后任务" ... done (time: 0.012s)
*** applied m151011_054352_task_need_more_long (time: 0.061s)

*** applying m151012_135612_task_add_branch
    > add column branch string(100) DEFAULT "master" comment "选择上线的分支" to table task ... done (time: 0.012s)
    > alter column name in table project to string(100) DEFAULT "master" comment "项目名字" ... done (time: 0.013s)
*** applied m151012_135612_task_add_branch (time: 0.026s)

*** applying m151014_115546_add_pre_release_task
    > alter column post_release in table project to text COMMENT "同步之前目标机器执行的任务" ... done (time: 0.006s)
    > rename column post_release in table project to pre_release ... done (time: 0.010s)
    > add column post_release text COMMENT "同步之后目标机器执行的任务" AFTER pre_release to table project ... done (time: 0.011s)
*** applied m151014_115546_add_pre_release_task (time: 0.029s)

*** applying m151018_032238_support_svn
    > rename column git_url in table project to repo_url ... done (time: 0.015s)
    > rename column git_type in table project to repo_mode ... done (time: 0.011s)
    > alter column repo_mode in table project to string(50) DEFAULT "branch" COMMENT "上线方式:branch/tag" AFTER repo_url ... done (time: 0.012s)
    > add column repo_type string(10) DEFAULT "git" COMMENT "上线方式:git/svn" AFTER repo_mode to table project ... done (time: 0.011s)
    > add column repo_username string(50) DEFAULT "" COMMENT "版本管理系统的用户名,一般为svn的用户名" AFTER repo_url to table project ... done (time: 0.013s)
    > add column repo_password string(100) DEFAULT "" COMMENT "版本管理系统的密码,一般为svn的密码" AFTER repo_username to table project ... done (time: 0.011s)
    > add column file_list text COMMENT "文件列表,svn上线方式可能会产生" to table task ... done (time: 0.015s)
    > alter column commit_id in table task to string(100) DEFAULT "" COMMENT "git commit id" ... done (time: 0.017s)
*** applied m151018_032238_support_svn (time: 0.106s)

*** applying m151027_063246_keep_version_num
    > add column keep_version_num integer(3) NOT NULL DEFAULT 20 COMMENT "线上版本保留数" AFTER audit to table project ... done (time: 0.013s)
    > add column enable_rollback integer(1) NOT NULL DEFAULT 1 COMMENT "能否回滚此版本:0no 1yes" to table task ... done (time: 0.014s)
*** applied m151027_063246_keep_version_num (time: 0.030s)

*** applying m160307_082032_ansible
    > add column ansible smallint(3) NOT NULL DEFAULT 0 COMMENT "是否启用Ansible 0关闭,1开启" AFTER audit to table project ... done (time: 0.013s)
*** applied m160307_082032_ansible (time: 0.014s)

*** applying m160402_173643_add_post_release_delay
    > add column post_release_delay integer(11) NOT NULL DEFAULT 0 COMMENT "每台目标机执行post_release任务间隔/延迟时间 单位:秒" AFTER post_release to table project ... done (time: 0.016s)
*** applied m160402_173643_add_post_release_delay (time: 0.018s)

*** applying m160418_035413_user_status_migrate
    > alter column role in table {{%user}} to smallint(6) NOT NULL DEFAULT 1 ... done (time: 0.010s)
    > alter column status in table {{%user}} to smallint(6) NOT NULL DEFAULT 1 ... done (time: 0.007s)
    > update {{%user}} ... done (time: 0.003s)
    > update {{%user}} ... done (time: 0.002s)
    > update {{%user}} ... done (time: 0.001s)
    > update {{%user}} ... done (time: 0.003s)
    > update {{%user}} ... done (time: 0.002s)
*** applied m160418_035413_user_status_migrate (time: 0.030s)

*** applying m160420_015223_add_file_transmission_mode
    > alter column created_at in table task to datetime COMMENT "创建时间" AFTER enable_rollback ... done (time: 0.014s)
    > alter column updated_at in table task to datetime COMMENT "修改时间" AFTER created_at ... done (time: 0.014s)
    > add column file_transmission_mode smallint(3) NOT NULL DEFAULT 1 COMMENT "上线文件模式: 1.全量所有文件 2.指定文件列表" AFTER branch to table task ... done (time: 0.013s)
*** applied m160420_015223_add_file_transmission_mode (time: 0.043s)


17 migrations were applied.

Migrated up successfully.

#配备http的虚拟主机

vim /etc/httpd/conf/httpd.conf
---------------------------------------------->
#DocumentRoot "/var/www/html"                 //注释掉此行

<VirtualHost *:80>                            //在最后添加此段配置
    ServerName walle.jason.com
    DocumentRoot /data/www/walle-web/web
      <Directory "/data/www/walle-web/web">
        Options  FollowSymLinks
        AllowOverride ALL
        Order allow,deny
        Allow from all
      </Directory>
</VirtualHost>
---------------------------------------------->

#重启服务
[root@m1 walle-web]# /etc/init.d/httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]

 三、登录walle系统

使用浏览器访问http://192.168.1.10  测试,用户名和密码均为admin。

    技术分享图片

    技术分享图片

 

一、Walle部署系统

标签:tab   tor   writing   local   检查   avatar   回滚   img   防火墙   

原文地址:https://www.cnblogs.com/nulige/p/9946091.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!