This Help Center is no longer being updated. It stays available as a reference for the classic ZEDEDA Cloud GUI. For the new console and current releases, see the ZEDEDA documentation at docs.zededa.com for doc updates and info about new releases.

Use the ZEDEDA CLI to Manage a Data Store

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

ZCLI is running. 
 

This is a series of articles. You will likely follow them in this order.

  1. Storage Overview
  2. Create a Data Store 
  3. Manage a Data Store
  4. 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.
AWSS3 Example
zcli datastore create MY-DS --dstype=AWSS3 --region='us-east-1' --apikey=AKIAIOSFODNN7EXAMPLE --apipass=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
CONTAINERREGISTRY Example
zcli datastore create MY-DS2 --dstype=CONTAINERREGISTRY --fqdn=docker://docker.io --apikey=MY-UNAME --apipass=MY-PWD 
AZUREBLOB Example
zcli datastore create MY-DS3 --dstype=AZUREBLOB --fqdn=https://zededacentral.blob.core.windows.net --dpath=qcow2images --apikey=AKIAIOSFODNN7EXAMPLE --apipass=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY  
ARTIFACT-STORE:VAULT or SECRET-STORE:VAULT Example

 

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>]]]]
Example
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>]
Example
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>]
Example
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.

  1. Storage Overview
  2. Create a Data Store 
  3. Manage a Data Store
  4. 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. 

Was this article helpful?
0 out of 0 found this helpful