Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

Commit

Permalink
Rename config files.
Browse files Browse the repository at this point in the history
Update provisioning naming, use dashes instead of underscores, and
remove a redundant config file.

Signed-off-by: Patrick Vacek <patrickvacek@gmail.com>
  • Loading branch information
pattivacek committed May 27, 2019
1 parent 4f76dd1 commit 083c325
Show file tree
Hide file tree
Showing 14 changed files with 8 additions and 13 deletions.
2 changes: 1 addition & 1 deletion config/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if(BUILD_DEB)
PERMISSIONS OWNER_READ OWNER_WRITE
COMPONENT aktualizr)

install(FILES sota_ubuntu.toml
install(FILES sota-ubuntu.toml
DESTINATION lib/sota/conf.d
PERMISSIONS OWNER_READ OWNER_WRITE
COMPONENT aktualizr)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 0 additions & 5 deletions config/sota_autoprov_primary.toml

This file was deleted.

4 changes: 2 additions & 2 deletions docs/client-provisioning-methods.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ To configure a device to provision with shared credentials, follow these steps:
. Download a https://docs.ota.here.com/quickstarts/generating-provisioning-credentials.html[provisioning key].
. Edit the following `.toml` configuration file:
+
link:../config/sota_autoprov.toml[config/sota_autoprov.toml]
link:../config/sota-shared-cred.toml[config/sota-shared-cred.toml]
. Update the configuration file with the path to the zip file that you saved in the first step and start Aktualizr on the device.
+
** When aktualizr starts, it uses the provisioning key to register with the device gateway HTTPS API.
** When aktualizr starts, it uses the provisioning key to register with the device gateway HTTPS API.
** The server registers the new device and returns a PKCS#12 archive containing the real credentials for the device. This archive contains the root CA certificate and client certificate.
** The device unpacks the archive into the paths that are specified in the `[storage]` section of the config.
** The device uses this private key and certificate for all further communication with the server.
Expand Down
4 changes: 2 additions & 2 deletions docs/debugging-tips.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

== Running Aktualizr in development

The `sota_local.toml` configuration file sets the package manager to `PackageManagerFake`, which allows the installation process to be tested locally:
The `sota-local.toml` configuration file sets the package manager to `PackageManagerFake`, which allows the installation process to be tested locally:

# From the build directory
mkdir sota-prov
src/aktualizr_primary/aktualizr --config ../config/sota_local.toml
src/aktualizr_primary/aktualizr --config ../config/sota-local.toml

For VS code, there is a `launch.json` provided in the `.vscode` directory. This assumes that the cmake build directory is `build`.

Expand Down
2 changes: 1 addition & 1 deletion docs/provisioning-methods-and-credentialszip.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ The following items are relevant for this process:
| Primary ECU Hardware ID | Automatically generated by Aktualizr
|===================

An example `.toml` configuration file can be found at link:../config/sota_autoprov.toml[]. This is what is used by the `aktualizr-auto-prov` recipe in meta-updater.
An example `.toml` configuration file can be found at link:../config/sota-shared-cred.toml[]. This is what is used by the `aktualizr-shared-cred-prov` recipe in meta-updater.

== Configuration options for provisioning with device credentials

Expand Down
2 changes: 1 addition & 1 deletion src/aktualizr_info/aktualizr_info_config_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ TEST(aktualizr_info_config, config_initialized_values) {
}

TEST(aktualizr_info_config, config_toml_parsing) {
AktualizrInfoConfig conf("config/sota_autoprov.toml");
AktualizrInfoConfig conf("config/sota-shared-cred.toml");

EXPECT_EQ(conf.storage.type, StorageType::kSqlite);
EXPECT_EQ(conf.storage.sqldb_path.get(conf.storage.path), "/var/sota/sql.db");
Expand Down
2 changes: 1 addition & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ set_tests_properties(test-help-with-nonexistent-options
PROPERTIES PASS_REGULAR_EXPRESSION "aktualizr command line options")

add_test(NAME test-secondary-config-with-nonexisting-dir
COMMAND aktualizr -c ${PROJECT_SOURCE_DIR}/config/sota_autoprov.toml
COMMAND aktualizr -c ${PROJECT_SOURCE_DIR}/config/sota-shared-cred.toml
--tls-server fake --secondary-configs-dir nonexistingdir check)
set_tests_properties(test-secondary-config-with-nonexisting-dir
PROPERTIES PASS_REGULAR_EXPRESSION "\"nonexistingdir\": not a directory")
Expand Down

0 comments on commit 083c325

Please sign in to comment.