diff --git a/_includes/docker-compose-upgrade-instructions.md b/_includes/docker-compose-upgrade-instructions.md new file mode 100644 index 0000000000..bc1886fb2b --- /dev/null +++ b/_includes/docker-compose-upgrade-instructions.md @@ -0,0 +1,95 @@ +{%- assign platform = "ThingsBoard CE" -%} +{%- assign current_version = include.version -%} +{%- assign current_version_with_platform = current_version -%} +{%- assign previous_version = include.prev_version -%} +{%- assign update_status = include.update_status | default: "true" -%} +{%- assign applicable_versions = include.applicable_versions -%} +{%- assign x_status = include.x -%} + +{% if docsPrefix == "pe/" %} +{%- assign platform = "ThingsBoard PE" -%} +{%- assign current_version_with_platform = current_version | append: "pe" -%} +{% endif %} + +{%- assign curr_parts = current_version | split: "." -%} +{%- assign prev_parts = previous_version | split: "." -%} + +{%- assign curr_major = curr_parts[0] -%} +{%- assign curr_minor = curr_parts[1] -%} + +{%- assign prev_major = prev_parts[0] -%} +{%- assign prev_minor = prev_parts[1] -%} + +{%- assign previous_version_anchor = previous_version | replace: ".", "" -%} + +{%- assign previous_version_path = prev_major | append: "-" | append: prev_minor | append: "-x" -%} + +{%- assign use_external_link = false -%} +{%- if curr_major != prev_major or curr_minor != prev_minor -%} +{%- assign use_external_link = true -%} +{%- endif -%} + +{%- assign prev_parts = previous_version | split: "." -%} +{%- assign prev_major = prev_parts[0] -%} +{%- assign prev_minor = prev_parts[1] -%} + +### Upgrading {{ platform }} to {{ current_version }} + +{%- if x_status == "true" -%} +{%- assign prev_version_label = prev_major | append: "." | append: prev_minor | append: ".x" -%} +{%- else -%} +{%- assign prev_version_label = previous_version -%} +{%- endif -%} + +{% if docsPrefix == "pe/" %} +{%- assign prev_version_label = prev_version_label | append: "PE" -%} +{% endif %} + +{% assign platform_hash = "#upgrading-thingsboard-ce-to-" %} +{% if docsPrefix == "pe/" %} +{%- assign platform_hash = "#upgrading-thingsboard-pe-to-" -%} +{% endif %} + +{%- if use_external_link -%} +{%- assign prev_version_href = "/docs/" | append: docsPrefix | append: "user-guide/install/upgrade-instructions/docker-compose/v" | append: previous_version_path | append: "/" | append: platform_hash | append: previous_version_anchor -%} +{%- else -%} +{%- assign prev_version_href = platform_hash | append: previous_version_anchor -%} +{%- endif -%} + +{% capture difference %} +**NOTE:** +
+These upgrade steps are applicable for ThingsBoard version {{ prev_version_label }}{% if applicable_versions %}{% assign versions = applicable_versions | split: "," %}{% for v in versions %} and ThingsBoard version {{ v | strip }}{% endfor %}{% endif %}. +In order to upgrade to {{ current_version_with_platform | upcase }} you need to [**upgrade to {{ prev_version_label }} first**]({{ prev_version_href }}). +{% endcapture %} +{% include templates/info-banner.md content=difference %} + +{% assign docker-compose-repo-link = "https://github.com/thingsboard/" %} + +{% if docsPrefix == "pe/" %} +{% assign docker-compose-repo-link = docker-compose-repo-link | append: "thingsboard-pe-docker-compose/tree/release-" | append: current_version %} +{% else %} +{% assign docker-compose-repo-link = docker-compose-repo-link | append: "thingsboard/tree/v" | append: current_version | append: "/docker" %} +{% endif %} + +{% capture update_manifests_note %} +We strongly recommend that you also update your Docker Compose deployment manifests to [**the corresponding version from GitHub repository**]({{ docker-compose-repo-link }}) with every ThingsBoard upgrade. This ensures your ThingsBoard service runs with the latest best-practice parameters and configurations, while also guarantees that all required services are correctly deployed to support the newest features introduced in the release. +
+
+If you are running older releases of ThingsBoard - be aware that the manifests in `master` branch of the repository may contain configurations for features that are not available in your specific version. Always ensure that manifests are compatible with your target ThingsBoard version while merging deployment files. +{% endcapture %} +{% include templates/warn-banner.md content=update_manifests_note %} + +#### {{ platform }} service upgrade + +{% assign skipUpgrade = false %} +{% if update_status == "false" %} +{% assign skipUpgrade = true %} +{% endif %} + +{% assign version = version %} +{% if docsPrefix == "pe/" %} +{% assign version = version | append: "PE" %} +{% endif %} + +{% include docs/user-guide/install/docker-compose-upgrade-steps.md version=version skipUpgrade=skipUpgrade %} \ No newline at end of file diff --git a/_includes/docker-upgrade-instructions.md b/_includes/docker-upgrade-instructions.md new file mode 100644 index 0000000000..20919f7c2f --- /dev/null +++ b/_includes/docker-upgrade-instructions.md @@ -0,0 +1,79 @@ +{%- assign platform = "ThingsBoard CE" -%} +{%- assign current_version = include.version -%} +{%- assign current_version_with_platform = current_version -%} +{%- assign previous_version = include.prev_version -%} +{%- assign update_status = include.update_status | default: "true" -%} +{%- assign applicable_versions = include.applicable_versions -%} +{%- assign x_status = include.x -%} + +{% if docsPrefix == "pe/" %} +{%- assign platform = "ThingsBoard PE" -%} +{%- assign current_version_with_platform = current_version | append: "pe" -%} +{% endif %} + +{%- assign curr_parts = current_version | split: "." -%} +{%- assign prev_parts = previous_version | split: "." -%} + +{%- assign curr_major = curr_parts[0] -%} +{%- assign curr_minor = curr_parts[1] -%} + +{%- assign prev_major = prev_parts[0] -%} +{%- assign prev_minor = prev_parts[1] -%} + +{%- assign previous_version_anchor = previous_version | replace: ".", "" -%} + +{%- assign previous_version_path = prev_major | append: "-" | append: prev_minor | append: "-x" -%} + +{%- assign use_external_link = false -%} +{%- if curr_major != prev_major or curr_minor != prev_minor -%} +{%- assign use_external_link = true -%} +{%- endif -%} + +{%- assign prev_parts = previous_version | split: "." -%} +{%- assign prev_major = prev_parts[0] -%} +{%- assign prev_minor = prev_parts[1] -%} + +### Upgrading {{ platform }} to {{ current_version }} + +{%- if x_status == "true" -%} +{%- assign prev_version_label = prev_major | append: "." | append: prev_minor | append: ".x" -%} +{%- else -%} +{%- assign prev_version_label = previous_version -%} +{%- endif -%} + +{% if docsPrefix == "pe/" %} +{%- assign prev_version_label = prev_version_label | append: "PE" -%} +{% endif %} + +{% assign platform_hash = "#upgrading-thingsboard-ce-to-" %} +{% if docsPrefix == "pe/" %} +{%- assign platform_hash = "#upgrading-thingsboard-pe-to-" -%} +{% endif %} + +{%- if use_external_link -%} +{%- assign prev_version_href = "/docs/" | append: docsPrefix | append: "user-guide/install/upgrade-instructions/docker/v" | append: previous_version_path | append: "/" | append: platform_hash | append: previous_version_anchor -%} +{%- else -%} +{%- assign prev_version_href = platform_hash | append: previous_version_anchor -%} +{%- endif -%} + +{% capture difference %} +**NOTE:** +
+These upgrade steps are applicable for ThingsBoard version {{ prev_version_label }}{% if applicable_versions %}{% assign versions = applicable_versions | split: "," %}{% for v in versions %} and ThingsBoard version {{ v | strip }}{% endfor %}{% endif %}. +In order to upgrade to {{ current_version_with_platform | upcase }} you need to [**upgrade to {{ prev_version_label }} first**]({{ prev_version_href }}). +{% endcapture %} +{% include templates/info-banner.md content=difference %} + +#### {{ platform }} service upgrade + +{% assign skipUpgrade = false %} +{% if update_status == "false" %} +{% assign skipUpgrade = true %} +{% endif %} + +{% if docsPrefix == "pe/" %} +{% assign pe_version = version | append: "PE" %} +{% include docs/pe/user-guide/install/docker-upgrade-steps.md version=pe_version skipUpgrade=skipUpgrade %} +{% else %} +{% include docs/user-guide/install/docker-upgrade-steps.md version=version skipUpgrade=skipUpgrade %} +{% endif %} diff --git a/_includes/releases-table.liquid b/_includes/releases-table.liquid index ba1c5ccb8c..205f6395d0 100644 --- a/_includes/releases-table.liquid +++ b/_includes/releases-table.liquid @@ -23,6 +23,7 @@
+ {% assign active_lts_already_set = false %} {% for page in releases %} {% if page.name != "index.md" %} {% assign version = page.name | split: "." | first %} @@ -60,14 +61,21 @@ {% if page.lts %} + {% if active_lts_already_set == false %} + {% assign lts_label = "Active LTS" %} + {% assign active_lts_already_set = true %} + {% else %} + {% assign lts_label = "Maintenance LTS" %} + {% endif %} + - - Active LTS - + class="releases-table-content-item version-link version-link-lts"> + + {{ lts_label }} + + style="color: {% if docsPrefix == "pe/" %}#1F8B4D{% elsif docsPrefix == "edge/" %}#2260A7{% elsif docsPrefix == "pe/edge/" %}#009688{% else %}#2a7dec{% endif %}"> + {% else %}
Standard
@@ -124,9 +132,10 @@
-