GCP
gcsfuse
misankim
2023. 5. 12. 23:27
gcsfuse
-> Utility to mount gcs like a file system
https://github.com/GoogleCloudPlatform/gcsfuse/
# installation
https://github.com/GoogleCloudPlatform/gcsfuse/blob/master/docs/installing.md
## centos
sudo tee /etc/yum.repos.d/gcsfuse.repo > /dev/null <<EOF
[gcsfuse]
name=gcsfuse (packages.cloud.google.com)
baseurl=https://packages.cloud.google.com/yum/repos/gcsfuse-el7-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=0
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg
https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
EOF
sudo yum install gcsfuse
# Setting Cloud API access scope for gce instance
-> The default Cloud API access scope for storage is read-only, so you must change it separately to write files.
Stop Instance -> Modify Instance -> Manage API and Identity -> Cloud API Access Scope -> Storage -> Change to Full
# use
# mount
gcsfuse premisan-test-bucket-123 /home/premisan/gcs/
# unmount
fusermount -u /home/premisan/gcs/