summaryrefslogtreecommitdiffstats
path: root/gluster-s3object
diff options
context:
space:
mode:
Diffstat (limited to 'gluster-s3object')
-rw-r--r--gluster-s3object/CentOS/docker-gluster-s3/README.md6
-rw-r--r--gluster-s3object/CentOS/docker-gluster-s3/etc/sysconfig/swift-volumes6
-rwxr-xr-xgluster-s3object/CentOS/docker-gluster-s3/gluster-swift-add-user12
-rw-r--r--gluster-s3object/CentOS/docker-gluster-s3/swift-adduser.service2
-rw-r--r--gluster-s3object/CentOS/docker-gluster-s3/swift-gen-builders.service2
-rw-r--r--gluster-s3object/CentOS/docker-gluster-s3/update_gluster_vol.sh12
6 files changed, 20 insertions, 20 deletions
diff --git a/gluster-s3object/CentOS/docker-gluster-s3/README.md b/gluster-s3object/CentOS/docker-gluster-s3/README.md
index a8bd935..8b3e151 100644
--- a/gluster-s3object/CentOS/docker-gluster-s3/README.md
+++ b/gluster-s3object/CentOS/docker-gluster-s3/README.md
@@ -23,14 +23,14 @@ to bind mount individual gluster volumes.
The same needs to be updated in etc/sysconfig/swift-volumes.
For example(in swift-volumes):
-GLUSTER_VOLUMES='tv1'
+S3_ACCOUNT='tv1'
Where tv1 is the volume name.
**Example:**
```bash
-# docker run -d --privileged -v /sys/fs/cgroup/:/sys/fs/cgroup/:ro -p 8080:8080 -v /mnt/gluster-object:/mnt/gluster-object -e GLUSTER_VOLUMES="tv1" -e GLUSTER_USER="admin" -e GLUSTER_PASSWORD="redhat" gluster-s3
+# docker run -d --privileged -v /sys/fs/cgroup/:/sys/fs/cgroup/:ro -p 8080:8080 -v /mnt/gluster-object:/mnt/gluster-object -e S3_ACCOUNT="tv1" -e S3_USER="admin" -e S3_PASSWORD="redhat" gluster-s3
```
If you have selinux set to enforced on the host machine, refer to the
@@ -46,7 +46,7 @@ Troubleshooting section below before running the container.
the same host machine.
-v : Bind mount a host path inside the container.
-e : Set and pass environment variable. In our case, provide a list of volumes
- to be exported over object inerface by setting GLUSTER_VOLUMES environment
+ to be exported over object inerface by setting S3_ACCOUNT environment
variable.
~~~
diff --git a/gluster-s3object/CentOS/docker-gluster-s3/etc/sysconfig/swift-volumes b/gluster-s3object/CentOS/docker-gluster-s3/etc/sysconfig/swift-volumes
index 3aeb7ec..83b3a33 100644
--- a/gluster-s3object/CentOS/docker-gluster-s3/etc/sysconfig/swift-volumes
+++ b/gluster-s3object/CentOS/docker-gluster-s3/etc/sysconfig/swift-volumes
@@ -1,4 +1,4 @@
# Set Gluster volumes to be used by gluster-object service
-GLUSTER_VOLUMES="tv1"
-GLUSTER_USER="admin"
-GLUSTER_PASSWORD="redhat"
+S3_ACCOUNT="tv1"
+S3_USER="admin"
+S3_PASSWORD="redhat"
diff --git a/gluster-s3object/CentOS/docker-gluster-s3/gluster-swift-add-user b/gluster-s3object/CentOS/docker-gluster-s3/gluster-swift-add-user
index 59eb1b2..0b4262b 100755
--- a/gluster-s3object/CentOS/docker-gluster-s3/gluster-swift-add-user
+++ b/gluster-s3object/CentOS/docker-gluster-s3/gluster-swift-add-user
@@ -1,13 +1,13 @@
#!/bin/bash
if [ "$#" -lt 3 ]; then
- echo "Incorrect args. invoke gluster-swift-add-user $GLUSTER_USER $GLUSTER_PASSWORD $GLUSTER_VOLUMES"
+ echo "Incorrect args. invoke gluster-swift-add-user $S3_USER $S3_PASSWORD $S3_ACCOUNT"
exit 1
else
- GLUSTER_USER=$1
- GLUSTER_PASSWORD=$2
- GLUSTER_VOLUMES=$(echo $3 | cut -d" " -f1)
+ S3_USER=$1
+ S3_PASSWORD=$2
+ S3_ACCOUNT=$(echo $3 | cut -d" " -f1)
sleep 5
gswauth-prep -A http://0.0.0.0:8080/auth -K gswauthkey
- gswauth-add-account -K gswauthkey $GLUSTER_VOLUMES
- gswauth-add-user -K gswauthkey -a $GLUSTER_VOLUMES $GLUSTER_USER $GLUSTER_PASSWORD
+ gswauth-add-account -K gswauthkey $S3_ACCOUNT
+ gswauth-add-user -K gswauthkey -a $S3_ACCOUNT $S3_USER $S3_PASSWORD
fi
diff --git a/gluster-s3object/CentOS/docker-gluster-s3/swift-adduser.service b/gluster-s3object/CentOS/docker-gluster-s3/swift-adduser.service
index ee4c8d7..80f1819 100644
--- a/gluster-s3object/CentOS/docker-gluster-s3/swift-adduser.service
+++ b/gluster-s3object/CentOS/docker-gluster-s3/swift-adduser.service
@@ -5,7 +5,7 @@ After=swift-object.service
[Service]
Type=oneshot
EnvironmentFile=-/etc/sysconfig/swift-volumes
-ExecStart=/usr/local/bin/gluster-swift-add-user $GLUSTER_USER $GLUSTER_PASSWORD $GLUSTER_VOLUMES
+ExecStart=/usr/local/bin/gluster-swift-add-user $S3_USER $S3_PASSWORD $S3_ACCOUNT
[Install]
WantedBy=multi-user.target
diff --git a/gluster-s3object/CentOS/docker-gluster-s3/swift-gen-builders.service b/gluster-s3object/CentOS/docker-gluster-s3/swift-gen-builders.service
index efafca5..780bb8b 100644
--- a/gluster-s3object/CentOS/docker-gluster-s3/swift-gen-builders.service
+++ b/gluster-s3object/CentOS/docker-gluster-s3/swift-gen-builders.service
@@ -5,7 +5,7 @@ Before=memcached.service
[Service]
Type=oneshot
EnvironmentFile=-/etc/sysconfig/swift-volumes
-ExecStart=/usr/bin/gluster-swift-gen-builders $GLUSTER_VOLUMES gsmetadata
+ExecStart=/usr/bin/gluster-swift-gen-builders $S3_ACCOUNT gsmetadata
[Install]
WantedBy=multi-user.target
diff --git a/gluster-s3object/CentOS/docker-gluster-s3/update_gluster_vol.sh b/gluster-s3object/CentOS/docker-gluster-s3/update_gluster_vol.sh
index 9e9c60e..cfc7a09 100644
--- a/gluster-s3object/CentOS/docker-gluster-s3/update_gluster_vol.sh
+++ b/gluster-s3object/CentOS/docker-gluster-s3/update_gluster_vol.sh
@@ -1,14 +1,14 @@
#!/bin/bash
# To update gluster volume name in swift-volumes, used by swift-gen-builders.service
-if [[ -z "$GLUSTER_VOLUMES" || -z "$GLUSTER_USER" || -z "$GLUSTER_PASSWORD" ]]; then
- echo "You need to set GLUSTER_VOLUMES, GLUSTER_USER, GLUSTER_PASSWORD env variable"
+if [[ -z "$S3_ACCOUNT" || -z "$S3_USER" || -z "$S3_PASSWORD" ]]; then
+ echo "You need to set S3_ACCOUNT, S3_USER, S3_PASSWORD env variable"
exit 1
else
- echo "GLUSTER_VOLUMES env variable is set. Update in swift-volumes"
- sed -i.bak '/^GLUSTER_VOLUMES=/s/=.*/='\""$GLUSTER_VOLUMES"\"'/' /etc/sysconfig/swift-volumes
- sed -i.bak '/^GLUSTER_USER=/s/=.*/='\""$GLUSTER_USER"\"'/' /etc/sysconfig/swift-volumes
- sed -i.bak '/^GLUSTER_PASSWORD=/s/=.*/='\""$GLUSTER_PASSWORD"\"'/' /etc/sysconfig/swift-volumes
+ echo "S3_ACCOUNT env variable is set. Update in swift-volumes"
+ sed -i.bak '/^S3_ACCOUNT=/s/=.*/='\""$S3_ACCOUNT"\"'/' /etc/sysconfig/swift-volumes
+ sed -i.bak '/^S3_USER=/s/=.*/='\""$S3_USER"\"'/' /etc/sysconfig/swift-volumes
+ sed -i.bak '/^S3_PASSWORD=/s/=.*/='\""$S3_PASSWORD"\"'/' /etc/sysconfig/swift-volumes
fi
# Hand off to CMD