Introduction
After you create a data store, you can manage it or reconfigure it when things change. This article covers viewing, updating, and deleting your data store.
Prerequisites
This is a series of articles. You will likely follow them in this order.
- Storage Overview
- Create a Data Store
- Manage a Data Store
- Use the ZEDEDA CLI to Manage a Data Store - You are here!
Create a Data Store
Create a data store from ZCLI.
zcli datastore create <name> [--title=<title>] --dstype=<dstype> [--description=<description>] [--fqdn=<fqdn>] [--region=<region>] [--apikey=<apikey>] [--apipass=<password>] [--dpath=<dpath>] [--origin-type=<origin-type>] [--project-scope=<project-names>]
Notes:
-
dstype supported values are uppercase:
HTTP, HTTPS, AWSS3, SFTP, CONTAINERREGISTRY, AZUREBLOB, ARTIFACT-STORE:VAULT, SECRET-STORE:VAULT-
apikey supported values:
- If the datastore type (--dstype=) is AWSS3/AZUREBLOB, the apikey should be your Access Key Id.
- If the datastore type (--dstype=) is SFTP/CONTAINERREGISTRY, the apikey should be your Username.
-
apipass supported values:
- If the datastore type (--dstype=) is AWSS3/AZUREBLOB, apipass should be your Secret Access Key.
- If the datastore type (--dstype=) is SFTP/CONTAINERREGISTRY, apipass should be your Password.
- projectscope default is all projects.
-
apikey supported values:
zcli datastore create MY-DS --dstype=AWSS3 --region='us-east-1' --apikey=AKIAIOSFODNN7EXAMPLE --apipass=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
zcli datastore create MY-DS2 --dstype=CONTAINERREGISTRY --fqdn=docker://docker.io --apikey=MY-UNAME --apipass=MY-PWD
zcli datastore create MY-DS3 --dstype=AZUREBLOB --fqdn=https://zededacentral.blob.core.windows.net --dpath=qcow2images --apikey=AKIAIOSFODNN7EXAMPLE --apipass=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
View a Data Store
After you create a data store, you can view it.
zcli datastore show [--dstype=<dstype>] [[[<name> | --uuid=<uuid>] [--detail]] | [[--summary] | [[--name-pattern=<name-pattern>] [--page-size=<page-size>]]]]
zcli> zcli datastore show
Response:
Datastore Datastore URL Datastore region Path / Bucket
---------------------- ---------------------------------- ---------------- ----------------------------------
http-42 http://192.168.254.42 images
Zededa-AWS-Image https://s3-us-west-2.amazonaws.com us-west-2 zededa-zedcloud-hummingbird-images
zededa-ztest https://s3-us-west-2.amazonaws.com us-west-2 zededa-integration-tests
zededa-ztest-Container docker://docker.io
Total: 5 Type Distribution Summary: DATASTORE_TYPE_AWSS3 : 1 DATASTORE_TYPE_AZUREBLOB : 0 DATASTORE_TYPE_CONTAINERREGISTRY : 1 DATASTORE_TYPE_FILE_STORAGE : 0 DATASTORE_TYPE_HTTP : 2 DATASTORE_TYPE_HTTPS : 0 DATASTORE_TYPE_SFTP : 0 DATASTORE_TYPE_UNSPECIFIED : 0 DATASTORE_TYPE_ZEDEDABLOB : 0 DATASTORE_TYPE_ZEDEDAS3 : 1
Total: 5 Category Distribution Summary: DATASTORE_TYPE_CONTAINERREGISTRY : 1 DATASTORE_TYPE_FILE_STORAGE : 4
zcli>
Update a Data Store
After you create a data store, you can update it whenever things change.
zcli datastore update <name> [--dstype=<dstype>] [--title=title] [--description=<description>] [--clear-text=<true|false>] [--project-scope=<project-names>] [--origin-type=<origin-type>] [--fqdn=<fqdn>] [--apikey=<apikey>] [--dpath=<dpath>]
zcli datastore update MY-DS –-title=MY-NEW-TITLE
Delete a Data Store
After you create a data store, you can delete it if you no longer need it. If you don’t use the -f option, you’ll be prompted to confirm.
zcli datastore create-resource <name> --resource-name=<resource-name> --value=<value> [--title=<title>] [--description=<description>] [--expires-on=<expires-on>]
zcli datastore delete MY-DS -f
Note that if you do not remove connected objects first, such as images, you will get an error message.
Delete datastore dockerhub? [Y/N]: Y
Datastore delete dockerhub failed: Conflict
[Error DependencyConflict: Dependent Entry exists]
[Error DependencyConflict: image is associated with datastore, can't delete]
Next Steps
This is a series of articles. You will likely follow them in this order.
- Storage Overview
- Create a Data Store
- Manage a Data Store
- Use the ZEDEDA CLI to Manage a Data Store - You are here!
After you’ve completed the series, you might be interested in the following articles.
- Create an edge app image that uses the data store interface you just created.
- Manage Secrets and Artifacts in ZEDEDA Store to give your edge assets automated and secure access to your licenses, tokens, certificates, passwords, and other sensitive data.