Raptor Package Manager - Device Store Commands
Jan 1 2022 at 12:00 AM
Overview
The following section describes how to configure the raptor package manager cli tool device store profiles. There can be more than one device store configured per publish profile.
Please see below overview on available commands and subcommands associated to the device store.
Execute
raptorpm devicestore -h
Output
devicestore:
Commands related to configuration on the device store management
Usage:
raptorpm devicestore [options] [command]
Options:
Verbose, -v Option to specify if command should be logged in detail
-?, -h, --help Show help and usage information
Commands:
add <ProfileName> <DeviceStoreName> <DeviceStoreDescription> Command to add device store to an existing publish profile configured
<DeviceStoreType> <DeviceStoreCertificateSubjectName> <DeviceStoreUrl>
edit <ProfileName> <DeviceStoreName> Command related to editing configured device store options
list Command to list the available device store configurations
delete <ProfileName> <DeviceStoreName> Command related to deleting preconfigured device store options profile
security
The following commands will be discussed:
list
- Returns a list of the configured device store profiles available.add
- Adds a device store profile.edit
- Alter a predefined or preconfigured device store profile.delete
- Delete a preconfigured device store profile.security
- Device store security configuration.
The security
subcommand will be explained in detail with the Security Configuration Command
section.
List Device Store Profiles
After the initial installation of the raptor package manager. A sample publish profile will be configured to assist in visually explaning the publish profile tree. I.e. Each publish profile will have one or more device stores, and each device store will have none or more security configurations.
Some device stores allows for non authenticated communication.
Execute
raptorpm devicestore list -h
Output
list:
Command to list the available device store configurations
Usage:
raptorpm devicestore list [options]
Options:
IncludeDeviceStoreSecurity, -s Option to include device stores security in output
Verbose, -v Option to specify if command should be logged in detail
-?, -h, --help Show help and usage information
Execute Sample
raptorpm devicestore list -s
Output Sample
┌─────────────────────┬─────────────────────────────────┬─────────────────────────────────┬─────────────────────────────────┬───────────────────┐
│ Profile Name │ Device Store Name │ Description │ X509 Certificate Subject Name │ Device Store Url │
├─────────────────────┼─────────────────────────────────┼─────────────────────────────────┼─────────────────────────────────┼───────────────────┤
│ Sample.Profile.Name │ Sample.Device.Store.Device.Name │ Sample Device Store Description │ Sample.Certificate.Subject.Name │ https://sampleurl │
└─────────────────────┴─────────────────────────────────┴─────────────────────────────────┴─────────────────────────────────┴───────────────────┘
┌─────────────────────┬─────────────────────────────────┬────────────────────────────────────┬────────────────────────────────────────────┬──────────┬─────────────────┬─────────────┬───────────┬────────────────┬─────────────────────┐
│ Profile Name │ Device Store Name │ Device Store Security Profile │ Description │ IsActive │ Username │ HasPassword │ HasApiKey │ Api Key legend │ Authentication Type │
├─────────────────────┼─────────────────────────────────┼────────────────────────────────────┼────────────────────────────────────────────┼──────────┼─────────────────┼─────────────┼───────────┼────────────────┼─────────────────────┤
│ Sample.Profile.Name │ Sample.Device.Store.Device.Name │ Sample.Security.Configuration.Name │ Sample Security Configuration Description. │ True │ Sample.Username │ True │ True │ Sample-Api-Key │ Basic │
└─────────────────────┴─────────────────────────────────┴────────────────────────────────────┴────────────────────────────────────────────┴──────────┴─────────────────┴─────────────┴───────────┴────────────────┴─────────────────────┘
Add Device Store Profile
To add or create a device store profile, we have the following command available.
Execute
raptorpm devicestore add -h
Output
add:
Command to add device store to an existing publish profile configured
Usage:
raptorpm devicestore add [options] <ProfileName> <DeviceStoreName> <DeviceStoreDescription> <DeviceStoreType> <DeviceStoreCertificateSubjectName> <DeviceStoreUrl>
Arguments:
<ProfileName> Specify Profile Name
<DeviceStoreName> Specify the device store name Also known as the device store identifier.
<DeviceStoreDescription> Specify the device store description or purpose related to the device store
<DeviceStoreType> Specify the device store type.
<DeviceStoreCertificateSubjectName> Specify the device store X509 certificate subject name used tot secure and verify packages from this profile or author
<DeviceStoreUrl> Specify the device store url.
Options:
DeviceStoreSecurityName, -secName <DeviceStoreSecurityName> Specify device store security profile name. [default: ]
DeviceStoreSecurityDescription, -secDescription <DeviceStoreSecurityDescription> Specify device store security description [default: ]
DeviceStoreSecurityIsActive, -secIsActive Option to specify a name to greet. true or false [default: True]
UserName, -secUser <secUser> Option to specify a username.
Password, -secPassword <secPassword> Option to specify a password.
PasswordInClearText, -secClear Option to specify if we save the password in clear text.
AuthenticationType, -secAuthentication <Basic|Digest|None|Password> Option to specify a authentication type.
ApiKeyLegend, -secApiKeyLegend <secApiKeyLegend> Option to specify the api key legend or header key value.
ApiKeyValue, -secApiKey <ApiKeyValue> Option to specify the api key value in clear text.
Verbose, -v Option to specify if command should be logged in detail
-?, -h, --help
Note that we can only add a device store profile to an existing publish profile instance. We will need the publish profile name as a reference as the above usages indicates.
Also, same as the publish profile commands, we have the ability to add only a device store profile, or add a device store with an underlying security configuration.
Please see below details in regards to the two available methods:
1. Add only the device store
To add a device store profile or configuration see the below command structure should be followed. Please see example.
Usage
raptorpm devicestore add [options] <ProfileName> <DeviceStoreName> <DeviceStoreDescription> <DeviceStoreType> <DeviceStoreCertificateSubjectName> <DeviceStoreUrl>
Sample Execute
Sample execution based on the assumption that profileA exists as a preconfigured publish profile.
raptorpm devicestore add "ProfileA" "Development.Store" "Profile A Developement Store" "NuGet" "development.profilea" "http://companyx.devicestore"
Sample Output
Successfully added device store configuration Development.Store to publish profile ProfileA
2. Add a device store and underlying security profile
To add a device store and include underlying security profile or configuration see the below command structure should be followed. Please see example.
Usage
raptorpm devicestore add [options] <ProfileName> <DeviceStoreName> <DeviceStoreDescription> <DeviceStoreType> <DeviceStoreCertificateSubjectName> <DeviceStoreUrl> -secName <DeviceStoreSecurityName>
-secUser <secUser> -secPassword <secPassword> -secAuthentication <Basic|Digest|None|Password> -secApiKeyLegend <secApiKeyLegend> -secApiKey <ApiKeyValue>
Sample Execute Sample execution based on the assumption that profileA exists as a preconfigured publish profile.
raptorpm devicestore add "ProfileA" "Development.Store" "Profile A Developement Store" "NuGet" "development.profilea" "http://companyx.devicestore" -secName "Dev.Security" -secUser "Administrator" -secPassword "rjgW2epjJe6LeXbC" -secAuthentication "Digest" -secApiKeyLegend "X-NuGet-ApiKey" -secApiKey "NuGet-Api-Key-Value"
Sample Output
Successfuly added device store configuration Development.Store to publish profile ProfileA
Edit device store
To edit or update a existing device store , we can run execute the following command to list the available edit options. Note that the profile name value cannot be altered.
Execute
raptorpm devicestore edit -h
Output
edit:
Command related to editing configured device store options
Usage:
raptorpm devicestore edit [options] <ProfileName> <DeviceStoreName>
Arguments:
<ProfileName> Specify Profile Name
<DeviceStoreName> Specify the device store name Also known as the device store identifier.
Options:
DeviceStoreDescription, -dsDescription <DeviceStoreDescription> Specify the device store description or purpose related to the device store [default: ]
DeviceStoreType, -dsType <DeviceStoreType> Specify the device store type. [default: Nuget]
DeviceStoreCertificateSubjectName, -dsSubjectName <DeviceStoreCertificateSubjectName> Specify the device store X509 certificate subject name used tot secure and verify packages from this profile or author [default: ]
DeviceStoreUrl, -dsUrl <DeviceStoreUrl> Specify the device store url. [default: ]
Force, -f Option to force add the configuration ignoring existing profiles and overwriting them. [default: False]
Verbose, -v Option to specify if command should be logged in detail
-?, -h, --help Show help and usage information
Sample Execute
raptorpm devicestore edit "ProfileA" "Development.Store" -dsDescription "Updated device store description"
Note that we always have to specify the profile name and the device store name when trying to update a device store configuration profile. Additionally, we are not able to update the device store name.
Sample Output
Successfully updated device store configuration : Development.Store for publish profile :ProfileA
Delete device store
Usage
raptorpm devicestore delete -h
Output
delete:
Command related to deleting preconfigured device store options profile
Usage:
raptorpm devicestore delete [options] <ProfileName> <DeviceStoreName>
Arguments:
<ProfileName> Specify Profile Name
<DeviceStoreName> Specify the device store name Also known as the device store identifier.
Options:
Verbose, -v Option to specify if command should be logged in detail
-?, -h, --help Show help and usage information
Sample Execute
raptorpm devicestore delete profileA development.store
Sample Output
Successfully remove device store configuration with name profileA from publish profile profileA