config info in doc (#3796)

<!-- PR description-->

- Use single inverted comma instead of double inverted comma in Powershell env vars.
- Update config file information in docs.  

#### Does this PR need a docs update or release note?

- [ ]  No

#### Type of change

<!--- Please check the type of change your PR introduces: --->
- [ ] 🗺️ Documentation

#### Issue(s)

<!-- Can reference multiple issues. Use one of the following "magic words" - "closes, fixes" to auto-close the Github issue. -->
* https://github.com/alcionai/corso/issues/3522

#### Test Plan

<!-- How will this be tested prior to merging.-->
- [ ] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E
This commit is contained in:
neha_gupta 2023-07-17 21:49:21 +05:30 committed by GitHub
parent 99d6d42919
commit 49f6f8c337
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 71 additions and 10 deletions

View File

@ -10,6 +10,13 @@ Two things are needed to configure Corso:
* Environment variables containing configuration information
* A directory for Corso to store its configuration file
Apart from Environment variables configuration information can also be provided from flags or configuration files.
Corso uses the following priority order for configuration:
1. Flags values
2. Environment variables
3. Configuration File information
## Environment variables
Three distinct pieces of configuration are required by Corso:
@ -34,15 +41,15 @@ alternate ways to pass AWS credentials.
Ensure that all of the above environment variables are defined in your Powershell environment.
```powershell
$Env:AWS_ACCESS_KEY_ID = "..."
$Env:AWS_SECRET_ACCESS_KEY = "..."
$Env:AWS_ACCESS_KEY_ID = '...'
$Env:AWS_SECRET_ACCESS_KEY = '...'
$Env:AWS_SESSION_TOKEN = ""
$Env:AZURE_CLIENT_ID = "..."
$Env:AZURE_TENANT_ID = "..."
$Env:AZURE_CLIENT_SECRET = "..."
$Env:AZURE_CLIENT_ID = '...'
$Env:AZURE_TENANT_ID = '...'
$Env:AZURE_CLIENT_SECRET = '...'
$Env:CORSO_PASSPHRASE = "CHANGE-ME-THIS-IS-INSECURE"
$Env:CORSO_PASSPHRASE = 'CHANGE-ME-THIS-IS-INSECURE'
```
</TabItem>
@ -105,12 +112,48 @@ To create the environment variables file, you can run the following command:
By default, Corso stores its configuration file (`.corso.toml`) in the user's home directory.
The location of the configuration file can be specified using the `--config-file` option.
The config file can also be used to provide other configuration information like Azure and AWS credentials as mentioned below:
```bash
# AWS configs
aws_access_key_id = '...'
aws_secret_access_key = '...'
aws_session_token = '...'
# M365 config
account_provider = '...'
azure_tenantid = '...'
azure_client_id = '...'
azure_secret = '...'
# Corso passphrase
passphrase = '...'
```
</TabItem>
<TabItem value="unix" label="Linux/macOS">
By default, Corso stores its configuration file (`.corso.toml`) in the user's home directory.
The location of the configuration file can be specified using the `--config-file` option.
The config file can also be used to provide other configuration information like Azure and AWS credentials as mentioned below:
```bash
# AWS configs
aws_access_key_id = '...'
aws_secret_access_key = '...'
aws_session_token = '...'
# M365 config
account_provider = '...'
azure_tenantid = '...'
azure_client_id = '...'
azure_secret = '...'
# Corso passphrase
passphrase = '...'
```
</TabItem>
<TabItem value="docker" label="Docker">
@ -124,6 +167,24 @@ directory within the container.
<command> <command options>`
}</CodeBlock>
The config file can also be used to provide other configuration information like Azure and AWS credentials as mentioned below:
```bash
# AWS configs
aws_access_key_id = '...'
aws_secret_access_key = '...'
aws_session_token = '...'
# M365 config
account_provider = '...'
azure_tenantid = '...'
azure_client_id = '...'
azure_secret = '...'
# Corso passphrase
passphrase = '...'
```
</TabItem>
</Tabs>

View File

@ -85,8 +85,8 @@ Copy the client and tenant IDs and export them into the following environment va
<TabItem value="win" label="Powershell">
```powershell
$Env:AZURE_CLIENT_ID = "<Application (client) ID for configured app>"
$Env:AZURE_TENANT_ID = "<Directory (tenant) ID for configured app>"
$Env:AZURE_CLIENT_ID = '<Application (client) ID for configured app>'
$Env:AZURE_TENANT_ID = '<Directory (tenant) ID for configured app>'
```
</TabItem>
@ -124,7 +124,7 @@ environment variable.
<TabItem value="win" label="Powershell">
```powershell
$Env:AZURE_CLIENT_SECRET = "<Client secret value>"
$Env:AZURE_CLIENT_SECRET = '<Client secret value>'
```
</TabItem>

View File

@ -83,7 +83,7 @@ Before first use, you need to initialize a Corso repository with `corso repo ini
```powershell
# Initialize the Corso Repository
$Env:CORSO_PASSPHRASE = "CHANGE-ME-THIS-IS-INSECURE"
$Env:CORSO_PASSPHRASE = 'CHANGE-ME-THIS-IS-INSECURE'
.\corso repo init s3 --bucket corso-test
```