Link Search Menu Expand Document

Raptor Package Manager - Publish Profile Commands

Jan 1 2022 at 12:00 AM

  1. Overview
  2. List Publish Profiles
  3. Add Publish Profile
    1. 1. Add only the publish profile.
    2. 2. Add publish profile and an underlying device store.
    3. 3. Add publish profile and an underlying device store, including security configuration.
    4. Publish profile icons.
  4. Edit Publish Profile
  5. Delete Publish Profile
  6. Export Publish Profile

Overview

The following section describes how to configure the raptor package manager cli tool publish profiles. The cli tool requires these publish profiles to assist the developer work with more than one publisher/author of driver packages. This will also assist in configuring more than one device store per publish profile.

Included in each device store profile will be one or more security configurations in regards to accessing the device store as per profile configuration.

Please see below overview on available commands and subcommands associated to the publish profiles.

Execute

raptorpm profile -h

Output

profile:
  Command related to publish profiles, containing author and device store configuration

Usage:
  raptorpm profile [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> <ProfileDescription> <Authors> <Company> <Product> <Copyright>    Add publish profile
  edit <ProfileName>                                                                  Edit a predefined publish profile
  list                                                                                Returns a list of the configured publish profiles available
  delete <ProfileName>                                                                Delete a preconfigured publish profile command
  export <ExportFilePath>                                                             Exports the configured publish profiles to an output directory

The following commands will be discussed:

  • list - Returns a list of the configured publish profiles available.
  • add - Adds a publish profile.
  • edit - Alter a predefined or preconfigured publish profile.
  • delete - Delete a preconfigured publish profile command.
  • export - Exports the configured publish profiles to an output directory.

List Publish 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 profile list -h

Output

list:
  Returns a list of the configured publish profiles available

Usage:
  raptorpm profile list [options]

Options:
  IncludeAuthors, -a                Option to include author details when listing profiles. [default: False]
  IncludeDeviceStores, -d           Option to include device stores in output
  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

Notice that we have the ability to specify the options to expand the level of details on how to list the configured publish profiles. I.e. -a will insure that we list the configured publish profiles, and then include the author information related to the publish profile. The same is applied for -d, device store, and -s, security configuration.

As the above command is only the overview of the command help section which list the arguments and options. Lets run the actual command to list the configured profiles.

Note that the below includes the options arguments to display all the configured details for the publish profiles.

Execute

raptorpm profile list -a -d -s

Output

Publish Profiles:
┌─────────────────────┬────────────────────────────┬──────────┬───────────────┬────────────────┬────────────────┬──────────────────┐
│ Profile Name        │ Description                │ IsActive │ Author(s)     │ Company        │ Product        │ Copyright        │
├─────────────────────┼────────────────────────────┼──────────┼───────────────┼────────────────┼────────────────┼──────────────────┤
│ Sample.Profile.Name │ Sample Profile Description │ True     │ Sample Author │ Sample Company │ Sample Product │ Sample Copyright │
└─────────────────────┴────────────────────────────┴──────────┴───────────────┴────────────────┴────────────────┴──────────────────┘

Device Stores:
┌─────────────────────┬─────────────────────────────────┬─────────────────────────────────┬─────────────────────────────────┬───────────────────┐
│ 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 │
└─────────────────────┴─────────────────────────────────┴─────────────────────────────────┴─────────────────────────────────┴───────────────────┘

Device Store Security Configuration:
┌─────────────────────┬─────────────────────────────────┬────────────────────────────────────┬────────────────────────────────────────────┬──────────┬─────────────────┬─────────────┬───────────┬────────────────┬─────────────────────┐
│ 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 Publish Profile

To add or create a new publish profile, we can run execute the following command to list the minimum requirements.

Execute

raptorpm profile add -h

Output

add:
  Add publish profile

Usage:
  raptorpm profile add [options] <ProfileName> <ProfileDescription> <Authors> <Company> <Product> <Copyright>

Arguments:
  <ProfileName>           Specify Profile Name
  <ProfileDescription>    Specify Profile Description
  <Authors>               Specify author information which will be included in the package information,
  <Company>               Specify company information which will be included in the package information
  <Product>               Specify product name which will be included in the package information
  <Copyright>             Specify copyright information which will be included in the package information

Options:
  PackageIconFileName, -i <PackageIconFileName>                                            Specify the package icon file name which will be used when compiling a package
  DeviceStoreName, -dsName <DeviceStoreName>                                               *Specify the device store name Also known as the device store identifier. [default: ]
  DeviceStoreDescription, -dsDescription <DeviceStoreDescription>                          Specify the device store description or purpose related to the device store [default: ]
  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: ]
  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.
  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.
  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

Notice that the add command has many arguments and options to specify if desired. The add command has be implemented in such a way that we can add a publish profile by just specifying the publish profile details, author information, and/or to include the device store details and/or the security configuration thereof.

Please see below:

1. Add only the publish profile.

The below command will add a publish profile using the following structure as defined by die help section.

Usage

raptorpm profile add [options] <ProfileName> <ProfileDescription> <Authors> <Company> <Product> <Copyright>

Sample Execute

raptorpm profile add "ProfileA" "Publish Profile A for Company X" "John Doe" "Company X" "Driver Y" "Copyright information related to the driver comes here" -i "Icon.ico"

Output

Successfully added profile ProfileA

By running the raptorpm profile list -a -s -d command, you’ll notice that the profile has been added.

2. Add publish profile and an underlying device store.

To add a publish profile and include the device store details. The below command structure should be followed. Please see example.

Usage

raptorpm profile add [options] <ProfileName> <ProfileDescription> <Authors> <Company> <Product> <Copyright>
-dsName <DeviceStoreName> -dsDescription <DeviceStoreDescription> -dsSubjectName <DeviceStoreSubjectName> -dsUrl <DeviceStoreUrl>

