Manage Filestores
A filestore lets your Codiac asset use files stored on an external provider.
Codiac only supports Azure filestores. AWS and Google filestores are coming soon.
Codiac has read-only access to your existing filestores. It cannot create, edit, or remove files in your filestore. See your cloud service provider for instructions on creating and managing files and filestores.
Usage and Options
Use codiac filestore -h
to see all the available options:
Prerequisites
- Basic Codiac Prerequisites
- An Azure storage account.
- A file saved in your Azure storage account.
Add a filestore
Overview
Adding a filestore to your Codiac asset takes four steps:
- Tell Codiac about your external filestore.
- Add a mount point to your Codiac asset.
- Map the filestore from Step 1 to the asset from Step 2.
- Deploy the asset.
Step 1: Tell Codiac about your external filestore
- Use
codiac filestore capture
to create a reference to your external filestore:
codiac filestore capture
-
Follow the prompts:
i. Log into your Azure account.
ii. Select your Azure subscription.
iii. Select the Azure storage account.
iv. Select the filestore.
v. For Refer to as:, enter a name for your filestore.
Note the name you set for your filestore in this step. You will use that name in step 3.
Step 2: Add a mount point to your Codiac asset
- Use
codiac asset volume add
to configure your Codiac asset for the filestore:
codiac asset volume add
-
Follow the prompts:
i. Select the asset.
ii. For Enter a mountPath for the volume, enter the folder on the asset container where you want to mount the volume.
iii. For Refer to this mount folder as:, enter a name for your mount point.
iv. (Optional) For Describe the intended purpose for this volume mount, add a description.
v. Enter
Y
to confirm and create the asset volume.
Note the name you set for your mount point in this step. You will use that name in step 3.
Step 3: Map the filestore to the asset
- Use
codiac config set
to add the filestore information to the asset as a configuration:
codiac config set
-
Follow the prompts:
i. Select the asset.
ii. For Config, select create new.
iii. For Target, select filestore.
iv. For Setting, enter the name you set for the filestore in step 1.
v. For Scope, select your cabinet.
vi. For Value in environment ENVIRONMENT_NAME, enter the name you set for the mount point in step 2.
vii. For Apply, enter
Y
.
Because you set the filestore at the environment level, you can use different filestores for the same asset as deployed in different environments. For example, you may want the asset to use a test data file for your dev
environment and a production data file for your prod
environment.
Step 4: Deploy the asset
- Use
codiac asset deploy
to deploy the asset to the cabinet. This command defaults to the most recent version of the asset:
codiac asset deploy
- Follow the prompts to select the asset, cloud service provider, and cabinet.
Show filestores
Use codiac filestore list
to list all filestores added to your Codiac account:
codiac filestore list
Delete a filestore
Step 1. Un-map the filestore from the asset
- Use
codiac config delete
to delete the filestore configuration.
codiac config delete
- Follow the prompts to select the asset, select the filestore config you want to delete, and the scope for the deletion.
Step 2: Delete the mount point from the asset
- Use
codiac asset volume delete
to delete the mount point:
codiac asset volume delete
- Follow the prompts to select the asset and the volume mount to delete.
Step 1: Tell Codiac to forget your external filestore
- Use
codiac filestore forget
to remove the filestore from your Codiac account.
This command does not affect the filestore or the files within. See your cloud service provider for instructions on creating and managing filestores.
codiac filestore forget
- Follow the prompts to select the filestore you want to remove.