/
ceph-rgw.sh
executable file
·61 lines (53 loc) · 1.76 KB
/
ceph-rgw.sh
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
55
56
57
58
59
60
61
#
# Copyright (c) 2022 Seagate Technology LLC and/or its Affiliates
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# For any questions about this software or licensing,
# please email opensource@seagate.com or cortx-questions@seagate.com.
#
#!/bin/bash
cleanup()
{
rm -rf /tmp/hastatus.yaml
}
trap cleanup EXIT
### Kill rgw
### Start/restart motr
#sudo pkill -9 radosgw
#sudo hctl shutdown
#./disks.sh
#sudo hctl bootstrap --mkfs ./singlenode.yaml
#hctl status
set +x
hctl status &> /tmp/hastatus.yaml
if grep -q "Cluster is not running" "/tmp/hastatus.yaml"; then
echo "the cluster is not running!"
echo "start the cluster first!!"
exit
fi
set -x
#Create ceph config file
conf_file=/etc/ceph/ceph.conf
sudo mkdir -p $(dirname $conf_file)
sudo bash -c "./motraddr.sh --ceph-conf > /etc/ceph/ceph.conf"
cat /etc/ceph/ceph.conf
#Create radosgw admin
#Make sure the accesskey/secretkey pair matches AWS Cli configuration
radosgw-admin user create --uid rgwuser1 --display-name rgwuser1 --access-key ahsdfewdgluawxxxxaasd --secret jkaowxe345nfdakn7bqqs6 --no-mon-config
#Start radosgw service
#Use sudo pkill -9 radosgw to stop the service
sudo /usr/bin/radosgw -f --name client.rgw --no-mon-config &
#AWS s3 commands
#Execute s3 commands, preferably in another console
#./s3aws.sh