-
Notifications
You must be signed in to change notification settings - Fork 1
/
create-files.sh
executable file
·23 lines (19 loc) · 1.02 KB
/
create-files.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#! /bin/bash -eux
# Check http://${OZONE_OM_IP}:9876/#!/ when you encounter errors.
OZONE_OM_IP=$(sudo docker inspect --format='{{.NetworkSettings.Networks.bridge.Gateway}}' ozone-instance)
ROS3FS_MOUNTPOINT_ANSWER=$(git rev-parse --show-toplevel)/build/ros3fs_mountpoint_answer
mkdir -p ${ROS3FS_MOUNTPOINT_ANSWER}
aws configure set default.s3.signature_version s3v4
aws configure set region us-west-1
aws configure set aws_access_key_id "hoge"
aws configure set aws_secret_access_key "fuga"
aws s3api --endpoint http://${OZONE_OM_IP}:9878 create-bucket --bucket=bucket1
for f in testfile_a testfile_b testfile_c dir_a/testfile_a dir_a/dir_a/testfile_a
do
d=$(dirname ${f})
mkdir -p ${ROS3FS_MOUNTPOINT_ANSWER}/${d}
echo ${RANDOM} > ${ROS3FS_MOUNTPOINT_ANSWER}/${f}
echo "aaaaaa" >> ${ROS3FS_MOUNTPOINT_ANSWER}/${f}
aws s3 --endpoint http://${OZONE_OM_IP}:9878 cp --storage-class REDUCED_REDUNDANCY ${ROS3FS_MOUNTPOINT_ANSWER}/${f} s3://bucket1/${f}
done
aws s3 --endpoint http://${OZONE_OM_IP}:9878 ls s3://bucket1/