Nothing Special   »   [go: up one dir, main page]

Skip to content
/ sa-drive Public

An alternative of Shared drive/teamdrives. Utilises the 15gb storage of each service account. The more service accounts you have, the more storage you will get. With 100 service accounts you can get about 1.46TiB of storage.

License

Notifications You must be signed in to change notification settings

jsmsj/sa-drive

Repository files navigation

SA Drive (Service Account Drive)

Why is it needed ?

Since now team drives or shared drives (whichever you may prefer) are not available for free using td.msgsuite.workers.dev or any such generators.

Even if they are available, they are limited to 100GiB.

This project aims to give a displayable + managable look to the drive storage of service accounts.

How it works ?

Each service account has a 15GiB of drive storage. If you have a 100 service accounts [i.e. use only 1 google cloud project], then you have roughly 1.46 TiB of storage

When you upload files using the web interface, the program automatically detects a service account with enough storage to upload the file, and uploads it to that service account's google drive.

Hence in this way you can exceed the 15GiB storage of your personal drive.

Limitations

You cannot upload a file whoose size exceeds 15 GiB (Specifically 15784004812 Bytes or about 14.69GiB)

Best Case Scenario

Each Gmail account can create 12 projects. i.e. 12*100 service accounts. Hence you can effectively get 15*12*100 = 18000 GiB of storage, or roughly 17TiB per gmail account. With the only limitation being file size of each file about 14.7GiB

Deployment

  1. [OPTIONAL (if you do not have service accounts)] Create service accounts using AutoRclone or Service Account Utility [Video for using Service Account Utility: Youtube]
  2. Download the zip of the repository, extract it and paste the accounts/ folder in it.
  3. Generate a mongodb database uri. Follow step 1 of this tutorial
  4. Go to your personal google drive, make a folder there named sa-drive or whatever you may like. Keep its folder id handy. Share this folder with the google group where your service accounts are there.
  5. Open _config.py using any text editor and paste in the folder id [from step 4] in the parent_id variable.
  6. Paste the mongodb uri [from step 3] in db_uri variable.
  7. Choose a suitable username and password. RENAME IT TO config.py . Save and exit.
  8. Open command prompt in that folder.
  9. [OPTIONAL (but recommended)] Run pip install virtualenv. Then run virtualenv venv, cd venv/Scripts, activate, cd ../..
  10. Run pip install -r requirements.txt
  11. Run python main.py

Got questions ?

Read FAQs.

Video Tutorial

  1. Generate service accounts using Service Account Utility - Youtube
  2. Deploy sa-drive - Youtube

Images

  1. You can view the files in Google Drive as well. [Apart from the sa-drive web interface]
    Google Drive:
    Web Interface:
  2. You can share/star/rename the files/folders with anyone by using the menu accessible by right clicking the item.
  3. You can see the size occupied by each service account as well.

Note:

  1. More features can be requested apart from TODO below by creating an issue, or sending it on discord to jsmsj#5252 or jsmsj
  2. You can send pull requests too. [Please do 🙏]

TODO

  • support uploading an entire folder, with subfolders and files
  • drag and grop anywhere to upload
  • view file (with video player if possible)
  • share/unshare selected=> navbar
  • rclone/gclone ul/dl

About

An alternative of Shared drive/teamdrives. Utilises the 15gb storage of each service account. The more service accounts you have, the more storage you will get. With 100 service accounts you can get about 1.46TiB of storage.

Resources

License

Stars

Watchers

Forks