Sample Execute

raptorpm profile add "ProfileA" "Publish Profile A for Company X" "John Doe" "Company X" "Driver Y" "Copyright information related to the driver comes here" -dsName "Dev.Store" -dsDescription "Development Store" -dsSubjectName "development.store.companyx" -dsUrl "http//companyx.devicestore"

Output

Successfully added profile ProfileA

3. Add publish profile and an underlying device store, including security configuration.

To add a publish profile and include the device store details with security configuration. The below command structure should be followed. Please see example.

Usage

raptorpm profile add [options] <ProfileName> <ProfileDescription> <Authors> <Company> <Product> <Copyright>
-dsName <DeviceStoreName> -dsDescription <DeviceStoreDescription> -dsSubjectName <DeviceStoreSubjectName> -dsUrl <DeviceStoreUrl> -secName <DeviceStoreSecurityName> 
 -secUser <secUser> -secPassword <secPassword> -secAuthentication <Basic|Digest|None|Password> -secApiKeyLegend  <secApiKeyLegend> -secApiKey <ApiKeyValue>

Sample Execute

raptorpm profile add "ProfileA" "Publish Profile A for Company X" "John Doe" "Company X" "Driver Y" "Copyright information related to the driver comes here" -dsName "Dev.Store" -dsDescription "Development Store" -dsSubjectName "development.store.companyx" -dsUrl "http//companyx.devicestore" -secName "Dev.Security" -secUser "Administrator" -secPassword "rjgW2epjJe6LeXbC" -secAuthentication "Digest" -secApiKeyLegend "X-NuGet-ApiKey" -secApiKey "NuGet-Api-Key-Value"

Output

Successfully added profile ProfileA

Notice that the above security configurations is sample configuration of a device store using Digest as the authentication layer, and an Api-Key.

Publish profile icons.

Please add the following param to include an icon during package compile.

-i “Icon_File_Name.Ico”


Edit Publish Profile

To edit or update a existing publish profile, we can run execute the following command to list the available edit options. Note that the profile name value cannot be altered.

Execute

raptorpm profile edit -h

Output

edit:
  Edit a predefined publish profile

Usage:
  raptorpm profile edit [options] <ProfileName>

Arguments:
  <ProfileName>    Specify Profile Name

Options:
  ProfileDescription, -d <d>                       Specify the profile description
  Authors, -a <a>                                  Specify author information which will be included in the package information,
  Company, -c <c>                                  Specify company information which will be included in the package information
  Product, -p <p>                                  Specify product name which will be included in the package information
  Copyright, -r <r>                                Specify copyright information which will be included in the package information
  PackageIconFileName, -i <PackageIconFileName>    Specify the package icon file name which will be used when compiling a package
  Verbose, -v                                      Option to specify if command should be logged in detail
  -?, -h, --help                                   Show help and usage information

Sample Usage

raptorpm profile edit "profileA" -d "This is an updated description for this publish profile"

Any or all of the available optional arguments can be used to update the publish profile details. Note that the profile name cannot be altered.


Delete Publish Profile

To delete an existing publish profile, we can run execute the following command to list the available delete options.

Execute

raptorpm profile delete -h

Output

delete:
  Delete a preconfigured publish profile command

Usage:
  raptorpm profile delete [options] <ProfileName>

Arguments:
  <ProfileName>    Specify Profile Name to delete

Options:
  Verbose, -v       Option to specify if command should be logged in detail
  -?, -h, --help    Show help and usage information

Sample Usage

raptorpm profile delete "profileA"

Export Publish Profile

The export publish profiles command helps to exports all the configured profile from one developer to the next, or to create a backup.

Execute

raptorpm profile export -h

Output

export:
  Exports the configured publish profiles to an output directory

Usage:
  raptorpm profile export [options] <ExportFilePath>

Arguments:
  <ExportFilePath>    Export file path on the destination of the publish profile configuration

Options:
  Verbose, -v       Option to specify if command should be logged in detail
  -?, -h, --help    Show help and usage information

See the below sample usage and result.

Sample Usage

raptorpm profile export "C:\temp\publishprofile.json"

Sample Output

Successfully exported publish profile configuration to: C:\temp\publishprofile.json

Sample file output

{
  "Profiles": {
    "Sample.Profile.Name": {
      "ProfileName": "Sample.Profile.Name",
      "ProfileDescription": "Sample Profile Description",
      "IsActive": true,
      "AuthorProfile": {
        "Authors": "Sample Author",
        "Company": "Sample Company",
        "Product": "Sample Product",
        "Copyright": "Sample Copyright",
        "PackageIconFileName": null,
        "DeviceStoreConfigurations": {
          "Sample.Device.Store.Device.Name": {
            "Name": "Sample.Device.Store.Device.Name",
            "Description": "Sample Device Store Description",
            "Url": "https://sampleurl",
            "CertificateSubjectName": "Sample.Certificate.Subject.Name",
            "DeviceStoreSecurityConfiguration": {
              "Sample.Security.Configuration.Name": {
                "Name": "Sample.Security.Configuration.Name",
                "Description": "Sample Security Configuration Description.",
                "Active": true,
                "UserName": "Sample.Username",
                "Password": "Sample.Password",
                "AuthenticationType": 1,
                "ApiKeyLegend": "Sample-Api-Key",
                "ApiKeyValue": "SampleApiKeyValue"
              }
            }
          }
        }
      }
    }
  }
}

Note

The exported information for the device store security section contains the password and api-key values in an encrypted format. It is recommended that if this file is used as a backup and restore method, then the passwords/api-key values should be reconfigured using the cli tool. I.e. edit publish configuration and update with the new password/api-key value.