Browse code

Move all swift files to $FILES/swift/

Chmouel Boudjnah authored on 2011/11/03 03:09:30
Showing 17 changed files
1 1
deleted file mode 100644
... ...
@@ -1,19 +0,0 @@
1
-[DEFAULT]
2
-devices = %NODE_PATH%/node
3
-mount_check = false
4
-bind_port = %BIND_PORT%
5
-user = %USER%
6
-log_facility = LOG_LOCAL%LOG_FACILITY%
7
-
8
-[pipeline:main]
9
-pipeline = account-server
10
-
11
-[app:account-server]
12
-use = egg:swift#account
13
-
14
-[account-replicator]
15
-vm_test_mode = yes
16
-
17
-[account-auditor]
18
-
19
-[account-reaper]
20 1
deleted file mode 100644
... ...
@@ -1,21 +0,0 @@
1
-[DEFAULT]
2
-devices = %NODE_PATH%/node
3
-mount_check = false
4
-bind_port = %BIND_PORT%
5
-user = %USER%
6
-log_facility = LOG_LOCAL%LOG_FACILITY%
7
-
8
-[pipeline:main]
9
-pipeline = container-server
10
-
11
-[app:container-server]
12
-use = egg:swift#container
13
-
14
-[container-replicator]
15
-vm_test_mode = yes
16
-
17
-[container-updater]
18
-
19
-[container-auditor]
20
-
21
-[container-sync]
22 1
deleted file mode 100644
... ...
@@ -1,19 +0,0 @@
1
-[DEFAULT]
2
-devices = %NODE_PATH%/node
3
-mount_check = false
4
-bind_port = %BIND_PORT%
5
-user = %USER%
6
-log_facility = LOG_LOCAL%LOG_FACILITY%
7
-
8
-[pipeline:main]
9
-pipeline = object-server
10
-
11
-[app:object-server]
12
-use = egg:swift#object
13
-
14
-[object-replicator]
15
-vm_test_mode = yes
16
-
17
-[object-updater]
18
-
19
-[object-auditor]
20 1
deleted file mode 100644
... ...
@@ -1,31 +0,0 @@
1
-[DEFAULT]
2
-bind_port = 8080
3
-user = %USER%
4
-log_facility = LOG_LOCAL1
5
-
6
-[pipeline:main]
7
-pipeline = healthcheck cache %AUTH_SERVER% proxy-server
8
-
9
-[app:proxy-server]
10
-use = egg:swift#proxy
11
-allow_account_management = true
12
-account_autocreate = true
13
-
14
-[filter:keystone]
15
-use = egg:swiftkeystone2#keystone2
16
-keystone_admin_token = %SERVICE_TOKEN%
17
-keystone_url = http://localhost:35357/v2.0
18
-
19
-[filter:tempauth]
20
-use = egg:swift#tempauth
21
-user_admin_admin = admin .admin .reseller_admin
22
-user_test_tester = testing .admin
23
-user_test2_tester2 = testing2 .admin
24
-user_test_tester3 = testing3
25
-bind_ip = 0.0.0.0
26
-
27
-[filter:healthcheck]
28
-use = egg:swift#healthcheck
29
-
30
-[filter:cache]
31
-use = egg:swift#memcache
32 1
deleted file mode 100644
... ...
@@ -1,26 +0,0 @@
1
-#!/bin/bash
2
-
3
-cd /etc/swift
4
-
5
-rm -f *.builder *.ring.gz backups/*.builder backups/*.ring.gz
6
-
7
-swift-ring-builder object.builder create %SWIFT_PARTITION_POWER_SIZE% 3 1
8
-swift-ring-builder object.builder add z1-127.0.0.1:6010/sdb1 1
9
-swift-ring-builder object.builder add z2-127.0.0.1:6020/sdb2 1
10
-swift-ring-builder object.builder add z3-127.0.0.1:6030/sdb3 1
11
-swift-ring-builder object.builder add z4-127.0.0.1:6040/sdb4 1
12
-swift-ring-builder object.builder rebalance
13
-
14
-swift-ring-builder container.builder create %SWIFT_PARTITION_POWER_SIZE% 3 1
15
-swift-ring-builder container.builder add z1-127.0.0.1:6011/sdb1 1
16
-swift-ring-builder container.builder add z2-127.0.0.1:6021/sdb2 1
17
-swift-ring-builder container.builder add z3-127.0.0.1:6031/sdb3 1
18
-swift-ring-builder container.builder add z4-127.0.0.1:6041/sdb4 1
19
-swift-ring-builder container.builder rebalance
20
-
21
-swift-ring-builder account.builder create %SWIFT_PARTITION_POWER_SIZE% 3 1
22
-swift-ring-builder account.builder add z1-127.0.0.1:6012/sdb1 1
23
-swift-ring-builder account.builder add z2-127.0.0.1:6022/sdb2 1
24
-swift-ring-builder account.builder add z3-127.0.0.1:6032/sdb3 1
25
-swift-ring-builder account.builder add z4-127.0.0.1:6042/sdb4 1
26
-swift-ring-builder account.builder rebalance
27 1
deleted file mode 100644
... ...
@@ -1,79 +0,0 @@
1
-uid = %USER%
2
-gid = %GROUP%
3
-log file = /var/log/rsyncd.log
4
-pid file = /var/run/rsyncd.pid
5
-address = 127.0.0.1
6
-
7
-[account6012]
8
-max connections = 25
9
-path = %SWIFT_LOCATION%/1/node/
10
-read only = false
11
-lock file = /var/lock/account6012.lock
12
-
13
-[account6022]
14
-max connections = 25
15
-path = %SWIFT_LOCATION%/2/node/
16
-read only = false
17
-lock file = /var/lock/account6022.lock
18
-
19
-[account6032]
20
-max connections = 25
21
-path = %SWIFT_LOCATION%/3/node/
22
-read only = false
23
-lock file = /var/lock/account6032.lock
24
-
25
-[account6042]
26
-max connections = 25
27
-path = %SWIFT_LOCATION%/4/node/
28
-read only = false
29
-lock file = /var/lock/account6042.lock
30
-
31
-
32
-[container6011]
33
-max connections = 25
34
-path = %SWIFT_LOCATION%/1/node/
35
-read only = false
36
-lock file = /var/lock/container6011.lock
37
-
38
-[container6021]
39
-max connections = 25
40
-path = %SWIFT_LOCATION%/2/node/
41
-read only = false
42
-lock file = /var/lock/container6021.lock
43
-
44
-[container6031]
45
-max connections = 25
46
-path = %SWIFT_LOCATION%/3/node/
47
-read only = false
48
-lock file = /var/lock/container6031.lock
49
-
50
-[container6041]
51
-max connections = 25
52
-path = %SWIFT_LOCATION%/4/node/
53
-read only = false
54
-lock file = /var/lock/container6041.lock
55
-
56
-
57
-[object6010]
58
-max connections = 25
59
-path = %SWIFT_LOCATION%/1/node/
60
-read only = false
61
-lock file = /var/lock/object6010.lock
62
-
63
-[object6020]
64
-max connections = 25
65
-path = %SWIFT_LOCATION%/2/node/
66
-read only = false
67
-lock file = /var/lock/object6020.lock
68
-
69
-[object6030]
70
-max connections = 25
71
-path = %SWIFT_LOCATION%/3/node/
72
-read only = false
73
-lock file = /var/lock/object6030.lock
74
-
75
-[object6040]
76
-max connections = 25
77
-path = %SWIFT_LOCATION%/4/node/
78
-read only = false
79
-lock file = /var/lock/object6040.lock
80 1
deleted file mode 100755
... ...
@@ -1,3 +0,0 @@
1
-#!/bin/bash
2
-
3
-swift-init all restart
4 1
deleted file mode 100644
... ...
@@ -1,3 +0,0 @@
1
-[swift-hash]
2
-# random unique string that can never change (DO NOT LOSE)
3
-swift_hash_path_suffix = %SWIFT_HASH%
4 1
new file mode 100644
... ...
@@ -0,0 +1,19 @@
0
+[DEFAULT]
1
+devices = %NODE_PATH%/node
2
+mount_check = false
3
+bind_port = %BIND_PORT%
4
+user = %USER%
5
+log_facility = LOG_LOCAL%LOG_FACILITY%
6
+
7
+[pipeline:main]
8
+pipeline = account-server
9
+
10
+[app:account-server]
11
+use = egg:swift#account
12
+
13
+[account-replicator]
14
+vm_test_mode = yes
15
+
16
+[account-auditor]
17
+
18
+[account-reaper]
0 19
new file mode 100644
... ...
@@ -0,0 +1,21 @@
0
+[DEFAULT]
1
+devices = %NODE_PATH%/node
2
+mount_check = false
3
+bind_port = %BIND_PORT%
4
+user = %USER%
5
+log_facility = LOG_LOCAL%LOG_FACILITY%
6
+
7
+[pipeline:main]
8
+pipeline = container-server
9
+
10
+[app:container-server]
11
+use = egg:swift#container
12
+
13
+[container-replicator]
14
+vm_test_mode = yes
15
+
16
+[container-updater]
17
+
18
+[container-auditor]
19
+
20
+[container-sync]
0 21
new file mode 100644
... ...
@@ -0,0 +1,19 @@
0
+[DEFAULT]
1
+devices = %NODE_PATH%/node
2
+mount_check = false
3
+bind_port = %BIND_PORT%
4
+user = %USER%
5
+log_facility = LOG_LOCAL%LOG_FACILITY%
6
+
7
+[pipeline:main]
8
+pipeline = object-server
9
+
10
+[app:object-server]
11
+use = egg:swift#object
12
+
13
+[object-replicator]
14
+vm_test_mode = yes
15
+
16
+[object-updater]
17
+
18
+[object-auditor]
0 19
new file mode 100644
... ...
@@ -0,0 +1,31 @@
0
+[DEFAULT]
1
+bind_port = 8080
2
+user = %USER%
3
+log_facility = LOG_LOCAL1
4
+
5
+[pipeline:main]
6
+pipeline = healthcheck cache %AUTH_SERVER% proxy-server
7
+
8
+[app:proxy-server]
9
+use = egg:swift#proxy
10
+allow_account_management = true
11
+account_autocreate = true
12
+
13
+[filter:keystone]
14
+use = egg:swiftkeystone2#keystone2
15
+keystone_admin_token = %SERVICE_TOKEN%
16
+keystone_url = http://localhost:35357/v2.0
17
+
18
+[filter:tempauth]
19
+use = egg:swift#tempauth
20
+user_admin_admin = admin .admin .reseller_admin
21
+user_test_tester = testing .admin
22
+user_test2_tester2 = testing2 .admin
23
+user_test_tester3 = testing3
24
+bind_ip = 0.0.0.0
25
+
26
+[filter:healthcheck]
27
+use = egg:swift#healthcheck
28
+
29
+[filter:cache]
30
+use = egg:swift#memcache
0 31
new file mode 100644
... ...
@@ -0,0 +1,79 @@
0
+uid = %USER%
1
+gid = %GROUP%
2
+log file = /var/log/rsyncd.log
3
+pid file = /var/run/rsyncd.pid
4
+address = 127.0.0.1
5
+
6
+[account6012]
7
+max connections = 25
8
+path = %SWIFT_LOCATION%/1/node/
9
+read only = false
10
+lock file = /var/lock/account6012.lock
11
+
12
+[account6022]
13
+max connections = 25
14
+path = %SWIFT_LOCATION%/2/node/
15
+read only = false
16
+lock file = /var/lock/account6022.lock
17
+
18
+[account6032]
19
+max connections = 25
20
+path = %SWIFT_LOCATION%/3/node/
21
+read only = false
22
+lock file = /var/lock/account6032.lock
23
+
24
+[account6042]
25
+max connections = 25
26
+path = %SWIFT_LOCATION%/4/node/
27
+read only = false
28
+lock file = /var/lock/account6042.lock
29
+
30
+
31
+[container6011]
32
+max connections = 25
33
+path = %SWIFT_LOCATION%/1/node/
34
+read only = false
35
+lock file = /var/lock/container6011.lock
36
+
37
+[container6021]
38
+max connections = 25
39
+path = %SWIFT_LOCATION%/2/node/
40
+read only = false
41
+lock file = /var/lock/container6021.lock
42
+
43
+[container6031]
44
+max connections = 25
45
+path = %SWIFT_LOCATION%/3/node/
46
+read only = false
47
+lock file = /var/lock/container6031.lock
48
+
49
+[container6041]
50
+max connections = 25
51
+path = %SWIFT_LOCATION%/4/node/
52
+read only = false
53
+lock file = /var/lock/container6041.lock
54
+
55
+
56
+[object6010]
57
+max connections = 25
58
+path = %SWIFT_LOCATION%/1/node/
59
+read only = false
60
+lock file = /var/lock/object6010.lock
61
+
62
+[object6020]
63
+max connections = 25
64
+path = %SWIFT_LOCATION%/2/node/
65
+read only = false
66
+lock file = /var/lock/object6020.lock
67
+
68
+[object6030]
69
+max connections = 25
70
+path = %SWIFT_LOCATION%/3/node/
71
+read only = false
72
+lock file = /var/lock/object6030.lock
73
+
74
+[object6040]
75
+max connections = 25
76
+path = %SWIFT_LOCATION%/4/node/
77
+read only = false
78
+lock file = /var/lock/object6040.lock
0 79
new file mode 100755
... ...
@@ -0,0 +1,26 @@
0
+#!/bin/bash
1
+
2
+cd /etc/swift
3
+
4
+rm -f *.builder *.ring.gz backups/*.builder backups/*.ring.gz
5
+
6
+swift-ring-builder object.builder create %SWIFT_PARTITION_POWER_SIZE% 3 1
7
+swift-ring-builder object.builder add z1-127.0.0.1:6010/sdb1 1
8
+swift-ring-builder object.builder add z2-127.0.0.1:6020/sdb2 1
9
+swift-ring-builder object.builder add z3-127.0.0.1:6030/sdb3 1
10
+swift-ring-builder object.builder add z4-127.0.0.1:6040/sdb4 1
11
+swift-ring-builder object.builder rebalance
12
+
13
+swift-ring-builder container.builder create %SWIFT_PARTITION_POWER_SIZE% 3 1
14
+swift-ring-builder container.builder add z1-127.0.0.1:6011/sdb1 1
15
+swift-ring-builder container.builder add z2-127.0.0.1:6021/sdb2 1
16
+swift-ring-builder container.builder add z3-127.0.0.1:6031/sdb3 1
17
+swift-ring-builder container.builder add z4-127.0.0.1:6041/sdb4 1
18
+swift-ring-builder container.builder rebalance
19
+
20
+swift-ring-builder account.builder create %SWIFT_PARTITION_POWER_SIZE% 3 1
21
+swift-ring-builder account.builder add z1-127.0.0.1:6012/sdb1 1
22
+swift-ring-builder account.builder add z2-127.0.0.1:6022/sdb2 1
23
+swift-ring-builder account.builder add z3-127.0.0.1:6032/sdb3 1
24
+swift-ring-builder account.builder add z4-127.0.0.1:6042/sdb4 1
25
+swift-ring-builder account.builder rebalance
0 26
new file mode 100755
... ...
@@ -0,0 +1,3 @@
0
+#!/bin/bash
1
+
2
+swift-init all restart
0 3
new file mode 100644
... ...
@@ -0,0 +1,3 @@
0
+[swift-hash]
1
+# random unique string that can never change (DO NOT LOSE)
2
+swift_hash_path_suffix = %SWIFT_HASH%
... ...
@@ -617,7 +617,7 @@ if [[ "$ENABLED_SERVICES" =~ "n-net" ]]; then
617 617
 fi
618 618
 
619 619
 # Storage Service
620
-if [[ "$ENABLED_SERVICES" =~ "swift" ]];then
620
+if [[ "$ENABLED_SERVICES" =~ "swift" ]]; then
621 621
     # We first do a bit of setup by creating the directories and
622 622
     # changing the permissions so we can run it as our user.
623 623
 
... ...
@@ -662,7 +662,7 @@ if [[ "$ENABLED_SERVICES" =~ "swift" ]];then
662 662
    # Swift use rsync to syncronize between all the different
663 663
    # partitions (which make more sense when you have a multi-node
664 664
    # setup) we configure it with our version of rsync.
665
-   sed -e "s/%GROUP%/${USER_GROUP}/;s/%USER%/$USER/;s,%SWIFT_LOCATION%,$SWIFT_LOCATION," $FILES/swift-rsyncd.conf | sudo tee /etc/rsyncd.conf
665
+   sed -e "s/%GROUP%/${USER_GROUP}/;s/%USER%/$USER/;s,%SWIFT_LOCATION%,$SWIFT_LOCATION," $FILES/swift/rsyncd.conf | sudo tee /etc/rsyncd.conf
666 666
    sudo sed -i '/^RSYNC_ENABLE=false/ { s/false/true/ }' /etc/default/rsync
667 667
 
668 668
    # By default Swift will be installed with the tempauth middleware
... ...
@@ -682,9 +682,9 @@ if [[ "$ENABLED_SERVICES" =~ "swift" ]];then
682 682
    # We do the install of the proxy-server and swift configuration
683 683
    # replacing a few directives to match our configuration.
684 684
    sed "s/%USER%/$USER/;s/%SERVICE_TOKEN%/${SERVICE_TOKEN}/;s/%AUTH_SERVER%/${swift_auth_server}/" \
685
-       $FILES/swift-proxy-server.conf|sudo tee  /etc/swift/proxy-server.conf
685
+       $FILES/swift/proxy-server.conf|sudo tee  /etc/swift/proxy-server.conf
686 686
 
687
-   sed -e "s/%SWIFT_HASH%/$SWIFT_HASH/" $FILES/swift.conf > /etc/swift/swift.conf
687
+   sed -e "s/%SWIFT_HASH%/$SWIFT_HASH/" $FILES/swift/swift.conf > /etc/swift/swift.conf
688 688
 
689 689
    # We need to generate a object/account/proxy configuration
690 690
    # emulating 4 nodes on different ports we have a little function
... ...
@@ -698,7 +698,7 @@ if [[ "$ENABLED_SERVICES" =~ "swift" ]];then
698 698
        for node_number in {1..4};do
699 699
            node_path=${SWIFT_LOCATION}/${node_number}
700 700
            sed -e "s,%USER%,$USER,;s,%NODE_PATH%,${node_path},;s,%BIND_PORT%,${bind_port},;s,%LOG_FACILITY%,${log_facility}," \
701
-               $FILES/swift-${server_type}-server.conf > /etc/swift/${server_type}-server/${node_number}.conf
701
+               $FILES/swift/${server_type}-server.conf > /etc/swift/${server_type}-server/${node_number}.conf
702 702
            bind_port=$(( ${bind_port} + 10 ))
703 703
            log_facility=$(( ${log_facility} + 1 ))
704 704
        done
... ...
@@ -714,9 +714,9 @@ if [[ "$ENABLED_SERVICES" =~ "swift" ]];then
714 714
    # - swift-startmain
715 715
    #   Restart your full cluster.
716 716
    #
717
-   sed -e "s/%SWIFT_PARTITION_POWER_SIZE%/$SWIFT_PARTITION_POWER_SIZE/" $FILES/swift-remakerings | \
717
+   sed -e "s/%SWIFT_PARTITION_POWER_SIZE%/$SWIFT_PARTITION_POWER_SIZE/" $FILES/swift/swift-remakerings | \
718 718
        sudo tee /usr/local/bin/swift-remakerings
719
-   sudo install -m755 $FILES/swift-startmain /usr/local/bin/
719
+   sudo install -m755 $FILES/swift/swift-startmain /usr/local/bin/
720 720
    sudo chmod +x /usr/local/bin/swift-*
721 721
 
722 722
    # We then can start rsync.