From 471f7ae0c651adb0d027d2165a9c4ffc5700ce2b Mon Sep 17 00:00:00 2001 From: Lucas Di Pentima Date: Tue, 21 Sep 2021 15:50:42 -0300 Subject: [PATCH] Fixes the 'branchname' variable setting used on salt doc pages. Refs #18130 Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima --- doc/_includes/_branchname.liquid | 11 +++++++++++ doc/install/salt-multi-host.html.textile.liquid | 6 +----- doc/install/salt-single-host.html.textile.liquid | 6 +----- doc/install/salt.html.textile.liquid | 2 ++ 4 files changed, 15 insertions(+), 10 deletions(-) create mode 100644 doc/_includes/_branchname.liquid diff --git a/doc/_includes/_branchname.liquid b/doc/_includes/_branchname.liquid new file mode 100644 index 0000000000..44707e3f9a --- /dev/null +++ b/doc/_includes/_branchname.liquid @@ -0,0 +1,11 @@ +{% comment %} +Copyright (C) The Arvados Authors. All rights reserved. + +SPDX-License-Identifier: CC-BY-SA-3.0 +{% endcomment %} + +{% if site.current_version and site.current_version != 'main' %} +{% assign branchname = site.current_version | slice: 0, 3 | append: '-dev' %} +{% else %} +{% assign branchname = 'main' %} +{% endif %} diff --git a/doc/install/salt-multi-host.html.textile.liquid b/doc/install/salt-multi-host.html.textile.liquid index 2e4f49b019..0d7fb916e1 100644 --- a/doc/install/salt-multi-host.html.textile.liquid +++ b/doc/install/salt-multi-host.html.textile.liquid @@ -75,11 +75,7 @@ We added a few "terraform":https://terraform.io/ scripts (https://github.com/arv h2(#multi_host). Multi host install using the provision.sh script -{% if site.current_version %} -{% assign branchname = site.current_version | slice: 1, 5 | append: '-dev' %} -{% else %} -{% assign branchname = 'main' %} -{% endif %} +{% include 'branchname' %} This is a package-based installation method. Start with the @provision.sh@ script which is available by cloning the @{{ branchname }}@ branch from "https://git.arvados.org/arvados.git":https://git.arvados.org/arvados.git . The @provision.sh@ script and its supporting files can be found in the "arvados/tools/salt-install":https://git.arvados.org/arvados.git/tree/refs/heads/{{ branchname }}:/tools/salt-install directory in the Arvados git repository. diff --git a/doc/install/salt-single-host.html.textile.liquid b/doc/install/salt-single-host.html.textile.liquid index 6a066f77b0..6ca6738e32 100644 --- a/doc/install/salt-single-host.html.textile.liquid +++ b/doc/install/salt-single-host.html.textile.liquid @@ -25,11 +25,7 @@ h2(#single_host). Single host install using the provision.sh script NOTE: The single host installation is not recommended for production use. -{% if site.current_version %} -{% assign branchname = site.current_version | slice: 1, 5 | append: '-dev' %} -{% else %} -{% assign branchname = 'main' %} -{% endif %} +{% include 'branchname' %} This is a package-based installation method. Start with the @provision.sh@ script which is available by cloning the @{{ branchname }}@ branch from "https://git.arvados.org/arvados.git":https://git.arvados.org/arvados.git . The @provision.sh@ script and its supporting files can be found in the "arvados/tools/salt-install":https://git.arvados.org/arvados.git/tree/refs/heads/{{ branchname }}:/tools/salt-install directory in the Arvados git repository. diff --git a/doc/install/salt.html.textile.liquid b/doc/install/salt.html.textile.liquid index d110f73000..8db0ac15e4 100644 --- a/doc/install/salt.html.textile.liquid +++ b/doc/install/salt.html.textile.liquid @@ -19,6 +19,8 @@ SPDX-License-Identifier: CC-BY-SA-3.0 h2(#introduction). Introduction +{% include 'branchname' %} + To ease the installation of the various Arvados components, we have developed a "Saltstack":https://www.saltstack.com/ 's "arvados-formula":https://git.arvados.org/arvados-formula.git which can help you get an Arvados cluster up and running. Saltstack is a Python-based, open-source software for event-driven IT automation, remote task execution, and configuration management. It can be used in a _master/minion_ setup (where a master node orchestrates and coordinates the configuration of nodes in an infrastructure) or master-less, where Saltstack is run locally in a node, with no communication with a master node. -- 2.30.2