Data Stores

1. Introduction

Data Store captures the location where you want the device to get the binary application images. It can be hosted anywhere (e.g., AWS, Azure, or native servers running HTTPS/SFTP, Containers).
 
A quick overview of How to Add Data Store to ZedControl.
 
 
Let's get familiar with the navigation of the Data Stores screen before getting into the operational details.
 

1.1. List View

After you log in to ZedControl:
  • Step 1 > Click on the 'Library' (Library_icon.png) icon from the left navigation.
  • Step 2 > Select 'Data Stores' from the top navigation bar.
  • Step 3 > Click on the expand (Expand_Panel_icon.png) icon to view the summary panel.
 
Summary Panel shows the total number of Data Stores based on 'Data Store Type Distribution,' 'Data Store Category Distribution' widgets in the donut, and horizontal bar charts. You can hover around these donuts to get the number in each distribution.
 
ST_2_Screen_1.png
 

1.2. Detail View

  • Step 1 > Click on one of the Data Stores in the list view to show the detailed view of the same.
 
ST_2_Screen_2.png
 
  • Step 2 > A temporary tab (Datastores_icon.png) is created, navigating you to the detailed view of the selected Data Store.
 
ST_2_Screen_3.png
 
The detail view has tertiary navigation with the Basic info tab.
 

2. Operations Using ZedUI

2.1. Create

The create operation can be performed in the Data Stores list view only. After you log in to ZedControl, create a Data Store using the following steps:
  • Step 1 > Click on the Add (Add_icon.png) icon
 
ST_2_Screen_4.png
 
  • Step 2 > Populate the input field values for the 'Identity' section, as instructed in the table.
  • Step 3 > Populate the input field values for the 'Details' section, Category as 'File Storage,' as instructed in the table.
 
ST_2_Screen_5.png
 

Identity section

Define the basic identification details of the Data Store.
Input Field Value
Name(*) This is unique across the enterprise and cannot be changed.
Title(*) This is user-defined and can be changed.
Description A detailed explanation of what the Data Store is used for. Not mandatory.
Category(*) You can choose either 'File Storage' or 'Container Registry.'
 

Details section (for File Storage)

Define the details of the Data Store.
Input Field Value
FQDN(*) The complete domain name for a specific computer, or host, on the internet. If you select SFTP as the 'Type' of Datastore, FQDN must be of '<IP>:<Port>' format. For example, 192.168.25.101:22 or 192.168.16.11:23456.
Path(*) Specifies the path of the application image. It is required when 'File Storage' is selected as a category.
Type(*)
You must select one of the types in the dropdown list:
 
HTTP–Unsecured connection. No other details of this table are required if this option is chosen.
HTTPS–Secured connection. You can upload one or more certificates.
Amazon S3–You have to provide other details mentioned in this table.
SFTP–You have to provide other details as mentioned in this table.
Azure Blob Storage–You have to provide other details mentioned in this table.
Username(*) Provide the username. Applicable only when 'SFTP' is selected as 'Type.'
Password(*) Provide the password. Applicable only when 'SFTP' is selected as 'Type.'
Region(*) Provide the region. Applicable only when 'Amazon S3' is selected as 'Type.'
Access Key Id(*) Provide the access key id. Applicable when either 'Amazon S3' or 'Azure Blob Storage' are selected as 'Type.'
Secret Access Key(*) Provide a secret access key. Applicable when 'Amazon S3' or 'Azure Blob Storage' are selected as 'Type.'
 
  • Step 4 > Populate the input field values for the 'Details' section, Category as 'Container Registry,' as instructed in the table.
  • Step 5 > You have to select 'Container' as the 'Type.'
  • Step 6 > Click on the 'Add' button.
 
ST_2_Screen_6.png
 

Details section (for Container Registry)

Define the details of the Data Store. Click here to set up an Azure container registry for your specific IoT edge modules.
 
Input Field Value
FQDN(*)
The complete domain name for a specific computer, or host, on the internet.
  • For the docker registry, FQDN is docker://docker.io
  • For the Azure container registry, FQDN is zedcontrolapiteststore.azurecr.io, where zedcontrolApiTestStore is the registry name.
  • For Google container registry, FQDN is docker://gcr.io
  • For GitHub container registry, FQDN is docker://ghcr.io
Type(*) Select Container.
Username The username and password for the Azure container registry are different than regular docker hub credentials. You need to get them from the access keys. For more details on how to get the credentials, refer here.
Password Provide the password.
 

Create a Personal Token for the GitHub Container Registry

The username to the registry is the same as your GitHub username. For the password, you need to
create a GitHub personal token.
 
While creating the personal token, you must select at least the following scopes:
  • write:packages
  • read:packages
  • delete:packages
  • repo (if your repository is private; do not select if it is public)
 
A user might want to store their containers on their private container registry. The following table shows the procedure for some of the often used registries.
Docker Registry FQDN Username Password Details
Docker docker.io username (Dockerhub username) password (Dockerhub password) URL
GCP docker://gcr.io "_token" (Fixed string without quote) Authentication Token generated from GCP Console. URL
Azure
docker://uniquer.azurecr.io
(unique: is the name of registry create in Azure)
"_token" (Fixed string without quote) AD or SP password from Azure URL
 
  • Step 7 > When you click on the 'Add' button, a toast message appears as shown below:
Data Store: Test-datastore has been added.
  • Step 8 > You can see that the new Data Store is added in the Data Store list view, as shown below.
 
ST_2_Screen_7.png
 
Data Store is created successfully!
 

2.2. Read

The read operation can be performed in the Data Stores detail view only. After you log in to ZedControl, click on the 'Library' menu from the left navigation and select 'Data Stores' to go to the list of already available Data Stores. Click on any of the Data Stores in the list view to show the detailed view of the same.
 
The read view shows the 'Basic Info' section.
 

Basic Info

 
ST_2_Screen_8.png
 

a) Identity

Refer to the tables under the create operation for information on the field values and their descriptions.
 

b) Details

Refer to the tables under the create operation for information on the field values and their descriptions.
 

2.3. Update

The update/edit operation can only be performed in the Data Stores detail view. After you log in to ZedControl, click on the 'Library' menu from the left navigation and select 'Data Stores' to go to the list of already available Data Stores. Click on any of the Data Stores in the list view to show the detailed view of the same.
 
The update/edit view shows only the 'Basic Info' section.
 

Basic Info

Update/edit a Data Store using the following steps:
  • Step 1 > Click on the Edit (Edit_icon.png) icon.
The 'Basic Info' section allows you to update/edit most of the fields. Refer to the tables under the create operation for information on the editable field values and their descriptions.
 
ST_2_Screen_9.png
 
Step 2 > Update the editable fields of 'Identity' section. Refer to the tables under the create operation for information on the editable field values and their descriptions.
Step 3 > Update the editable fields of 'Details' section. Refer to the tables under the create operation for information on the editable field values and their descriptions.
Step 4 > Click on the 'Submit' button.
 
ST_2_Screen_10.png
 
Step 5 > When you click on the 'Submit' button, a toast message announcing the successful submission of the Data Store appears below:
Data Store: test_1 has been updated
 
ST_2_Screen_11.png
 
The Data Store is updated successfully!
 

2.4. Delete

The delete operation can be performed in the Data Stores list view and detail view. After you log in to ZedControl, if you no longer require the Data Store, you could delete it using the following steps:
Step 1 > Click on the checkboxes of the Data Stores list on which the required operation needs to be performed.
Step 2 > Click on the More (More_icon.png) icon on the top right corner.
Step 3 > From the dropdown, select 'Delete'.
 
ST_2_Screen_12.png
 
Step 4 > Click the 'Confirm' button on the modal dialogue, which appears as below:
Deleting these two Data Store(s) will permanently remove the data bout these data store(s) from management platform.
Note: There is a way to reclaim the data, after the delete operation is performed.
 
ST_2_Screen_13.png
 
Step 5 > When you click on the 'Confirm' button, a toast message announcing the successful submission of the delete request of the Data Store appears.
2 Data Stores were successfully deleted.
 
ST_2_Screen_14.png
 
The selected Data Stores are deleted successfully!
 

3. Azure Blob Datastore

The following steps enumerate the addition of Azure Blob Data Store:
  • Log in to the Azure portal, go to storage accounts and click on your storage account.
  • Click on 'Access Keys' under 'Storage + networking' on the left and copy the 'storage account name' and one of the security 'Keys' (you can copy the key by clicking on 'show keys' at the top). We will need this info for creating the datastore in ZedControl.
  • Click on containers under Data Storage on the panel on the left.
  • Create a container if one doesn't exist with the appropriate permissions or click on the existing container.
  • Click on properties under settings (on the left) and copy the URL.
  • Create a new datastore in ZedControl by going to the library --> Data Stores and clicking on the sign on the top right.
  • Create the datastore with the following fields:
    • Name and title of your choice.
    • Select Category as 'File Storage'.
    • The FQDN is the URL collected from step 5 minus the container name, and the path is the container name. For example, in this case, the URL is: 'https://zededacentral.blob.core.windows.net/qcow2images'. So the FQDN is 'https://zededacentral.blob.core.windows.net,' and the path is 'qcow2images'.
    • The datastore Type will be Azure Blob Storage.
    • The Access Key Id is the Storage account name, and the Secret Access Key is the Key portion of key1 or key2 (collected from Step2).
  • Click Add, and your Data Store setup on ZedControl is complete.
 

4. Operations Using zCLI

To login to ZedControl through zCLI, see here.
 

4.1. Create

You can create Data Store using the following command:
zcli> zcli datastore create <name> [--title=<title>] --dstype=<dstype> [--fqdn=<fqdn>] [--region=<region>] [--apikey=<apikey>] [--apipass=<password>] [--dpath=<dpath>]
 

4.2. Read (Show)

You can use the following command to see the created Data Sore details:
zcli> zcli zcli datastore show [[[<name> | --uuid=<uuid>] [--detail]] | [--name-pattern=<name-pattern>]]
 
For example, the show command for a Data Store displays the following output:
zcli> zcli datastore show
Datastore Datastore URL Datastore region Path / Bucket
------------------- ------------------------------ -------------------- --------------------
http_dataStore http://172.25.17.201 repo
AzureDataStore zedtest123
container docker://docker.io
testDataStore https://s3-us-west-2.amazonaws.com us-west-2 zededa-zedcloud-alpha-images
http_datastore_vm http://192.168.1.8 repo
DockerHubRegistry docker://docker.io
containerCredCheck docker://docker.io
Zededa-AWS-Image https://s3-us-west-2.amazonaws.com us-west-2 zededa-zedcloud-alpha-images
ContainerDataStore docker://docker.io
cloud-ubuntu-store http://cloud-images.ubuntu.com releases
testAzureDs azure zedtest123
DockerHubRegistryPublic docker://docker.io
docker-hub docker://docker.io
BadDataStore https://s3-us-west-2.amazonaws.com us-west-2 z. ededa-zedcloud-alpha-images
vign_aws_datastore https://s3-ap-south-1.amazonaws.com ap-south-1 vsm-test-bucket
zcli>
 

4.3. Update (Edit)

You can update a Data Store using the following command:
zcli> zcli datastore update <name> [--title=title]
 

4.4. Delete

You can delete a Data Store using the following command:
zcli> zcli datastore delete <name> [-f]
 
Note: -f is to forcefully make the delete request to the ZedControl, without prompting the user.
 
Data Store operations are successfully executed!
Was this article helpful?
0 out of 0 found this helpful

Articles in this section