wekan开源kanban系统部署

Open-Source kanban.

关键安装步骤

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
yum --showduplicates list snapd |expand

yum -y install snapd-2.30-0.el7.centos.1.x86_64 snapd-selinux-2.30-0.el7.centos.1.noarch snap-confine-2.30-0.el7.centos.1.x86_64

snap install wekan

snap list

查看wekan配置
snap get wekan

snap info wekan
snap services

snap 安装指定修订版本应用
snap refresh wekan --revision=581 --stable

所有的配置选项
wekan.help 2>&1 |grep "\\\$"

安装后配置

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
snap set wekan caddy-bind-port='80'
snap set wekan caddy-enabled='false'
snap set wekan ldap-sync-user-data-fieldmap='{\"cn\":\"name\", \"mail\":\"email\"}'
snap set wekan mail-from='username <username@xxxx.com>'
snap set wekan mail-url='smtp://username:passwd@mail.xxxx.com:25'
snap set wekan mongodb-bind-ip='127.0.0.1'
snap set wekan port='3001'
snap set wekan root-url='http://domainname'
#-----------------------------
snap set wekan ldap-enable='true'
snap set wekan ldap-port='389'
snap set wekan ldap-host='ldap.xxxx.com'
snap set wekan ldap-basedn='OU=user,OU=xxxx,DC=xxxx,DC=com'
snap set wekan ldap-login-fallback='false'
snap set wekan ldap-reconnect='true'
snap set wekan ldap-timeout='10000'
snap set wekan ldap-idle-timeout='10000'
snap set wekan ldap-vonnect-timeout='10000'
snap set wekan ldap-authentication='true'
snap set wekan ldap-authentication-userdn='cn=xxxx,ou=Special_Account,ou=user,ou=xxxx,dc=xxxx,dc=com'
snap set wekan ldap-authentication-password='passwd'
snap set wekan ldap-internal-log-level='debug'
snap set wekan ldap-background-sync='false'
snap set wekan ldap-background-sync-interval='100'
snap set wekan ldap-encryption='false'
snap set wekan ldap-reject-unauthorized='false'
snap set wekan ldap-group-filter-enable='false'
snap set wekan ldap-search-page-size='0'
snap set wekan ldap-search-size-limit='0'
snap set wekan ldap-user-search-filter=''
snap set wekan ldap-user-search-field='sAMAccountName'
snap set wekan ldap-user-search-scope=''
snap set wekan ldap-unique-identifier-field='sAMAccountName'
snap set wekan ldap-username-field='displayName'
snap set wekan ldap-sync-user-data='false'
# snap set wekan ldap-sync-user-data-fieldmap='{\"cn\":\"name\", \"mail\":\"email\"}'
snap set wekan ldap-sync-user-data-fieldmap='{\"displayName\":\"name\", \"mail\":\"email\"}'
snap set wekan ldap-merge-existing-users='true'
snap set wekan ldap-utf8-names-slugify='true'
snap set wekan ldap-fullname-field=displayName
snap set wekan ldap-login-fallback=true
snap set wekan default-authentication-method='ldap'

备份与恢复数据

