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).
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 ZEDEDA GUI:
- Step 1 > Click the 'Library' from the left navigation.
- Step 2 > Select 'Data Stores' from the top navigation bar.
- Step 3 > Click the expand icon to view the summary panel.
The summary Panel shows the total number of Data Stores based on the '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.
1.2. Detail View
- Step 1 > Click on one of the Data Stores in the list view to show the detailed view.
2. Operations using ZEDEDA GUI
2.1. Create
The create operation can be performed in the Data Stores list view only. After you log in to ZEDEDA platform, create a Data Store using the following steps:
- Step 1 > Click on the Add symbol.
- 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.
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.' |
Scope: Projects | Select the appropriate project from the dropdown list. |
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 must provide other details 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. Applicably 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 must select 'Container' as the 'Type.'
- Step 6 > Click on the 'Add' button.
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 |
Category(*) | Choose 'Container Registry.' |
Scope: Projects | Select the appropriate project from the dropdown list. |
FQDN(*) |
The complete domain name for a specific computer, or host, on the internet.
|
Type(*) | Select Container. |
Username | The username and password for the Azure container registry differ from 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 the registry created 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.
- Step 8 > You can see that the new Data Store is added in the Data Store list view.
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 the ZEDEDA platform, 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 Data Stores in the list view to show the detailed view.
The read view shows the 'Basic Info' section.
Basic Info
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 the ZEDEDA platform, 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.
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 icon. The 'Basic Info' section lets you update/edit most fields.
- Step 2 > Update the editable fields of the 'Identity' and 'Details' sections.
- Step 3 > Click on the 'Save' button.
- Step 4 > When you click on the 'Save' button, a toast message announcing the successful submission of the Data Store appears.
2.4. Delete
The delete operation can be performed in the Data Stores list and detail views. After you log in to the ZEDEDA platform, if you no longer require the Data Store, you can delete it using the following steps:
- Step 1 > Click on the check boxes of the Data Stores list on which the delete operation needs to be performed.
- Step 2 > Click on the More icon in the top right corner.
- Step 3 > From the dropdown, select 'Delete.'
- Step 4 > Click the 'Delete' button on the modal dialogue, as shown below.
- Step 5 > When you click on the 'Delete' button, a toast message announcing the successful submission of the delete request of the Data Store appears.
3. Azure Blob Datastore
The following steps enumerate the addition of Azure Blob Data Store:
-
-
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 the ZEDEDA platform.
- 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 data store in the ZEDEDA platform by going to the library --> Data Stores and clicking on the sign on the top right.
- Create the data store 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 the ZEDEDA platform is complete.
4. Operations using ZEDEDA CLI
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>]
Replace <apikey> with the API key of datastore.
- If the datastore type (--dstype=) is AWSS3/AZUREBLOB, apikey should be Access Key Id.
- If the datastore type (--dstype=) is SFTP/CONTAINERREGISTRY, apikey should be Username.
Replace <password> with one of the following:
- If the datastore type (--dstype=) is AWSS3/AZUREBLOB, apipass should be Secret Access Key.
- If the datastore type (--dstype=) is SFTP/CONTAINERREGISTRY, apipass should be Password.
4.2. Read (Show)
You can use the following command to see the created Data Sore details:
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-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>
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 ZEDEDA platform without prompting the user.
Data Store operations are successfully executed!