From 1c4526aa8f5b13693c7476b2bded81b27579b4a4 Mon Sep 17 00:00:00 2001 From: Bryan Wendlandt <74682355+bwendlandt-intel@users.noreply.github.com> Date: Wed, 25 Oct 2023 11:12:31 -0700 Subject: [PATCH] docs(deployment): update db for devicestate (#345) * docs(deployment): update db * fix: mkdocs deprec warnings --- docs/Deployment/Database/schema.md | 1 + docs/Deployment/upgradeVersion.md | 42 +++++++++++++++++++++++++++++- mkdocs.yml | 3 --- 3 files changed, 42 insertions(+), 4 deletions(-) diff --git a/docs/Deployment/Database/schema.md b/docs/Deployment/Database/schema.md index 97d389a31..9cfec1cef 100644 --- a/docs/Deployment/Database/schema.md +++ b/docs/Deployment/Database/schema.md @@ -14,6 +14,7 @@ The diagrams below illustrates the database schema and relationships for MPS and string tenantid string friendlyname string dnssuffix + json deviceInfo } ``` diff --git a/docs/Deployment/upgradeVersion.md b/docs/Deployment/upgradeVersion.md index 8d64a730f..54a6e6f7c 100644 --- a/docs/Deployment/upgradeVersion.md +++ b/docs/Deployment/upgradeVersion.md @@ -1,6 +1,46 @@ ## Specific Changes Required for Version Upgrades +### Upgrade to 2.16 (Oct 23) from 2.15 (Sep 23) + +The 2.16 release of Open AMT requires an upgrade to the `mpsdb` database. More information about why we've made this change can be found in the [October 2023 Release Notes](https://open-amt-cloud-toolkit.github.io/docs/2.16/release-notes/#whats-new). + +1. Run the following SQL script to alter constraints before upgrading the services. + + ``` sql + ALTER TABLE devices + ADD COLUMN IF NOT EXISTS deviceInfo json + ``` + + ???+ example "Example - Adding Columns to PostgresDB using psql" + This example walks through one potential option to update a Postgres Database using psql. + + 1. Open a Command Prompt or Terminal. + + 2. Connect to your Postgres instance and `mpsdb` database. Provide the hostname of the database, the port (Postgres default is 5432), the database `mpsdb`, and your database user. + ``` + psql -h [HOSTNAME] -p 5432 -d mpsdb -U [DATABASE USER] + ``` + + ??? example "Example Commands" + ``` + Azure: + psql -h myazuredb-sql.postgres.database.azure.com -p 5432 -d mpsdb -U postgresadmin@myazuredb-sql + + AWS: + psql -h myawsdb-1.jotd7t2abapq.us-west-2.rds.amazonaws.com -p 5432 -d mpsdb -U postgresadmin + ``` + + 3. Provide your Postgres user password. + + 4. Run the SQL Statements. + + 5. Verify the constraints were modified correctly. + ``` sql + SELECT * FROM devices; + ``` + +2. Continue with [Upgrade a Minor Version](#upgrade-a-minor-version-ie-2x-to-2y) steps below. ### Upgrade to 2.15 (Sep 23) from 2.14 (Aug 23) @@ -18,7 +58,7 @@ The 2.15 release of Open AMT requires an upgrade to the `rpsdb` database. More i ADD PRIMARY KEY (name, domain_suffix, tenant_id); ``` - ???+ example "Example - Adding Columns to PostgresDB using psql" + ??? example "Example - Adding Columns to PostgresDB using psql" This example walks through one potential option to update a Postgres Database using psql. 1. Open a Command Prompt or Terminal. diff --git a/mkdocs.yml b/mkdocs.yml index 32170ed60..e7045899d 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -165,9 +165,6 @@ markdown_extensions: - name: mermaid class: mermaid format: !!python/name:pymdownx.superfences.fence_code_format - - pymdownx.emoji: - emoji_index: !!python/name:materialx.emoji.twemoji - emoji_generator: !!python/name:materialx.emoji.to_svg - toc: permalink: true extra_css: