All Projects → ctrox → Csi S3

ctrox / Csi S3

Licence: apache-2.0
A Container Storage Interface for S3

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Csi S3

s3-server
Generic S3 server implementation
Stars: ✭ 27 (-89.41%)
Mutual labels:  s3
tichi
TiChi ☯️ contains the tidb community collaboration automation basic framework and tool set.
Stars: ✭ 36 (-85.88%)
Mutual labels:  k8s
k8s-mongo-sidecar
Kubernetes sidecar for MongoDB
Stars: ✭ 35 (-86.27%)
Mutual labels:  k8s
serverlessS3Upload
Example of using the Serverless framework to upload files to S3.
Stars: ✭ 35 (-86.27%)
Mutual labels:  s3
benji
📁 This library is a Scala reactive DSL for object storage (e.g. S3/Amazon, S3/CEPH, Google Cloud Storage).
Stars: ✭ 18 (-92.94%)
Mutual labels:  s3
synapse-s3-storage-provider
Synapse storage provider to fetch and store media in Amazon S3
Stars: ✭ 58 (-77.25%)
Mutual labels:  s3
terraform-aws-serverless-pypi
Serverless PyPI backed by S3
Stars: ✭ 33 (-87.06%)
Mutual labels:  s3
Krane
Kubernetes RBAC static Analysis & visualisation tool
Stars: ✭ 254 (-0.39%)
Mutual labels:  k8s
picgo-plugin-s3
PicGo S3 插件
Stars: ✭ 13 (-94.9%)
Mutual labels:  s3
qwery
A SQL-like language for performing ETL transformations.
Stars: ✭ 28 (-89.02%)
Mutual labels:  s3
centos-script
🎉centos下工具安装脚本,包含基础环境配置,Gitlab、Docker、LDAP、MongoDB、MySQL、RabbitMQ、Supervisor、Node、Python、zsh、rar、zabbix、k8s、prometheus、grafana等🎉
Stars: ✭ 121 (-52.55%)
Mutual labels:  k8s
storage
Go package for abstracting local, in-memory, and remote (Google Cloud Storage/S3) filesystems
Stars: ✭ 49 (-80.78%)
Mutual labels:  s3
s3-mongo-backup
Mongodb backups to S3
Stars: ✭ 18 (-92.94%)
Mutual labels:  s3
WebServerCloudBackups
Automatic backups your web projects bases and files to the clouds via WebDAV.
Stars: ✭ 20 (-92.16%)
Mutual labels:  s3
manifest-summary
print summary of a kubernetes manifest
Stars: ✭ 31 (-87.84%)
Mutual labels:  k8s
fluency
High throughput data ingestion logger to Fluentd, AWS S3 and Treasure Data
Stars: ✭ 135 (-47.06%)
Mutual labels:  s3
flekszible
Kubernetes resource/manifest file preprocessor, generator and manager.
Stars: ✭ 34 (-86.67%)
Mutual labels:  k8s
Terraform Aws Eks Cluster
Terraform module for provisioning an EKS cluster
Stars: ✭ 256 (+0.39%)
Mutual labels:  k8s
k8s mcextfs
Midnight Commander extfs for kubernetes
Stars: ✭ 18 (-92.94%)
Mutual labels:  k8s
simply-static-deploy
WordPress plugin to deploy static sites easily to an AWS S3 bucket.
Stars: ✭ 48 (-81.18%)
Mutual labels:  s3

CSI for S3

This is a Container Storage Interface (CSI) for S3 (or S3 compatible) storage. This can dynamically allocate buckets and mount them via a fuse mount into any container.

Status

This is still very experimental and should not be used in any production environment. Unexpected data loss could occur depending on what mounter and S3 storage backend is being used.

Kubernetes installation

Requirements

  • Kubernetes 1.13+ (CSI v1.0.0 compatibility)
  • Kubernetes has to allow privileged containers
  • Docker daemon must allow shared mounts (systemd flag MountFlags=shared)

1. Create a secret with your S3 credentials

apiVersion: v1
kind: Secret
metadata:
  name: csi-s3-secret
stringData:
  accessKeyID: <YOUR_ACCESS_KEY_ID>
  secretAccessKey: <YOUR_SECRET_ACCES_KEY>
  # For AWS set it to "https://s3.<region>.amazonaws.com"
  endpoint: <S3_ENDPOINT_URL>
  # If not on S3, set it to ""
  region: <S3_REGION>

The region can be empty if you are using some other S3 compatible storage.

2. Deploy the driver

cd deploy/kubernetes
kubectl create -f provisioner.yaml
kubectl create -f attacher.yaml
kubectl create -f csi-s3.yaml

3. Create the storage class

kubectl create -f storageclass.yaml

4. Test the S3 driver

  1. Create a pvc using the new storage class:
kubectl create -f pvc.yaml
  1. Check if the PVC has been bound:
$ kubectl get pvc csi-s3-pvc
NAME         STATUS    VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS   AGE
csi-s3-pvc   Bound     pvc-c5d4634f-8507-11e8-9f33-0e243832354b   5Gi        RWO            csi-s3         9s
  1. Create a test pod which mounts your volume:
kubectl create -f poc.yaml

If the pod can start, everything should be working.

  1. Test the mount
$ kubectl exec -ti csi-s3-test-nginx bash
$ mount | grep fuse
s3fs on /var/lib/www/html type fuse.s3fs (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
$ touch /var/lib/www/html/hello_world

If something does not work as expected, check the troubleshooting section below.

Additional configuration

Mounter

As S3 is not a real file system there are some limitations to consider here. Depending on what mounter you are using, you will have different levels of POSIX compability. Also depending on what S3 storage backend you are using there are not always consistency guarantees.

The driver can be configured to use one of these mounters to mount buckets:

The mounter can be set as a parameter in the storage class. You can also create multiple storage classes for each mounter if you like.

All mounters have different strengths and weaknesses depending on your use case. Here are some characteristics which should help you choose a mounter:

rclone

  • Almost full POSIX compatibility (depends on caching mode)
  • Files can be viewed normally with any S3 client

s3fs

  • Large subset of POSIX
  • Files can be viewed normally with any S3 client
  • Does not support appends or random writes

goofys

  • Weak POSIX compatibility
  • Performance first
  • Files can be viewed normally with any S3 client
  • Does not support appends or random writes

s3backer (experimental*)

  • Represents a block device stored on S3
  • Allows to use a real filesystem
  • Files are not readable with other S3 clients
  • Support appends
  • Supports compression before upload (Not yet implemented in this driver)
  • Supports encryption before upload (Not yet implemented in this driver)

*s3backer is experimental at this point because volume corruption can occur pretty quickly in case of an unexpected shutdown of a Kubernetes node or CSI pod. The s3backer binary is not bundled with the normal docker image to keep that as small as possible. Use the <version>-full image tag for testing s3backer.

Fore more detailed limitations consult the documentation of the different projects.

Troubleshooting

Issues while creating PVC

Check the logs of the provisioner:

kubectl logs -l app=csi-provisioner-s3 -c csi-s3

Issues creating containers

  1. Ensure feature gate MountPropagation is not set to false
  2. Check the logs of the s3-driver:
kubectl logs -l app=csi-s3 -c csi-s3

Development

This project can be built like any other go application.

go get -u github.com/ctrox/csi-s3

Build executable

make build

Tests

Currently the driver is tested by the CSI Sanity Tester. As end-to-end tests require S3 storage and a mounter like s3fs, this is best done in a docker container. A Dockerfile and the test script are in the test directory. The easiest way to run the tests is to just use the make command:

make test
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].