├── .gitignore ├── Dockerfile ├── LICENSE ├── Makefile ├── README.md ├── files ├── account-server.conf ├── container-server.conf ├── dispersion.conf ├── object-expirer.conf ├── object-server.conf ├── proxy-server.conf ├── rsyncd.conf ├── startmain.sh ├── supervisord.conf └── swift.conf └── swiftrc /.gitignore: -------------------------------------------------------------------------------- 1 | *.DS_Store 2 | *.swp 3 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:14.04 2 | MAINTAINER curtis 3 | 4 | RUN apt-get update 5 | RUN apt-get install -y software-properties-common 6 | RUN add-apt-repository cloud-archive:liberty 7 | RUN apt-get update 8 | RUN apt-get install -y supervisor swift python-swiftclient rsync \ 9 | swift-proxy swift-object memcached python-keystoneclient \ 10 | python-swiftclient swift-plugin-s3 python-netifaces \ 11 | python-xattr python-memcache \ 12 | swift-account swift-container swift-object pwgen 13 | 14 | RUN mkdir -p /var/log/supervisor 15 | ADD files/supervisord.conf /etc/supervisor/conf.d/supervisord.conf 16 | 17 | # 18 | # Swift configuration 19 | # - Partially fom http://docs.openstack.org/developer/swift/development_saio.html 20 | # 21 | 22 | # not sure how valuable dispersion will be... 23 | ADD files/dispersion.conf /etc/swift/dispersion.conf 24 | ADD files/rsyncd.conf /etc/rsyncd.conf 25 | ADD files/swift.conf /etc/swift/swift.conf 26 | ADD files/proxy-server.conf /etc/swift/proxy-server.conf 27 | ADD files/account-server.conf /etc/swift/account-server.conf 28 | ADD files/object-server.conf /etc/swift/object-server.conf 29 | ADD files/container-server.conf /etc/swift/container-server.conf 30 | ADD files/startmain.sh /usr/local/bin/startmain.sh 31 | RUN chmod 755 /usr/local/bin/startmain.sh 32 | 33 | EXPOSE 8080 34 | 35 | CMD /usr/local/bin/startmain.sh 36 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | ISC License 2 | 3 | Copyright (c) 2016, Curtis Collicutt 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 8 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | 2 | SWIFT_USER_PASSWORD=testing 3 | CNTR=onlyone 4 | CNTR_IMAGE=swift-onlyone 5 | DATA_CNTR=SWIFT_DATA 6 | DATA_CNTR_IMAGE=busybox 7 | LOCAL_PORT=12345 8 | DOCKER_PORT=8080 9 | 10 | all: build delete run_swift_data run_swift 11 | 12 | redeploy: delete build run_swift 13 | 14 | run_swift_data: 15 | -docker run \ 16 | -v /srv \ 17 | --name $(DATA_CNTR) \ 18 | $(DATA_CNTR_IMAGE) 19 | 20 | run_swift: 21 | docker run \ 22 | --name $(CNTR) \ 23 | --hostname $(CNTR) \ 24 | -e "SWIFT_USER_PASSWORD=$(SWIFT_USER_PASSWORD)" \ 25 | -d \ 26 | -p $(LOCAL_PORT):$(DOCKER_PORT) \ 27 | --volumes-from $(DATA_CNTR) \ 28 | -t $(CNTR_IMAGE) 29 | 30 | delete: 31 | -docker rm -f $(CNTR) 32 | 33 | bash: 34 | docker exec -i -t $(CNTR) /bin/bash 35 | 36 | build: 37 | docker build -t $(CNTR_IMAGE) . 38 | 39 | logs: 40 | docker logs $(CNTR) 41 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | #Docker OpenStack Swift onlyone 2 | 3 | Simple deployment of a "all in one" style OpenStack Swift server, uses Ubuntu packages as opposed to source. 4 | 5 | ## Makefile and swiftrc 6 | 7 | There is a makefile with some useful helper commands, as well as a swiftrc file that you can use as well which shorts the swift command as well as adds a function to set a container to be a public, listable html page. 8 | 9 | ## Usage 10 | 11 | I suggest using the data container methodology. 12 | 13 | So first we create a data only container for /srv. 14 | 15 | ```bash 16 | vagrant@host1:~$ docker run -v /srv --name SWIFT_DATA busybox 17 | ``` 18 | 19 | Now that we have a data container, we can use the "--volumes-from" option when creating the "onlyone" container. Note that in this case I've called the image built from this docker file "curtis/swift-onlyone". 20 | 21 | ```bash 22 | vagrant@host1:~$ ID=$(docker run --name onlyone --hostname onlyone -d -p 12345:8080 --volumes-from SWIFT_DATA -t curtis/swift-onlyone) 23 | ``` 24 | 25 | With that container running we can now check the logs. 26 | 27 | ```bash 28 | vagrant@host1:~$ docker logs $ID 29 | Device d0r1z1-127.0.0.1:6010R127.0.0.1:6010/sdb1_"" with 1.0 weight got id 0 30 | Reassigned 128 (100.00%) partitions. Balance is now 0.00. 31 | Device d0r1z1-127.0.0.1:6011R127.0.0.1:6011/sdb1_"" with 1.0 weight got id 0 32 | Reassigned 128 (100.00%) partitions. Balance is now 0.00. 33 | Device d0r1z1-127.0.0.1:6012R127.0.0.1:6012/sdb1_"" with 1.0 weight got id 0 34 | Reassigned 128 (100.00%) partitions. Balance is now 0.00. 35 | WARNING: Unable to modify file descriptor limit. Running as non-root? 36 | Starting proxy-server...(/etc/swift/proxy-server.conf) 37 | Starting container-server...(/etc/swift/container-server.conf) 38 | Starting account-server...(/etc/swift/account-server.conf) 39 | Starting object-server...(/etc/swift/object-server.conf) 40 | WARNING: Unable to modify file descriptor limit. Running as non-root? 41 | Starting container-updater...(/etc/swift/container-server.conf) 42 | Starting account-auditor...(/etc/swift/account-server.conf) 43 | Starting object-replicator...(/etc/swift/object-server.conf) 44 | Starting container-replicator...(/etc/swift/container-server.conf) 45 | Starting object-auditor...(/etc/swift/object-server.conf) 46 | Unable to locate config for object-expirer 47 | Starting container-auditor...(/etc/swift/container-server.conf) 48 | Starting account-replicator...(/etc/swift/account-server.conf) 49 | Starting account-reaper...(/etc/swift/account-server.conf) 50 | Starting container-sync...(/etc/swift/container-server.conf) 51 | Starting object-updater...(/etc/swift/object-server.conf) 52 | Starting to tail /var/log/syslog...(hit ctrl-c if you are starting the container in a bash shell) 53 | ``` 54 | 55 | At this point OpenStack Swift is running. 56 | 57 | ```bash 58 | vagrant@host1:~$ docker ps 59 | CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 60 | 4941f8cd8b48 curtis/swift-onlyone:latest /bin/sh -c /usr/loca 58 seconds ago Up 57 seconds 0.0.0.0:12345->8080/tcp hopeful_brattain 61 | ``` 62 | 63 | We can now use the swift python client to access Swift using the Docker forwarded port, in this example port 12345. 64 | 65 | ```bash 66 | vagrant@host1:~$ swift -A http://127.0.0.1:12345/auth/v1.0 -U test:tester -K testing stat 67 | Account: AUTH_test 68 | Containers: 0 69 | Objects: 0 70 | Bytes: 0 71 | Content-Type: text/plain; charset=utf-8 72 | X-Timestamp: 1402463864.77057 73 | X-Trans-Id: tx4e7861ebab8244c09dad9-005397e678 74 | X-Put-Timestamp: 1402463864.77057 75 | ``` 76 | 77 | Try uploading a file: 78 | 79 | ```bash 80 | vagrant@host1:~$ swift -A http://127.0.0.1:12345/auth/v1.0 -U test:tester -K testing upload swift swift.txt 81 | swift.txt 82 | ``` 83 | 84 | That's it! 85 | 86 | ## Todo 87 | 88 | * It seems supervisord running as root in the container, a better way to do this? 89 | * bash command to start rsyslog is still running... 90 | * Add all the files in /etc/swift with one ADD command? 91 | * supervisor pid file is getting setup in /etc/ 92 | -------------------------------------------------------------------------------- /files/account-server.conf: -------------------------------------------------------------------------------- 1 | [DEFAULT] 2 | devices = /srv/node 3 | mount_check = false 4 | disable_fallocate = true 5 | bind_port = 6012 6 | workers = 1 7 | user = swift 8 | log_facility = LOG_LOCAL2 9 | recon_cache_path = /var/cache/swift 10 | eventlet_debug = true 11 | 12 | [pipeline:main] 13 | pipeline = recon account-server 14 | 15 | [app:account-server] 16 | use = egg:swift#account 17 | 18 | [filter:recon] 19 | use = egg:swift#recon 20 | 21 | [account-replicator] 22 | vm_test_mode = yes 23 | 24 | [account-auditor] 25 | 26 | [account-reaper] 27 | -------------------------------------------------------------------------------- /files/container-server.conf: -------------------------------------------------------------------------------- 1 | [DEFAULT] 2 | devices = /srv/node 3 | mount_check = false 4 | disable_fallocate = true 5 | bind_port = 6011 6 | workers = 1 7 | user = swift 8 | log_facility = LOG_LOCAL2 9 | recon_cache_path = /var/cache/swift 10 | eventlet_debug = true 11 | allow_versions = true 12 | 13 | [pipeline:main] 14 | pipeline = recon container-server 15 | 16 | [app:container-server] 17 | use = egg:swift#container 18 | 19 | [filter:recon] 20 | use = egg:swift#recon 21 | 22 | [container-replicator] 23 | vm_test_mode = yes 24 | 25 | [container-updater] 26 | 27 | [container-auditor] 28 | 29 | [container-sync] 30 | -------------------------------------------------------------------------------- /files/dispersion.conf: -------------------------------------------------------------------------------- 1 | [dispersion] 2 | auth_url = http://127.0.0.1:8080/auth/v1.0 3 | auth_user = test:tester 4 | auth_key = testing 5 | endpoint_type = internalURL -------------------------------------------------------------------------------- /files/object-expirer.conf: -------------------------------------------------------------------------------- 1 | [DEFAULT] 2 | # swift_dir = /etc/swift 3 | user = swift 4 | # You can specify default log routing here if you want: 5 | log_name = object-expirer 6 | log_facility = LOG_LOCAL6 7 | log_level = INFO 8 | #log_address = /dev/log 9 | # 10 | # comma separated list of functions to call to setup custom log handlers. 11 | # functions get passed: conf, name, log_to_console, log_route, fmt, logger, 12 | # adapted_logger 13 | # log_custom_handlers = 14 | # 15 | # If set, log_udp_host will override log_address 16 | # log_udp_host = 17 | # log_udp_port = 514 18 | # 19 | # You can enable StatsD logging here: 20 | # log_statsd_host = localhost 21 | # log_statsd_port = 8125 22 | # log_statsd_default_sample_rate = 1.0 23 | # log_statsd_sample_rate_factor = 1.0 24 | # log_statsd_metric_prefix = 25 | 26 | [object-expirer] 27 | interval = 300 28 | # auto_create_account_prefix = . 29 | # report_interval = 300 30 | # concurrency is the level of concurrency o use to do the work, this value 31 | # must be set to at least 1 32 | # concurrency = 1 33 | # processes is how many parts to divide the work into, one part per process 34 | # that will be doing the work 35 | # processes set 0 means that a single process will be doing all the work 36 | # processes can also be specified on the command line and will override the 37 | # config value 38 | # processes = 0 39 | # process is which of the parts a particular process will work on 40 | # process can also be specified on the command line and will overide the config 41 | # value 42 | # process is "zero based", if you want to use 3 processes, you should run 43 | # processes with process set to 0, 1, and 2 44 | # process = 0 45 | 46 | [pipeline:main] 47 | pipeline = catch_errors cache proxy-server 48 | 49 | [app:proxy-server] 50 | use = egg:swift#proxy 51 | # See proxy-server.conf-sample for options 52 | 53 | [filter:cache] 54 | use = egg:swift#memcache 55 | # See proxy-server.conf-sample for options 56 | 57 | [filter:catch_errors] 58 | use = egg:swift#catch_errors 59 | # See proxy-server.conf-sample for options -------------------------------------------------------------------------------- /files/object-server.conf: -------------------------------------------------------------------------------- 1 | [DEFAULT] 2 | devices = /srv/node 3 | mount_check = false 4 | disable_fallocate = true 5 | bind_port = 6010 6 | workers = 1 7 | user = swift 8 | log_facility = LOG_LOCAL2 9 | recon_cache_path = /var/cache/swift 10 | eventlet_debug = true 11 | 12 | [pipeline:main] 13 | pipeline = recon object-server 14 | 15 | [app:object-server] 16 | use = egg:swift#object 17 | 18 | [filter:recon] 19 | use = egg:swift#recon 20 | 21 | [object-replicator] 22 | vm_test_mode = yes 23 | 24 | [object-updater] 25 | 26 | [object-auditor] 27 | -------------------------------------------------------------------------------- /files/proxy-server.conf: -------------------------------------------------------------------------------- 1 | [DEFAULT] 2 | bind_port = 8080 3 | workers = 1 4 | user = swift 5 | log_facility = LOG_LOCAL1 6 | eventlet_debug = true 7 | 8 | [pipeline:main] 9 | # Yes, proxy-logging appears twice. This is so that 10 | # middleware-originated requests get logged too. 11 | pipeline = catch_errors gatekeeper healthcheck proxy-logging cache bulk tempurl slo dlo ratelimit crossdomain tempauth staticweb container-quotas account-quotas proxy-logging proxy-server 12 | 13 | [filter:catch_errors] 14 | use = egg:swift#catch_errors 15 | 16 | [filter:healthcheck] 17 | use = egg:swift#healthcheck 18 | 19 | [filter:proxy-logging] 20 | use = egg:swift#proxy_logging 21 | 22 | [filter:bulk] 23 | use = egg:swift#bulk 24 | 25 | [filter:ratelimit] 26 | use = egg:swift#ratelimit 27 | 28 | [filter:crossdomain] 29 | use = egg:swift#crossdomain 30 | 31 | [filter:dlo] 32 | use = egg:swift#dlo 33 | 34 | [filter:slo] 35 | use = egg:swift#slo 36 | 37 | [filter:tempurl] 38 | use = egg:swift#tempurl 39 | 40 | [filter:tempauth] 41 | storage_url_scheme = default 42 | use = egg:swift#tempauth 43 | user_admin_admin = admin .admin .reseller_admin 44 | user_test_tester = testing .admin 45 | user_test2_tester2 = testing2 .admin 46 | user_test_tester3 = testing3 47 | 48 | [filter:staticweb] 49 | use = egg:swift#staticweb 50 | 51 | [filter:account-quotas] 52 | use = egg:swift#account_quotas 53 | 54 | [filter:container-quotas] 55 | use = egg:swift#container_quotas 56 | 57 | [filter:cache] 58 | use = egg:swift#memcache 59 | 60 | [filter:gatekeeper] 61 | use = egg:swift#gatekeeper 62 | 63 | [app:proxy-server] 64 | use = egg:swift#proxy 65 | allow_account_management = true 66 | account_autocreate = true 67 | -------------------------------------------------------------------------------- /files/rsyncd.conf: -------------------------------------------------------------------------------- 1 | uid = swift 2 | gid = swift 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 = /srv/node 10 | read only = false 11 | lock file = /var/lock/account6012.lock 12 | 13 | [container6011] 14 | max connections = 25 15 | path = /srv/node 16 | read only = false 17 | lock file = /var/lock/container6011.lock 18 | 19 | [object6010] 20 | max connections = 25 21 | path = /srv/node 22 | read only = false 23 | lock file = /var/lock/object6010.lock 24 | -------------------------------------------------------------------------------- /files/startmain.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 4 | # Make the rings if they don't exist already 5 | # 6 | 7 | # These can be set with docker run -e VARIABLE=X at runtime 8 | SWIFT_PART_POWER=${SWIFT_PART_POWER:-7} 9 | SWIFT_PART_HOURS=${SWIFT_PART_HOURS:-1} 10 | SWIFT_REPLICAS=${SWIFT_REPLICAS:-1} 11 | 12 | if [ -e /srv/account.builder ]; then 13 | echo "Ring files already exist in /srv, copying them to /etc/swift..." 14 | cp /srv/*.builder /etc/swift/ 15 | cp /srv/*.gz /etc/swift/ 16 | fi 17 | 18 | # This comes from a volume, so need to chown it here, not sure of a better way 19 | # to get it owned by Swift. 20 | if [ ! -e /srv/node ]; then 21 | mkdir /srv/node 22 | fi 23 | chown -R swift:swift /srv 24 | 25 | if [ ! -e /etc/swift/account.builder ]; then 26 | 27 | cd /etc/swift 28 | 29 | # 2^& = 128 we are assuming just one drive 30 | # 1 replica only 31 | 32 | echo "No existing ring files, creating them..." 33 | 34 | swift-ring-builder object.builder create ${SWIFT_PART_POWER} ${SWIFT_REPLICAS} ${SWIFT_PART_HOURS} 35 | swift-ring-builder object.builder add r1z1-127.0.0.1:6010/sdb1 1 36 | swift-ring-builder object.builder rebalance 37 | swift-ring-builder container.builder create ${SWIFT_PART_POWER} ${SWIFT_REPLICAS} ${SWIFT_PART_HOURS} 38 | swift-ring-builder container.builder add r1z1-127.0.0.1:6011/sdb1 1 39 | swift-ring-builder container.builder rebalance 40 | swift-ring-builder account.builder create ${SWIFT_PART_POWER} ${SWIFT_REPLICAS} ${SWIFT_PART_HOURS} 41 | swift-ring-builder account.builder add r1z1-127.0.0.1:6012/sdb1 1 42 | swift-ring-builder account.builder rebalance 43 | 44 | # Back these up for later use 45 | echo "Copying ring files to /srv to save them if it's a docker volume..." 46 | cp *.gz /srv 47 | cp *.builder /srv 48 | 49 | fi 50 | 51 | # If you are going to put an ssl terminator in front of the proxy, then I believe 52 | # the storage_url_scheme should be set to https. So if this var isn't empty, set 53 | # the default storage url to https. 54 | if [ ! -z "${SWIFT_STORAGE_URL_SCHEME}" ]; then 55 | echo "Setting default_storage_scheme to https in proxy-server.conf..." 56 | sed -i -e "s/storage_url_scheme = default/storage_url_scheme = https/g" /etc/swift/proxy-server.conf 57 | grep "storage_url_scheme" /etc/swift/proxy-server.conf 58 | fi 59 | 60 | if [ ! -z "${SWIFT_USER_PASSWORD}" ]; then 61 | echo "Setting passwords in /etc/swift/proxy-server.conf" 62 | PASS=`pwgen 12 1` 63 | sed -i -e "s/user_admin_admin = admin .admin .reseller_admin/user_admin_admin = ${SWIFT_USER_PASSWORD} .admin .reseller_admin/g" /etc/swift/proxy-server.conf 64 | sed -i -e "s/user_test_tester = testing .admin/user_test_tester = ${SWIFT_USER_PASSWORD} .admin/g" /etc/swift/proxy-server.conf 65 | sed -i -e "s/user_test2_tester2 = testing2 .admin/user_test2_tester2 = ${SWIFT_USER_PASSWORD} .admin/g" /etc/swift/proxy-server.conf 66 | sed -i -e "s/user_test_tester3 = testing3/user_test_tester3 = ${SWIFT_USER_PASSWORD}/g" /etc/swift/proxy-server.conf 67 | grep "user_test" /etc/swift/proxy-server.conf 68 | fi 69 | 70 | # Start supervisord 71 | echo "Starting supervisord..." 72 | /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf 73 | 74 | # 75 | # Tail the log file for "docker log $CONTAINER_ID" 76 | # 77 | 78 | # sleep waiting for rsyslog to come up under supervisord 79 | sleep 3 80 | 81 | echo "Starting to tail /var/log/syslog...(hit ctrl-c if you are starting the container in a bash shell)" 82 | 83 | tail -n 0 -f /var/log/syslog 84 | -------------------------------------------------------------------------------- /files/supervisord.conf: -------------------------------------------------------------------------------- 1 | [supervisord] 2 | nodaemon=false 3 | 4 | [program:memcached] 5 | command=/usr/bin/memcached -u memcache 6 | startsecs=3 7 | stopwaitsecs = 3 8 | 9 | [program:rsyslog] 10 | command=/bin/bash -c "source /etc/default/rsyslog && /usr/sbin/rsyslogd -n -c3" 11 | startsecs = 5 12 | stopwaitsecs = 5 13 | 14 | [program:proxy-server] 15 | command=/usr/bin/python /usr/bin/swift-proxy-server /etc/swift/proxy-server.conf 16 | startsecs=3 17 | stopwaitsecs = 3 18 | 19 | [program:container-server] 20 | command=/usr/bin/python /usr/bin/swift-container-server /etc/swift/container-server.conf 21 | startsecs=3 22 | stopwaitsecs = 3 23 | 24 | [program:account-server] 25 | command=/usr/bin/python /usr/bin/swift-account-server /etc/swift/account-server.conf 26 | startsecs=3 27 | stopwaitsecs = 3 28 | 29 | [program:account-auditor] 30 | command=/usr/bin/python /usr/bin/swift-account-auditor /etc/swift/account-server.conf 31 | startsecs=3 32 | stopwaitsecs = 3 33 | 34 | [program:object-replicator] 35 | command=/usr/bin/python /usr/bin/swift-object-replicator /etc/swift/object-server.conf 36 | startsecs=3 37 | stopwaitsecs = 3 38 | 39 | [program:object-auditor] 40 | command=/usr/bin/python /usr/bin/swift-object-auditor /etc/swift/object-server.conf 41 | startsecs=3 42 | stopwaitsecs = 3 43 | 44 | [progam:container-auditor] 45 | command=/usr/bin/python /usr/bin/swift-container-auditor /etc/swift/container-server.conf 46 | startsecs=3 47 | stopwaitsecs = 3 48 | 49 | [program:object-auditor] 50 | command=/usr/bin/python /usr/bin/swift-object-server /etc/swift/object-server.conf 51 | startsecs=3 52 | stopwaitsecs = 3 53 | 54 | [program:account-replicator] 55 | command=/usr/bin/python /usr/bin/swift-account-replicator /etc/swift/account-server.conf 56 | startsecs=3 57 | stopwaitsecs = 3 58 | 59 | [program:account-reaper] 60 | command=/usr/bin/python /usr/bin/swift-account-reaper /etc/swift/account-server.conf 61 | startsecs=3 62 | stopwaitsecs = 3 63 | 64 | [program:container-sync] 65 | command=/usr/bin/python /usr/bin/swift-container-sync /etc/swift/container-server.conf 66 | startsecs=3 67 | stopwaitsecs = 3 68 | 69 | [program:object-updater] 70 | command=/usr/bin/python /usr/bin/swift-object-updater /etc/swift/object-server.conf 71 | startsecs=3 72 | stopwaitsecs = 3 73 | 74 | -------------------------------------------------------------------------------- /files/swift.conf: -------------------------------------------------------------------------------- 1 | [swift-hash] 2 | # random unique strings that can never change (DO NOT LOSE) 3 | swift_hash_path_prefix = changeme 4 | swift_hash_path_suffix = changeme -------------------------------------------------------------------------------- /swiftrc: -------------------------------------------------------------------------------- 1 | 2 | # If you change the user name or password or project you'd have to 3 | # change it here as well. 4 | alias sw="swift -A http://127.0.0.1:12345/auth/v1.0 -U test:tester -K testing" 5 | 6 | # Make a container available via public html web page. 7 | function web { 8 | if [ -z "$1" ]; then 9 | echo "USAGE: web container_name" 10 | else 11 | echo "INFO: Making $1 a listable web index container" 12 | sw post -r '.r:*' -m 'web-index:index.html' -m 'web-listings: true' $1 13 | fi 14 | } 15 | 16 | --------------------------------------------------------------------------------