1
2
3
4
5
备份:
/var/lib/snapd/snap/bin/wekan.database-backup >/dev/null 2>&1 && mv /var/snap/wekan/common/db-backups/* /data/wekan/db-backups/

恢复
wekan.database-restore /var/snap/wekan/common/db-backups/wekan-20190806T103004.backup

操作历史

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
diff /etc/yum.repos.d/ngompa-snapcore-el7-epel-7.repo /etc/yum.repos.d/_copr_ngompa-snapcore-el7.repo
rm -rf /etc/yum.repos.d/ngompa-snapcore-el7-epel-7.repo
sudo yum install snapd
snap install wekan
systemctl enable --now snapd.socket
snap install wekan
snap set wekan root-url="http://0.0.0.0:3000/"
lsof -i :3000
snap set wekan root-url="http://10.153.43.151:3000/wekan"
snap set wekan port='3001'
systemctl restart snap.wekan.wekan
systemctl status snap.wekan.wekan
snap set wekan.help
wekan.help
ll /snapcat /etc/systemd/system/snap.wekan.wekan.service
cat /etc/systemd/system/snap.wekan.wekan.service
sudo snap set wekan mail-url='smtp://username:passwd@mail.xxx-inc.com:25'
sudo snap set wekan mail-from='xxx <xxx@xxx-inc.com>'
systemctl restart snap.wekan.caddy.service
systemctl status snap.wekan.wekan.service
systemctl status snap.wekan.mongodb.service
journalctl -af -u snap.wekan.caddy.service
vim /etc/systemd/system/snap.wekan.caddy.service
/usr/bin/snap run wekan.caddy
snap set wekan caddy-bind-port=80
snap set wekan caddy-enabled=true
systemctl status snap.wekan.caddy.service
vim /var/snap/wekan/common/Caddyfile
vim /var/snap/wekan/common/Caddyfile
snap set wekan caddy-bind-port=80
systemctl status snap.wekan.caddy.service -l
systemctl status snap.wekan.caddy.service -l
snap set wekan ldap-login-fallback=true
snap get wekan
snap set wekan root-url=http://10.153.43.151:3001/dashboard
systemctl status snap.wekan.caddy.service -l
systemctl status snap.wekan.wekan.service
systemctl status snap.wekan.mongodb.service
snap set wekan caddy-enabled=false
snap set wekan port=80
snap set wekan root-url=http://domainname/dashboard
snap set wekan port=3001
snap set wekan root-url=http://domainname
snap set wekan mongodb-bind-ip=127.0.0.1
systemctl restart snap.wekan.wekan.service
systemctl status snap.wekan.wekan.service

LDAP配置

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
cat << EOF
#!/bin/bash
snap set wekan ldap-port='389'
snap set wekan ldap-host='ldap.xxx-inc.com'
snap set wekan ldap-basedn='OU=user,OU=xxx,DC=xxx-inc,DC=com'
snap set wekan ldap-login-fallback='false'
snap set wekan ldap-reconnect='true'
snap set wekan ldap-timeout='10000'
snap set wekan ldap-idle-timeout='10000'
snap set wekan ldap-vonnect-timeout='10000'
snap set wekan ldap-authentication='true'
snap set wekan ldap-authentication-userdn='cn=xxxxxx,ou=xxxxxx,ou=user,ou=xxx,dc=xxx-inc,dc=com'
snap set wekan ldap-authentication-password='passwd'
snap set wekan ldap-internal-log-level='debug'
snap set wekan ldap-background-sync='false'
snap set wekan ldap-background-sync-interval='100'
snap set wekan ldap-encryption='false'
snap set wekan ldap-reject-unauthorized='false'
snap set wekan ldap-group-filter-enable='false'
snap set wekan ldap-search-page-size='0'
snap set wekan ldap-search-size-limit='0'
snap set wekan ldap-user-search-filter=''
snap set wekan ldap-user-search-field='sAMAccountName'
snap set wekan ldap-user-search-scope=''
snap set wekan ldap-unique-identifier-field='sAMAccountName'
snap set wekan ldap-username-field='displayName'
snap set wekan ldap-sync-user-data='false'
snap set wekan ldap-sync-user-data-fieldmap='{\"displayName\":\"name\", \"mail\":\"email\"}'
snap set wekan ldap-merge-existing-users='true'
snap set wekan ldap-utf8-names-slugify='true'
snap set wekan ldap-fullname-field=displayName
snap set wekan ldap-login-fallback=true
snap set wekan default-authentication-method='ldap'
EOF |bash

nginx代理

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
cat >> wekan.conf << EOF
upstream task {
server 10.0.0.1:3001;
}
# this section is needed to proxy web-socket connections
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server
{
include vhosts/vhosts.listen.addr;

server_name wekan.webserver;
access_log logs/${server_name}_access_log main;
access_log logs/status_log mini;
charset utf-8;

error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;

location = /50x.html
{
root html;
}
location /server-status
{
stub_status on;
allow 10.0.0.0/8;
deny all;
}
location /
{
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_max_temp_file_size 0;
proxy_set_header Upgrade $http_upgrade; # allow websockets
proxy_set_header Connection $connection_upgrade;
proxy_pass http://task;

#this is the maximum upload size
client_max_body_size 10m;
client_body_buffer_size 128k;

proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffering off;
proxy_request_buffering off; # Required for HTTP CLI commands in Jenkins > 2.54
proxy_set_header Connection ""; # Clear for keepalive
}
}

备份

1
30 10 * * * /var/lib/snapd/snap/bin/wekan.database-backup >/dev/null 2>&1 && mv /var/snap/wekan/common/db-backups/* /data/wekan/db-backups/
1
2
3
4
5
我们可以看到图中的loo0-loop11占用100%,我们只要清理掉一下就可以了.
命令:
sudo apt autoremove --purge snapd
 命令:
  sudo apt autoremove --purge snapd

相关资料