Saltbox defaults to using service accounts for uploading to multiple teamdrives to allow for future growth.
To make the setup more straightforward, this guide will leverage
safire to generate as much infrastructure as possible.
This will set up three Shared Drives and set up all the infrastructure you need for Saltbox to use them.
If you're here, you probably want to go here instead.
safire has been acting inconsistently.
This script is a work in progress; it probably has rough edges.¶
Assumptions and defaults:¶
You have rclone installed
You are running python 3.8 and have run
sudo apt install python3.8-venv -yProbably other python3 works, the assumption is that the script can create a venv
The script will generate a random prefix and use this for the shared drives, service accounts, and projects.
Default is to generate three shared drives:
This can be modified with a config file. The first half of the script will display the details.
- Default is to generate three projects with 100 service accounts each. This can be modified at the beginning of the script itself.
There are a couple other user settings at the beginning of the script.
Google Project and Group Setup¶
There are two pieces that can't be scripted.
You will need to create a new project and generate a credential file:
You will need to create a Google Group to hold service accounts:
SSH into your server, then copy-paste these commands one by one:
curl -fLvO https://raw.githubusercontent.com/chazlarson/sb_gd/main/sb_gd.sh chmod +x sb_gd.sh ./sb_gd.sh
Copy the credential JSON you downloaded earlier to
~/safire/creds/creds.jsonon your server
You can do this in a variety of ways; if you are running a linux-like system locally
scp /LOCAL/PATH/TO/creds.json USER@DOMAIN.TLD:~/safire/creds/creds.json
scp /Users/nacl/Downloads/safire-credentials.json firstname.lastname@example.org:~/safire/creds/creds.json
Run the script again.
You will be prompted to authenticate to google and copy-paste a token [this will happen twice].
If you didn't enter your google group email address into the script, you will be asked for it.
You should now have three new shared drives ready for use with Saltbox.