diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 463f365f241..d689a037949 100755 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,19 +1,12 @@ -#------------------------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information. -#------------------------------------------------------------------------------------------------------------- +## Source: https://github.com/microsoft/vscode-dev-containers/blob/main/containers/python-3/.devcontainer/Dockerfile -# To fully customize the contents of this image, use the following Dockerfile instead: -# https://github.com/microsoft/vscode-dev-containers/blob/master/containers/python-3/.devcontainer/Dockerfile - -# [Choice] Python version: 3, 3.8, 3.7, 3.6 -ARG VARIANT=3 +# [Choice] Python version (use -bullseye variants on local arm64/Apple Silicon): 3, 3.10, 3.9, 3.8, 3.7, 3.6, 3-bullseye, 3.10-bullseye, 3.9-bullseye, 3.8-bullseye, 3.7-bullseye, 3.6-bullseye, 3-buster, 3.10-buster, 3.9-buster, 3.8-buster, 3.7-buster, 3.6-buster +ARG VARIANT=3-bullseye FROM mcr.microsoft.com/vscode/devcontainers/python:${VARIANT} -# [Option] Install Node.js -ARG INSTALL_NODE="true" +# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10 ARG NODE_VERSION="lts/*" -RUN if [ "${INSTALL_NODE}" = "true" ]; then su vscode -c "source /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi +RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi # [Optional] If your pip requirements rarely change, uncomment this section to add them to the image. # COPY requirements.txt /tmp/pip-tmp/ @@ -24,14 +17,50 @@ RUN if [ "${INSTALL_NODE}" = "true" ]; then su vscode -c "source /usr/local/shar # RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ # && apt-get -y install --no-install-recommends +# [Optional] Uncomment this line to install global node packages. +# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g " 2>&1 + # latest gatsby RUN su vscode -c "source /usr/local/share/nvm/nvm.sh \ && npm install -g gatsby-cli" 2>&1 -# Enable docker-in-docker (see: https://github.com/microsoft/vscode-dev-containers/blob/master/script-library/docs/docker-in-docker.md) +## Git LFS: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/git-lfs.md +COPY library-scripts/git-lfs-debian.sh /tmp/library-scripts/ +RUN apt-get update && bash /tmp/library-scripts/git-lfs-debian.sh + +## Enable docker-in-docker (see: https://github.com/microsoft/vscode-dev-containers/blob/master/script-library/docs/docker-in-docker.md) + +# [Option] Install zsh +ARG INSTALL_ZSH="true" +# [Option] Upgrade OS packages to their latest versions +ARG UPGRADE_PACKAGES="false" +# [Option] Enable non-root Docker access in container +ARG ENABLE_NONROOT_DOCKER="true" +# [Option] Use the OSS Moby Engine instead of the licensed Docker Engine +ARG USE_MOBY="true" +# [Option] Engine/CLI Version +ARG DOCKER_VERSION="latest" + +# Enable new "BUILDKIT" mode for Docker CLI +ENV DOCKER_BUILDKIT=1 + +# Install needed packages and setup non-root user. Use a separate RUN statement to add your +# own dependencies. A user of "automatic" attempts to reuse an user ID if one already exists. +ARG USERNAME=automatic +ARG USER_UID=1000 +ARG USER_GID=$USER_UID COPY library-scripts/*.sh /tmp/library-scripts/ RUN apt-get update \ - && /bin/bash /tmp/library-scripts/docker-in-docker-debian.sh + && /bin/bash /tmp/library-scripts/common-debian.sh "${INSTALL_ZSH}" "${USERNAME}" "${USER_UID}" "${USER_GID}" "${UPGRADE_PACKAGES}" "true" "true" \ + # Use Docker script from script library to set things up + && /bin/bash /tmp/library-scripts/docker-in-docker-debian.sh "${ENABLE_NONROOT_DOCKER}" "${USERNAME}" "${USE_MOBY}" "${DOCKER_VERSION}" \ + # Clean up + && apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* /tmp/library-scripts/ + + +## env +RUN curl -sfL https://direnv.net/install.sh | bash + ENTRYPOINT ["/usr/local/share/docker-init.sh"] VOLUME [ "/var/lib/docker" ] CMD ["sleep", "infinity"] diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 8bb9d6cabb4..78cde877c5c 100755 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -5,7 +5,7 @@ // Set *default* container specific settings.json values on container create. "settings": { - "terminal.integrated.shell.linux": "/bin/bash" + "terminal.integrated.shell.linux": "/usr/bin/zsh" }, // Add the IDs of extensions you want installed when the container is created. @@ -17,11 +17,12 @@ ], // Use 'forwardPorts' to make a list of ports inside the container available locally. - // "forwardPorts": [8000], - "appPort": [8000], + "forwardPorts": [8000], // Use 'postCreateCommand' to run commands after the container is created. - "postCreateCommand": "npm install", + // this configures NPM (without icons unless NPM_TOKEN is configured) and direnv (for root only) + // for icons, will still need to create & edit .env.development + "postCreateCommand": "echo 'eval \"$(direnv hook bash)\"' >> ~/.bashrc && echo 'eval \"$(direnv hook zsh)\"' >> ~/.zshrc && ([ ! -f .envrc ] || direnv allow) && direnv exec . npm run setup", // docker in docker (https://github.com/microsoft/vscode-dev-containers/blob/master/script-library/docs/docker-in-docker.md) "runArgs": ["--init", "--privileged"], diff --git a/.devcontainer/library-scripts/common-debian.sh b/.devcontainer/library-scripts/common-debian.sh new file mode 100644 index 00000000000..b6549190bc8 --- /dev/null +++ b/.devcontainer/library-scripts/common-debian.sh @@ -0,0 +1,482 @@ +#!/usr/bin/env bash +#------------------------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information. +#------------------------------------------------------------------------------------------------------------- +# +# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/common.md +# Maintainer: The VS Code and Codespaces Teams +# +# Syntax: ./common-debian.sh [install zsh flag] [username] [user UID] [user GID] [upgrade packages flag] [install Oh My Zsh! flag] [Add non-free packages] + +set -e + +INSTALL_ZSH=${1:-"true"} +USERNAME=${2:-"automatic"} +USER_UID=${3:-"automatic"} +USER_GID=${4:-"automatic"} +UPGRADE_PACKAGES=${5:-"true"} +INSTALL_OH_MYS=${6:-"true"} +ADD_NON_FREE_PACKAGES=${7:-"false"} +SCRIPT_DIR="$(cd $(dirname "${BASH_SOURCE[0]}") && pwd)" +MARKER_FILE="/usr/local/etc/vscode-dev-containers/common" + + +if [ "$(id -u)" -ne 0 ]; then + echo -e 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.' + exit 1 +fi + +# Ensure that login shells get the correct path if the user updated the PATH using ENV. +rm -f /etc/profile.d/00-restore-env.sh +echo "export PATH=${PATH//$(sh -lc 'echo $PATH')/\$PATH}" > /etc/profile.d/00-restore-env.sh +chmod +x /etc/profile.d/00-restore-env.sh + +# If in automatic mode, determine if a user already exists, if not use vscode +if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then + USERNAME="" + POSSIBLE_USERS=("vscode" "node" "codespace" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)") + for CURRENT_USER in ${POSSIBLE_USERS[@]}; do + if id -u ${CURRENT_USER} > /dev/null 2>&1; then + USERNAME=${CURRENT_USER} + break + fi + done + if [ "${USERNAME}" = "" ]; then + USERNAME=vscode + fi +elif [ "${USERNAME}" = "none" ]; then + USERNAME=root + USER_UID=0 + USER_GID=0 +fi + +# Load markers to see which steps have already run +if [ -f "${MARKER_FILE}" ]; then + echo "Marker file found:" + cat "${MARKER_FILE}" + source "${MARKER_FILE}" +fi + +# Ensure apt is in non-interactive to avoid prompts +export DEBIAN_FRONTEND=noninteractive + +# Function to call apt-get if needed +apt_get_update_if_needed() +{ + if [ ! -d "/var/lib/apt/lists" ] || [ "$(ls /var/lib/apt/lists/ | wc -l)" = "0" ]; then + echo "Running apt-get update..." + apt-get update + else + echo "Skipping apt-get update." + fi +} + +# Run install apt-utils to avoid debconf warning then verify presence of other common developer tools and dependencies +if [ "${PACKAGES_ALREADY_INSTALLED}" != "true" ]; then + + package_list="apt-utils \ + openssh-client \ + gnupg2 \ + dirmngr \ + iproute2 \ + procps \ + lsof \ + htop \ + net-tools \ + psmisc \ + curl \ + wget \ + rsync \ + ca-certificates \ + unzip \ + zip \ + nano \ + vim-tiny \ + less \ + jq \ + lsb-release \ + apt-transport-https \ + dialog \ + libc6 \ + libgcc1 \ + libkrb5-3 \ + libgssapi-krb5-2 \ + libicu[0-9][0-9] \ + liblttng-ust0 \ + libstdc++6 \ + zlib1g \ + locales \ + sudo \ + ncdu \ + man-db \ + strace \ + manpages \ + manpages-dev \ + init-system-helpers" + + # Needed for adding manpages-posix and manpages-posix-dev which are non-free packages in Debian + if [ "${ADD_NON_FREE_PACKAGES}" = "true" ]; then + # Bring in variables from /etc/os-release like VERSION_CODENAME + . /etc/os-release + sed -i -E "s/deb http:\/\/(deb|httpredir)\.debian\.org\/debian ${VERSION_CODENAME} main/deb http:\/\/\1\.debian\.org\/debian ${VERSION_CODENAME} main contrib non-free/" /etc/apt/sources.list + sed -i -E "s/deb-src http:\/\/(deb|httredir)\.debian\.org\/debian ${VERSION_CODENAME} main/deb http:\/\/\1\.debian\.org\/debian ${VERSION_CODENAME} main contrib non-free/" /etc/apt/sources.list + sed -i -E "s/deb http:\/\/(deb|httpredir)\.debian\.org\/debian ${VERSION_CODENAME}-updates main/deb http:\/\/\1\.debian\.org\/debian ${VERSION_CODENAME}-updates main contrib non-free/" /etc/apt/sources.list + sed -i -E "s/deb-src http:\/\/(deb|httpredir)\.debian\.org\/debian ${VERSION_CODENAME}-updates main/deb http:\/\/\1\.debian\.org\/debian ${VERSION_CODENAME}-updates main contrib non-free/" /etc/apt/sources.list + sed -i "s/deb http:\/\/security\.debian\.org\/debian-security ${VERSION_CODENAME}\/updates main/deb http:\/\/security\.debian\.org\/debian-security ${VERSION_CODENAME}\/updates main contrib non-free/" /etc/apt/sources.list + sed -i "s/deb-src http:\/\/security\.debian\.org\/debian-security ${VERSION_CODENAME}\/updates main/deb http:\/\/security\.debian\.org\/debian-security ${VERSION_CODENAME}\/updates main contrib non-free/" /etc/apt/sources.list + sed -i "s/deb http:\/\/deb\.debian\.org\/debian ${VERSION_CODENAME}-backports main/deb http:\/\/deb\.debian\.org\/debian ${VERSION_CODENAME}-backports main contrib non-free/" /etc/apt/sources.list + sed -i "s/deb-src http:\/\/deb\.debian\.org\/debian ${VERSION_CODENAME}-backports main/deb http:\/\/deb\.debian\.org\/debian ${VERSION_CODENAME}-backports main contrib non-free/" /etc/apt/sources.list + # Handle bullseye location for security https://www.debian.org/releases/bullseye/amd64/release-notes/ch-information.en.html + sed -i "s/deb http:\/\/security\.debian\.org\/debian-security ${VERSION_CODENAME}-security main/deb http:\/\/security\.debian\.org\/debian-security ${VERSION_CODENAME}-security main contrib non-free/" /etc/apt/sources.list + sed -i "s/deb-src http:\/\/security\.debian\.org\/debian-security ${VERSION_CODENAME}-security main/deb http:\/\/security\.debian\.org\/debian-security ${VERSION_CODENAME}-security main contrib non-free/" /etc/apt/sources.list + echo "Running apt-get update..." + apt-get update + package_list="${package_list} manpages-posix manpages-posix-dev" + else + apt_get_update_if_needed + fi + + # Install libssl1.1 if available + if [[ ! -z $(apt-cache --names-only search ^libssl1.1$) ]]; then + package_list="${package_list} libssl1.1" + fi + + # Install appropriate version of libssl1.0.x if available + libssl_package=$(dpkg-query -f '${db:Status-Abbrev}\t${binary:Package}\n' -W 'libssl1\.0\.?' 2>&1 || echo '') + if [ "$(echo "$LIlibssl_packageBSSL" | grep -o 'libssl1\.0\.[0-9]:' | uniq | sort | wc -l)" -eq 0 ]; then + if [[ ! -z $(apt-cache --names-only search ^libssl1.0.2$) ]]; then + # Debian 9 + package_list="${package_list} libssl1.0.2" + elif [[ ! -z $(apt-cache --names-only search ^libssl1.0.0$) ]]; then + # Ubuntu 18.04, 16.04, earlier + package_list="${package_list} libssl1.0.0" + fi + fi + + echo "Packages to verify are installed: ${package_list}" + apt-get -y install --no-install-recommends ${package_list} 2> >( grep -v 'debconf: delaying package configuration, since apt-utils is not installed' >&2 ) + + # Install git if not already installed (may be more recent than distro version) + if ! type git > /dev/null 2>&1; then + apt-get -y install --no-install-recommends git + fi + + PACKAGES_ALREADY_INSTALLED="true" +fi + +# Get to latest versions of all packages +if [ "${UPGRADE_PACKAGES}" = "true" ]; then + apt_get_update_if_needed + apt-get -y upgrade --no-install-recommends + apt-get autoremove -y +fi + +# Ensure at least the en_US.UTF-8 UTF-8 locale is available. +# Common need for both applications and things like the agnoster ZSH theme. +if [ "${LOCALE_ALREADY_SET}" != "true" ] && ! grep -o -E '^\s*en_US.UTF-8\s+UTF-8' /etc/locale.gen > /dev/null; then + echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen + locale-gen + LOCALE_ALREADY_SET="true" +fi + +# Create or update a non-root user to match UID/GID. +if id -u ${USERNAME} > /dev/null 2>&1; then + # User exists, update if needed + if [ "${USER_GID}" != "automatic" ] && [ "$USER_GID" != "$(id -G $USERNAME)" ]; then + groupmod --gid $USER_GID $USERNAME + usermod --gid $USER_GID $USERNAME + fi + if [ "${USER_UID}" != "automatic" ] && [ "$USER_UID" != "$(id -u $USERNAME)" ]; then + usermod --uid $USER_UID $USERNAME + fi +else + # Create user + if [ "${USER_GID}" = "automatic" ]; then + groupadd $USERNAME + else + groupadd --gid $USER_GID $USERNAME + fi + if [ "${USER_UID}" = "automatic" ]; then + useradd -s /bin/bash --gid $USERNAME -m $USERNAME + else + useradd -s /bin/bash --uid $USER_UID --gid $USERNAME -m $USERNAME + fi +fi + +# Add add sudo support for non-root user +if [ "${USERNAME}" != "root" ] && [ "${EXISTING_NON_ROOT_USER}" != "${USERNAME}" ]; then + echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME + chmod 0440 /etc/sudoers.d/$USERNAME + EXISTING_NON_ROOT_USER="${USERNAME}" +fi + +# ** Shell customization section ** +if [ "${USERNAME}" = "root" ]; then + user_rc_path="/root" +else + user_rc_path="/home/${USERNAME}" +fi + +# Restore user .bashrc defaults from skeleton file if it doesn't exist or is empty +if [ ! -f "${user_rc_path}/.bashrc" ] || [ ! -s "${user_rc_path}/.bashrc" ] ; then + cp /etc/skel/.bashrc "${user_rc_path}/.bashrc" +fi + +# Restore user .profile defaults from skeleton file if it doesn't exist or is empty +if [ ! -f "${user_rc_path}/.profile" ] || [ ! -s "${user_rc_path}/.profile" ] ; then + cp /etc/skel/.profile "${user_rc_path}/.profile" +fi + +# .bashrc/.zshrc snippet +rc_snippet="$(cat << 'EOF' + +if [ -z "${USER}" ]; then export USER=$(whoami); fi +if [[ "${PATH}" != *"$HOME/.local/bin"* ]]; then export PATH="${PATH}:$HOME/.local/bin"; fi + +# Display optional first run image specific notice if configured and terminal is interactive +if [ -t 1 ] && [[ "${TERM_PROGRAM}" = "vscode" || "${TERM_PROGRAM}" = "codespaces" ]] && [ ! -f "$HOME/.config/vscode-dev-containers/first-run-notice-already-displayed" ]; then + if [ -f "/usr/local/etc/vscode-dev-containers/first-run-notice.txt" ]; then + cat "/usr/local/etc/vscode-dev-containers/first-run-notice.txt" + elif [ -f "/workspaces/.codespaces/shared/first-run-notice.txt" ]; then + cat "/workspaces/.codespaces/shared/first-run-notice.txt" + fi + mkdir -p "$HOME/.config/vscode-dev-containers" + # Mark first run notice as displayed after 10s to avoid problems with fast terminal refreshes hiding it + ((sleep 10s; touch "$HOME/.config/vscode-dev-containers/first-run-notice-already-displayed") &) +fi + +# Set the default git editor if not already set +if [ -z "$(git config --get core.editor)" ] && [ -z "${GIT_EDITOR}" ]; then + if [ "${TERM_PROGRAM}" = "vscode" ]; then + if [[ -n $(command -v code-insiders) && -z $(command -v code) ]]; then + export GIT_EDITOR="code-insiders --wait" + else + export GIT_EDITOR="code --wait" + fi + fi +fi + +EOF +)" + +# code shim, it fallbacks to code-insiders if code is not available +cat << 'EOF' > /usr/local/bin/code +#!/bin/sh + +get_in_path_except_current() { + which -a "$1" | grep -A1 "$0" | grep -v "$0" +} + +code="$(get_in_path_except_current code)" + +if [ -n "$code" ]; then + exec "$code" "$@" +elif [ "$(command -v code-insiders)" ]; then + exec code-insiders "$@" +else + echo "code or code-insiders is not installed" >&2 + exit 127 +fi +EOF +chmod +x /usr/local/bin/code + +# systemctl shim - tells people to use 'service' if systemd is not running +cat << 'EOF' > /usr/local/bin/systemctl +#!/bin/sh +set -e +if [ -d "/run/systemd/system" ]; then + exec /bin/systemctl/systemctl "$@" +else + echo '\n"systemd" is not running in this container due to its overhead.\nUse the "service" command to start services intead. e.g.: \n\nservice --status-all' +fi +EOF +chmod +x /usr/local/bin/systemctl + +# Codespaces bash and OMZ themes - partly inspired by https://github.com/ohmyzsh/ohmyzsh/blob/master/themes/robbyrussell.zsh-theme +codespaces_bash="$(cat \ +<<'EOF' + +# Codespaces bash prompt theme +__bash_prompt() { + local userpart='`export XIT=$? \ + && [ ! -z "${GITHUB_USER}" ] && echo -n "\[\033[0;32m\]@${GITHUB_USER} " || echo -n "\[\033[0;32m\]\u " \ + && [ "$XIT" -ne "0" ] && echo -n "\[\033[1;31m\]➜" || echo -n "\[\033[0m\]➜"`' + local gitbranch='`\ + export BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD 2>/dev/null); \ + if [ "${BRANCH}" != "" ]; then \ + echo -n "\[\033[0;36m\](\[\033[1;31m\]${BRANCH}" \ + && if git ls-files --error-unmatch -m --directory --no-empty-directory -o --exclude-standard ":/*" > /dev/null 2>&1; then \ + echo -n " \[\033[1;33m\]✗"; \ + fi \ + && echo -n "\[\033[0;36m\]) "; \ + fi`' + local lightblue='\[\033[1;34m\]' + local removecolor='\[\033[0m\]' + PS1="${userpart} ${lightblue}\w ${gitbranch}${removecolor}\$ " + unset -f __bash_prompt +} +__bash_prompt + +EOF +)" + +codespaces_zsh="$(cat \ +<<'EOF' +# Codespaces zsh prompt theme +__zsh_prompt() { + local prompt_username + if [ ! -z "${GITHUB_USER}" ]; then + prompt_username="@${GITHUB_USER}" + else + prompt_username="%n" + fi + PROMPT="%{$fg[green]%}${prompt_username} %(?:%{$reset_color%}➜ :%{$fg_bold[red]%}➜ )" # User/exit code arrow + PROMPT+='%{$fg_bold[blue]%}%(5~|%-1~/…/%3~|%4~)%{$reset_color%} ' # cwd + PROMPT+='$(git_prompt_info)%{$fg[white]%}$ %{$reset_color%}' # Git status + unset -f __zsh_prompt +} +ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[cyan]%}(%{$fg_bold[red]%}" +ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} " +ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg_bold[yellow]%}✗%{$fg_bold[cyan]%})" +ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[cyan]%})" +__zsh_prompt + +EOF +)" + +# Add notice that Oh My Bash! has been removed from images and how to provide information on how to install manually +omb_readme="$(cat \ +<<'EOF' +"Oh My Bash!" has been removed from this image in favor of a simple shell prompt. If you +still wish to use it, remove "~/.oh-my-bash" and install it from: https://github.com/ohmybash/oh-my-bash +You may also want to consider "Bash-it" as an alternative: https://github.com/bash-it/bash-it +See here for infomation on adding it to your image or dotfiles: https://aka.ms/codespaces/omb-remove +EOF +)" +omb_stub="$(cat \ +<<'EOF' +#!/usr/bin/env bash +if [ -t 1 ]; then + cat $HOME/.oh-my-bash/README.md +fi +EOF +)" + +# Add RC snippet and custom bash prompt +if [ "${RC_SNIPPET_ALREADY_ADDED}" != "true" ]; then + echo "${rc_snippet}" >> /etc/bash.bashrc + echo "${codespaces_bash}" >> "${user_rc_path}/.bashrc" + echo 'export PROMPT_DIRTRIM=4' >> "${user_rc_path}/.bashrc" + if [ "${USERNAME}" != "root" ]; then + echo "${codespaces_bash}" >> "/root/.bashrc" + echo 'export PROMPT_DIRTRIM=4' >> "/root/.bashrc" + fi + chown ${USERNAME}:${USERNAME} "${user_rc_path}/.bashrc" + RC_SNIPPET_ALREADY_ADDED="true" +fi + +# Add stub for Oh My Bash! +if [ ! -d "${user_rc_path}/.oh-my-bash}" ] && [ "${INSTALL_OH_MYS}" = "true" ]; then + mkdir -p "${user_rc_path}/.oh-my-bash" "/root/.oh-my-bash" + echo "${omb_readme}" >> "${user_rc_path}/.oh-my-bash/README.md" + echo "${omb_stub}" >> "${user_rc_path}/.oh-my-bash/oh-my-bash.sh" + chmod +x "${user_rc_path}/.oh-my-bash/oh-my-bash.sh" + if [ "${USERNAME}" != "root" ]; then + echo "${omb_readme}" >> "/root/.oh-my-bash/README.md" + echo "${omb_stub}" >> "/root/.oh-my-bash/oh-my-bash.sh" + chmod +x "/root/.oh-my-bash/oh-my-bash.sh" + fi + chown -R "${USERNAME}:${USERNAME}" "${user_rc_path}/.oh-my-bash" +fi + +# Optionally install and configure zsh and Oh My Zsh! +if [ "${INSTALL_ZSH}" = "true" ]; then + if ! type zsh > /dev/null 2>&1; then + apt_get_update_if_needed + apt-get install -y zsh + fi + if [ "${ZSH_ALREADY_INSTALLED}" != "true" ]; then + echo "${rc_snippet}" >> /etc/zsh/zshrc + ZSH_ALREADY_INSTALLED="true" + fi + + # Adapted, simplified inline Oh My Zsh! install steps that adds, defaults to a codespaces theme. + # See https://github.com/ohmyzsh/ohmyzsh/blob/master/tools/install.sh for official script. + oh_my_install_dir="${user_rc_path}/.oh-my-zsh" + if [ ! -d "${oh_my_install_dir}" ] && [ "${INSTALL_OH_MYS}" = "true" ]; then + template_path="${oh_my_install_dir}/templates/zshrc.zsh-template" + user_rc_file="${user_rc_path}/.zshrc" + umask g-w,o-w + mkdir -p ${oh_my_install_dir} + git clone --depth=1 \ + -c core.eol=lf \ + -c core.autocrlf=false \ + -c fsck.zeroPaddedFilemode=ignore \ + -c fetch.fsck.zeroPaddedFilemode=ignore \ + -c receive.fsck.zeroPaddedFilemode=ignore \ + "https://github.com/ohmyzsh/ohmyzsh" "${oh_my_install_dir}" 2>&1 + echo -e "$(cat "${template_path}")\nDISABLE_AUTO_UPDATE=true\nDISABLE_UPDATE_PROMPT=true" > ${user_rc_file} + sed -i -e 's/ZSH_THEME=.*/ZSH_THEME="codespaces"/g' ${user_rc_file} + + mkdir -p ${oh_my_install_dir}/custom/themes + echo "${codespaces_zsh}" > "${oh_my_install_dir}/custom/themes/codespaces.zsh-theme" + # Shrink git while still enabling updates + cd "${oh_my_install_dir}" + git repack -a -d -f --depth=1 --window=1 + # Copy to non-root user if one is specified + if [ "${USERNAME}" != "root" ]; then + cp -rf "${user_rc_file}" "${oh_my_install_dir}" /root + chown -R ${USERNAME}:${USERNAME} "${user_rc_path}" + fi + fi +fi + +# Persist image metadata info, script if meta.env found in same directory +meta_info_script="$(cat << 'EOF' +#!/bin/sh +. /usr/local/etc/vscode-dev-containers/meta.env + +# Minimal output +if [ "$1" = "version" ] || [ "$1" = "image-version" ]; then + echo "${VERSION}" + exit 0 +elif [ "$1" = "release" ]; then + echo "${GIT_REPOSITORY_RELEASE}" + exit 0 +elif [ "$1" = "content" ] || [ "$1" = "content-url" ] || [ "$1" = "contents" ] || [ "$1" = "contents-url" ]; then + echo "${CONTENTS_URL}" + exit 0 +fi + +#Full output +echo +echo "Development container image information" +echo +if [ ! -z "${VERSION}" ]; then echo "- Image version: ${VERSION}"; fi +if [ ! -z "${DEFINITION_ID}" ]; then echo "- Definition ID: ${DEFINITION_ID}"; fi +if [ ! -z "${VARIANT}" ]; then echo "- Variant: ${VARIANT}"; fi +if [ ! -z "${GIT_REPOSITORY}" ]; then echo "- Source code repository: ${GIT_REPOSITORY}"; fi +if [ ! -z "${GIT_REPOSITORY_RELEASE}" ]; then echo "- Source code release/branch: ${GIT_REPOSITORY_RELEASE}"; fi +if [ ! -z "${BUILD_TIMESTAMP}" ]; then echo "- Timestamp: ${BUILD_TIMESTAMP}"; fi +if [ ! -z "${CONTENTS_URL}" ]; then echo && echo "More info: ${CONTENTS_URL}"; fi +echo +EOF +)" +if [ -f "${SCRIPT_DIR}/meta.env" ]; then + mkdir -p /usr/local/etc/vscode-dev-containers/ + cp -f "${SCRIPT_DIR}/meta.env" /usr/local/etc/vscode-dev-containers/meta.env + echo "${meta_info_script}" > /usr/local/bin/devcontainer-info + chmod +x /usr/local/bin/devcontainer-info +fi + +# Write marker file +mkdir -p "$(dirname "${MARKER_FILE}")" +echo -e "\ + PACKAGES_ALREADY_INSTALLED=${PACKAGES_ALREADY_INSTALLED}\n\ + LOCALE_ALREADY_SET=${LOCALE_ALREADY_SET}\n\ + EXISTING_NON_ROOT_USER=${EXISTING_NON_ROOT_USER}\n\ + RC_SNIPPET_ALREADY_ADDED=${RC_SNIPPET_ALREADY_ADDED}\n\ + ZSH_ALREADY_INSTALLED=${ZSH_ALREADY_INSTALLED}" > "${MARKER_FILE}" + +echo "Done!" \ No newline at end of file diff --git a/.devcontainer/library-scripts/docker-in-docker-debian.sh b/.devcontainer/library-scripts/docker-in-docker-debian.sh index 40c7a695482..118ebe92b8d 100644 --- a/.devcontainer/library-scripts/docker-in-docker-debian.sh +++ b/.devcontainer/library-scripts/docker-in-docker-debian.sh @@ -4,14 +4,17 @@ # Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information. #------------------------------------------------------------------------------------------------------------- # -# Docs: https://github.com/microsoft/vscode-dev-containers/blob/master/script-library/docs/docker-in-docker.md +# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/docker-in-docker.md # Maintainer: The VS Code and Codespaces Teams # -# Syntax: ./docker-in-docker-debian.sh [enable non-root docker access flag] [non-root user] [use moby] +# Syntax: ./docker-in-docker-debian.sh [enable non-root docker access flag] [non-root user] [use moby] [Engine/CLI Version] ENABLE_NONROOT_DOCKER=${1:-"true"} USERNAME=${2:-"automatic"} USE_MOBY=${3:-"true"} +DOCKER_VERSION=${4:-"latest"} # The Docker/Moby Engine + CLI should match in version +MICROSOFT_GPG_KEYS_URI="https://packages.microsoft.com/keys/microsoft.asc" +DOCKER_DASH_COMPOSE_VERSION="1" set -e @@ -37,8 +40,23 @@ elif [ "${USERNAME}" = "none" ] || ! id -u ${USERNAME} > /dev/null 2>&1; then USERNAME=root fi +# Get central common setting +get_common_setting() { + if [ "${common_settings_file_loaded}" != "true" ]; then + curl -sfL "https://aka.ms/vscode-dev-containers/script-library/settings.env" 2>/dev/null -o /tmp/vsdc-settings.env || echo "Could not download settings file. Skipping." + common_settings_file_loaded=true + fi + if [ -f "/tmp/vsdc-settings.env" ]; then + local multi_line="" + if [ "$2" = "true" ]; then multi_line="-z"; fi + local result="$(grep ${multi_line} -oP "$1=\"?\K[^\"]+" /tmp/vsdc-settings.env | tr -d '\0')" + if [ ! -z "${result}" ]; then declare -g $1="${result}"; fi + fi + echo "$1=${!1}" +} + # Function to run apt-get if needed -apt-get-update-if-needed() +apt_get_update_if_needed() { if [ ! -d "/var/lib/apt/lists" ] || [ "$(ls /var/lib/apt/lists/ | wc -l)" = "0" ]; then echo "Running apt-get update..." @@ -48,47 +66,164 @@ apt-get-update-if-needed() fi } +# Checks if packages are installed and installs them if not +check_packages() { + if ! dpkg -s "$@" > /dev/null 2>&1; then + apt_get_update_if_needed + apt-get -y install --no-install-recommends "$@" + fi +} + +# Figure out correct version of a three part version number is not passed +find_version_from_git_tags() { + local variable_name=$1 + local requested_version=${!variable_name} + if [ "${requested_version}" = "none" ]; then return; fi + local repository=$2 + local prefix=${3:-"tags/v"} + local separator=${4:-"."} + local last_part_optional=${5:-"false"} + if [ "$(echo "${requested_version}" | grep -o "." | wc -l)" != "2" ]; then + local escaped_separator=${separator//./\\.} + local last_part + if [ "${last_part_optional}" = "true" ]; then + last_part="(${escaped_separator}[0-9]+)?" + else + last_part="${escaped_separator}[0-9]+" + fi + local regex="${prefix}\\K[0-9]+${escaped_separator}[0-9]+${last_part}$" + local version_list="$(git ls-remote --tags ${repository} | grep -oP "${regex}" | tr -d ' ' | tr "${separator}" "." | sort -rV)" + if [ "${requested_version}" = "latest" ] || [ "${requested_version}" = "current" ] || [ "${requested_version}" = "lts" ]; then + declare -g ${variable_name}="$(echo "${version_list}" | head -n 1)" + else + set +e + declare -g ${variable_name}="$(echo "${version_list}" | grep -E -m 1 "^${requested_version//./\\.}([\\.\\s]|$)")" + set -e + fi + fi + if [ -z "${!variable_name}" ] || ! echo "${version_list}" | grep "^${!variable_name//./\\.}$" > /dev/null 2>&1; then + echo -e "Invalid ${variable_name} value: ${requested_version}\nValid values:\n${version_list}" >&2 + exit 1 + fi + echo "${variable_name}=${!variable_name}" +} + # Ensure apt is in non-interactive to avoid prompts export DEBIAN_FRONTEND=noninteractive -# Install docker/dockerd dependencies if missing -if ! dpkg -s apt-transport-https curl ca-certificates lsb-release lxc pigz iptables > /dev/null 2>&1 || ! type gpg > /dev/null 2>&1; then - apt-get-update-if-needed - apt-get -y install --no-install-recommends apt-transport-https curl ca-certificates lsb-release lxc pigz iptables gnupg2 +# Install dependencies +check_packages apt-transport-https curl ca-certificates lxc pigz iptables gnupg2 dirmngr +if ! type git > /dev/null 2>&1; then + apt_get_update_if_needed + apt-get -y install git fi # Swap to legacy iptables for compatibility -update-alternatives --set iptables /usr/sbin/iptables-legacy -update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy +if type iptables-legacy > /dev/null 2>&1; then + update-alternatives --set iptables /usr/sbin/iptables-legacy + update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy +fi + +# Source /etc/os-release to get OS info +. /etc/os-release +# Fetch host/container arch. +architecture="$(dpkg --print-architecture)" + +# Set up the necessary apt repos (either Microsoft's or Docker's) +if [ "${USE_MOBY}" = "true" ]; then + + # Name of open source engine/cli + engine_package_name="moby-engine" + cli_package_name="moby-cli" + + # Import key safely and import Microsoft apt repo + get_common_setting MICROSOFT_GPG_KEYS_URI + curl -sSL ${MICROSOFT_GPG_KEYS_URI} | gpg --dearmor > /usr/share/keyrings/microsoft-archive-keyring.gpg + echo "deb [arch=${architecture} signed-by=/usr/share/keyrings/microsoft-archive-keyring.gpg] https://packages.microsoft.com/repos/microsoft-${ID}-${VERSION_CODENAME}-prod ${VERSION_CODENAME} main" > /etc/apt/sources.list.d/microsoft.list +else + # Name of licensed engine/cli + engine_package_name="docker-ce" + cli_package_name="docker-ce-cli" + + # Import key safely and import Docker apt repo + curl -fsSL https://download.docker.com/linux/${ID}/gpg | gpg --dearmor > /usr/share/keyrings/docker-archive-keyring.gpg + echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/${ID} ${VERSION_CODENAME} stable" > /etc/apt/sources.list.d/docker.list +fi + +# Refresh apt lists +apt-get update + +# Soft version matching +if [ "${DOCKER_VERSION}" = "latest" ] || [ "${DOCKER_VERSION}" = "lts" ] || [ "${DOCKER_VERSION}" = "stable" ]; then + # Empty, meaning grab whatever "latest" is in apt repo + engine_version_suffix="" + cli_version_suffix="" +else + # Fetch a valid version from the apt-cache (eg: the Microsoft repo appends +azure, breakfix, etc...) + docker_version_dot_escaped="${DOCKER_VERSION//./\\.}" + docker_version_dot_plus_escaped="${docker_version_dot_escaped//+/\\+}" + # Regex needs to handle debian package version number format: https://www.systutorials.com/docs/linux/man/5-deb-version/ + docker_version_regex="^(.+:)?${docker_version_dot_plus_escaped}([\\.\\+ ~:-]|$)" + set +e # Don't exit if finding version fails - will handle gracefully + cli_version_suffix="=$(apt-cache madison ${cli_package_name} | awk -F"|" '{print $2}' | sed -e 's/^[ \t]*//' | grep -E -m 1 "${docker_version_regex}")" + engine_version_suffix="=$(apt-cache madison ${engine_package_name} | awk -F"|" '{print $2}' | sed -e 's/^[ \t]*//' | grep -E -m 1 "${docker_version_regex}")" + set -e + if [ -z "${engine_version_suffix}" ] || [ "${engine_version_suffix}" = "=" ] || [ -z "${cli_version_suffix}" ] || [ "${cli_version_suffix}" = "=" ] ; then + echo "(!) No full or partial Docker / Moby version match found for \"${DOCKER_VERSION}\" on OS ${ID} ${VERSION_CODENAME} (${architecture}). Available versions:" + apt-cache madison ${cli_package_name} | awk -F"|" '{print $2}' | grep -oP '^(.+:)?\K.+' + exit 1 + fi + echo "engine_version_suffix ${engine_version_suffix}" + echo "cli_version_suffix ${cli_version_suffix}" +fi # Install Docker / Moby CLI if not already installed if type docker > /dev/null 2>&1 && type dockerd > /dev/null 2>&1; then echo "Docker / Moby CLI and Engine already installed." else if [ "${USE_MOBY}" = "true" ]; then - DISTRO=$(lsb_release -is | tr '[:upper:]' '[:lower:]') - CODENAME=$(lsb_release -cs) - curl -s https://packages.microsoft.com/keys/microsoft.asc | (OUT=$(apt-key add - 2>&1) || echo $OUT) - echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-${DISTRO}-${CODENAME}-prod ${CODENAME} main" > /etc/apt/sources.list.d/microsoft.list - apt-get update - apt-get -y install --no-install-recommends moby-cli moby-engine + apt-get -y install --no-install-recommends moby-cli${cli_version_suffix} moby-buildx moby-engine${engine_version_suffix} + apt-get -y install --no-install-recommends moby-compose || echo "(*) Package moby-compose (Docker Compose v2) not available for OS ${ID} ${VERSION_CODENAME} (${architecture}). Skipping." else - curl -fsSL https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/gpg | (OUT=$(apt-key add - 2>&1) || echo $OUT) - echo "deb [arch=amd64] https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]') $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list - apt-get update - apt-get -y install --no-install-recommends docker-ce-cli docker-ce + apt-get -y install --no-install-recommends docker-ce-cli${cli_version_suffix} docker-ce${engine_version_suffix} fi fi -echo "Finished installing docker / moby" +echo "Finished installing docker / moby!" -# Install Docker Compose if not already installed +# Install Docker Compose if not already installed and is on a supported architecture if type docker-compose > /dev/null 2>&1; then echo "Docker Compose already installed." else - LATEST_COMPOSE_VERSION=$(curl -sSL "https://api.github.com/repos/docker/compose/releases/latest" | grep -o -P '(?<="tag_name": ").+(?=")') - curl -sSL "https://github.com/docker/compose/releases/download/${LATEST_COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose - chmod +x /usr/local/bin/docker-compose + target_compose_arch="${architecture}" + if [ "${target_compose_arch}" = "amd64" ]; then + target_compose_arch="x86_64" + fi + if [ "${target_compose_arch}" != "x86_64" ]; then + # Use pip to get a version that runns on this architecture + if ! dpkg -s python3-minimal python3-pip libffi-dev python3-venv > /dev/null 2>&1; then + apt_get_update_if_needed + apt-get -y install python3-minimal python3-pip libffi-dev python3-venv + fi + export PIPX_HOME=/usr/local/pipx + mkdir -p ${PIPX_HOME} + export PIPX_BIN_DIR=/usr/local/bin + export PYTHONUSERBASE=/tmp/pip-tmp + export PIP_CACHE_DIR=/tmp/pip-tmp/cache + pipx_bin=pipx + if ! type pipx > /dev/null 2>&1; then + pip3 install --disable-pip-version-check --no-warn-script-location --no-cache-dir --user pipx + pipx_bin=/tmp/pip-tmp/bin/pipx + fi + ${pipx_bin} install --system-site-packages --pip-args '--no-cache-dir --force-reinstall' docker-compose + rm -rf /tmp/pip-tmp + else + # Only supports docker-compose v1 + find_version_from_git_tags DOCKER_DASH_COMPOSE_VERSION "https://github.com/docker/compose" "tags/" + echo "(*) Installing docker-compose ${DOCKER_DASH_COMPOSE_VERSION}..." + curl -fsSL "https://github.com/docker/compose/releases/download/${DOCKER_DASH_COMPOSE_VERSION}/docker-compose-Linux-x86_64" -o /usr/local/bin/docker-compose + chmod +x /usr/local/bin/docker-compose + fi fi # If init file already exists, exit @@ -96,18 +231,19 @@ if [ -f "/usr/local/share/docker-init.sh" ]; then echo "/usr/local/share/docker-init.sh already exists, so exiting." exit 0 fi -echo "docker-init doesnt exist..." +echo "docker-init doesnt exist, adding..." # Add user to the docker group if [ "${ENABLE_NONROOT_DOCKER}" = "true" ]; then if ! getent group docker > /dev/null 2>&1; then groupadd docker fi - usermod -aG docker ${USERNAME} + + usermod -aG docker ${USERNAME} fi tee /usr/local/share/docker-init.sh > /dev/null \ -<< 'EOF' +<< 'EOF' #!/usr/bin/env bash #------------------------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -177,10 +313,10 @@ set -e set +e -# Execute whatever commands were passed in (if any). This allows us +# Execute whatever commands were passed in (if any). This allows us # to set this script to ENTRYPOINT while still executing the default CMD. exec "$@" EOF chmod +x /usr/local/share/docker-init.sh -chown ${USERNAME}:root /usr/local/share/docker-init.sh +chown ${USERNAME}:root /usr/local/share/docker-init.sh \ No newline at end of file diff --git a/.devcontainer/library-scripts/git-lfs-debian.sh b/.devcontainer/library-scripts/git-lfs-debian.sh new file mode 100644 index 00000000000..dd9e7022065 --- /dev/null +++ b/.devcontainer/library-scripts/git-lfs-debian.sh @@ -0,0 +1,194 @@ +#!/usr/bin/env bash +#------------------------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information. +#------------------------------------------------------------------------------------------------------------- +# +# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/git-lfs.md +# Maintainer: The VS Code and Codespaces Teams +# +# Syntax: ./git-lfs-debian.sh [version] + +GIT_LFS_VERSION=${1:-"latest"} +GIT_LFS_ARCHIVE_GPG_KEY_URI="https://packagecloud.io/github/git-lfs/gpgkey" +GIT_LFS_ARCHIVE_ARCHITECTURES="amd64" +GIT_LFS_ARCHIVE_VERSION_CODENAMES="stretch buster bullseye bionic focal" +GIT_LFS_CHECKSUM_GPG_KEYS="0x88ace9b29196305ba9947552f1ba225c0223b187 0x86cd3297749375bcf8206715f54fe648088335a9 0xaa3b3450295830d2de6db90caba67be5a5795889" +GPG_KEY_SERVERS="keyserver hkp://keyserver.ubuntu.com:80 +keyserver hkps://keys.openpgp.org +keyserver hkp://keyserver.pgp.com" + +set -e + +if [ "$(id -u)" -ne 0 ]; then + echo -e 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.' + exit 1 +fi + +# Get central common setting +get_common_setting() { + if [ "${common_settings_file_loaded}" != "true" ]; then + curl -sfL "https://aka.ms/vscode-dev-containers/script-library/settings.env" 2>/dev/null -o /tmp/vsdc-settings.env || echo "Could not download settings file. Skipping." + common_settings_file_loaded=true + fi + if [ -f "/tmp/vsdc-settings.env" ]; then + local multi_line="" + if [ "$2" = "true" ]; then multi_line="-z"; fi + local result="$(grep ${multi_line} -oP "$1=\"?\K[^\"]+" /tmp/vsdc-settings.env | tr -d '\0')" + if [ ! -z "${result}" ]; then declare -g $1="${result}"; fi + fi + echo "$1=${!1}" +} + +# Figure out correct version of a three part version number is not passed +find_version_from_git_tags() { + local variable_name=$1 + local requested_version=${!variable_name} + if [ "${requested_version}" = "none" ]; then return; fi + local repository=$2 + local prefix=${3:-"tags/v"} + local separator=${4:-"."} + local last_part_optional=${5:-"false"} + if [ "$(echo "${requested_version}" | grep -o "." | wc -l)" != "2" ]; then + local escaped_separator=${separator//./\\.} + local last_part + if [ "${last_part_optional}" = "true" ]; then + last_part="(${escaped_separator}[0-9]+)?" + else + last_part="${escaped_separator}[0-9]+" + fi + local regex="${prefix}\\K[0-9]+${escaped_separator}[0-9]+${last_part}$" + local version_list="$(git ls-remote --tags ${repository} | grep -oP "${regex}" | tr -d ' ' | tr "${separator}" "." | sort -rV)" + if [ "${requested_version}" = "latest" ] || [ "${requested_version}" = "current" ] || [ "${requested_version}" = "lts" ]; then + declare -g ${variable_name}="$(echo "${version_list}" | head -n 1)" + else + set +e + declare -g ${variable_name}="$(echo "${version_list}" | grep -E -m 1 "^${requested_version//./\\.}([\\.\\s]|$)")" + set -e + fi + fi + if [ -z "${!variable_name}" ] || ! echo "${version_list}" | grep "^${!variable_name//./\\.}$" > /dev/null 2>&1; then + echo -e "Invalid ${variable_name} value: ${requested_version}\nValid values:\n${version_list}" >&2 + exit 1 + fi + echo "${variable_name}=${!variable_name}" +} + +# Import the specified key in a variable name passed in as +receive_gpg_keys() { + get_common_setting $1 + local keys=${!1} + get_common_setting GPG_KEY_SERVERS true + + # Use a temporary locaiton for gpg keys to avoid polluting image + export GNUPGHOME="/tmp/tmp-gnupg" + mkdir -p ${GNUPGHOME} + chmod 700 ${GNUPGHOME} + echo -e "disable-ipv6\n${GPG_KEY_SERVERS}" > ${GNUPGHOME}/dirmngr.conf + # GPG key download sometimes fails for some reason and retrying fixes it. + local retry_count=0 + local gpg_ok="false" + set +e + until [ "${gpg_ok}" = "true" ] || [ "${retry_count}" -eq "5" ]; + do + echo "(*) Downloading GPG key..." + ( echo "${keys}" | xargs -n 1 gpg --recv-keys) 2>&1 && gpg_ok="true" + if [ "${gpg_ok}" != "true" ]; then + echo "(*) Failed getting key, retring in 10s..." + (( retry_count++ )) + sleep 10s + fi + done + set -e + if [ "${gpg_ok}" = "false" ]; then + echo "(!) Failed to get gpg key." + exit 1 + fi +} + +# Function to run apt-get if needed +apt_get_update_if_needed() +{ + if [ ! -d "/var/lib/apt/lists" ] || [ "$(ls /var/lib/apt/lists/ | wc -l)" = "0" ]; then + echo "Running apt-get update..." + apt-get update + else + echo "Skipping apt-get update." + fi +} + +# Checks if packages are installed and installs them if not +check_packages() { + if ! dpkg -s "$@" > /dev/null 2>&1; then + apt_get_update_if_needed + apt-get -y install --no-install-recommends "$@" + fi +} + +install_using_apt() { + # Soft version matching + if [ "${GIT_LFS_VERSION}" != "latest" ] && [ "${GIT_LFS_VERSION}" != "lts" ] && [ "${GIT_LFS_VERSION}" != "stable" ]; then + find_version_from_git_tags GIT_LFS_VERSION "https://github.com/git-lfs/git-lfs" + version_suffix="=${GIT_LFS_VERSION}" + else + version_suffix="" + fi + # Install + get_common_setting GIT_LFS_ARCHIVE_GPG_KEY_URI + curl -sSL "${GIT_LFS_ARCHIVE_GPG_KEY_URI}" | gpg --dearmor > /usr/share/keyrings/gitlfs-archive-keyring.gpg + echo -e "deb [arch=${architecture} signed-by=/usr/share/keyrings/gitlfs-archive-keyring.gpg] https://packagecloud.io/github/git-lfs/${ID} ${VERSION_CODENAME} main\ndeb-src [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/gitlfs-archive-keyring.gpg] https://packagecloud.io/github/git-lfs/${ID} ${VERSION_CODENAME} main" > /etc/apt/sources.list.d/git-lfs.list + + if ! (apt-get update && apt-get install -yq git-lfs${version_suffix}); then + rm -f /etc/apt/sources.list.d/git-lfs.list + return 1 + fi + + git-lfs install --skip-repo +} + +install_using_github() { + echo "(*) No apt package for ${VERSION_CODENAME} ${architecture}. Installing manually." + mkdir -p /tmp/git-lfs + cd /tmp/git-lfs + find_version_from_git_tags GIT_LFS_VERSION "https://github.com/git-lfs/git-lfs" + git_lfs_filename="git-lfs-linux-${architecture}-v${GIT_LFS_VERSION}.tar.gz" + curl -sSL -o "${git_lfs_filename}" "https://github.com/git-lfs/git-lfs/releases/download/v${GIT_LFS_VERSION}/${git_lfs_filename}" + # Verify file + curl -sSL -o "sha256sums.asc" "https://github.com/git-lfs/git-lfs/releases/download/v${GIT_LFS_VERSION}/sha256sums.asc" + receive_gpg_keys GIT_LFS_CHECKSUM_GPG_KEYS + gpg -q --decrypt "sha256sums.asc" > sha256sums + sha256sum --ignore-missing -c "sha256sums" + # Extract and install + tar xf "${git_lfs_filename}" -C . + ./install.sh + rm -rf /tmp/git-lfs /tmp/tmp-gnupg +} + +export DEBIAN_FRONTEND=noninteractive + +# Install git, curl, gpg, dirmngr and debian-archive-keyring if missing +. /etc/os-release +check_packages curl ca-certificates gnupg2 dirmngr apt-transport-https +if ! type git > /dev/null 2>&1; then + apt_get_update_if_needed + apt-get -y install --no-install-recommends git +fi +if [ "${ID}" = "debian" ]; then + check_packages debian-archive-keyring +fi + +# Install Git LFS +echo "Installing Git LFS..." +architecture="$(dpkg --print-architecture)" +if [[ "${GIT_LFS_ARCHIVE_ARCHITECTURES}" = *"${architecture}"* ]] && [[ "${GIT_LFS_ARCHIVE_VERSION_CODENAMES}" = *"${VERSION_CODENAME}"* ]]; then + install_using_apt || use_github="true" +else + use_github="true" +fi + +# If no archive exists or apt install fails, try direct from github +if [ "${use_github}" = "true" ]; then + install_using_github +fi + +echo "Done!" \ No newline at end of file diff --git a/.dockerignore b/.dockerignore index a48cc639476..096697b3f7c 100644 --- a/.dockerignore +++ b/.dockerignore @@ -4,3 +4,4 @@ !gatsby*.js !package*.json !requirements-ci.txt +!install_template diff --git a/docker/docker-compose.install-template.yaml b/docker/docker-compose.install-template.yaml new file mode 100644 index 00000000000..b3d5c29b1bb --- /dev/null +++ b/docker/docker-compose.install-template.yaml @@ -0,0 +1,20 @@ +version: "3.8" + +services: + install-docs-template-renderer: + build: + context: ../ + dockerfile: docker/images/Dockerfile.install-template + image: edb/docs-install-template + container_name: docs-install-template + hostname: docs-install-template + command: sh -c "npm i && node main.mjs" + volumes: + - ../install_template/config.yaml:/app/config.yaml:ro + - ../install_template/main.mjs:/app/main.mjs:ro + - ../install_template/deploy.mjs:/app/deploy.mjs:ro + - ../install_template/package-lock.json:/app/package-lock.json + - ../install_template/package.json:/app/package.json + - ../install_template/templates:/app/templates:ro + - ../install_template/renders:/app/renders + - ../product_docs/docs:/app/product_docs/docs diff --git a/docker/images/Dockerfile.install-template b/docker/images/Dockerfile.install-template new file mode 100644 index 00000000000..a95aa5e974a --- /dev/null +++ b/docker/images/Dockerfile.install-template @@ -0,0 +1,15 @@ +FROM node:14-alpine as base + +RUN npm install -g npm@7 +WORKDIR /app + + +FROM base as dependencies + +COPY install_template/package*.json ./ +RUN npm i + + +FROM base as renderer + +COPY --from=dependencies /app/node_modules /app/node_modules diff --git a/install_template/.gitignore b/install_template/.gitignore new file mode 100644 index 00000000000..a7b7307161e --- /dev/null +++ b/install_template/.gitignore @@ -0,0 +1,5 @@ +node_modules/ +# when ready to go live (before merging into develop) then uncomment this line and remove renders (and also add logic to copy these files to their intended destination) +renders/* +!renders/.gitkeep +.DS_Store diff --git a/install_template/.prettierrc.json b/install_template/.prettierrc.json new file mode 100644 index 00000000000..bf357fbbc08 --- /dev/null +++ b/install_template/.prettierrc.json @@ -0,0 +1,3 @@ +{ + "trailingComma": "all" +} diff --git a/install_template/README.md b/install_template/README.md new file mode 100644 index 00000000000..3ec6c4879f2 --- /dev/null +++ b/install_template/README.md @@ -0,0 +1,109 @@ +# Install Docs Templates + +This script allows the generation of product instalation docs for many different product versions and platforms with a minimum of duplicated copy. [Nunjucks](https://mozilla.github.io/nunjucks/) is used as our templating engine. + +## Quick Start + +The following commands can be run from the Docs project directory. + +- `npm run install-docs:build` — Renders the templates and generates the final install doc files. +- `npm run install-docs:deploy` — Deploys the final install doc files to their final location. +- `npm run install-docs:rebuild-docker-image` — Rebuilds the docker container used to render templates. + +## Configuration + +The docs to be generated are defined in `config.yaml`. This file lists out all of the products to generate docs for, the platforms that product supports, and the supported versions for each platform. + +When generating docs, this script will look for templates in `templates/products/[product-name]/`, where product name is all lower case, and spaces have been replaced with dashes. It will look for template files with names in the format below. It will use the first template found in the order below: + +1. `v{product version}_{platform name}_{platform architecture}.njk` + e.g. for EDB postgres advanced server 13 on centos 7 for x86_64, it would check for a file called `v13_centos-7_x86_64.njk` + +1. `v{product version}_{platform name}.njk` + e.g. for EDB postgres advanced server 13 on centos 7 for x86_64, it would check for a file called `v13_centos-7.njk` + +1. `{platform name}_{platform architecture}.njk` + e.g. for EDB postgres advanced server 13 on centos 7 for x86_64, it would check for a file called `centos-7_x86_64.njk` + +1. `{platform name}.njk` + e.g. for EDB postgres advanced server 13 on centos 7 for x86_64, it would check for a file called `centos-7.njk` + +## Writing Templates + +We are using Nunjucks as the templating engine, which is a javascript implementation of Jinja. + +- [Nunjucks templating documentation](https://mozilla.github.io/nunjucks/templating.html) +- [Jinja templating documentation](https://jinja.palletsprojects.com/en/3.0.x/templates/) — most of this applies to nunjucks as well, and it is more detailed + +Context based on the config will be passed in automatically. The following can be accessed from within templates: + +- `product.name` — the name of the product we are rendering a template for. e.g. "EDB Postgres Advanced Server" +- `product.version` — the version of the product we are rendering a template for. e.g. "13" +- `platform.name` — the name of the platform we are rendering a template for. e.g. "CentOS 8" +- `platform.arch` — the architecture of the platform we are rendering a template for. e.g. "x86_64" + +### Template Structure + +After a template file is found, no rules are enforced on how that template should behave. That said, templates for EPAS docs have already been created and a general structure has been provided as an example of how future templates could be implemented. Here is an overview of how these templates are currently working + +#### `/templates/platformBase/base.njk` + +- All templates ultimitaly should inherit from this file. This is a good place to write copy that needs to be shared by all docs, regardless of the product being installed +- 3 blocks are currently available: + - `prerequisites` — This is where information like adding EDB repos will go + - `installCommand` — This is where the command to actually install the product will go + - `postinstall` — This is where commands like starting the EPAS server will go + +#### `/templates/platformBase/[platform name].njk` + +- These files are largely reposible for setting up the `prerequisites` and `installCommand` blocks +- Currently, they rely on a `packageName` macro to be set by a child template. This macro is being used in the `installCommand` block. +- You will notice there are no Ubuntu templates in the platformBase folder. This is because install instructions were the same as Debian 10, and so only the `debian-10.njk` file was created to reduce duplication. If Ubuntu specific instructions are needed, new template files could be created which inherit from `debian-10.njk`. +- The `centos-7.njk` template contains a conditional to include ppc64le specific instructions. To display these instructions, add `{% set includePPC = true %}` to a child template + +#### `/templates/products/edb-postgres-advanced-server/base.njk` + +- All EPAS templates inherit from this file at some point. This is a good place to store copy which is shared by all EPAS docs. +- This template will choose a `platformBase` template to inherit from based on the value of `platformBaseTemplate`, which must be set by a child template. +- the `packageName` macro used by the `platformBase` templates can be found in this template +- a `postinstall` block containing copy shared by all of the EPAS docs can be found here. That said, this block is extended by some child templates. + +### Template techniques + +Nunjucks offers many tools that we can use to minimize repetition and increase the readability of templates. Which to use depends on circumstances. + +#### Placeholder blocks + +[Template inheritance](https://mozilla.github.io/nunjucks/templating.html#template-inheritance) is our primary method to structure templates. If we know that a bit of text only appears in a certain subset of rendered documentation, we can use an empty placeholder block to define where that text goes. Then in the appropriate child template, we can override the placeholder block. + +Note that the definition should be filled in at the most general template possible. So if a block is specific to, say, BDR, we should include the definition in the BDR product template. Or, if the block is specific to a single version of RHEL, it would be defined in that version's template. It's also possible, to redefine a placeholder block again if there is an exception to the exception. You can even revert back to an empty block, if needed. + +Placeholder blocks are convenient and self-documenting, but they do depend on having the right inheritance structure in place. It's sometimes necessary to add a level of inheritance to create the appropriate abstraction layers. If you find yourself repeating the same block customization, you should evaluate whether the inheritance structure is right. Alternatively, you might need to use another technique. + +#### Include other templates + +When there are pieces of text that need to be repeated, but don't have a place in the existing structure, consider using [the `include` tag](https://mozilla.github.io/nunjucks/templating.html#include). For instance, we might want to includes a disclaimer for platforms nearing the end of our support cycle. Rather than repeat that warning in each affected template, we could put the text in a new template that we include when needed. + +In Nunjucks, `include` doesn't work like a pre-processor (inserting code before rendering). Instead, included templates are rendered and the results are inserted. That means you can't use `include` to override a block in the calling template and blocks defined in the calling template aren't visible to the included template. Included templates should be considered self-contained snippets. + +#### Macros + +Sometimes a chunk of text varies only by a few discrete variables. In that case, a [macro](https://mozilla.github.io/nunjucks/templating.html#macro) might be in order. We currently have two macros in `/templates/platformBase/_shared.njk`: + +1. `centosRepositoryConfiguration(packageManager, epelRepo)` +2. `centosInstallCommand(packageManager, packageName)` + +When that file is [imported](https://mozilla.github.io/nunjucks/templating.html#import) (not included) in another template, those macros can be used to insert the proper instructions for configuring the repository and installing the package. By using a few variables (`packageManager`, `epelRepo` and `packageName`), we can generate many different combinations of instructions from a single source. + +Macros can be self-documenting and avoid [action-at-a-distance problems](https://en.wikipedia.org/wiki/Action_at_a_distance_(computer_programming)). If you call a macro, it's easier to know what you are going to get in the render. + +#### Conditionals + +We also use global variables to trigger conditionals: + +1. `templates/platformBase/centos-7.njk` uses the value of `includePPC` to determine whether to install [Advance Toolchain](https://github.com/advancetoolchain/advance-toolchain). +2. `templates/platformBase/rhel-7-or-ol-7.njk` uses the value of `includeLOCAL` to trigger an option to create a local repository. + +For small template systems, this system works well enough. But as the number of templates increases, this becomes harder to understand. In this case, we need to search through the template files to find out where the variables are being used. Fortunately, they are used just once, but it's not hard to imagine multiple (and exclusive) conditionals that are hard to read, modify and debug. + +It's almost always better to use one of the other techniques than fall back on conditionals triggered by global variables. diff --git a/install_template/config.yaml b/install_template/config.yaml new file mode 100644 index 00000000000..7dafc8fa689 --- /dev/null +++ b/install_template/config.yaml @@ -0,0 +1,577 @@ +products: + - name: EDB JDBC Connector + platforms: + - name: CentOS 7 + arch: x86_64 + supported versions: [42.x.x] + - name: CentOS 7 + arch: ppc64le + supported versions: [42.x.x] + - name: AlmaLinux 8 or Rocky Linux 8 + arch: x86_64 + supported versions: [42.x.x] + - name: RHEL 7 or OL 7 + arch: x86_64 + supported versions: [42.x.x] + - name: RHEL 7 or OL 7 + arch: ppc64le + supported versions: [42.x.x] + - name: RHEL 8 or OL 8 + arch: x86_64 + supported versions: [42.x.x] + - name: Ubuntu 18.04 or Debian 9 + arch: x86_64 + supported versions: [42.x.x] + - name: Ubuntu 20.04 or Debian 10 + arch: x86_64 + supported versions: [42.x.x] + - name: SLES 12 + arch: x86_64 + supported versions: [42.3.3.1] + - name: SLES 12 + arch: ppc64le + supported versions: [42.3.3.1] + - name: SLES 15 + arch: x86_64 + supported versions: [42.3.3.1] + - name: SLES 15 + arch: ppc64le + supported versions: [42.3.3.1] + - name: Migration Toolkit + platforms: + - name: RHEL 8 or OL 8 + arch: x86_64 + supported versions: [55] + - name: AlmaLinux 8 or Rocky Linux 8 + arch: x86_64 + supported versions: [55] + - name: RHEL 7 or OL 7 + arch: x86_64 + supported versions: [55] + - name: CentOS 7 + arch: x86_64 + supported versions: [55] + - name: SLES 15 + arch: x86_64 + supported versions: [55] + - name: SLES 12 + arch: ppc64le + supported versions: [55] + - name: Ubuntu 20.04 or Debian 10 + arch: x86_64 + supported versions: [55] + - name: Ubuntu 18.04 or Debian 9 + arch: x86_64 + supported versions: [55] + - name: RHEL 8 or OL 8 + arch: ppc64le + supported versions: [55] + - name: RHEL 7 or OL 7 + arch: ppc64le + supported versions: [55] + - name: SLES 15 + arch: ppc64le + supported versions: [55] + - name: SLES 12 + arch: x86_64 + supported versions: [55] + - name: EDB OCL Connector + platforms: + - name: CentOS 7 + arch: x86_64 + supported versions: [14.1.0.1] + - name: CentOS 7 + arch: ppc64le + supported versions: [14.1.0.1] + - name: AlmaLinux 8 or Rocky Linux 8 + arch: x86_64 + supported versions: [14.1.0.1] + - name: RHEL 7 or OL 7 + arch: x86_64 + supported versions: [14.1.0.1] + - name: RHEL 7 or OL 7 + arch: ppc64le + supported versions: [14.1.0.1] + - name: RHEL 8 or OL 8 + arch: x86_64 + supported versions: [14.1.0.1] + - name: Ubuntu 18.04 or Debian 9 + arch: x86_64 + supported versions: [14.1.0.1] + - name: Ubuntu 20.04 or Debian 10 + arch: x86_64 + supported versions: [14.1.0.1] + - name: SLES 12 + arch: x86_64 + supported versions: [14.1.0.1] + - name: SLES 12 + arch: ppc64le + supported versions: [14.1.0.1] + - name: SLES 15 + arch: x86_64 + supported versions: [14.1.0.1] + - name: SLES 15 + arch: ppc64le + supported versions: [14.1.0.1] + - name: EDB ODBC Connector + platforms: + - name: CentOS 7 + arch: x86_64 + supported versions: [13.1.0.2] + - name: CentOS 7 + arch: ppc64le + supported versions: [13.1.0.2] + - name: AlmaLinux 8 or Rocky Linux 8 + arch: x86_64 + supported versions: [13.1.0.2] + - name: RHEL 7 or OL 7 + arch: x86_64 + supported versions: [13.1.0.2] + - name: RHEL 7 or OL 7 + arch: ppc64le + supported versions: [13.1.0.2] + - name: RHEL 8 or OL 8 + arch: x86_64 + supported versions: [13.1.0.2] + - name: Ubuntu 18.04 or Debian 9 + arch: x86_64 + supported versions: [13.1.0.2] + - name: Ubuntu 20.04 or Debian 10 + arch: x86_64 + supported versions: [13.1.0.2] + - name: SLES 12 + arch: x86_64 + supported versions: [13.1.0.2] + - name: SLES 12 + arch: ppc64le + supported versions: [13.1.0.2] + - name: SLES 15 + arch: x86_64 + supported versions: [13.1.0.2] + - name: SLES 15 + arch: ppc64le + supported versions: [13.1.0.2] + - name: EDB pgBouncer + platforms: + - name: CentOS 7 + arch: x86_64 + supported versions: [1.14, 1.15, 1.16] + - name: CentOS 7 + arch: ppc64le + supported versions: [1.14, 1.15, 1.16] + - name: AlmaLinux 8 or Rocky Linux 8 + arch: x86_64 + supported versions: [1.14, 1.15, 1.16] + - name: RHEL 7 or OL 7 + arch: x86_64 + supported versions: [1.14, 1.15, 1.16] + - name: RHEL 7 or OL 7 + arch: ppc64le + supported versions: [1.14, 1.15, 1.16] + - name: RHEL 8 or OL 8 + arch: x86_64 + supported versions: [1.14, 1.15, 1.16] + - name: Ubuntu 18.04 or Debian 9 + arch: x86_64 + supported versions: [1.14, 1.15, 1.16] + - name: Ubuntu 20.04 or Debian 10 + arch: x86_64 + supported versions: [1.14, 1.15, 1.16] + - name: SLES 12 + arch: x86_64 + supported versions: [1.16] + - name: SLES 12 + arch: ppc64le + supported versions: [1.16] + - name: SLES 15 + arch: x86_64 + supported versions: [1.16] + - name: SLES 15 + arch: ppc64le + supported versions: [1.16] + - name: EDB PgpoolII + platforms: + - name: CentOS 7 + arch: x86_64 + supported versions: [4.0, 4.1, 4.2, 4.3] + - name: CentOS 7 + arch: ppc64le + supported versions: [4.0, 4.1, 4.2, 4.3] + - name: AlmaLinux 8 or Rocky Linux 8 + arch: x86_64 + supported versions: [4.0, 4.1, 4.2, 4.3] + - name: RHEL 7 or OL 7 + arch: x86_64 + supported versions: [4.0, 4.1, 4.2, 4.3] + - name: RHEL 7 or OL 7 + arch: ppc64le + supported versions: [4.0, 4.1, 4.2, 4.3] + - name: RHEL 8 or OL 8 + arch: x86_64 + supported versions: [4.0, 4.1, 4.2, 4.3] + - name: Ubuntu 18.04 or Debian 9 + arch: x86_64 + supported versions: [4.0, 4.1, 4.2, 4.3] + - name: Ubuntu 20.04 or Debian 10 + arch: x86_64 + supported versions: [4.0, 4.1, 4.2, 4.3] + - name: SLES 12 + arch: x86_64 + supported versions: [4.3] + - name: SLES 12 + arch: ppc64le + supported versions: [4.3] + - name: SLES 15 + arch: x86_64 + supported versions: [4.3] + - name: SLES 15 + arch: ppc64le + supported versions: [4.3] + - name: EDB PgpoolII Extensions + platforms: + - name: CentOS 7 + arch: x86_64 + supported versions: [4.0, 4.1, 4.2, 4.3] + - name: CentOS 7 + arch: ppc64le + supported versions: [4.0, 4.1, 4.2, 4.3] + - name: AlmaLinux 8 or Rocky Linux 8 + arch: x86_64 + supported versions: [4.0, 4.1, 4.2, 4.3] + - name: RHEL 7 or OL 7 + arch: x86_64 + supported versions: [4.0, 4.1, 4.2, 4.3] + - name: RHEL 7 or OL 7 + arch: ppc64le + supported versions: [4.0, 4.1, 4.2, 4.3] + - name: RHEL 8 or OL 8 + arch: x86_64 + supported versions: [4.0, 4.1, 4.2, 4.3] + - name: Ubuntu 18.04 or Debian 9 + arch: x86_64 + supported versions: [4.0, 4.1, 4.2, 4.3] + - name: Ubuntu 20.04 or Debian 10 + arch: x86_64 + supported versions: [4.0, 4.1, 4.2, 4.3] + - name: SLES 12 + arch: x86_64 + supported versions: [4.3] + - name: SLES 12 + arch: ppc64le + supported versions: [4.3] + - name: SLES 15 + arch: x86_64 + supported versions: [4.3] + - name: SLES 15 + arch: ppc64le + supported versions: [4.3] + - name: EDB Postgres Advanced Server + platforms: + - name: CentOS 7 + arch: x86_64 + supported versions: [10, 11, 12, 13, 14] + - name: CentOS 7 + arch: ppc64le + supported versions: [10, 11, 12, 13, 14] + - name: AlmaLinux 8 or Rocky Linux 8 + arch: x86_64 + supported versions: [11, 12, 13, 14] + - name: RHEL 7 or OL 7 + arch: x86_64 + supported versions: [9.6, 10, 11, 12, 13, 14] + - name: RHEL 7 or OL 7 + arch: ppc64le + supported versions: [9.6, 10, 11, 12, 13, 14] + - name: RHEL 7 or OL 7 + arch: local + supported versions: [9.6, 10, 11, 12, 13, 14] + - name: RHEL 8 or OL 8 + arch: x86_64 + supported versions: [11, 12, 13, 14] + - name: RHEL 8 or OL 8 + arch: Linux on IBM Power (ppc64le) + supported versions: [11, 12, 13, 14] + - name: Ubuntu 18.04 or Debian 9 + arch: x86_64 + supported versions: [11, 12, 13, 14] + - name: Ubuntu 20.04 or Debian 10 + arch: x86_64 + supported versions: [13, 14] + - name: SLES 12 + arch: x86_64 + supported versions: [14] + - name: SLES 15 + arch: x86_64 + supported versions: [14] + - name: SLES 12 + arch: ppc64le + supported versions: [14] + - name: SLES 15 + arch: ppc64le + supported versions: [14] + - name: EDB*Plus + platforms: + - name: CentOS 7 + arch: x86_64 + supported versions: [9.6, 11, 12, 13, 14] + - name: CentOS 7 + arch: ppc64le + supported versions: [9.6, 11, 12, 13, 14] + - name: AlmaLinux 8 or Rocky Linux 8 + arch: x86_64 + supported versions: [9.6, 11, 12, 13, 14] + - name: RHEL 7 or OL 7 + arch: x86_64 + supported versions: [9.6, 11, 12, 13, 14] + - name: RHEL 7 or OL 7 + arch: ppc64le + supported versions: [9.6, 11, 12, 13, 14] + - name: RHEL 8 or OL 8 + arch: x86_64 + supported versions: [9.6, 11, 12, 13, 14] + - name: Ubuntu 18.04 or Debian 9 + arch: x86_64 + supported versions: [9.6, 11, 12, 13, 14] + - name: Ubuntu 20.04 or Debian 10 + arch: x86_64 + supported versions: [9.6, 11, 12, 13, 14] + - name: SLES 12 + arch: x86_64 + supported versions: [14] + - name: SLES 12 + arch: ppc64le + supported versions: [14] + - name: SLES 15 + arch: x86_64 + supported versions: [14] + - name: SLES 15 + arch: ppc64le + supported versions: [14] + - name: Failover Manager + platforms: + - name: CentOS 7 + arch: x86_64 + supported versions: [3.10, 4.0, 4.1, 4.2, 4.3, 4.4] + - name: CentOS 7 + arch: ppc64le + supported versions: [3.10, 4.0, 4.1, 4.2, 4.3, 4.4] + - name: AlmaLinux 8 or Rocky Linux 8 + arch: x86_64 + supported versions: [3.10, 4.0, 4.1, 4.2, 4.3, 4.4] + - name: RHEL 7 or OL 7 + arch: x86_64 + supported versions: [3.10, 4.0, 4.1, 4.2, 4.3, 4.4] + - name: RHEL 7 or OL 7 + arch: ppc64le + supported versions: [3.10, 4.0, 4.1, 4.2, 4.3, 4.4] + - name: RHEL 8 or OL 8 + arch: x86_64 + supported versions: [3.10, 4.0, 4.1, 4.2, 4.3, 4.4] + - name: Ubuntu 18.04 or Debian 9 + arch: x86_64 + supported versions: [3.10, 4.0, 4.1, 4.2, 4.3, 4.4] + - name: Ubuntu 20.04 or Debian 10 + arch: x86_64 + supported versions: [3.10, 4.0, 4.1, 4.2, 4.3, 4.4] + - name: SLES 12 + arch: x86_64 + supported versions: [4.4] + - name: SLES 12 + arch: ppc64le + supported versions: [4.4] + - name: SLES 15 + arch: x86_64 + supported versions: [4.4] + - name: SLES 15 + arch: ppc64le + supported versions: [4.4] + - name: Hadoop Foreign Data Wrapper + platforms: + - name: CentOS 7 + arch: x86_64 + supported versions: [2] + - name: CentOS 7 + arch: ppc64le + supported versions: [2] + - name: AlmaLinux 8 or Rocky Linux 8 + arch: x86_64 + supported versions: [2] + - name: RHEL 7 or OL 7 + arch: x86_64 + supported versions: [2] + - name: RHEL 7 or OL 7 + arch: ppc64le + supported versions: [2] + - name: RHEL 8 or OL 8 + arch: x86_64 + supported versions: [2] + - name: Ubuntu 18.04 or Debian 9 + arch: x86_64 + supported versions: [2] + - name: Ubuntu 20.04 or Debian 10 + arch: x86_64 + supported versions: [2] + - name: SLES 12 + arch: x86_64 + supported versions: [2] + - name: SLES 12 + arch: ppc64le + supported versions: [2] + - name: SLES 15 + arch: x86_64 + supported versions: [2] + - name: SLES 15 + arch: ppc64le + supported versions: [2] + - name: MongoDB Foreign Data Wrapper + platforms: + - name: CentOS 7 + arch: x86_64 + supported versions: [11, 12, 13, 14] + - name: CentOS 7 + arch: ppc64le + supported versions: [11, 12, 13, 14] + - name: AlmaLinux 8 or Rocky Linux 8 + arch: x86_64 + supported versions: [11, 12, 13, 14] + - name: RHEL 7 or OL 7 + arch: x86_64 + supported versions: [11, 12, 13, 14] + - name: RHEL 7 or OL 7 + arch: ppc64le + supported versions: [11, 12, 13, 14] + - name: RHEL 8 or OL 8 + arch: x86_64 + supported versions: [11, 12, 13, 14] + - name: Ubuntu 18.04 or Debian 9 + arch: x86_64 + supported versions: [11, 12, 13, 14] + - name: Ubuntu 20.04 or Debian 10 + arch: x86_64 + supported versions: [11, 12, 13, 14] + - name: SLES 12 + arch: x86_64 + supported versions: [14] + - name: SLES 12 + arch: ppc64le + supported versions: [14] + - name: SLES 15 + arch: x86_64 + supported versions: [14] + - name: SLES 15 + arch: ppc64le + supported versions: [14] + - name: MySQL Foreign Data Wrapper + platforms: + - name: CentOS 7 + arch: x86_64 + supported versions: [11, 12, 13, 14] + - name: CentOS 7 + arch: ppc64le + supported versions: [11, 12, 13, 14] + - name: AlmaLinux 8 or Rocky Linux 8 + arch: x86_64 + supported versions: [11, 12, 13, 14] + - name: RHEL 7 or OL 7 + arch: x86_64 + supported versions: [11, 12, 13, 14] + - name: RHEL 7 or OL 7 + arch: ppc64le + supported versions: [11, 12, 13, 14] + - name: RHEL 8 or OL 8 + arch: x86_64 + supported versions: [11, 12, 13, 14] + - name: Ubuntu 18.04 or Debian 9 + arch: x86_64 + supported versions: [11, 12, 13, 14] + - name: Ubuntu 20.04 or Debian 10 + arch: x86_64 + supported versions: [11, 12, 13, 14] + - name: SLES 12 + arch: x86_64 + supported versions: [14] + - name: SLES 12 + arch: ppc64le + supported versions: [14] + - name: SLES 15 + arch: x86_64 + supported versions: [14] + - name: SLES 15 + arch: ppc64le + supported versions: [14] + - name: PostGIS + platforms: + - name: CentOS 7 + arch: x86_64 + supported versions: [11, 12, 13, 14] + - name: CentOS 7 + arch: ppc64le + supported versions: [11, 12, 13, 14] + - name: AlmaLinux 8 or Rocky Linux 8 + arch: x86_64 + supported versions: [11, 12, 13, 14] + - name: RHEL 7 or OL 7 + arch: x86_64 + supported versions: [11, 12, 13, 14] + - name: RHEL 7 or OL 7 + arch: ppc64le + supported versions: [11, 12, 13, 14] + - name: RHEL 8 or OL 8 + arch: x86_64 + supported versions: [11, 12, 13, 14] + - name: Ubuntu 18.04 or Debian 9 + arch: x86_64 + supported versions: [11, 12, 13, 14] + - name: Ubuntu 20.04 or Debian 10 + arch: x86_64 + supported versions: [11, 12, 13, 14] + - name: SLES 12 + arch: x86_64 + supported versions: [14] + - name: SLES 12 + arch: ppc64le + supported versions: [14] + - name: SLES 15 + arch: x86_64 + supported versions: [14] + - name: SLES 15 + arch: ppc64le + supported versions: [14] + - name: Postgres Enterprise Manager + platforms: + - name: CentOS 7 + arch: x86_64 + supported versions: [7, 8] + - name: CentOS 7 + arch: ppc64le + supported versions: [7, 8] + - name: AlmaLinux 8 or Rocky Linux 8 + arch: x86_64 + supported versions: [7, 8] + - name: RHEL 7 or OL 7 + arch: x86_64 + supported versions: [7, 8] + - name: RHEL 7 or OL 7 + arch: ppc64le + supported versions: [7, 8] + - name: RHEL 8 or OL 8 + arch: x86_64 + supported versions: [7, 8] + - name: Ubuntu 18.04 or Debian 9 + arch: x86_64 + supported versions: [7, 8] + - name: Ubuntu 20.04 or Debian 10 + arch: x86_64 + supported versions: [7, 8] + - name: SLES 12 + arch: x86_64 + supported versions: [8] + - name: SLES 15 + arch: x86_64 + supported versions: [8] + - name: SLES 12 + arch: ppc64le + supported versions: [8] + - name: SLES 15 + arch: ppc64le + supported versions: [8] diff --git a/install_template/deploy.mjs b/install_template/deploy.mjs new file mode 100644 index 00000000000..13aedc19376 --- /dev/null +++ b/install_template/deploy.mjs @@ -0,0 +1,261 @@ +import fs from "fs/promises"; +import path from "path"; +import { fileURLToPath } from "url"; +import nunjucks from "nunjucks"; +import yaml from "yaml"; +import isMatch from "lodash.ismatch"; + +nunjucks.configure("templates", { throwOnUndefined: true, autoescape: false }); + +// script takes one _optional_ parameter: the base directory to write output to. +// if not specified, defaults to ../product_docs/docs +// if relative (as is the default), this path is interpreted relative to the location of this script +const args = process.argv.slice(2); +const __dirname = path.dirname(fileURLToPath(import.meta.url)); +const destPath = path.resolve(__dirname, args[0] || "../product_docs/docs"); + +/** + * Loop through the config.yaml file and generate docs for every product/platform/supported version combination found. + * @returns void + */ +const run = async () => { + const config = yaml.parse( + await fs.readFile(path.resolve(__dirname, "config.yaml"), "utf8"), + ); + + let results = []; + + for (const product of config.products) { + for (const platform of product.platforms) { + for (const version of platform["supported versions"]) { + results.push(await moveDoc(product, platform, version)); + } + } + } + + for (const result of results.filter((r) => !!r.success)) + console.log(result.success); + for (const result of results.filter((r) => !!r.warn)) + console.warn(result.warn, result.context); + console.log( + `${ + results.filter((r) => r.note && /^Skipping/.test(r.note)).length + } files skipped`, + ); + + return; +}; + +/** + * Composes the code needed to copy a document for a product/platform/version combination. + * @param product The product name we are generating a template for + * @param platform The platform and architecture we are generating docs for (e.g. { name: Centos 7, arch: x86_64 }) + * @param version The version of the product to generate docs for + * @returns object {success: 'message', note: 'observation', warn: 'warning or error', context: {additional}} + */ +const moveDoc = async (product, platform, version) => { + /* + console.log( + `Copying install guide for ${product.name} ${version} on ${platform.name} ${platform.arch}`, + ); + */ + + const context = generateContext(product, platform, version); + + const product_stub = formatStringForFile(context.product.name); + + const srcFilename = + [ + product_stub, + context.product.version, + formatStringForFile(context.platform.name), + context.platform.arch, + ].join("_") + ".mdx"; + + const prefix = { + rhel_8_x86_64: "01", + other_linux8_x86_64: "02", + rhel_7_x86_64: "03", + centos_7_x86_64: "04", + sles_15_x86_64: "05", + sles_12_x86_64: "06", + ubuntu_20_deb10_x86_64: "07", + ubuntu_18_deb9_x86_64: "08", + rhel_8_ppc64le: "09", + rhel_7_ppc64le: "10", + sles_15_ppc64le: "11", + sles_12_ppc64le: "12", + }; + + switch (product_stub) { + case "hadoop-foreign-data-wrapper": + case "mongodb-foreign-data-wrapper": + case "mysql-foreign-data-wrapper": + prefix["sles_12_x86"] = "07"; + prefix["sles_12_x86_64"] = "07"; + prefix["rhel_8_ppc64le"] = "13"; + prefix["rhel_7_ppc64le"] = "15"; + prefix["sles_12_ppc64le"] = "19"; + prefix["sles_15_ppc64le"] = "17"; + break; + case "edb-ocl-connector": + prefix["sles_15_x86_64"] = "03"; + prefix["sles_12_x86_64"] = "04"; + prefix["sles_15_ppc64le"] = "09"; + prefix["sles_12_ppc64le"] = "10"; + break; + } + + const expand_arch = { + ppcle: "ibm_power_ppc64le", + x86: "x86_amd64", + x86_64: "x86_amd64", + ppc64le: "ibm_power_ppc64le", + }; + + const plat = [ + context.platform.name.toLowerCase().replace(/ /g, "_"), + context.platform.arch, + ].join("_"); + + const product_prefix = { + "failover-manager": "03", + "migration-toolkit": "05", + "hadoop-foreign-data-wrapper": "05", + "mongodb-foreign-data-wrapper": "04", + "mysql-foreign-data-wrapper": "04", + "edb-pgpoolii": "01", + "edb-pgpoolii-extensions": "pgpoolext", + postgis: "01a", + "edb-jdbc-connector": "04", + "edb-ocl-connector": "04", + "edb-odbc-connector": "03", + "edb-pgbouncer": "01", + }; + + const fmtArchPath = (ctx) => expand_arch[ctx.platform.arch]; + const fmtArchFilename = (ctx) => ctx.platform.arch.replace(/_?64/g, ""); + + // prettier-ignore + const destFilename = match(context, + when({product: {name: "Failover Manager", version: 4.4}, platform: {name: "SLES 12"}}, + (ctx) => `efm/4/03_installing_efm/${fmtArchPath(ctx)}/${prefix[plat]}_efm4_sles12_${fmtArchFilename(ctx)}.mdx`), + when({product: {name: "Failover Manager", version: 4.4}, platform: {name: "SLES 15"}}, + (ctx) => `efm/4/03_installing_efm/${fmtArchPath(ctx)}/${prefix[plat]}_efm4_sles15_${fmtArchFilename(ctx)}.mdx`), + when({product: {name: "Hadoop Foreign Data Wrapper"}, platform: {name: "SLES 12"}}, + (ctx) => `hadoop_data_adapter/2/05_installing_the_hadoop_data_adapter/${fmtArchPath(ctx)}/${prefix[plat]}_hadoop_sles12_${fmtArchFilename(ctx)}.mdx`), + when({product: {name: "Hadoop Foreign Data Wrapper"}, platform: {name: "SLES 15"}}, + (ctx) => `hadoop_data_adapter/2/05_installing_the_hadoop_data_adapter/${fmtArchPath(ctx)}/${prefix[plat]}_hadoop_sles15_${fmtArchFilename(ctx)}.mdx`), + when({product: {name: "EDB JDBC Connector"}, platform: {name: "SLES 12"}}, + (ctx) => `jdbc_connector/42.3.3.1/04_installing_and_configuring_the_jdbc_connector/01_installing_the_connector_with_an_rpm_package/${fmtArchPath(ctx)}/${prefix[plat]}_jdbc42_sles12_${fmtArchFilename(ctx)}.mdx`), + when({product: {name: "EDB JDBC Connector"}, platform: {name: "SLES 15"}}, + (ctx) => `jdbc_connector/42.3.3.1/04_installing_and_configuring_the_jdbc_connector/01_installing_the_connector_with_an_rpm_package/${fmtArchPath(ctx)}/${prefix[plat]}_jdbc42_sles15_${fmtArchFilename(ctx)}.mdx`), + when({product: {name: "Migration Toolkit"}, platform: {name: "SLES 12"}}, + (ctx) => `migration_toolkit/55/05_installing_mtk/install_on_linux/${fmtArchPath(ctx)}/${prefix[plat]}_mtk55_sles12_${fmtArchFilename(ctx)}.mdx`), + when({product: {name: "Migration Toolkit"}, platform: {name: "SLES 15"}}, + (ctx) => `migration_toolkit/55/05_installing_mtk/install_on_linux/${fmtArchPath(ctx)}/${prefix[plat]}_mtk55_sles15_${fmtArchFilename(ctx)}.mdx`), + when({product: {name: "MongoDB Foreign Data Wrapper", version: 14}, platform: {name: "SLES 12"}}, + (ctx) => `mongo_data_adapter/14/04_installing_the_mongo_data_adapter/${fmtArchPath(ctx)}/${prefix[plat]}_mongo_sles12_${fmtArchFilename(ctx)}.mdx`), + when({product: {name: "MongoDB Foreign Data Wrapper", version: 14}, platform: {name: "SLES 15"}}, + (ctx) => `mongo_data_adapter/14/04_installing_the_mongo_data_adapter/${fmtArchPath(ctx)}/${prefix[plat]}_mongo_sles15_${fmtArchFilename(ctx)}.mdx`), + when({product: {name: "MySQL Foreign Data Wrapper", version: 14}, platform: {name: "SLES 12"}}, + (ctx) => `mysql_data_adapter/14/04_installing_the_mysql_data_adapter/${fmtArchPath(ctx)}/${prefix[plat]}_mysql_sles12_${fmtArchFilename(ctx)}.mdx`), + when({product: {name: "MySQL Foreign Data Wrapper", version: 14}, platform: {name: "SLES 15"}}, + (ctx) => `mysql_data_adapter/14/04_installing_the_mysql_data_adapter/${fmtArchPath(ctx)}/${prefix[plat]}_mysql_sles15_${fmtArchFilename(ctx)}.mdx`), + when({product: {name: "EDB OCL Connector"}, platform: {name: "SLES 12"}}, + (ctx) => `ocl_connector/${ctx.product.version}/04_open_client_library/01_installing_and_configuring_the_ocl_connector/install_on_linux_using_edb_repo/${fmtArchPath(ctx)}/${prefix[plat]}_ocl_connector14_sles12_${fmtArchFilename(ctx)}.mdx`), + when({product: {name: "EDB OCL Connector"}, platform: {name: "SLES 15"}}, + (ctx) => `ocl_connector/${ctx.product.version}/04_open_client_library/01_installing_and_configuring_the_ocl_connector/install_on_linux_using_edb_repo/${fmtArchPath(ctx)}/${prefix[plat]}_ocl_connector14_sles15_${fmtArchFilename(ctx)}.mdx`), + when({product: {name: "EDB ODBC Connector"}, platform: {name: "SLES 12"}}, + (ctx) => `odbc_connector/13/03_installing_edb_odbc/01_installing_linux/${fmtArchPath(ctx)}/${prefix[plat]}_odbc13_sles12_${fmtArchFilename(ctx)}.mdx`), + when({product: {name: "EDB ODBC Connector"}, platform: {name: "SLES 15"}}, + (ctx) => `odbc_connector/13/03_installing_edb_odbc/01_installing_linux/${fmtArchPath(ctx)}/${prefix[plat]}_odbc13_sles15_${fmtArchFilename(ctx)}.mdx`), + when({product: {name: "EDB PgpoolII", version: 4.3}, platform: {name: "SLES 12"}}, + (ctx) => `pgpool/4.3/01_installing_and_configuring_the_pgpool-II/${fmtArchPath(ctx)}/${prefix[plat]}_pgpool_sles12_${fmtArchFilename(ctx)}.mdx`), + when({product: {name: "EDB PgpoolII", version: 4.3}, platform: {name: "SLES 15"}}, + (ctx) => `pgpool/4.3/01_installing_and_configuring_the_pgpool-II/${fmtArchPath(ctx)}/${prefix[plat]}_pgpool_sles15_${fmtArchFilename(ctx)}.mdx`), + when({product: {name: "EDB PgpoolII Extensions", version: 4.3}, platform: {name: "SLES 12"}}, + (ctx) => `pgpool/4.3/02_extensions/${fmtArchPath(ctx)}/${prefix[plat]}_pgpoolext_sles12_${fmtArchFilename(ctx)}.mdx`), + when({product: {name: "EDB PgpoolII Extensions", version: 4.3}, platform: {name: "SLES 15"}}, + (ctx) => `pgpool/4.3/02_extensions/${fmtArchPath(ctx)}/${prefix[plat]}_pgpoolext_sles15_${fmtArchFilename(ctx)}.mdx`), + when({product: {name: "PostGIS", version: 14}, platform: {name: "SLES 12"}}, + (ctx) => `postgis/14/01a_installing_postgis/installing_on_linux/${fmtArchPath(ctx)}/${prefix[plat]}_postgis_sles12_${fmtArchFilename(ctx)}.mdx`), + when({product: {name: "PostGIS", version: 14}, platform: {name: "SLES 15"}}, + (ctx) => `postgis/14/01a_installing_postgis/installing_on_linux/${fmtArchPath(ctx)}/${prefix[plat]}_postgis_sles15_${fmtArchFilename(ctx)}.mdx`), + ); + + function match(context, ...conditions) { + for (let test of conditions) { + const result = test(context); + if (result !== false && result !== null) return result; + } + return null; + } + + function when(pattern, resultFn) { + return (ctx) => isMatch(ctx, pattern) && resultFn(ctx); + } + + if (!destFilename) { + return { note: `Skipping (no mapping): ${srcFilename}`, context }; + } + + const src = path.resolve(__dirname, "renders", srcFilename); + const dest = path.resolve(__dirname, destPath, destFilename); + try { + await fs.mkdir(path.dirname(dest), { recursive: true }); + await fs.copyFile(src, dest); + return { success: `deployed ${src} to ${dest}` }; + } catch (err) { + return { + warn: err.toString(), + context: { + src, + dest, + }, + }; + } +}; + +/** + * Format a string into the format expected when used in file or folder names. + * Converts a string to lowercase, and replaces all spaces with dashes + * @param string + * @returns a string formatted for file names + */ +const formatStringForFile = (string) => { + return string.toLowerCase().replace(/ /g, "-"); +}; + +/** + * Creates a filename based on the filenameParts passed in, and appends to to a base path + * @param basePath A file path formatted string which will be used as a prefix to the generated filename. e.g "products/product-name/" + * @param filenameParts An array of strings to combine into a template name. e.g. ["first-part", "second", "last-part"] + * @returns A file path which refers to the expected location of a nunjucks template, with each filename part seperated by an underscore. + * e.g. "products/product-name/first-part_second_last-part.njk" + */ +const constructTemplatePath = (basePath, filenameParts) => { + return path.join(basePath, filenameParts.join("_") + ".njk"); +}; + +/** + * Creates the context object used by nunjucks templates + * @param product The product to render docs for, from the config. + * @param platform The platform to render docs for, from the config. + * @param version The version of the product to render docs for + * @returns a context object. + */ +const generateContext = (product, platform, version) => { + return { + product: { + name: product.name, + version: version, + }, + platform: { + name: platform.name, + arch: platform.arch, + }, + }; +}; + +run(); diff --git a/install_template/main.mjs b/install_template/main.mjs new file mode 100644 index 00000000000..c9a57560f83 --- /dev/null +++ b/install_template/main.mjs @@ -0,0 +1,190 @@ +import fs from "fs/promises"; +import { existsSync as fileExists } from "fs"; +import path from "path"; +import nunjucks from "nunjucks"; +import prettier from "prettier"; +import yaml from "yaml"; + +nunjucks.configure("templates", { throwOnUndefined: true, autoescape: false }); + +/** + * Loop through the config.yaml file and generate docs for every product/platform/supported version combination found. + * @returns void + */ +const run = async () => { + const config = yaml.parse(await fs.readFile("config.yaml", "utf8")); + + config.products.forEach((product) => { + product.platforms.forEach((platform) => { + platform["supported versions"].forEach((version) => { + renderDoc(product, platform, version); + }); + }); + }); + + return; +}; + +/** + * Composes the code needed to render a single installation docuement for a product/platform/version combination. + * @param product The product name we are generating a template for + * @param platform The platform and architecture we are generating docs for (e.g. { name: Centos 7, arch: x86_64 }) + * @param version The version of the product to generate docs for + * @returns void + */ +const renderDoc = (product, platform, version) => { + console.log( + `Starting render for ${product.name} ${version} on ${platform.name} ${platform.arch}`, + ); + + const template = findTemplate( + product.name, + version, + platform.name, + platform.arch, + ); + + if (template === false) { + return; + } + + console.log(` using template "${template}"`); + + const context = generateContext(product, platform, version); + + try { + writeDoc(template, context); + } catch (error) { + console.error("[ERROR] An exception occurred. Details below:"); + console.error(error); + process.exit(1); + } +}; + +/** + * Find an appropriate template file based on the config information passed in + * @param productName The product to render docs for. This is used as part of the path to the template file. + * @param productVersion The version of the product to render docs for. Used in some of the filenames checked for. + * @param platformName The name of the platform to render docs for. (e.g. Centos 7) + * @param platformArch The archictecture of the platform to render docs for. + * @returns The path to a applicable template file, or false if none is found. + */ +const findTemplate = ( + productName, + productVersion, + platformName, + platformArch, +) => { + const basePath = "products/" + formatStringForFile(productName); + const formattedPlatform = formatStringForFile(platformName); + + // Check if a file exists for the specific product version, platform, and architecture + const fullFilename = constructTemplatePath(basePath, [ + `v${productVersion}`, + formattedPlatform, + platformArch, + ]); + if (fileExists("templates/" + fullFilename)) { + return fullFilename; + } + + // Check if a file exists for the specific product version and platform + const versionPlatformFilename = constructTemplatePath(basePath, [ + `v${productVersion}`, + formattedPlatform, + ]); + if (fileExists("templates/" + versionPlatformFilename)) { + return versionPlatformFilename; + } + + // check if a file exists for a specific platform and architecture + const platformArchFilename = constructTemplatePath(basePath, [ + formattedPlatform, + platformArch, + ]); + if (fileExists("templates/" + platformArchFilename)) { + return platformArchFilename; + } + + // check if a file exists for a specific platform + const platformFilename = constructTemplatePath(basePath, [formattedPlatform]); + if (fileExists("templates/" + platformFilename)) { + return platformFilename; + } + + console.error( + `[ERROR] no template could be found\n` + + " Please add one of the following files:\n" + + ` ${fullFilename}\n` + + ` ${versionPlatformFilename}\n` + + ` ${platformArchFilename}\n` + + ` ${platformFilename}\n`, + ); + + return false; +}; + +/** + * Format a string into the format expected when used in file or folder names. + * Converts a string to lowercase, and replaces all spaces with dashes + * @param string + * @returns a string formatted for file names + */ +const formatStringForFile = (string) => { + return string.toLowerCase().replace(/ /g, "-"); +}; + +/** + * Creates a filename based on the filenameParts passed in, and appends to to a base path + * @param basePath A file path formatted string which will be used as a prefix to the generated filename. e.g "products/product-name/" + * @param filenameParts An array of strings to combine into a template name. e.g. ["first-part", "second", "last-part"] + * @returns A file path which refers to the expected location of a nunjucks template, with each filename part seperated by an underscore. + * e.g. "products/product-name/first-part_second_last-part.njk" + */ +const constructTemplatePath = (basePath, filenameParts) => { + return path.join(basePath, filenameParts.join("_") + ".njk"); +}; + +/** + * Creates the context object used by nunjucks templates + * @param product The product to render docs for, from the config. + * @param platform The platform to render docs for, from the config. + * @param version The version of the product to render docs for + * @returns a context object. + */ +const generateContext = (product, platform, version) => { + return { + product: { + name: product.name, + version: version, + }, + platform: { + name: platform.name, + arch: platform.arch, + }, + }; +}; + +/** + * actually render a nunjucks template with context, and write the result to the "/renders" folder. + * @param template The path to a nunjucks tempalte to render. + * @param context An object passed into the nunjucks template which will be used to render some variable content. + */ +const writeDoc = (template, context) => { + const render = prettier.format(nunjucks.render(template, context), { + parser: "mdx", + }); + const filename = + [ + formatStringForFile(context.product.name), + context.product.version, + formatStringForFile(context.platform.name), + context.platform.arch, + ].join("_") + ".mdx"; + + console.log(` writing ${filename}`); + + fs.writeFile(`renders/${filename}`, render); +}; + +run(); diff --git a/install_template/package-lock.json b/install_template/package-lock.json new file mode 100644 index 00000000000..6d7db8d6f3f --- /dev/null +++ b/install_template/package-lock.json @@ -0,0 +1,127 @@ +{ + "name": "nunjucks-test", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "nunjucks-test", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "lodash.ismatch": "^4.4.0", + "nunjucks": "^3.2.3", + "prettier": "^2.4.0", + "yaml": "^1.10.2" + } + }, + "node_modules/a-sync-waterfall": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/a-sync-waterfall/-/a-sync-waterfall-1.0.1.tgz", + "integrity": "sha512-RYTOHHdWipFUliRFMCS4X2Yn2X8M87V/OpSqWzKKOGhzqyUxzyVmhHDH9sAvG+ZuQf/TAOFsLCpMw09I1ufUnA==" + }, + "node_modules/asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=" + }, + "node_modules/commander": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", + "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", + "engines": { + "node": ">= 6" + } + }, + "node_modules/lodash.ismatch": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz", + "integrity": "sha512-fPMfXjGQEV9Xsq/8MTSgUf255gawYRbjwMyDbcvDhXgV7enSZA0hynz6vMPnpAb5iONEzBHBPsT+0zes5Z301g==" + }, + "node_modules/nunjucks": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/nunjucks/-/nunjucks-3.2.3.tgz", + "integrity": "sha512-psb6xjLj47+fE76JdZwskvwG4MYsQKXUtMsPh6U0YMvmyjRtKRFcxnlXGWglNybtNTNVmGdp94K62/+NjF5FDQ==", + "dependencies": { + "a-sync-waterfall": "^1.0.0", + "asap": "^2.0.3", + "commander": "^5.1.0" + }, + "bin": { + "nunjucks-precompile": "bin/precompile" + }, + "engines": { + "node": ">= 6.9.0" + }, + "peerDependencies": { + "chokidar": "^3.3.0" + }, + "peerDependenciesMeta": { + "chokidar": { + "optional": true + } + } + }, + "node_modules/prettier": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.5.0.tgz", + "integrity": "sha512-FM/zAKgWTxj40rH03VxzIPdXmj39SwSjwG0heUcNFwI+EMZJnY93yAiKXM3dObIKAM5TA88werc8T/EwhB45eg==", + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "engines": { + "node": ">= 6" + } + } + }, + "dependencies": { + "a-sync-waterfall": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/a-sync-waterfall/-/a-sync-waterfall-1.0.1.tgz", + "integrity": "sha512-RYTOHHdWipFUliRFMCS4X2Yn2X8M87V/OpSqWzKKOGhzqyUxzyVmhHDH9sAvG+ZuQf/TAOFsLCpMw09I1ufUnA==" + }, + "asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=" + }, + "commander": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", + "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==" + }, + "lodash.ismatch": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz", + "integrity": "sha512-fPMfXjGQEV9Xsq/8MTSgUf255gawYRbjwMyDbcvDhXgV7enSZA0hynz6vMPnpAb5iONEzBHBPsT+0zes5Z301g==" + }, + "nunjucks": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/nunjucks/-/nunjucks-3.2.3.tgz", + "integrity": "sha512-psb6xjLj47+fE76JdZwskvwG4MYsQKXUtMsPh6U0YMvmyjRtKRFcxnlXGWglNybtNTNVmGdp94K62/+NjF5FDQ==", + "requires": { + "a-sync-waterfall": "^1.0.0", + "asap": "^2.0.3", + "commander": "^5.1.0" + } + }, + "prettier": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.5.0.tgz", + "integrity": "sha512-FM/zAKgWTxj40rH03VxzIPdXmj39SwSjwG0heUcNFwI+EMZJnY93yAiKXM3dObIKAM5TA88werc8T/EwhB45eg==" + }, + "yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==" + } + } +} diff --git a/install_template/package.json b/install_template/package.json new file mode 100644 index 00000000000..be2b8ad93fc --- /dev/null +++ b/install_template/package.json @@ -0,0 +1,18 @@ +{ + "name": "nunjucks-test", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [], + "author": "", + "license": "ISC", + "dependencies": { + "lodash.ismatch": "^4.4.0", + "nunjucks": "^3.2.3", + "prettier": "^2.4.0", + "yaml": "^1.10.2" + } +} diff --git a/install_template/renders/.gitkeep b/install_template/renders/.gitkeep new file mode 100644 index 00000000000..e69de29bb2d diff --git a/install_template/templates/platformBase/_shared.njk b/install_template/templates/platformBase/_shared.njk new file mode 100644 index 00000000000..37dd7939640 --- /dev/null +++ b/install_template/templates/platformBase/_shared.njk @@ -0,0 +1,18 @@ +{% macro centosRepositoryConfiguration(packageManager, epelRepo) %} +```shell +# Set up the EDB repository: +{{ packageManager }} -y install https://yum.enterprisedb.com/edbrepos/edb-repo-latest.noarch.rpm + +# This creates the /etc/yum.repos.d/edb.repo configuration file. + +# Replace `'USERNAME:PASSWORD'` below with your username and password available from your +[EDB account](https://www.enterprisedb.com/user) in the edb.repo file: +sed -i "s@:@USERNAME:PASSWORD@" /etc/yum.repos.d/edb.repo + +# Install EPEL repository and refresh the cache: +{{ packageManager }} -y install {{ epelRepo }} +{{ packageManager }} makecache +``` +{% endmacro %} + +{% macro centosInstallCommand(packageManager, packageName) %}{{packageManager}} -y install {{ packageName }}{% endmacro %} \ No newline at end of file diff --git a/install_template/templates/platformBase/almalinux-8-or-rocky-linux-8.njk b/install_template/templates/platformBase/almalinux-8-or-rocky-linux-8.njk new file mode 100644 index 00000000000..72de23b465d --- /dev/null +++ b/install_template/templates/platformBase/almalinux-8-or-rocky-linux-8.njk @@ -0,0 +1,16 @@ +{% extends "platformBase/base.njk" %} +{% from "platformBase/_shared.njk" import centosRepositoryConfiguration, centosInstallCommand %} +{% set packageManager = "dnf" %} +{% block prerequisites %} +{{ centosRepositoryConfiguration("dnf", "epel-release") }} +```shell +# Enable the powertools repository since EPEL packages may depend on packages from it: +dnf config-manager --set-enabled powertools +``` +{% endblock prerequisites %} + +{% block installCommand %} +```shell +{{ centosInstallCommand("dnf", packageName) }} +``` +{% endblock installCommand %} diff --git a/install_template/templates/platformBase/base.njk b/install_template/templates/platformBase/base.njk new file mode 100644 index 00000000000..dcb98421468 --- /dev/null +++ b/install_template/templates/platformBase/base.njk @@ -0,0 +1,21 @@ +--- +navTitle: {{ platform.name }} on {{ platform.arch }} +title: Installing {{ product.name }} on {{ platform.name }} {{ platform.arch }} +--- + +Before you begin the installation process, log in as superuser. +```shell +# To log in as a superuser: +sudo su - +``` + +## Set up the repository +Setting up the repository is a one-time task. If you have already set up your repository, you do not need to perform this step. If you do need to set up the repository, you must register with EDB. To receive credentials for the EDB repository, visit: [Repository Access Request](https://www.enterprisedb.com/repository-access-request). +{% block prerequisites %}{% endblock prerequisites %} + +## Install the package + +{% block installCommand %}{% endblock installCommand %} + +{% block postinstall %}{% endblock postinstall %} + diff --git a/install_template/templates/platformBase/centos-7.njk b/install_template/templates/platformBase/centos-7.njk new file mode 100644 index 00000000000..1ffd4be8d33 --- /dev/null +++ b/install_template/templates/platformBase/centos-7.njk @@ -0,0 +1,35 @@ +{% extends "platformBase/base.njk" %} +{% from "platformBase/_shared.njk" import centosRepositoryConfiguration, centosInstallCommand %} +{% set packageManager = "yum" %} +{% block prerequisites %} +{% if includePPC %} +# Install Advance Toolchain + +```shell +rpm --import https://public.dhe.ibm.com/software/server/POWER/Linux/toolchain/at/redhat/RHEL7/gpg-pubkey-6976a827-5164221b + +cat > /etc/yum.repos.d/advance-toolchain.repo < /etc/apt/sources.list.d/edb-$(lsb_release -cs).list +``` +This creates the /etc/apt/sources.list.d/edb-stretch.list configuration file. +{% endblock repoAuth %} diff --git a/install_template/templates/platformBase/ubuntu-20.04-or-debian-10.njk b/install_template/templates/platformBase/ubuntu-20.04-or-debian-10.njk new file mode 100644 index 00000000000..01a843f35d1 --- /dev/null +++ b/install_template/templates/platformBase/ubuntu-20.04-or-debian-10.njk @@ -0,0 +1,28 @@ +{% extends "platformBase/base.njk" %} +{% set packageManager = "apt-get" %} +{% block prerequisites %} +{% block repoAuth %} +```shell +# Setup the EDB repository +echo "deb [arch=amd64] https://apt.enterprisedb.com/$(lsb_release -cs)-edb/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/edb-$(lsb_release -cs).list + +# Replace '' and '' below with your username and password for the EDB repositories: +echo "machine apt.enterprisedb.com login password " > /etc/apt/auth.conf.d/edb.conf +{% endblock repoAuth %} + +# Add support for secure APT repositories: +apt-get -y install apt-transport-https + +# Add the EDB signing key: +wget -q -O - https://:@apt.enterprisedb.com/edb-deb.gpg.key | sudo apt-key add - + +# Update the repository metadata: +apt-get update +``` +{% endblock prerequisites %} + +{% block installCommand %} +```shell +apt-get -y install {{ packageName }} +``` +{% endblock installCommand %} diff --git a/install_template/templates/products/edb*plus/almalinux-8-or-rocky-linux-8.njk b/install_template/templates/products/edb*plus/almalinux-8-or-rocky-linux-8.njk new file mode 100644 index 00000000000..b19364aa0f2 --- /dev/null +++ b/install_template/templates/products/edb*plus/almalinux-8-or-rocky-linux-8.njk @@ -0,0 +1,10 @@ +{% extends "products/edb*plus/base.njk" %} +{% set platformBaseTemplate = "almalinux-8-or-rocky-linux-8" %} +{% block prerequisites %} +{{ super() }} +1. Disable the built-in PostgreSQL module: + + ```sh + dnf -qy module disable postgresql + ``` +{% endblock prerequisites %} \ No newline at end of file diff --git a/install_template/templates/products/edb*plus/base.njk b/install_template/templates/products/edb*plus/base.njk new file mode 100644 index 00000000000..12c7338ce76 --- /dev/null +++ b/install_template/templates/products/edb*plus/base.njk @@ -0,0 +1,72 @@ +{% extends "platformBase/" + platformBaseTemplate + '.njk' %} +{% set packageName %}edb-as{{ product.version | replace(".", "") }}-edbplus{% endset %} +{% block postinstallMenu %}- [Initial configuration](#initial-configuration){% endblock postinstallMenu %} +{% block postinstall %} +## Initial configuration + +After performing an RPM installation of EDB\*Plus, you must set the values of environment variables that allow EDB\*Plus to locate your Java installation. Use the following commands to set variable values: + +```text +export JAVA_HOME= +export PATH=/bin:$PATH +``` + +By default, the `pg_hba.conf` file for the RPM installer enforces `IDENT` authentication. Before invoking EDB\*Plus, you must either modify the `pg_hba.conf` file, changing the authentication method to a form other than `IDENT` (and restarting the server), or perform the following steps to ensure that an `IDENT` server is accessible: + +You must confirm that an `identd` server is installed and running. You can use the package manager to install an `identd` server by invoking the command: + +```text +{{ packageManager }} -y install xinetd authd +``` + +The command should create a file named `/etc/xinetd.d/auth` that contains: + +```text +service auth +{ + disable = yes + socket_type = stream +wait =no +user = ident +cps = 4096 10 +instances = UNLIMITED +server = /usr/sbin/in.authd server_args = -t60 --xerror –os +} +``` + +!!! Note + If the file includes a `-E` argument at the end of the server arguments, please erase `-E`. + +Then, to start the `identd` server, invoke the following commands: + +```text +systemctl enable xinetd +systemctl start xinetd +``` + +Open the `pg_ident.conf` file and create a user mapping: + +```text +# map_name system_username postgres_username + edbas enterprisedb enterprisedb +``` + +Where: + +- The name specified in the `map_name` column is a user-defined name that will identify the mapping in the `pg_hba.conf` file. +- The name specified in the `system_username` column is `enterprisedb`. +- The name specified in the `postgres_username` column is `enterprisedb`. + +Then, open the `pg_hba.conf` file and modify the `IDENT` entries: + +- If you are using an IPv4 local connection, modify the file entry to read: + + `host all all 127.0.0.0/0 ident map=edbas` + +- If you are using an IPv6 local connection, modify the file entry to read: + + `host all all ::1/128 ident map=edbas` + +You must restart the Advanced Server service before invoking EDB\*Plus. For detailed information about controlling the Advanced Server service, see the online documentation for [EDB Postgres Advanced Server](/epas/latest/). + +{% endblock postinstall %} \ No newline at end of file diff --git a/install_template/templates/products/edb*plus/centos-7.njk b/install_template/templates/products/edb*plus/centos-7.njk new file mode 100644 index 00000000000..78e02471bd0 --- /dev/null +++ b/install_template/templates/products/edb*plus/centos-7.njk @@ -0,0 +1,2 @@ +{% extends "products/edb*plus/base.njk" %} +{% set platformBaseTemplate = "centos-7" %} \ No newline at end of file diff --git a/install_template/templates/products/edb*plus/centos-7_ppc64le.njk b/install_template/templates/products/edb*plus/centos-7_ppc64le.njk new file mode 100644 index 00000000000..1f84a3cf3b4 --- /dev/null +++ b/install_template/templates/products/edb*plus/centos-7_ppc64le.njk @@ -0,0 +1,2 @@ +{% extends "products/edb*plus/centos-7.njk" %} +{% set includePPC = true %} diff --git a/install_template/templates/products/edb*plus/debian-10.njk b/install_template/templates/products/edb*plus/debian-10.njk new file mode 100644 index 00000000000..bb8123cbe22 --- /dev/null +++ b/install_template/templates/products/edb*plus/debian-10.njk @@ -0,0 +1,2 @@ +{% extends "products/edb*plus/base.njk" %} +{% set platformBaseTemplate = "debian-10" %} \ No newline at end of file diff --git a/install_template/templates/products/edb*plus/debian-9.njk b/install_template/templates/products/edb*plus/debian-9.njk new file mode 100644 index 00000000000..0a3cdf6aa69 --- /dev/null +++ b/install_template/templates/products/edb*plus/debian-9.njk @@ -0,0 +1,2 @@ +{% extends "products/edb*plus/base.njk" %} +{% set platformBaseTemplate = "debian-9" %} \ No newline at end of file diff --git a/install_template/templates/products/edb*plus/rhel-7-or-ol-7.njk b/install_template/templates/products/edb*plus/rhel-7-or-ol-7.njk new file mode 100644 index 00000000000..992aaeb60dc --- /dev/null +++ b/install_template/templates/products/edb*plus/rhel-7-or-ol-7.njk @@ -0,0 +1,2 @@ +{% extends "products/edb*plus/base.njk" %} +{% set platformBaseTemplate = "rhel-7-or-ol-7" %} \ No newline at end of file diff --git a/install_template/templates/products/edb*plus/rhel-7-or-ol-7_ppc64le.njk b/install_template/templates/products/edb*plus/rhel-7-or-ol-7_ppc64le.njk new file mode 100644 index 00000000000..c9ece0c831c --- /dev/null +++ b/install_template/templates/products/edb*plus/rhel-7-or-ol-7_ppc64le.njk @@ -0,0 +1,2 @@ +{% extends "products/edb*plus/rhel-7-or-ol-7.njk" %} +{% set includePPC = true %} \ No newline at end of file diff --git a/install_template/templates/products/edb*plus/rhel-8-or-ol-8.njk b/install_template/templates/products/edb*plus/rhel-8-or-ol-8.njk new file mode 100644 index 00000000000..e376bbbd3de --- /dev/null +++ b/install_template/templates/products/edb*plus/rhel-8-or-ol-8.njk @@ -0,0 +1,2 @@ +{% extends "products/edb*plus/base.njk" %} +{% set platformBaseTemplate = "rhel-8-or-ol-8" %} \ No newline at end of file diff --git a/install_template/templates/products/edb*plus/sles-12.njk b/install_template/templates/products/edb*plus/sles-12.njk new file mode 100644 index 00000000000..56ca0569218 --- /dev/null +++ b/install_template/templates/products/edb*plus/sles-12.njk @@ -0,0 +1,2 @@ +{% extends "products/edb*plus/base.njk" %} +{% set platformBaseTemplate = "sles-12" %} diff --git a/install_template/templates/products/edb*plus/sles-12_ppc64le.njk b/install_template/templates/products/edb*plus/sles-12_ppc64le.njk new file mode 100644 index 00000000000..e602925f27d --- /dev/null +++ b/install_template/templates/products/edb*plus/sles-12_ppc64le.njk @@ -0,0 +1,3 @@ +{% extends "products/edb*plus/base.njk" %} +{% set platformBaseTemplate = "sles-12" %} +{% set includePPC = true %} diff --git a/install_template/templates/products/edb*plus/sles-15.njk b/install_template/templates/products/edb*plus/sles-15.njk new file mode 100644 index 00000000000..25b488d5fb3 --- /dev/null +++ b/install_template/templates/products/edb*plus/sles-15.njk @@ -0,0 +1,2 @@ +{% extends "products/edb*plus/base.njk" %} +{% set platformBaseTemplate = "sles-15" %} diff --git a/install_template/templates/products/edb*plus/sles-15_ppc64le.njk b/install_template/templates/products/edb*plus/sles-15_ppc64le.njk new file mode 100644 index 00000000000..09807c02057 --- /dev/null +++ b/install_template/templates/products/edb*plus/sles-15_ppc64le.njk @@ -0,0 +1,3 @@ +{% extends "products/edb*plus/base.njk" %} +{% set platformBaseTemplate = "sles-15" %} +{% set includePPC = true %} diff --git a/install_template/templates/products/edb*plus/ubuntu-18.04.njk b/install_template/templates/products/edb*plus/ubuntu-18.04.njk new file mode 100644 index 00000000000..b558f4ed7d9 --- /dev/null +++ b/install_template/templates/products/edb*plus/ubuntu-18.04.njk @@ -0,0 +1 @@ +{% extends "products/edb*plus/debian-10.njk" %} diff --git a/install_template/templates/products/edb*plus/ubuntu-20.04.njk b/install_template/templates/products/edb*plus/ubuntu-20.04.njk new file mode 100644 index 00000000000..b558f4ed7d9 --- /dev/null +++ b/install_template/templates/products/edb*plus/ubuntu-20.04.njk @@ -0,0 +1 @@ +{% extends "products/edb*plus/debian-10.njk" %} diff --git a/install_template/templates/products/edb-bart/almalinux-8-or-rocky-linux-8.njk b/install_template/templates/products/edb-bart/almalinux-8-or-rocky-linux-8.njk new file mode 100644 index 00000000000..f8ede94475e --- /dev/null +++ b/install_template/templates/products/edb-bart/almalinux-8-or-rocky-linux-8.njk @@ -0,0 +1,10 @@ +{% extends "products/edb-bart/base.njk" %} +{% set platformBaseTemplate = "almalinux-8-or-rocky-linux-8" %} +{% block prerequisites %} +{{ super() }} +1. Disable the built-in PostgreSQL module: + + ```sh + dnf -qy module disable postgresql + ``` +{% endblock prerequisites %} \ No newline at end of file diff --git a/install_template/templates/products/edb-bart/base.njk b/install_template/templates/products/edb-bart/base.njk new file mode 100644 index 00000000000..f9408ac273b --- /dev/null +++ b/install_template/templates/products/edb-bart/base.njk @@ -0,0 +1,2 @@ +{% extends "platformBase/" + platformBaseTemplate + '.njk' %} +{% set packageName %}edb-bart{% endset %} diff --git a/install_template/templates/products/edb-bart/centos-7.njk b/install_template/templates/products/edb-bart/centos-7.njk new file mode 100644 index 00000000000..cb168352d8d --- /dev/null +++ b/install_template/templates/products/edb-bart/centos-7.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-bart/base.njk" %} +{% set platformBaseTemplate = "centos-7" %} \ No newline at end of file diff --git a/install_template/templates/products/edb-bart/centos-7_ppc64le.njk b/install_template/templates/products/edb-bart/centos-7_ppc64le.njk new file mode 100644 index 00000000000..6f10d86b348 --- /dev/null +++ b/install_template/templates/products/edb-bart/centos-7_ppc64le.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-bart/centos-7.njk" %} +{% set includePPC = true %} diff --git a/install_template/templates/products/edb-bart/debian-10.njk b/install_template/templates/products/edb-bart/debian-10.njk new file mode 100644 index 00000000000..c93a8c2af41 --- /dev/null +++ b/install_template/templates/products/edb-bart/debian-10.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-bart/base.njk" %} +{% set platformBaseTemplate = "debian-10" %} \ No newline at end of file diff --git a/install_template/templates/products/edb-bart/debian-9.njk b/install_template/templates/products/edb-bart/debian-9.njk new file mode 100644 index 00000000000..d497d100a8b --- /dev/null +++ b/install_template/templates/products/edb-bart/debian-9.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-bart/base.njk" %} +{% set platformBaseTemplate = "debian-9" %} \ No newline at end of file diff --git a/install_template/templates/products/edb-bart/rhel-7-or-ol-7.njk b/install_template/templates/products/edb-bart/rhel-7-or-ol-7.njk new file mode 100644 index 00000000000..1b365d0e140 --- /dev/null +++ b/install_template/templates/products/edb-bart/rhel-7-or-ol-7.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-bart/base.njk" %} +{% set platformBaseTemplate = "rhel-7-or-ol-7" %} \ No newline at end of file diff --git a/install_template/templates/products/edb-bart/rhel-7-or-ol-7_ppc64le.njk b/install_template/templates/products/edb-bart/rhel-7-or-ol-7_ppc64le.njk new file mode 100644 index 00000000000..d2772dbb891 --- /dev/null +++ b/install_template/templates/products/edb-bart/rhel-7-or-ol-7_ppc64le.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-bart/rhel-7-or-ol-7.njk" %} +{% set includePPC = true %} \ No newline at end of file diff --git a/install_template/templates/products/edb-bart/rhel-8-or-ol-8.njk b/install_template/templates/products/edb-bart/rhel-8-or-ol-8.njk new file mode 100644 index 00000000000..455eb7bf31f --- /dev/null +++ b/install_template/templates/products/edb-bart/rhel-8-or-ol-8.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-bart/base.njk" %} +{% set platformBaseTemplate = "rhel-8-or-ol-8" %} \ No newline at end of file diff --git a/install_template/templates/products/edb-bart/sles-12.njk b/install_template/templates/products/edb-bart/sles-12.njk new file mode 100644 index 00000000000..705899632c9 --- /dev/null +++ b/install_template/templates/products/edb-bart/sles-12.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-bart/base.njk" %} +{% set platformBaseTemplate = "sles-12" %} \ No newline at end of file diff --git a/install_template/templates/products/edb-bart/sles-12_ppc64le.njk b/install_template/templates/products/edb-bart/sles-12_ppc64le.njk new file mode 100644 index 00000000000..705899632c9 --- /dev/null +++ b/install_template/templates/products/edb-bart/sles-12_ppc64le.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-bart/base.njk" %} +{% set platformBaseTemplate = "sles-12" %} \ No newline at end of file diff --git a/install_template/templates/products/edb-bart/sles-15.njk b/install_template/templates/products/edb-bart/sles-15.njk new file mode 100644 index 00000000000..244b7941398 --- /dev/null +++ b/install_template/templates/products/edb-bart/sles-15.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-bart/base.njk" %} +{% set platformBaseTemplate = "sles-15" %} \ No newline at end of file diff --git a/install_template/templates/products/edb-bart/sles-15_ppc64le.njk b/install_template/templates/products/edb-bart/sles-15_ppc64le.njk new file mode 100644 index 00000000000..e2fc8a4dcbf --- /dev/null +++ b/install_template/templates/products/edb-bart/sles-15_ppc64le.njk @@ -0,0 +1,3 @@ +{% extends "products/edb-bart/base.njk" %} +{% set platformBaseTemplate = "sles-15" %} +{% set includePPC = true %} \ No newline at end of file diff --git a/install_template/templates/products/edb-bart/ubuntu-18.04.njk b/install_template/templates/products/edb-bart/ubuntu-18.04.njk new file mode 100644 index 00000000000..5c16448abda --- /dev/null +++ b/install_template/templates/products/edb-bart/ubuntu-18.04.njk @@ -0,0 +1 @@ +{% extends "products/edb-bart/debian-10.njk" %} diff --git a/install_template/templates/products/edb-bart/ubuntu-20.04.njk b/install_template/templates/products/edb-bart/ubuntu-20.04.njk new file mode 100644 index 00000000000..5c16448abda --- /dev/null +++ b/install_template/templates/products/edb-bart/ubuntu-20.04.njk @@ -0,0 +1 @@ +{% extends "products/edb-bart/debian-10.njk" %} diff --git a/install_template/templates/products/edb-jdbc-connector/almalinux-8-or-rocky-linux-8.njk b/install_template/templates/products/edb-jdbc-connector/almalinux-8-or-rocky-linux-8.njk new file mode 100644 index 00000000000..6f483a059c9 --- /dev/null +++ b/install_template/templates/products/edb-jdbc-connector/almalinux-8-or-rocky-linux-8.njk @@ -0,0 +1,10 @@ +{% extends "products/edb-jdbc-connector/base.njk" %} +{% set platformBaseTemplate = "almalinux-8-or-rocky-linux-8" %} +{% block prerequisites %} +{{ super() }} +1. Disable the built-in PostgreSQL module: + + ```sh + dnf -qy module disable postgresql + ``` +{% endblock prerequisites %} \ No newline at end of file diff --git a/install_template/templates/products/edb-jdbc-connector/base.njk b/install_template/templates/products/edb-jdbc-connector/base.njk new file mode 100644 index 00000000000..b5d513b9753 --- /dev/null +++ b/install_template/templates/products/edb-jdbc-connector/base.njk @@ -0,0 +1,13 @@ +{% extends "platformBase/" + platformBaseTemplate + '.njk' %} +{% set packageName %}edb-jdbc{% endset %} +{% block postinstallMenu %}- [Initial configuration](#initial-configuration){% endblock postinstallMenu %} +{% block postinstall %} +## Initial configuration + +To make the JDBC driver available to Java, you must either copy the appropriate java `.jar` file for the JDBC version that you are using to your `$java_home/jre/lib/ext` directory or append the location of the `.jar` file to the `CLASSPATH` environment variable. + +Note that if you choose to append the location of the `jar` file to the `CLASSPATH` environment variable, you must include the complete pathname: + + `/usr/edb/jdbc/edb-jdbc18.jar` + +{% endblock postinstall %} \ No newline at end of file diff --git a/install_template/templates/products/edb-jdbc-connector/centos-7.njk b/install_template/templates/products/edb-jdbc-connector/centos-7.njk new file mode 100644 index 00000000000..5a302d86826 --- /dev/null +++ b/install_template/templates/products/edb-jdbc-connector/centos-7.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-jdbc-connector/base.njk" %} +{% set platformBaseTemplate = "centos-7" %} \ No newline at end of file diff --git a/install_template/templates/products/edb-jdbc-connector/centos-7_ppc64le.njk b/install_template/templates/products/edb-jdbc-connector/centos-7_ppc64le.njk new file mode 100644 index 00000000000..3fcb93ad6f3 --- /dev/null +++ b/install_template/templates/products/edb-jdbc-connector/centos-7_ppc64le.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-jdbc-connector/centos-7.njk" %} +{% set includePPC = true %} diff --git a/install_template/templates/products/edb-jdbc-connector/debian-10.njk b/install_template/templates/products/edb-jdbc-connector/debian-10.njk new file mode 100644 index 00000000000..d5f7157ef7b --- /dev/null +++ b/install_template/templates/products/edb-jdbc-connector/debian-10.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-jdbc-connector/base.njk" %} +{% set platformBaseTemplate = "debian-10" %} \ No newline at end of file diff --git a/install_template/templates/products/edb-jdbc-connector/debian-9.njk b/install_template/templates/products/edb-jdbc-connector/debian-9.njk new file mode 100644 index 00000000000..193de285dc3 --- /dev/null +++ b/install_template/templates/products/edb-jdbc-connector/debian-9.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-jdbc-connector/base.njk" %} +{% set platformBaseTemplate = "debian-9" %} \ No newline at end of file diff --git a/install_template/templates/products/edb-jdbc-connector/rhel-7-or-ol-7.njk b/install_template/templates/products/edb-jdbc-connector/rhel-7-or-ol-7.njk new file mode 100644 index 00000000000..545d66585d3 --- /dev/null +++ b/install_template/templates/products/edb-jdbc-connector/rhel-7-or-ol-7.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-jdbc-connector/base.njk" %} +{% set platformBaseTemplate = "rhel-7-or-ol-7" %} \ No newline at end of file diff --git a/install_template/templates/products/edb-jdbc-connector/rhel-7-or-ol-7_ppc64le.njk b/install_template/templates/products/edb-jdbc-connector/rhel-7-or-ol-7_ppc64le.njk new file mode 100644 index 00000000000..f5b18889610 --- /dev/null +++ b/install_template/templates/products/edb-jdbc-connector/rhel-7-or-ol-7_ppc64le.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-jdbc-connector/rhel-7-or-ol-7.njk" %} +{% set includePPC = true %} \ No newline at end of file diff --git a/install_template/templates/products/edb-jdbc-connector/rhel-8-or-ol-8.njk b/install_template/templates/products/edb-jdbc-connector/rhel-8-or-ol-8.njk new file mode 100644 index 00000000000..bb766031edd --- /dev/null +++ b/install_template/templates/products/edb-jdbc-connector/rhel-8-or-ol-8.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-jdbc-connector/base.njk" %} +{% set platformBaseTemplate = "rhel-8-or-ol-8" %} \ No newline at end of file diff --git a/install_template/templates/products/edb-jdbc-connector/sles-12.njk b/install_template/templates/products/edb-jdbc-connector/sles-12.njk new file mode 100644 index 00000000000..9e611c35d43 --- /dev/null +++ b/install_template/templates/products/edb-jdbc-connector/sles-12.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-jdbc-connector/base.njk" %} +{% set platformBaseTemplate = "sles-12" %} diff --git a/install_template/templates/products/edb-jdbc-connector/sles-12_ppc64le.njk b/install_template/templates/products/edb-jdbc-connector/sles-12_ppc64le.njk new file mode 100644 index 00000000000..9e611c35d43 --- /dev/null +++ b/install_template/templates/products/edb-jdbc-connector/sles-12_ppc64le.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-jdbc-connector/base.njk" %} +{% set platformBaseTemplate = "sles-12" %} diff --git a/install_template/templates/products/edb-jdbc-connector/sles-15.njk b/install_template/templates/products/edb-jdbc-connector/sles-15.njk new file mode 100644 index 00000000000..e1afa96be2c --- /dev/null +++ b/install_template/templates/products/edb-jdbc-connector/sles-15.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-jdbc-connector/base.njk" %} +{% set platformBaseTemplate = "sles-15" %} \ No newline at end of file diff --git a/install_template/templates/products/edb-jdbc-connector/sles-15_ppc64le.njk b/install_template/templates/products/edb-jdbc-connector/sles-15_ppc64le.njk new file mode 100644 index 00000000000..7bc76791795 --- /dev/null +++ b/install_template/templates/products/edb-jdbc-connector/sles-15_ppc64le.njk @@ -0,0 +1,3 @@ +{% extends "products/edb-jdbc-connector/base.njk" %} +{% set platformBaseTemplate = "sles-15" %} +{% set includePPC = true %} \ No newline at end of file diff --git a/install_template/templates/products/edb-jdbc-connector/ubuntu-18.04.njk b/install_template/templates/products/edb-jdbc-connector/ubuntu-18.04.njk new file mode 100644 index 00000000000..33f908ffae7 --- /dev/null +++ b/install_template/templates/products/edb-jdbc-connector/ubuntu-18.04.njk @@ -0,0 +1 @@ +{% extends "products/edb-jdbc-connector/debian-10.njk" %} diff --git a/install_template/templates/products/edb-jdbc-connector/ubuntu-20.04.njk b/install_template/templates/products/edb-jdbc-connector/ubuntu-20.04.njk new file mode 100644 index 00000000000..33f908ffae7 --- /dev/null +++ b/install_template/templates/products/edb-jdbc-connector/ubuntu-20.04.njk @@ -0,0 +1 @@ +{% extends "products/edb-jdbc-connector/debian-10.njk" %} diff --git a/install_template/templates/products/edb-ocl-connector/almalinux-8-or-rocky-linux-8.njk b/install_template/templates/products/edb-ocl-connector/almalinux-8-or-rocky-linux-8.njk new file mode 100644 index 00000000000..795fa4d65f8 --- /dev/null +++ b/install_template/templates/products/edb-ocl-connector/almalinux-8-or-rocky-linux-8.njk @@ -0,0 +1,10 @@ +{% extends "products/edb-ocl-connector/base.njk" %} +{% set platformBaseTemplate = "almalinux-8-or-rocky-linux-8" %} +{% block prerequisites %} +{{ super() }} +1. Disable the built-in PostgreSQL module: + + ```sh + dnf -qy module disable postgresql + ``` +{% endblock prerequisites %} \ No newline at end of file diff --git a/install_template/templates/products/edb-ocl-connector/base.njk b/install_template/templates/products/edb-ocl-connector/base.njk new file mode 100644 index 00000000000..fbaac082c2d --- /dev/null +++ b/install_template/templates/products/edb-ocl-connector/base.njk @@ -0,0 +1,2 @@ +{% extends "platformBase/" + platformBaseTemplate + '.njk' %} +{% set packageName %}edb-oci{% endset %} diff --git a/install_template/templates/products/edb-ocl-connector/centos-7.njk b/install_template/templates/products/edb-ocl-connector/centos-7.njk new file mode 100644 index 00000000000..07abf1c5d59 --- /dev/null +++ b/install_template/templates/products/edb-ocl-connector/centos-7.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-ocl-connector/base.njk" %} +{% set platformBaseTemplate = "centos-7" %} \ No newline at end of file diff --git a/install_template/templates/products/edb-ocl-connector/centos-7_ppc64le.njk b/install_template/templates/products/edb-ocl-connector/centos-7_ppc64le.njk new file mode 100644 index 00000000000..2c7baf131f6 --- /dev/null +++ b/install_template/templates/products/edb-ocl-connector/centos-7_ppc64le.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-ocl-connector/centos-7.njk" %} +{% set includePPC = true %} diff --git a/install_template/templates/products/edb-ocl-connector/debian-10.njk b/install_template/templates/products/edb-ocl-connector/debian-10.njk new file mode 100644 index 00000000000..df7c17ecae0 --- /dev/null +++ b/install_template/templates/products/edb-ocl-connector/debian-10.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-ocl-connector/base.njk" %} +{% set platformBaseTemplate = "debian-10" %} \ No newline at end of file diff --git a/install_template/templates/products/edb-ocl-connector/debian-9.njk b/install_template/templates/products/edb-ocl-connector/debian-9.njk new file mode 100644 index 00000000000..69152bba6d4 --- /dev/null +++ b/install_template/templates/products/edb-ocl-connector/debian-9.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-ocl-connector/base.njk" %} +{% set platformBaseTemplate = "debian-9" %} \ No newline at end of file diff --git a/install_template/templates/products/edb-ocl-connector/rhel-7-or-ol-7.njk b/install_template/templates/products/edb-ocl-connector/rhel-7-or-ol-7.njk new file mode 100644 index 00000000000..5f4dd3bea58 --- /dev/null +++ b/install_template/templates/products/edb-ocl-connector/rhel-7-or-ol-7.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-ocl-connector/base.njk" %} +{% set platformBaseTemplate = "rhel-7-or-ol-7" %} \ No newline at end of file diff --git a/install_template/templates/products/edb-ocl-connector/rhel-7-or-ol-7_ppc64le.njk b/install_template/templates/products/edb-ocl-connector/rhel-7-or-ol-7_ppc64le.njk new file mode 100644 index 00000000000..f86f93620e3 --- /dev/null +++ b/install_template/templates/products/edb-ocl-connector/rhel-7-or-ol-7_ppc64le.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-ocl-connector/rhel-7-or-ol-7.njk" %} +{% set includePPC = true %} \ No newline at end of file diff --git a/install_template/templates/products/edb-ocl-connector/rhel-8-or-ol-8.njk b/install_template/templates/products/edb-ocl-connector/rhel-8-or-ol-8.njk new file mode 100644 index 00000000000..9b691257a4e --- /dev/null +++ b/install_template/templates/products/edb-ocl-connector/rhel-8-or-ol-8.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-ocl-connector/base.njk" %} +{% set platformBaseTemplate = "rhel-8-or-ol-8" %} \ No newline at end of file diff --git a/install_template/templates/products/edb-ocl-connector/sles-12.njk b/install_template/templates/products/edb-ocl-connector/sles-12.njk new file mode 100644 index 00000000000..cbb88e17147 --- /dev/null +++ b/install_template/templates/products/edb-ocl-connector/sles-12.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-ocl-connector/base.njk" %} +{% set platformBaseTemplate = "sles-12" %} \ No newline at end of file diff --git a/install_template/templates/products/edb-ocl-connector/sles-12_ppc64le.njk b/install_template/templates/products/edb-ocl-connector/sles-12_ppc64le.njk new file mode 100644 index 00000000000..cbb88e17147 --- /dev/null +++ b/install_template/templates/products/edb-ocl-connector/sles-12_ppc64le.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-ocl-connector/base.njk" %} +{% set platformBaseTemplate = "sles-12" %} \ No newline at end of file diff --git a/install_template/templates/products/edb-ocl-connector/sles-15.njk b/install_template/templates/products/edb-ocl-connector/sles-15.njk new file mode 100644 index 00000000000..4776c45ab34 --- /dev/null +++ b/install_template/templates/products/edb-ocl-connector/sles-15.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-ocl-connector/base.njk" %} +{% set platformBaseTemplate = "sles-15" %} \ No newline at end of file diff --git a/install_template/templates/products/edb-ocl-connector/sles-15_ppc64le.njk b/install_template/templates/products/edb-ocl-connector/sles-15_ppc64le.njk new file mode 100644 index 00000000000..70725f7778e --- /dev/null +++ b/install_template/templates/products/edb-ocl-connector/sles-15_ppc64le.njk @@ -0,0 +1,3 @@ +{% extends "products/edb-ocl-connector/base.njk" %} +{% set platformBaseTemplate = "sles-15" %} +{% set includePPC = true %} \ No newline at end of file diff --git a/install_template/templates/products/edb-ocl-connector/ubuntu-18.04.njk b/install_template/templates/products/edb-ocl-connector/ubuntu-18.04.njk new file mode 100644 index 00000000000..91a910513bd --- /dev/null +++ b/install_template/templates/products/edb-ocl-connector/ubuntu-18.04.njk @@ -0,0 +1 @@ +{% extends "products/edb-ocl-connector/debian-10.njk" %} diff --git a/install_template/templates/products/edb-ocl-connector/ubuntu-20.04.njk b/install_template/templates/products/edb-ocl-connector/ubuntu-20.04.njk new file mode 100644 index 00000000000..91a910513bd --- /dev/null +++ b/install_template/templates/products/edb-ocl-connector/ubuntu-20.04.njk @@ -0,0 +1 @@ +{% extends "products/edb-ocl-connector/debian-10.njk" %} diff --git a/install_template/templates/products/edb-odbc-connector/almalinux-8-or-rocky-linux-8.njk b/install_template/templates/products/edb-odbc-connector/almalinux-8-or-rocky-linux-8.njk new file mode 100644 index 00000000000..434df4a6b4a --- /dev/null +++ b/install_template/templates/products/edb-odbc-connector/almalinux-8-or-rocky-linux-8.njk @@ -0,0 +1,10 @@ +{% extends "products/edb-odbc-connector/base.njk" %} +{% set platformBaseTemplate = "almalinux-8-or-rocky-linux-8" %} +{% block prerequisites %} +{{ super() }} +1. Disable the built-in PostgreSQL module: + + ```sh + dnf -qy module disable postgresql + ``` +{% endblock prerequisites %} \ No newline at end of file diff --git a/install_template/templates/products/edb-odbc-connector/base.njk b/install_template/templates/products/edb-odbc-connector/base.njk new file mode 100644 index 00000000000..533f6a9fa65 --- /dev/null +++ b/install_template/templates/products/edb-odbc-connector/base.njk @@ -0,0 +1,2 @@ +{% extends "platformBase/" + platformBaseTemplate + '.njk' %} +{% set packageName %}edb-odbc{% endset %} diff --git a/install_template/templates/products/edb-odbc-connector/centos-7.njk b/install_template/templates/products/edb-odbc-connector/centos-7.njk new file mode 100644 index 00000000000..feae850732d --- /dev/null +++ b/install_template/templates/products/edb-odbc-connector/centos-7.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-odbc-connector/base.njk" %} +{% set platformBaseTemplate = "centos-7" %} \ No newline at end of file diff --git a/install_template/templates/products/edb-odbc-connector/centos-7_ppc64le.njk b/install_template/templates/products/edb-odbc-connector/centos-7_ppc64le.njk new file mode 100644 index 00000000000..81c735ec9f7 --- /dev/null +++ b/install_template/templates/products/edb-odbc-connector/centos-7_ppc64le.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-odbc-connector/centos-7.njk" %} +{% set includePPC = true %} diff --git a/install_template/templates/products/edb-odbc-connector/debian-10.njk b/install_template/templates/products/edb-odbc-connector/debian-10.njk new file mode 100644 index 00000000000..c3b68f87253 --- /dev/null +++ b/install_template/templates/products/edb-odbc-connector/debian-10.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-odbc-connector/base.njk" %} +{% set platformBaseTemplate = "debian-10" %} \ No newline at end of file diff --git a/install_template/templates/products/edb-odbc-connector/debian-9.njk b/install_template/templates/products/edb-odbc-connector/debian-9.njk new file mode 100644 index 00000000000..217e336fbf1 --- /dev/null +++ b/install_template/templates/products/edb-odbc-connector/debian-9.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-odbc-connector/base.njk" %} +{% set platformBaseTemplate = "debian-9" %} \ No newline at end of file diff --git a/install_template/templates/products/edb-odbc-connector/rhel-7-or-ol-7.njk b/install_template/templates/products/edb-odbc-connector/rhel-7-or-ol-7.njk new file mode 100644 index 00000000000..284ebd1b458 --- /dev/null +++ b/install_template/templates/products/edb-odbc-connector/rhel-7-or-ol-7.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-odbc-connector/base.njk" %} +{% set platformBaseTemplate = "rhel-7-or-ol-7" %} \ No newline at end of file diff --git a/install_template/templates/products/edb-odbc-connector/rhel-7-or-ol-7_ppc64le.njk b/install_template/templates/products/edb-odbc-connector/rhel-7-or-ol-7_ppc64le.njk new file mode 100644 index 00000000000..b3ee612762e --- /dev/null +++ b/install_template/templates/products/edb-odbc-connector/rhel-7-or-ol-7_ppc64le.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-odbc-connector/rhel-7-or-ol-7.njk" %} +{% set includePPC = true %} \ No newline at end of file diff --git a/install_template/templates/products/edb-odbc-connector/rhel-8-or-ol-8.njk b/install_template/templates/products/edb-odbc-connector/rhel-8-or-ol-8.njk new file mode 100644 index 00000000000..32ec589eb1d --- /dev/null +++ b/install_template/templates/products/edb-odbc-connector/rhel-8-or-ol-8.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-odbc-connector/base.njk" %} +{% set platformBaseTemplate = "rhel-8-or-ol-8" %} \ No newline at end of file diff --git a/install_template/templates/products/edb-odbc-connector/sles-12.njk b/install_template/templates/products/edb-odbc-connector/sles-12.njk new file mode 100644 index 00000000000..3b5f6694028 --- /dev/null +++ b/install_template/templates/products/edb-odbc-connector/sles-12.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-odbc-connector/base.njk" %} +{% set platformBaseTemplate = "sles-12" %} \ No newline at end of file diff --git a/install_template/templates/products/edb-odbc-connector/sles-12_ppc64le.njk b/install_template/templates/products/edb-odbc-connector/sles-12_ppc64le.njk new file mode 100644 index 00000000000..3b5f6694028 --- /dev/null +++ b/install_template/templates/products/edb-odbc-connector/sles-12_ppc64le.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-odbc-connector/base.njk" %} +{% set platformBaseTemplate = "sles-12" %} \ No newline at end of file diff --git a/install_template/templates/products/edb-odbc-connector/sles-15.njk b/install_template/templates/products/edb-odbc-connector/sles-15.njk new file mode 100644 index 00000000000..e392f81aea9 --- /dev/null +++ b/install_template/templates/products/edb-odbc-connector/sles-15.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-odbc-connector/base.njk" %} +{% set platformBaseTemplate = "sles-15" %} \ No newline at end of file diff --git a/install_template/templates/products/edb-odbc-connector/sles-15_ppc64le.njk b/install_template/templates/products/edb-odbc-connector/sles-15_ppc64le.njk new file mode 100644 index 00000000000..c9839f9812e --- /dev/null +++ b/install_template/templates/products/edb-odbc-connector/sles-15_ppc64le.njk @@ -0,0 +1,3 @@ +{% extends "products/edb-odbc-connector/base.njk" %} +{% set platformBaseTemplate = "sles-15" %} +{% set includePPC = true %} \ No newline at end of file diff --git a/install_template/templates/products/edb-odbc-connector/ubuntu-18.04.njk b/install_template/templates/products/edb-odbc-connector/ubuntu-18.04.njk new file mode 100644 index 00000000000..05bcce6ea77 --- /dev/null +++ b/install_template/templates/products/edb-odbc-connector/ubuntu-18.04.njk @@ -0,0 +1 @@ +{% extends "products/edb-odbc-connector/debian-10.njk" %} diff --git a/install_template/templates/products/edb-odbc-connector/ubuntu-20.04.njk b/install_template/templates/products/edb-odbc-connector/ubuntu-20.04.njk new file mode 100644 index 00000000000..05bcce6ea77 --- /dev/null +++ b/install_template/templates/products/edb-odbc-connector/ubuntu-20.04.njk @@ -0,0 +1 @@ +{% extends "products/edb-odbc-connector/debian-10.njk" %} diff --git a/install_template/templates/products/edb-pgbouncer/almalinux-8-or-rocky-linux-8.njk b/install_template/templates/products/edb-pgbouncer/almalinux-8-or-rocky-linux-8.njk new file mode 100644 index 00000000000..189f1f855d9 --- /dev/null +++ b/install_template/templates/products/edb-pgbouncer/almalinux-8-or-rocky-linux-8.njk @@ -0,0 +1,10 @@ +{% extends "products/edb-pgbouncer/base.njk" %} +{% set platformBaseTemplate = "almalinux-8-or-rocky-linux-8" %} +{% block prerequisites %} +{{ super() }} +1. Disable the built-in PostgreSQL module: + + ```sh + dnf -qy module disable postgresql + ``` +{% endblock prerequisites %} \ No newline at end of file diff --git a/install_template/templates/products/edb-pgbouncer/base.njk b/install_template/templates/products/edb-pgbouncer/base.njk new file mode 100644 index 00000000000..8618c7c4c3e --- /dev/null +++ b/install_template/templates/products/edb-pgbouncer/base.njk @@ -0,0 +1,8 @@ +{% extends "platformBase/" + platformBaseTemplate + '.njk' %} +{% set packageName %}edb-pgbouncer{% endset %} +{% block installCommand %} +```shell +zypper -n install {{ packageName }} +``` +Where `` is the version of EDB PgBouncer you are installing. +{% endblock installCommand %} \ No newline at end of file diff --git a/install_template/templates/products/edb-pgbouncer/centos-7.njk b/install_template/templates/products/edb-pgbouncer/centos-7.njk new file mode 100644 index 00000000000..8442447ef64 --- /dev/null +++ b/install_template/templates/products/edb-pgbouncer/centos-7.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-pgbouncer/base.njk" %} +{% set platformBaseTemplate = "centos-7" %} \ No newline at end of file diff --git a/install_template/templates/products/edb-pgbouncer/centos-7_ppc64le.njk b/install_template/templates/products/edb-pgbouncer/centos-7_ppc64le.njk new file mode 100644 index 00000000000..e6420f9bf37 --- /dev/null +++ b/install_template/templates/products/edb-pgbouncer/centos-7_ppc64le.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-pgbouncer/centos-7.njk" %} +{% set includePPC = true %} diff --git a/install_template/templates/products/edb-pgbouncer/debian-10.njk b/install_template/templates/products/edb-pgbouncer/debian-10.njk new file mode 100644 index 00000000000..b08994b1cf5 --- /dev/null +++ b/install_template/templates/products/edb-pgbouncer/debian-10.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-pgbouncer/base.njk" %} +{% set platformBaseTemplate = "debian-10" %} \ No newline at end of file diff --git a/install_template/templates/products/edb-pgbouncer/debian-9.njk b/install_template/templates/products/edb-pgbouncer/debian-9.njk new file mode 100644 index 00000000000..a7afcb8dc3d --- /dev/null +++ b/install_template/templates/products/edb-pgbouncer/debian-9.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-pgbouncer/base.njk" %} +{% set platformBaseTemplate = "debian-9" %} \ No newline at end of file diff --git a/install_template/templates/products/edb-pgbouncer/rhel-7-or-ol-7.njk b/install_template/templates/products/edb-pgbouncer/rhel-7-or-ol-7.njk new file mode 100644 index 00000000000..415e2a0a9d0 --- /dev/null +++ b/install_template/templates/products/edb-pgbouncer/rhel-7-or-ol-7.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-pgbouncer/base.njk" %} +{% set platformBaseTemplate = "rhel-7-or-ol-7" %} \ No newline at end of file diff --git a/install_template/templates/products/edb-pgbouncer/rhel-7-or-ol-7_ppc64le.njk b/install_template/templates/products/edb-pgbouncer/rhel-7-or-ol-7_ppc64le.njk new file mode 100644 index 00000000000..8764abd165c --- /dev/null +++ b/install_template/templates/products/edb-pgbouncer/rhel-7-or-ol-7_ppc64le.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-pgbouncer/rhel-7-or-ol-7.njk" %} +{% set includePPC = true %} \ No newline at end of file diff --git a/install_template/templates/products/edb-pgbouncer/rhel-8-or-ol-8.njk b/install_template/templates/products/edb-pgbouncer/rhel-8-or-ol-8.njk new file mode 100644 index 00000000000..262082bf7a7 --- /dev/null +++ b/install_template/templates/products/edb-pgbouncer/rhel-8-or-ol-8.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-pgbouncer/base.njk" %} +{% set platformBaseTemplate = "rhel-8-or-ol-8" %} \ No newline at end of file diff --git a/install_template/templates/products/edb-pgbouncer/sles-12.njk b/install_template/templates/products/edb-pgbouncer/sles-12.njk new file mode 100644 index 00000000000..e58c3610bd1 --- /dev/null +++ b/install_template/templates/products/edb-pgbouncer/sles-12.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-pgbouncer/base.njk" %} +{% set platformBaseTemplate = "sles-12" %} \ No newline at end of file diff --git a/install_template/templates/products/edb-pgbouncer/sles-12_ppc64le.njk b/install_template/templates/products/edb-pgbouncer/sles-12_ppc64le.njk new file mode 100644 index 00000000000..e58c3610bd1 --- /dev/null +++ b/install_template/templates/products/edb-pgbouncer/sles-12_ppc64le.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-pgbouncer/base.njk" %} +{% set platformBaseTemplate = "sles-12" %} \ No newline at end of file diff --git a/install_template/templates/products/edb-pgbouncer/sles-15.njk b/install_template/templates/products/edb-pgbouncer/sles-15.njk new file mode 100644 index 00000000000..b1dbc01fe18 --- /dev/null +++ b/install_template/templates/products/edb-pgbouncer/sles-15.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-pgbouncer/base.njk" %} +{% set platformBaseTemplate = "sles-15" %} \ No newline at end of file diff --git a/install_template/templates/products/edb-pgbouncer/sles-15_ppc64le.njk b/install_template/templates/products/edb-pgbouncer/sles-15_ppc64le.njk new file mode 100644 index 00000000000..795803c92e1 --- /dev/null +++ b/install_template/templates/products/edb-pgbouncer/sles-15_ppc64le.njk @@ -0,0 +1,3 @@ +{% extends "products/edb-pgbouncer/base.njk" %} +{% set platformBaseTemplate = "sles-15" %} +{% set includePPC = true %} \ No newline at end of file diff --git a/install_template/templates/products/edb-pgbouncer/ubuntu-18.04.njk b/install_template/templates/products/edb-pgbouncer/ubuntu-18.04.njk new file mode 100644 index 00000000000..2cdc2edfa95 --- /dev/null +++ b/install_template/templates/products/edb-pgbouncer/ubuntu-18.04.njk @@ -0,0 +1 @@ +{% extends "products/edb-pgbouncer/debian-10.njk" %} diff --git a/install_template/templates/products/edb-pgbouncer/ubuntu-20.04.njk b/install_template/templates/products/edb-pgbouncer/ubuntu-20.04.njk new file mode 100644 index 00000000000..2cdc2edfa95 --- /dev/null +++ b/install_template/templates/products/edb-pgbouncer/ubuntu-20.04.njk @@ -0,0 +1 @@ +{% extends "products/edb-pgbouncer/debian-10.njk" %} diff --git a/install_template/templates/products/edb-pgpoolii-extensions/almalinux-8-or-rocky-linux-8.njk b/install_template/templates/products/edb-pgpoolii-extensions/almalinux-8-or-rocky-linux-8.njk new file mode 100644 index 00000000000..73204b7cbc9 --- /dev/null +++ b/install_template/templates/products/edb-pgpoolii-extensions/almalinux-8-or-rocky-linux-8.njk @@ -0,0 +1,10 @@ +{% extends "products/edb-pgpoolii/base.njk" %} +{% set platformBaseTemplate = "almalinux-8-or-rocky-linux-8" %} +{% block prerequisites %} +{{ super() }} +1. Disable the built-in PostgreSQL module: + + ```sh + dnf -qy module disable postgresql + ``` +{% endblock prerequisites %} \ No newline at end of file diff --git a/install_template/templates/products/edb-pgpoolii-extensions/base.njk b/install_template/templates/products/edb-pgpoolii-extensions/base.njk new file mode 100644 index 00000000000..285e1946571 --- /dev/null +++ b/install_template/templates/products/edb-pgpoolii-extensions/base.njk @@ -0,0 +1,8 @@ +{% extends "platformBase/" + platformBaseTemplate + '.njk' %} +{% set packageName %}edb-as--pgpool-extensions{% endset %} +{% block installCommand %} +```shell +zypper -n install {{ packageName }} +``` +Where `` is the EDB Postgres Advanced Server version and `` is the EDB Pgpool-II version you are installing. +{% endblock installCommand %} diff --git a/install_template/templates/products/edb-pgpoolii-extensions/centos-7.njk b/install_template/templates/products/edb-pgpoolii-extensions/centos-7.njk new file mode 100644 index 00000000000..9fd14588299 --- /dev/null +++ b/install_template/templates/products/edb-pgpoolii-extensions/centos-7.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-pgpoolii-extensions/base.njk" %} +{% set platformBaseTemplate = "centos-7" %} \ No newline at end of file diff --git a/install_template/templates/products/edb-pgpoolii-extensions/centos-7_ppc64le.njk b/install_template/templates/products/edb-pgpoolii-extensions/centos-7_ppc64le.njk new file mode 100644 index 00000000000..64df7efa1f6 --- /dev/null +++ b/install_template/templates/products/edb-pgpoolii-extensions/centos-7_ppc64le.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-pgpoolii-extensions/centos-7.njk" %} +{% set includePPC = true %} diff --git a/install_template/templates/products/edb-pgpoolii-extensions/debian-10.njk b/install_template/templates/products/edb-pgpoolii-extensions/debian-10.njk new file mode 100644 index 00000000000..2683b56783c --- /dev/null +++ b/install_template/templates/products/edb-pgpoolii-extensions/debian-10.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-pgpoolii-extensions/base.njk" %} +{% set platformBaseTemplate = "debian-10" %} \ No newline at end of file diff --git a/install_template/templates/products/edb-pgpoolii-extensions/debian-9.njk b/install_template/templates/products/edb-pgpoolii-extensions/debian-9.njk new file mode 100644 index 00000000000..d9a545ef822 --- /dev/null +++ b/install_template/templates/products/edb-pgpoolii-extensions/debian-9.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-pgpoolii-extensions/base.njk" %} +{% set platformBaseTemplate = "debian-9" %} \ No newline at end of file diff --git a/install_template/templates/products/edb-pgpoolii-extensions/rhel-7-or-ol-7.njk b/install_template/templates/products/edb-pgpoolii-extensions/rhel-7-or-ol-7.njk new file mode 100644 index 00000000000..27a7a010b8b --- /dev/null +++ b/install_template/templates/products/edb-pgpoolii-extensions/rhel-7-or-ol-7.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-pgpoolii-extensions/base.njk" %} +{% set platformBaseTemplate = "rhel-7-or-ol-7" %} \ No newline at end of file diff --git a/install_template/templates/products/edb-pgpoolii-extensions/rhel-7-or-ol-7_ppc64le.njk b/install_template/templates/products/edb-pgpoolii-extensions/rhel-7-or-ol-7_ppc64le.njk new file mode 100644 index 00000000000..fe0a6ae2694 --- /dev/null +++ b/install_template/templates/products/edb-pgpoolii-extensions/rhel-7-or-ol-7_ppc64le.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-pgpoolii-extensions/rhel-7-or-ol-7.njk" %} +{% set includePPC = true %} \ No newline at end of file diff --git a/install_template/templates/products/edb-pgpoolii-extensions/rhel-8-or-ol-8.njk b/install_template/templates/products/edb-pgpoolii-extensions/rhel-8-or-ol-8.njk new file mode 100644 index 00000000000..4f4a6e0124e --- /dev/null +++ b/install_template/templates/products/edb-pgpoolii-extensions/rhel-8-or-ol-8.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-pgpoolii-extensions/base.njk" %} +{% set platformBaseTemplate = "rhel-8-or-ol-8" %} \ No newline at end of file diff --git a/install_template/templates/products/edb-pgpoolii-extensions/sles-12.njk b/install_template/templates/products/edb-pgpoolii-extensions/sles-12.njk new file mode 100644 index 00000000000..d69e0701519 --- /dev/null +++ b/install_template/templates/products/edb-pgpoolii-extensions/sles-12.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-pgpoolii-extensions/base.njk" %} +{% set platformBaseTemplate = "sles-12" %} \ No newline at end of file diff --git a/install_template/templates/products/edb-pgpoolii-extensions/sles-12_ppc64le.njk b/install_template/templates/products/edb-pgpoolii-extensions/sles-12_ppc64le.njk new file mode 100644 index 00000000000..d69e0701519 --- /dev/null +++ b/install_template/templates/products/edb-pgpoolii-extensions/sles-12_ppc64le.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-pgpoolii-extensions/base.njk" %} +{% set platformBaseTemplate = "sles-12" %} \ No newline at end of file diff --git a/install_template/templates/products/edb-pgpoolii-extensions/sles-15.njk b/install_template/templates/products/edb-pgpoolii-extensions/sles-15.njk new file mode 100644 index 00000000000..da132b4e3ce --- /dev/null +++ b/install_template/templates/products/edb-pgpoolii-extensions/sles-15.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-pgpoolii-extensions/base.njk" %} +{% set platformBaseTemplate = "sles-15" %} \ No newline at end of file diff --git a/install_template/templates/products/edb-pgpoolii-extensions/sles-15_ppc64le.njk b/install_template/templates/products/edb-pgpoolii-extensions/sles-15_ppc64le.njk new file mode 100644 index 00000000000..6550ff3a389 --- /dev/null +++ b/install_template/templates/products/edb-pgpoolii-extensions/sles-15_ppc64le.njk @@ -0,0 +1,3 @@ +{% extends "products/edb-pgpoolii-extensions/base.njk" %} +{% set platformBaseTemplate = "sles-15" %} +{% set includePPC = true %} \ No newline at end of file diff --git a/install_template/templates/products/edb-pgpoolii-extensions/ubuntu-18.04.njk b/install_template/templates/products/edb-pgpoolii-extensions/ubuntu-18.04.njk new file mode 100644 index 00000000000..9548753acca --- /dev/null +++ b/install_template/templates/products/edb-pgpoolii-extensions/ubuntu-18.04.njk @@ -0,0 +1 @@ +{% extends "products/edb-pgpoolii-extensions/debian-10.njk" %} diff --git a/install_template/templates/products/edb-pgpoolii-extensions/ubuntu-20.04.njk b/install_template/templates/products/edb-pgpoolii-extensions/ubuntu-20.04.njk new file mode 100644 index 00000000000..9548753acca --- /dev/null +++ b/install_template/templates/products/edb-pgpoolii-extensions/ubuntu-20.04.njk @@ -0,0 +1 @@ +{% extends "products/edb-pgpoolii-extensions/debian-10.njk" %} diff --git a/install_template/templates/products/edb-pgpoolii/almalinux-8-or-rocky-linux-8.njk b/install_template/templates/products/edb-pgpoolii/almalinux-8-or-rocky-linux-8.njk new file mode 100644 index 00000000000..73204b7cbc9 --- /dev/null +++ b/install_template/templates/products/edb-pgpoolii/almalinux-8-or-rocky-linux-8.njk @@ -0,0 +1,10 @@ +{% extends "products/edb-pgpoolii/base.njk" %} +{% set platformBaseTemplate = "almalinux-8-or-rocky-linux-8" %} +{% block prerequisites %} +{{ super() }} +1. Disable the built-in PostgreSQL module: + + ```sh + dnf -qy module disable postgresql + ``` +{% endblock prerequisites %} \ No newline at end of file diff --git a/install_template/templates/products/edb-pgpoolii/base.njk b/install_template/templates/products/edb-pgpoolii/base.njk new file mode 100644 index 00000000000..9dbc78954e0 --- /dev/null +++ b/install_template/templates/products/edb-pgpoolii/base.njk @@ -0,0 +1,8 @@ +{% extends "platformBase/" + platformBaseTemplate + '.njk' %} +{% set packageName %}edb-pgpool{% endset %} +{% block installCommand %} +```shell +zypper -n install {{ packageName }} +``` +Where `` is the version of EDB PbPool-II you are installing. +{% endblock installCommand %} diff --git a/install_template/templates/products/edb-pgpoolii/centos-7.njk b/install_template/templates/products/edb-pgpoolii/centos-7.njk new file mode 100644 index 00000000000..0ced08dfc2f --- /dev/null +++ b/install_template/templates/products/edb-pgpoolii/centos-7.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-pgpoolii/base.njk" %} +{% set platformBaseTemplate = "centos-7" %} \ No newline at end of file diff --git a/install_template/templates/products/edb-pgpoolii/centos-7_ppc64le.njk b/install_template/templates/products/edb-pgpoolii/centos-7_ppc64le.njk new file mode 100644 index 00000000000..93c76f789ec --- /dev/null +++ b/install_template/templates/products/edb-pgpoolii/centos-7_ppc64le.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-pgpoolii/centos-7.njk" %} +{% set includePPC = true %} diff --git a/install_template/templates/products/edb-pgpoolii/debian-10.njk b/install_template/templates/products/edb-pgpoolii/debian-10.njk new file mode 100644 index 00000000000..72372bfb8d2 --- /dev/null +++ b/install_template/templates/products/edb-pgpoolii/debian-10.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-pgpoolii/base.njk" %} +{% set platformBaseTemplate = "debian-10" %} \ No newline at end of file diff --git a/install_template/templates/products/edb-pgpoolii/debian-9.njk b/install_template/templates/products/edb-pgpoolii/debian-9.njk new file mode 100644 index 00000000000..995623c5fea --- /dev/null +++ b/install_template/templates/products/edb-pgpoolii/debian-9.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-pgpoolii/base.njk" %} +{% set platformBaseTemplate = "debian-9" %} \ No newline at end of file diff --git a/install_template/templates/products/edb-pgpoolii/rhel-7-or-ol-7.njk b/install_template/templates/products/edb-pgpoolii/rhel-7-or-ol-7.njk new file mode 100644 index 00000000000..51c924f89e9 --- /dev/null +++ b/install_template/templates/products/edb-pgpoolii/rhel-7-or-ol-7.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-pgpoolii/base.njk" %} +{% set platformBaseTemplate = "rhel-7-or-ol-7" %} \ No newline at end of file diff --git a/install_template/templates/products/edb-pgpoolii/rhel-7-or-ol-7_ppc64le.njk b/install_template/templates/products/edb-pgpoolii/rhel-7-or-ol-7_ppc64le.njk new file mode 100644 index 00000000000..0428d5bdcc4 --- /dev/null +++ b/install_template/templates/products/edb-pgpoolii/rhel-7-or-ol-7_ppc64le.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-pgpoolii/rhel-7-or-ol-7.njk" %} +{% set includePPC = true %} \ No newline at end of file diff --git a/install_template/templates/products/edb-pgpoolii/rhel-8-or-ol-8.njk b/install_template/templates/products/edb-pgpoolii/rhel-8-or-ol-8.njk new file mode 100644 index 00000000000..eaae22b3e1c --- /dev/null +++ b/install_template/templates/products/edb-pgpoolii/rhel-8-or-ol-8.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-pgpoolii/base.njk" %} +{% set platformBaseTemplate = "rhel-8-or-ol-8" %} \ No newline at end of file diff --git a/install_template/templates/products/edb-pgpoolii/sles-12.njk b/install_template/templates/products/edb-pgpoolii/sles-12.njk new file mode 100644 index 00000000000..df59d96575d --- /dev/null +++ b/install_template/templates/products/edb-pgpoolii/sles-12.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-pgpoolii/base.njk" %} +{% set platformBaseTemplate = "sles-12" %} \ No newline at end of file diff --git a/install_template/templates/products/edb-pgpoolii/sles-12_ppc64le.njk b/install_template/templates/products/edb-pgpoolii/sles-12_ppc64le.njk new file mode 100644 index 00000000000..df59d96575d --- /dev/null +++ b/install_template/templates/products/edb-pgpoolii/sles-12_ppc64le.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-pgpoolii/base.njk" %} +{% set platformBaseTemplate = "sles-12" %} \ No newline at end of file diff --git a/install_template/templates/products/edb-pgpoolii/sles-15.njk b/install_template/templates/products/edb-pgpoolii/sles-15.njk new file mode 100644 index 00000000000..a43f3e923d4 --- /dev/null +++ b/install_template/templates/products/edb-pgpoolii/sles-15.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-pgpoolii/base.njk" %} +{% set platformBaseTemplate = "sles-15" %} \ No newline at end of file diff --git a/install_template/templates/products/edb-pgpoolii/sles-15_ppc64le.njk b/install_template/templates/products/edb-pgpoolii/sles-15_ppc64le.njk new file mode 100644 index 00000000000..f6950412ea1 --- /dev/null +++ b/install_template/templates/products/edb-pgpoolii/sles-15_ppc64le.njk @@ -0,0 +1,3 @@ +{% extends "products/edb-pgpoolii/base.njk" %} +{% set platformBaseTemplate = "sles-15" %} +{% set includePPC = true %} \ No newline at end of file diff --git a/install_template/templates/products/edb-pgpoolii/ubuntu-18.04.njk b/install_template/templates/products/edb-pgpoolii/ubuntu-18.04.njk new file mode 100644 index 00000000000..4050a963575 --- /dev/null +++ b/install_template/templates/products/edb-pgpoolii/ubuntu-18.04.njk @@ -0,0 +1 @@ +{% extends "products/edb-pgpoolii/debian-10.njk" %} diff --git a/install_template/templates/products/edb-pgpoolii/ubuntu-20.04.njk b/install_template/templates/products/edb-pgpoolii/ubuntu-20.04.njk new file mode 100644 index 00000000000..4050a963575 --- /dev/null +++ b/install_template/templates/products/edb-pgpoolii/ubuntu-20.04.njk @@ -0,0 +1 @@ +{% extends "products/edb-pgpoolii/debian-10.njk" %} diff --git a/install_template/templates/products/edb-postgres-advanced-server/_centos-rhel-connectdatabasecluster.njk b/install_template/templates/products/edb-postgres-advanced-server/_centos-rhel-connectdatabasecluster.njk new file mode 100644 index 00000000000..48f885404e2 --- /dev/null +++ b/install_template/templates/products/edb-postgres-advanced-server/_centos-rhel-connectdatabasecluster.njk @@ -0,0 +1,6 @@ +1. To ensure the installation and initial configuration was successful, check the status of your cluster: + + ```sh + /usr/edb/as{{ product.version }}/bin/pg_ctl status -D /var/lib/edb/as{{ product.version }}/data + ``` + See [Managing Cluster > Managing Services] for more information. \ No newline at end of file diff --git a/install_template/templates/products/edb-postgres-advanced-server/_centos-rhel-installcommand.njk b/install_template/templates/products/edb-postgres-advanced-server/_centos-rhel-installcommand.njk new file mode 100644 index 00000000000..f68d90274aa --- /dev/null +++ b/install_template/templates/products/edb-postgres-advanced-server/_centos-rhel-installcommand.njk @@ -0,0 +1 @@ +Installing the server package creates an operating system user named `enterprisedb`. The user is assigned a user ID (UID) and a group ID (GID). The user has no default password. Use the `passwd` command to assign a password for the user. The default shell for the user is `bash` and the user's home directory is `/var/lib/edb/as{{ product.version }}`. \ No newline at end of file diff --git a/install_template/templates/products/edb-postgres-advanced-server/_centos-rhel-postinstall.njk b/install_template/templates/products/edb-postgres-advanced-server/_centos-rhel-postinstall.njk new file mode 100644 index 00000000000..19d7f24d014 --- /dev/null +++ b/install_template/templates/products/edb-postgres-advanced-server/_centos-rhel-postinstall.njk @@ -0,0 +1,11 @@ +1. Initialize the database cluster: + + ```sh + PGSETUP_INITDB_OPTIONS="-E UTF-8" /usr/edb/as{{ product.version }}/bin/edb-as-{{ product.version | replace(".", "") }}-setup initdb + ``` + +1. Start the database cluster: + + ```sh + systemctl start edb-as-{{ product.version }} + ``` diff --git a/install_template/templates/products/edb-postgres-advanced-server/_debian-initialconfiguration.njk b/install_template/templates/products/edb-postgres-advanced-server/_debian-initialconfiguration.njk new file mode 100644 index 00000000000..8613674b5aa --- /dev/null +++ b/install_template/templates/products/edb-postgres-advanced-server/_debian-initialconfiguration.njk @@ -0,0 +1 @@ +For Debian/Ubuntu platforms, initializing and starting of the database cluster is done along with the package installation. diff --git a/install_template/templates/products/edb-postgres-advanced-server/almalinux-8-or-rocky-linux-8.njk b/install_template/templates/products/edb-postgres-advanced-server/almalinux-8-or-rocky-linux-8.njk new file mode 100644 index 00000000000..7570fb82e1f --- /dev/null +++ b/install_template/templates/products/edb-postgres-advanced-server/almalinux-8-or-rocky-linux-8.njk @@ -0,0 +1,22 @@ +{% extends "products/edb-postgres-advanced-server/base.njk" %} +{% set platformBaseTemplate = "almalinux-8-or-rocky-linux-8" %} +{% block prerequisites %} +{{ super() }} +1. Disable the built-in PostgreSQL module: + + ```sh + dnf -qy module disable postgresql + ``` +{% endblock prerequisites %} +{% block installCommand %} +{{ super() }} +{% include "products/edb-postgres-advanced-server/_centos-rhel-installcommand.njk" %} +{% endblock installCommand %} +{% block postinstall %} +{% include "products/edb-postgres-advanced-server/_centos-rhel-postinstall.njk" %} +{{ super() }} +{% endblock postinstall %} +{% block connectdatabasecluster %} +{% include "products/edb-postgres-advanced-server/_centos-rhel-connectdatabasecluster.njk" %} +{{ super() }} +{% endblock connectdatabasecluster %} diff --git a/install_template/templates/products/edb-postgres-advanced-server/base.njk b/install_template/templates/products/edb-postgres-advanced-server/base.njk new file mode 100644 index 00000000000..37ef64a7617 --- /dev/null +++ b/install_template/templates/products/edb-postgres-advanced-server/base.njk @@ -0,0 +1,72 @@ +{% extends "platformBase/" + platformBaseTemplate + '.njk' %} +{% set packageName %}edb-as-server{% endset %} +{% block installCommand %} +```shell +zypper -n install {{ packageName }} +``` +Where xx is the version of EDB Postgres Advanced Server you are installing. +{% endblock installCommand %} + +{% block postinstall %} +## Connecting to Your Database cluster + +This section steps you through getting started with your cluster including logging in, ensuring the installation and initial configuration was successful, connecting to your cluster, and creating the user password. + +{% block connectdatabasecluster %}{% endblock connectdatabasecluster %} +1. To work in your cluster, login as `enterprisedb` user: + + ```sh + su - enterprisedb + ``` + See [Managing Your Cluster > Managing Services], for more information. + +1. Connect to the database server using psql command line client: + + ```sh + psql edb + ``` + See [Managing Your Cluster > Connecting to Your Cluster], for more information including how to use pgAdmin4 to connect to your cluster using its graphical interface. + +1. Then, assign a password to the database superuser `enterprisedb`: + + ```sh + ALTER ROLE enterprisedb IDENTIFIED BY password; + ``` + +## Creating a Database + +This section steps you through creating and adding data to a simple database. + +1. Create a database (named hr): + + ```sh + CREATE DATABASE hr; + ``` + +1. Connect to the new database and create a table (named dept): + + ```sh + \c hr + CREATE TABLE public.dept (deptno numeric(2) NOT NULL CONSTRAINT dept_pk + PRIMARY KEY, dname varchar(14) CONSTRAINT dept_dname_uq UNIQUE, loc + varchar(13)); + ``` + +1. Add data to the table: + + ```sh + INSERT INTO dept VALUES (10,'ACCOUNTING','NEW YORK'); + INSERT into dept VALUES (20,'RESEARCH','DALLAS'); + ``` + +1. You can use simple SQL commands to query the database and retrieve information about the data you have added to the table: + + ```sh + SELECT * FROM dept; + deptno | dname | loc + --------+------------+---------- + 10 | ACCOUNTING | NEW YORK + 20 | RESEARCH | DALLAS + (2 rows) + ``` +{% endblock postinstall %} \ No newline at end of file diff --git a/install_template/templates/products/edb-postgres-advanced-server/centos-7.njk b/install_template/templates/products/edb-postgres-advanced-server/centos-7.njk new file mode 100644 index 00000000000..82c31735212 --- /dev/null +++ b/install_template/templates/products/edb-postgres-advanced-server/centos-7.njk @@ -0,0 +1,14 @@ +{% extends "products/edb-postgres-advanced-server/base.njk" %} +{% set platformBaseTemplate = "centos-7" %} +{% block installCommand %} +{{ super() }} +{% include "products/edb-postgres-advanced-server/_centos-rhel-installcommand.njk" %} +{% endblock installCommand %} +{% block postinstall %} +{% include "products/edb-postgres-advanced-server/_centos-rhel-postinstall.njk" %} +{{ super() }} +{% endblock postinstall %} +{% block connectdatabasecluster %} +{% include "products/edb-postgres-advanced-server/_centos-rhel-connectdatabasecluster.njk" %} +{{ super() }} +{% endblock connectdatabasecluster %} diff --git a/install_template/templates/products/edb-postgres-advanced-server/centos-7_ppc64le.njk b/install_template/templates/products/edb-postgres-advanced-server/centos-7_ppc64le.njk new file mode 100644 index 00000000000..2c7a1d9160c --- /dev/null +++ b/install_template/templates/products/edb-postgres-advanced-server/centos-7_ppc64le.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-postgres-advanced-server/centos-7.njk" %} +{% set includePPC = true %} diff --git a/install_template/templates/products/edb-postgres-advanced-server/debian-10.njk b/install_template/templates/products/edb-postgres-advanced-server/debian-10.njk new file mode 100644 index 00000000000..2088e274ad2 --- /dev/null +++ b/install_template/templates/products/edb-postgres-advanced-server/debian-10.njk @@ -0,0 +1,6 @@ +{% extends "products/edb-postgres-advanced-server/base.njk" %} +{% set platformBaseTemplate = "debian-10" %} +{% block postinstall %} +{% include "products/edb-postgres-advanced-server/_debian-initialconfiguration.njk" %} +{{ super() }} +{% endblock postinstall %} \ No newline at end of file diff --git a/install_template/templates/products/edb-postgres-advanced-server/debian-9.njk b/install_template/templates/products/edb-postgres-advanced-server/debian-9.njk new file mode 100644 index 00000000000..876f9e82bbe --- /dev/null +++ b/install_template/templates/products/edb-postgres-advanced-server/debian-9.njk @@ -0,0 +1,6 @@ +{% extends "products/edb-postgres-advanced-server/base.njk" %} +{% set platformBaseTemplate = "debian-9" %} +{% block postinstall %} +{% include "products/edb-postgres-advanced-server/_debian-initialconfiguration.njk" %} +{{ super() }} +{% endblock postinstall %} diff --git a/install_template/templates/products/edb-postgres-advanced-server/rhel-7-or-ol-7.njk b/install_template/templates/products/edb-postgres-advanced-server/rhel-7-or-ol-7.njk new file mode 100644 index 00000000000..989c8c5b739 --- /dev/null +++ b/install_template/templates/products/edb-postgres-advanced-server/rhel-7-or-ol-7.njk @@ -0,0 +1,10 @@ +{% extends "products/edb-postgres-advanced-server/base.njk" %} +{% set platformBaseTemplate = "rhel-7-or-ol-7" %} +{% block installCommand %} +{{ super() }} +{% include "products/edb-postgres-advanced-server/_centos-rhel-installcommand.njk" %} +{% endblock installCommand %} +{% block postinstall %} +{% include "products/edb-postgres-advanced-server/_centos-rhel-postinstall.njk" %} +{{ super() }} +{% endblock postinstall %} diff --git a/install_template/templates/products/edb-postgres-advanced-server/rhel-7-or-ol-7_local.njk b/install_template/templates/products/edb-postgres-advanced-server/rhel-7-or-ol-7_local.njk new file mode 100644 index 00000000000..2c29868f09c --- /dev/null +++ b/install_template/templates/products/edb-postgres-advanced-server/rhel-7-or-ol-7_local.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-postgres-advanced-server/rhel-7-or-ol-7.njk" %} +{% set includeLOCAL = true %} \ No newline at end of file diff --git a/install_template/templates/products/edb-postgres-advanced-server/rhel-7-or-ol-7_ppc64le.njk b/install_template/templates/products/edb-postgres-advanced-server/rhel-7-or-ol-7_ppc64le.njk new file mode 100644 index 00000000000..ceeebb5337b --- /dev/null +++ b/install_template/templates/products/edb-postgres-advanced-server/rhel-7-or-ol-7_ppc64le.njk @@ -0,0 +1,5 @@ +{% extends "products/edb-postgres-advanced-server/rhel-7-or-ol-7.njk" %} +{% set includePPC = true %} +{% block installCommand %} +{{ super() }} +{% endblock installCommand %} \ No newline at end of file diff --git a/install_template/templates/products/edb-postgres-advanced-server/rhel-8-or-centos-8-or-ol-8.njk b/install_template/templates/products/edb-postgres-advanced-server/rhel-8-or-centos-8-or-ol-8.njk new file mode 100644 index 00000000000..54997b7ac49 --- /dev/null +++ b/install_template/templates/products/edb-postgres-advanced-server/rhel-8-or-centos-8-or-ol-8.njk @@ -0,0 +1,10 @@ +{% extends "products/edb-postgres-advanced-server/base.njk" %} +{% set platformBaseTemplate = "rhel-8-or-ol-8" %} +{% block installCommand %} +{{ super() }} +{% include "products/edb-postgres-advanced-server/_centos-rhel-installcommand.njk" %} +{% endblock installCommand %} +{% block postinstall %} +{% include "products/edb-postgres-advanced-server/_centos-rhel-postinstall.njk" %} +{{ super() }} +{% endblock postinstall %} diff --git a/install_template/templates/products/edb-postgres-advanced-server/rhel-8-or-ol-8.njk b/install_template/templates/products/edb-postgres-advanced-server/rhel-8-or-ol-8.njk new file mode 100644 index 00000000000..54997b7ac49 --- /dev/null +++ b/install_template/templates/products/edb-postgres-advanced-server/rhel-8-or-ol-8.njk @@ -0,0 +1,10 @@ +{% extends "products/edb-postgres-advanced-server/base.njk" %} +{% set platformBaseTemplate = "rhel-8-or-ol-8" %} +{% block installCommand %} +{{ super() }} +{% include "products/edb-postgres-advanced-server/_centos-rhel-installcommand.njk" %} +{% endblock installCommand %} +{% block postinstall %} +{% include "products/edb-postgres-advanced-server/_centos-rhel-postinstall.njk" %} +{{ super() }} +{% endblock postinstall %} diff --git a/install_template/templates/products/edb-postgres-advanced-server/rhel-8-or-ol-8_ppc64le.njk b/install_template/templates/products/edb-postgres-advanced-server/rhel-8-or-ol-8_ppc64le.njk new file mode 100644 index 00000000000..e887d463646 --- /dev/null +++ b/install_template/templates/products/edb-postgres-advanced-server/rhel-8-or-ol-8_ppc64le.njk @@ -0,0 +1,2 @@ +{% extends "products/edb-postgres-advanced-server/rhel-8-or-ol-8.njk" %} +{% set includePPC = true %} \ No newline at end of file diff --git a/install_template/templates/products/edb-postgres-advanced-server/sles-12.njk b/install_template/templates/products/edb-postgres-advanced-server/sles-12.njk new file mode 100644 index 00000000000..64ac8240b95 --- /dev/null +++ b/install_template/templates/products/edb-postgres-advanced-server/sles-12.njk @@ -0,0 +1,6 @@ +{% extends "products/edb-postgres-advanced-server/base.njk" %} +{% set platformBaseTemplate = "sles-12" %} +{% block postinstall %} +{% include "products/edb-postgres-advanced-server/_centos-rhel-postinstall.njk" %} +{{ super() }} +{% endblock postinstall %} diff --git a/install_template/templates/products/edb-postgres-advanced-server/sles-12_ppc64le.njk b/install_template/templates/products/edb-postgres-advanced-server/sles-12_ppc64le.njk new file mode 100644 index 00000000000..64ac8240b95 --- /dev/null +++ b/install_template/templates/products/edb-postgres-advanced-server/sles-12_ppc64le.njk @@ -0,0 +1,6 @@ +{% extends "products/edb-postgres-advanced-server/base.njk" %} +{% set platformBaseTemplate = "sles-12" %} +{% block postinstall %} +{% include "products/edb-postgres-advanced-server/_centos-rhel-postinstall.njk" %} +{{ super() }} +{% endblock postinstall %} diff --git a/install_template/templates/products/edb-postgres-advanced-server/sles-15.njk b/install_template/templates/products/edb-postgres-advanced-server/sles-15.njk new file mode 100644 index 00000000000..c57a843fa73 --- /dev/null +++ b/install_template/templates/products/edb-postgres-advanced-server/sles-15.njk @@ -0,0 +1,6 @@ +{% extends "products/edb-postgres-advanced-server/base.njk" %} +{% set platformBaseTemplate = "sles-15" %} +{% block postinstall %} +{% include "products/edb-postgres-advanced-server/_centos-rhel-postinstall.njk" %} +{{ super() }} +{% endblock postinstall %} diff --git a/install_template/templates/products/edb-postgres-advanced-server/sles-15_ppc64le.njk b/install_template/templates/products/edb-postgres-advanced-server/sles-15_ppc64le.njk new file mode 100644 index 00000000000..a4113efd4f6 --- /dev/null +++ b/install_template/templates/products/edb-postgres-advanced-server/sles-15_ppc64le.njk @@ -0,0 +1,7 @@ +{% extends "products/edb-postgres-advanced-server/base.njk" %} +{% set platformBaseTemplate = "sles-15" %} +{% set includePPC = true %} +{% block postinstall %} +{% include "products/edb-postgres-advanced-server/_centos-rhel-postinstall.njk" %} +{{ super() }} +{% endblock postinstall %} diff --git a/install_template/templates/products/edb-postgres-advanced-server/ubuntu-18.04.njk b/install_template/templates/products/edb-postgres-advanced-server/ubuntu-18.04.njk new file mode 100644 index 00000000000..367bf0e6b44 --- /dev/null +++ b/install_template/templates/products/edb-postgres-advanced-server/ubuntu-18.04.njk @@ -0,0 +1 @@ +{% extends "products/edb-postgres-advanced-server/debian-10.njk" %} diff --git a/install_template/templates/products/edb-postgres-advanced-server/ubuntu-20.04.njk b/install_template/templates/products/edb-postgres-advanced-server/ubuntu-20.04.njk new file mode 100644 index 00000000000..367bf0e6b44 --- /dev/null +++ b/install_template/templates/products/edb-postgres-advanced-server/ubuntu-20.04.njk @@ -0,0 +1 @@ +{% extends "products/edb-postgres-advanced-server/debian-10.njk" %} diff --git a/install_template/templates/products/failover-manager/almalinux-8-or-rocky-linux-8.njk b/install_template/templates/products/failover-manager/almalinux-8-or-rocky-linux-8.njk new file mode 100644 index 00000000000..f7ed1e086c1 --- /dev/null +++ b/install_template/templates/products/failover-manager/almalinux-8-or-rocky-linux-8.njk @@ -0,0 +1,10 @@ +{% extends "products/failover-manager/base.njk" %} +{% set platformBaseTemplate = "almalinux-8-or-rocky-linux-8" %} +{% block prerequisites %} +{{ super() }} +1. Disable the built-in PostgreSQL module: + + ```sh + dnf -qy module disable postgresql + ``` +{% endblock prerequisites %} \ No newline at end of file diff --git a/install_template/templates/products/failover-manager/base.njk b/install_template/templates/products/failover-manager/base.njk new file mode 100644 index 00000000000..39f04c65181 --- /dev/null +++ b/install_template/templates/products/failover-manager/base.njk @@ -0,0 +1,20 @@ +{% extends "platformBase/" + platformBaseTemplate + '.njk' %} +{% set packageName %}edb-efm<4x>{% endset %} +{% block installCommand %} +```shell +zypper -n install {{ packageName }} +``` +Where `<4x>` is the version of Failover Manager you are installing. For example, if you are installing version 4.0, the package name would be `edb-efm40`. +{% endblock installCommand %} +{% block postinstall %} +## Initial configuration + +If you are using Failover Manager to monitor a cluster owned by a user other than enterprisedb or postgres, see [Extending Failover Manager permissions](../04_configuring_efm/04_extending_efm_permissions/#extending_efm_permissions). + +After installing on each node of the cluster: + +1. Modify the [cluster properties file](../04_configuring_efm/01_cluster_properties/#cluster_properties) on each node. +2. Modify the [cluster members file](../04_configuring_efm/03_cluster_members/#cluster_members) on each node. +3. If applicable, configure and test virtual IP address settings and any scripts that are identified in the cluster properties file. +4. Start the agent on each node of the cluster. For more information, see [Controlling the Failover Manager service](../08_controlling_efm_service/#controlling-the-failover-manager-service). +{% endblock postinstall %} \ No newline at end of file diff --git a/install_template/templates/products/failover-manager/centos-7.njk b/install_template/templates/products/failover-manager/centos-7.njk new file mode 100644 index 00000000000..b7569bfc129 --- /dev/null +++ b/install_template/templates/products/failover-manager/centos-7.njk @@ -0,0 +1,2 @@ +{% extends "products/failover-manager/base.njk" %} +{% set platformBaseTemplate = "centos-7" %} \ No newline at end of file diff --git a/install_template/templates/products/failover-manager/centos-7_ppc64le.njk b/install_template/templates/products/failover-manager/centos-7_ppc64le.njk new file mode 100644 index 00000000000..3fed018c861 --- /dev/null +++ b/install_template/templates/products/failover-manager/centos-7_ppc64le.njk @@ -0,0 +1,2 @@ +{% extends "products/failover-manager/centos-7.njk" %} +{% set includePPC = true %} diff --git a/install_template/templates/products/failover-manager/debian-10.njk b/install_template/templates/products/failover-manager/debian-10.njk new file mode 100644 index 00000000000..abc889724f9 --- /dev/null +++ b/install_template/templates/products/failover-manager/debian-10.njk @@ -0,0 +1,2 @@ +{% extends "products/failover-manager/base.njk" %} +{% set platformBaseTemplate = "debian-10" %} \ No newline at end of file diff --git a/install_template/templates/products/failover-manager/debian-9.njk b/install_template/templates/products/failover-manager/debian-9.njk new file mode 100644 index 00000000000..4690bbccf6c --- /dev/null +++ b/install_template/templates/products/failover-manager/debian-9.njk @@ -0,0 +1,2 @@ +{% extends "products/failover-manager/base.njk" %} +{% set platformBaseTemplate = "debian-9" %} \ No newline at end of file diff --git a/install_template/templates/products/failover-manager/rhel-7-or-ol-7.njk b/install_template/templates/products/failover-manager/rhel-7-or-ol-7.njk new file mode 100644 index 00000000000..19d0ff7e1a7 --- /dev/null +++ b/install_template/templates/products/failover-manager/rhel-7-or-ol-7.njk @@ -0,0 +1,2 @@ +{% extends "products/failover-manager/base.njk" %} +{% set platformBaseTemplate = "rhel-7-or-ol-7" %} \ No newline at end of file diff --git a/install_template/templates/products/failover-manager/rhel-7-or-ol-7_ppc64le.njk b/install_template/templates/products/failover-manager/rhel-7-or-ol-7_ppc64le.njk new file mode 100644 index 00000000000..8b763313fa7 --- /dev/null +++ b/install_template/templates/products/failover-manager/rhel-7-or-ol-7_ppc64le.njk @@ -0,0 +1,2 @@ +{% extends "products/failover-manager/rhel-7-or-ol-7.njk" %} +{% set includePPC = true %} \ No newline at end of file diff --git a/install_template/templates/products/failover-manager/rhel-8-or-ol-8.njk b/install_template/templates/products/failover-manager/rhel-8-or-ol-8.njk new file mode 100644 index 00000000000..43a82c48b44 --- /dev/null +++ b/install_template/templates/products/failover-manager/rhel-8-or-ol-8.njk @@ -0,0 +1,2 @@ +{% extends "products/failover-manager/base.njk" %} +{% set platformBaseTemplate = "rhel-8-or-ol-8" %} \ No newline at end of file diff --git a/install_template/templates/products/failover-manager/sles-12.njk b/install_template/templates/products/failover-manager/sles-12.njk new file mode 100644 index 00000000000..9f15a8082bd --- /dev/null +++ b/install_template/templates/products/failover-manager/sles-12.njk @@ -0,0 +1,2 @@ +{% extends "products/failover-manager/base.njk" %} +{% set platformBaseTemplate = "sles-12" %} diff --git a/install_template/templates/products/failover-manager/sles-12_ppc64le.njk b/install_template/templates/products/failover-manager/sles-12_ppc64le.njk new file mode 100644 index 00000000000..9f15a8082bd --- /dev/null +++ b/install_template/templates/products/failover-manager/sles-12_ppc64le.njk @@ -0,0 +1,2 @@ +{% extends "products/failover-manager/base.njk" %} +{% set platformBaseTemplate = "sles-12" %} diff --git a/install_template/templates/products/failover-manager/sles-15.njk b/install_template/templates/products/failover-manager/sles-15.njk new file mode 100644 index 00000000000..15ed86901a3 --- /dev/null +++ b/install_template/templates/products/failover-manager/sles-15.njk @@ -0,0 +1,2 @@ +{% extends "products/failover-manager/base.njk" %} +{% set platformBaseTemplate = "sles-15" %} diff --git a/install_template/templates/products/failover-manager/sles-15_ppc64le.njk b/install_template/templates/products/failover-manager/sles-15_ppc64le.njk new file mode 100644 index 00000000000..4ea8ce56ede --- /dev/null +++ b/install_template/templates/products/failover-manager/sles-15_ppc64le.njk @@ -0,0 +1,3 @@ +{% extends "products/failover-manager/base.njk" %} +{% set platformBaseTemplate = "sles-15" %} +{% set includePPC = true %} \ No newline at end of file diff --git a/install_template/templates/products/failover-manager/ubuntu-18.04.njk b/install_template/templates/products/failover-manager/ubuntu-18.04.njk new file mode 100644 index 00000000000..0f8744f2140 --- /dev/null +++ b/install_template/templates/products/failover-manager/ubuntu-18.04.njk @@ -0,0 +1 @@ +{% extends "products/failover-manager/debian-10.njk" %} diff --git a/install_template/templates/products/failover-manager/ubuntu-20.04.njk b/install_template/templates/products/failover-manager/ubuntu-20.04.njk new file mode 100644 index 00000000000..0f8744f2140 --- /dev/null +++ b/install_template/templates/products/failover-manager/ubuntu-20.04.njk @@ -0,0 +1 @@ +{% extends "products/failover-manager/debian-10.njk" %} diff --git a/install_template/templates/products/hadoop-foreign-data-wrapper/almalinux-8-or-rocky-linux-8.njk b/install_template/templates/products/hadoop-foreign-data-wrapper/almalinux-8-or-rocky-linux-8.njk new file mode 100644 index 00000000000..7aa6155aa47 --- /dev/null +++ b/install_template/templates/products/hadoop-foreign-data-wrapper/almalinux-8-or-rocky-linux-8.njk @@ -0,0 +1,10 @@ +{% extends "products/hadoop-foreign-data-wrapper/base.njk" %} +{% set platformBaseTemplate = "almalinux-8-or-rocky-linux-8" %} +{% block prerequisites %} +{{ super() }} +1. Disable the built-in PostgreSQL module: + + ```sh + dnf -qy module disable postgresql + ``` +{% endblock prerequisites %} \ No newline at end of file diff --git a/install_template/templates/products/hadoop-foreign-data-wrapper/base.njk b/install_template/templates/products/hadoop-foreign-data-wrapper/base.njk new file mode 100644 index 00000000000..49db2d2c787 --- /dev/null +++ b/install_template/templates/products/hadoop-foreign-data-wrapper/base.njk @@ -0,0 +1,2 @@ +{% extends "platformBase/" + platformBaseTemplate + '.njk' %} +{% set packageName %}edb-as{{ product.version | replace(".", "") }}-hdfs_fdw{% endset %} diff --git a/install_template/templates/products/hadoop-foreign-data-wrapper/centos-7.njk b/install_template/templates/products/hadoop-foreign-data-wrapper/centos-7.njk new file mode 100644 index 00000000000..1d2ae335746 --- /dev/null +++ b/install_template/templates/products/hadoop-foreign-data-wrapper/centos-7.njk @@ -0,0 +1,2 @@ +{% extends "products/hadoop-foreign-data-wrapper/base.njk" %} +{% set platformBaseTemplate = "centos-7" %} \ No newline at end of file diff --git a/install_template/templates/products/hadoop-foreign-data-wrapper/centos-7_ppc64le.njk b/install_template/templates/products/hadoop-foreign-data-wrapper/centos-7_ppc64le.njk new file mode 100644 index 00000000000..efaa9c2e7dd --- /dev/null +++ b/install_template/templates/products/hadoop-foreign-data-wrapper/centos-7_ppc64le.njk @@ -0,0 +1,2 @@ +{% extends "products/hadoop-foreign-data-wrapper/centos-7.njk" %} +{% set includePPC = true %} diff --git a/install_template/templates/products/hadoop-foreign-data-wrapper/debian-10.njk b/install_template/templates/products/hadoop-foreign-data-wrapper/debian-10.njk new file mode 100644 index 00000000000..5dba7ec69db --- /dev/null +++ b/install_template/templates/products/hadoop-foreign-data-wrapper/debian-10.njk @@ -0,0 +1,2 @@ +{% extends "products/hadoop-foreign-data-wrapper/base.njk" %} +{% set platformBaseTemplate = "debian-10" %} \ No newline at end of file diff --git a/install_template/templates/products/hadoop-foreign-data-wrapper/debian-9.njk b/install_template/templates/products/hadoop-foreign-data-wrapper/debian-9.njk new file mode 100644 index 00000000000..a08d36cc6db --- /dev/null +++ b/install_template/templates/products/hadoop-foreign-data-wrapper/debian-9.njk @@ -0,0 +1,2 @@ +{% extends "products/hadoop-foreign-data-wrapper/base.njk" %} +{% set platformBaseTemplate = "debian-9" %} \ No newline at end of file diff --git a/install_template/templates/products/hadoop-foreign-data-wrapper/rhel-7-or-ol-7.njk b/install_template/templates/products/hadoop-foreign-data-wrapper/rhel-7-or-ol-7.njk new file mode 100644 index 00000000000..f82dec09351 --- /dev/null +++ b/install_template/templates/products/hadoop-foreign-data-wrapper/rhel-7-or-ol-7.njk @@ -0,0 +1,2 @@ +{% extends "products/hadoop-foreign-data-wrapper/base.njk" %} +{% set platformBaseTemplate = "rhel-7-or-ol-7" %} \ No newline at end of file diff --git a/install_template/templates/products/hadoop-foreign-data-wrapper/rhel-7-or-ol-7_ppc64le.njk b/install_template/templates/products/hadoop-foreign-data-wrapper/rhel-7-or-ol-7_ppc64le.njk new file mode 100644 index 00000000000..032a94b5151 --- /dev/null +++ b/install_template/templates/products/hadoop-foreign-data-wrapper/rhel-7-or-ol-7_ppc64le.njk @@ -0,0 +1,2 @@ +{% extends "products/hadoop-foreign-data-wrapper/rhel-7-or-ol-7.njk" %} +{% set includePPC = true %} \ No newline at end of file diff --git a/install_template/templates/products/hadoop-foreign-data-wrapper/rhel-8-or-ol-8.njk b/install_template/templates/products/hadoop-foreign-data-wrapper/rhel-8-or-ol-8.njk new file mode 100644 index 00000000000..c19c16f990d --- /dev/null +++ b/install_template/templates/products/hadoop-foreign-data-wrapper/rhel-8-or-ol-8.njk @@ -0,0 +1,2 @@ +{% extends "products/hadoop-foreign-data-wrapper/base.njk" %} +{% set platformBaseTemplate = "rhel-8-or-ol-8" %} \ No newline at end of file diff --git a/install_template/templates/products/hadoop-foreign-data-wrapper/sles-12.njk b/install_template/templates/products/hadoop-foreign-data-wrapper/sles-12.njk new file mode 100644 index 00000000000..84b9ff1f885 --- /dev/null +++ b/install_template/templates/products/hadoop-foreign-data-wrapper/sles-12.njk @@ -0,0 +1,2 @@ +{% extends "products/hadoop-foreign-data-wrapper/base.njk" %} +{% set platformBaseTemplate = "sles-12" %} \ No newline at end of file diff --git a/install_template/templates/products/hadoop-foreign-data-wrapper/sles-12_ppc64le.njk b/install_template/templates/products/hadoop-foreign-data-wrapper/sles-12_ppc64le.njk new file mode 100644 index 00000000000..9e221f2accf --- /dev/null +++ b/install_template/templates/products/hadoop-foreign-data-wrapper/sles-12_ppc64le.njk @@ -0,0 +1,2 @@ +{% extends "products/hadoop-foreign-data-wrapper/base.njk" %} +{% set platformBaseTemplate = "sles-12" %} diff --git a/install_template/templates/products/hadoop-foreign-data-wrapper/sles-15.njk b/install_template/templates/products/hadoop-foreign-data-wrapper/sles-15.njk new file mode 100644 index 00000000000..c48b6c0e36b --- /dev/null +++ b/install_template/templates/products/hadoop-foreign-data-wrapper/sles-15.njk @@ -0,0 +1,2 @@ +{% extends "products/hadoop-foreign-data-wrapper/base.njk" %} +{% set platformBaseTemplate = "sles-15" %} \ No newline at end of file diff --git a/install_template/templates/products/hadoop-foreign-data-wrapper/sles-15_ppc64le.njk b/install_template/templates/products/hadoop-foreign-data-wrapper/sles-15_ppc64le.njk new file mode 100644 index 00000000000..e63b992e7a4 --- /dev/null +++ b/install_template/templates/products/hadoop-foreign-data-wrapper/sles-15_ppc64le.njk @@ -0,0 +1,3 @@ +{% extends "products/hadoop-foreign-data-wrapper/base.njk" %} +{% set platformBaseTemplate = "sles-15" %} +{% set includePPC = true %} \ No newline at end of file diff --git a/install_template/templates/products/hadoop-foreign-data-wrapper/ubuntu-18.04.njk b/install_template/templates/products/hadoop-foreign-data-wrapper/ubuntu-18.04.njk new file mode 100644 index 00000000000..ded5f976c67 --- /dev/null +++ b/install_template/templates/products/hadoop-foreign-data-wrapper/ubuntu-18.04.njk @@ -0,0 +1 @@ +{% extends "products/hadoop-foreign-data-wrapper/debian-10.njk" %} diff --git a/install_template/templates/products/hadoop-foreign-data-wrapper/ubuntu-20.04.njk b/install_template/templates/products/hadoop-foreign-data-wrapper/ubuntu-20.04.njk new file mode 100644 index 00000000000..ded5f976c67 --- /dev/null +++ b/install_template/templates/products/hadoop-foreign-data-wrapper/ubuntu-20.04.njk @@ -0,0 +1 @@ +{% extends "products/hadoop-foreign-data-wrapper/debian-10.njk" %} diff --git a/install_template/templates/products/migration-toolkit/almalinux-8-or-rocky-linux-8.njk b/install_template/templates/products/migration-toolkit/almalinux-8-or-rocky-linux-8.njk new file mode 100644 index 00000000000..f5ca87d0297 --- /dev/null +++ b/install_template/templates/products/migration-toolkit/almalinux-8-or-rocky-linux-8.njk @@ -0,0 +1,10 @@ +{% extends "products/migration-toolkit/base.njk" %} +{% set platformBaseTemplate = "almalinux-8-or-rocky-linux-8" %} +{% block prerequisites %} +{{ super() }} +1. Disable the built-in PostgreSQL module: + + ```sh + dnf -qy module disable postgresql + ``` +{% endblock prerequisites %} \ No newline at end of file diff --git a/install_template/templates/products/migration-toolkit/base.njk b/install_template/templates/products/migration-toolkit/base.njk new file mode 100644 index 00000000000..4f566495040 --- /dev/null +++ b/install_template/templates/products/migration-toolkit/base.njk @@ -0,0 +1,8 @@ +{% extends "platformBase/" + platformBaseTemplate + '.njk' %} +{% set packageName %}edb-migrationtoolkit{% endset %} +{% block postinstall %} +## Initial configuration +Before invoking Migration Toolkit, you must download and install a freely available source-specific driver. To download a driver, or for a link to a vendor download site, see the [Third Party JDBC Drivers](https://www.enterprisedb.com/software-downloads-postgres#third-party-jdbc-drivers) on the Downloads page. + +After downloading the source-specific driver, move the driver file into the `/lib` directory. +{% endblock postinstall %} \ No newline at end of file diff --git a/install_template/templates/products/migration-toolkit/centos-7.njk b/install_template/templates/products/migration-toolkit/centos-7.njk new file mode 100644 index 00000000000..dcdf228e846 --- /dev/null +++ b/install_template/templates/products/migration-toolkit/centos-7.njk @@ -0,0 +1,2 @@ +{% extends "products/migration-toolkit/base.njk" %} +{% set platformBaseTemplate = "centos-7" %} \ No newline at end of file diff --git a/install_template/templates/products/migration-toolkit/centos-7_ppc64le.njk b/install_template/templates/products/migration-toolkit/centos-7_ppc64le.njk new file mode 100644 index 00000000000..0a0b88d3ff2 --- /dev/null +++ b/install_template/templates/products/migration-toolkit/centos-7_ppc64le.njk @@ -0,0 +1,2 @@ +{% extends "products/migration-toolkit/centos-7.njk" %} +{% set includePPC = true %} diff --git a/install_template/templates/products/migration-toolkit/rhel-7-or-ol-7.njk b/install_template/templates/products/migration-toolkit/rhel-7-or-ol-7.njk new file mode 100644 index 00000000000..e06371d0aff --- /dev/null +++ b/install_template/templates/products/migration-toolkit/rhel-7-or-ol-7.njk @@ -0,0 +1,2 @@ +{% extends "products/migration-toolkit/base.njk" %} +{% set platformBaseTemplate = "rhel-7-or-ol-7" %} \ No newline at end of file diff --git a/install_template/templates/products/migration-toolkit/rhel-7-or-ol-7_ppc64le.njk b/install_template/templates/products/migration-toolkit/rhel-7-or-ol-7_ppc64le.njk new file mode 100644 index 00000000000..e6f0f2d98ab --- /dev/null +++ b/install_template/templates/products/migration-toolkit/rhel-7-or-ol-7_ppc64le.njk @@ -0,0 +1,2 @@ +{% extends "products/migration-toolkit/rhel-7-or-ol-7.njk" %} +{% set includePPC = true %} \ No newline at end of file diff --git a/install_template/templates/products/migration-toolkit/rhel-8-or-ol-8.njk b/install_template/templates/products/migration-toolkit/rhel-8-or-ol-8.njk new file mode 100644 index 00000000000..7205ecad861 --- /dev/null +++ b/install_template/templates/products/migration-toolkit/rhel-8-or-ol-8.njk @@ -0,0 +1,2 @@ +{% extends "products/migration-toolkit/base.njk" %} +{% set platformBaseTemplate = "rhel-8-or-ol-8" %} \ No newline at end of file diff --git a/install_template/templates/products/migration-toolkit/sles-12.njk b/install_template/templates/products/migration-toolkit/sles-12.njk new file mode 100644 index 00000000000..459e87d293c --- /dev/null +++ b/install_template/templates/products/migration-toolkit/sles-12.njk @@ -0,0 +1,2 @@ +{% extends "products/migration-toolkit/base.njk" %} +{% set platformBaseTemplate = "sles-12" %} diff --git a/install_template/templates/products/migration-toolkit/sles-12_ppc64le.njk b/install_template/templates/products/migration-toolkit/sles-12_ppc64le.njk new file mode 100644 index 00000000000..b2237251b83 --- /dev/null +++ b/install_template/templates/products/migration-toolkit/sles-12_ppc64le.njk @@ -0,0 +1,3 @@ +{% extends "products/migration-toolkit/base.njk" %} +{% set platformBaseTemplate = "sles-12" %} +{% set includePPC = true %} diff --git a/install_template/templates/products/migration-toolkit/sles-15.njk b/install_template/templates/products/migration-toolkit/sles-15.njk new file mode 100644 index 00000000000..2b75009b1db --- /dev/null +++ b/install_template/templates/products/migration-toolkit/sles-15.njk @@ -0,0 +1,2 @@ +{% extends "products/migration-toolkit/base.njk" %} +{% set platformBaseTemplate = "sles-15" %} \ No newline at end of file diff --git a/install_template/templates/products/migration-toolkit/sles-15_ppc64le.njk b/install_template/templates/products/migration-toolkit/sles-15_ppc64le.njk new file mode 100644 index 00000000000..7a2eab13fef --- /dev/null +++ b/install_template/templates/products/migration-toolkit/sles-15_ppc64le.njk @@ -0,0 +1,3 @@ +{% extends "products/migration-toolkit/base.njk" %} +{% set platformBaseTemplate = "sles-15" %} +{% set includePPC = true %} \ No newline at end of file diff --git a/install_template/templates/products/migration-toolkit/ubuntu-18.04-or-debian-9.njk b/install_template/templates/products/migration-toolkit/ubuntu-18.04-or-debian-9.njk new file mode 100644 index 00000000000..31802c6b054 --- /dev/null +++ b/install_template/templates/products/migration-toolkit/ubuntu-18.04-or-debian-9.njk @@ -0,0 +1,2 @@ +{% extends "products/migration-toolkit/base.njk" %} +{% set platformBaseTemplate = "ubuntu-18.04-or-debian-9" %} \ No newline at end of file diff --git a/install_template/templates/products/migration-toolkit/ubuntu-20.04-or-debian-10.njk b/install_template/templates/products/migration-toolkit/ubuntu-20.04-or-debian-10.njk new file mode 100644 index 00000000000..95688d2aa85 --- /dev/null +++ b/install_template/templates/products/migration-toolkit/ubuntu-20.04-or-debian-10.njk @@ -0,0 +1,2 @@ +{% extends "products/migration-toolkit/base.njk" %} +{% set platformBaseTemplate = "ubuntu-20.04-or-debian-10" %} \ No newline at end of file diff --git a/install_template/templates/products/mongodb-foreign-data-wrapper/almalinux-8-or-rocky-linux-8.njk b/install_template/templates/products/mongodb-foreign-data-wrapper/almalinux-8-or-rocky-linux-8.njk new file mode 100644 index 00000000000..8bcd927e031 --- /dev/null +++ b/install_template/templates/products/mongodb-foreign-data-wrapper/almalinux-8-or-rocky-linux-8.njk @@ -0,0 +1,10 @@ +{% extends "products/mongodb-foreign-data-wrapper/base.njk" %} +{% set platformBaseTemplate = "almalinux-8-or-rocky-linux-8" %} +{% block prerequisites %} +{{ super() }} +1. Disable the built-in PostgreSQL module: + + ```sh + dnf -qy module disable postgresql + ``` +{% endblock prerequisites %} \ No newline at end of file diff --git a/install_template/templates/products/mongodb-foreign-data-wrapper/base.njk b/install_template/templates/products/mongodb-foreign-data-wrapper/base.njk new file mode 100644 index 00000000000..62e9a57152d --- /dev/null +++ b/install_template/templates/products/mongodb-foreign-data-wrapper/base.njk @@ -0,0 +1,2 @@ +{% extends "platformBase/" + platformBaseTemplate + '.njk' %} +{% set packageName %}edb-as{{ product.version | replace(".", "") }}-mongo_fdw{% endset %} diff --git a/install_template/templates/products/mongodb-foreign-data-wrapper/centos-7.njk b/install_template/templates/products/mongodb-foreign-data-wrapper/centos-7.njk new file mode 100644 index 00000000000..89e975e964b --- /dev/null +++ b/install_template/templates/products/mongodb-foreign-data-wrapper/centos-7.njk @@ -0,0 +1,2 @@ +{% extends "products/mongodb-foreign-data-wrapper/base.njk" %} +{% set platformBaseTemplate = "centos-7" %} \ No newline at end of file diff --git a/install_template/templates/products/mongodb-foreign-data-wrapper/centos-7_ppc64le.njk b/install_template/templates/products/mongodb-foreign-data-wrapper/centos-7_ppc64le.njk new file mode 100644 index 00000000000..d5ff778f8f6 --- /dev/null +++ b/install_template/templates/products/mongodb-foreign-data-wrapper/centos-7_ppc64le.njk @@ -0,0 +1,2 @@ +{% extends "products/mongodb-foreign-data-wrapper/centos-7.njk" %} +{% set includePPC = true %} diff --git a/install_template/templates/products/mongodb-foreign-data-wrapper/debian-10.njk b/install_template/templates/products/mongodb-foreign-data-wrapper/debian-10.njk new file mode 100644 index 00000000000..def4e54863f --- /dev/null +++ b/install_template/templates/products/mongodb-foreign-data-wrapper/debian-10.njk @@ -0,0 +1,2 @@ +{% extends "products/mongodb-foreign-data-wrapper/base.njk" %} +{% set platformBaseTemplate = "debian-10" %} \ No newline at end of file diff --git a/install_template/templates/products/mongodb-foreign-data-wrapper/debian-9.njk b/install_template/templates/products/mongodb-foreign-data-wrapper/debian-9.njk new file mode 100644 index 00000000000..3ca74b342c8 --- /dev/null +++ b/install_template/templates/products/mongodb-foreign-data-wrapper/debian-9.njk @@ -0,0 +1,2 @@ +{% extends "products/mongodb-foreign-data-wrapper/base.njk" %} +{% set platformBaseTemplate = "debian-9" %} \ No newline at end of file diff --git a/install_template/templates/products/mongodb-foreign-data-wrapper/rhel-7-or-ol-7.njk b/install_template/templates/products/mongodb-foreign-data-wrapper/rhel-7-or-ol-7.njk new file mode 100644 index 00000000000..68affb9166b --- /dev/null +++ b/install_template/templates/products/mongodb-foreign-data-wrapper/rhel-7-or-ol-7.njk @@ -0,0 +1,2 @@ +{% extends "products/mongodb-foreign-data-wrapper/base.njk" %} +{% set platformBaseTemplate = "rhel-7-or-ol-7" %} \ No newline at end of file diff --git a/install_template/templates/products/mongodb-foreign-data-wrapper/rhel-7-or-ol-7_ppc64le.njk b/install_template/templates/products/mongodb-foreign-data-wrapper/rhel-7-or-ol-7_ppc64le.njk new file mode 100644 index 00000000000..114fc0ef1b3 --- /dev/null +++ b/install_template/templates/products/mongodb-foreign-data-wrapper/rhel-7-or-ol-7_ppc64le.njk @@ -0,0 +1,2 @@ +{% extends "products/mongodb-foreign-data-wrapper/rhel-7-or-ol-7.njk" %} +{% set includePPC = true %} \ No newline at end of file diff --git a/install_template/templates/products/mongodb-foreign-data-wrapper/rhel-8-or-ol-8.njk b/install_template/templates/products/mongodb-foreign-data-wrapper/rhel-8-or-ol-8.njk new file mode 100644 index 00000000000..a546248f815 --- /dev/null +++ b/install_template/templates/products/mongodb-foreign-data-wrapper/rhel-8-or-ol-8.njk @@ -0,0 +1,2 @@ +{% extends "products/mongodb-foreign-data-wrapper/base.njk" %} +{% set platformBaseTemplate = "rhel-8-or-ol-8" %} \ No newline at end of file diff --git a/install_template/templates/products/mongodb-foreign-data-wrapper/sles-12.njk b/install_template/templates/products/mongodb-foreign-data-wrapper/sles-12.njk new file mode 100644 index 00000000000..2de68a3f06d --- /dev/null +++ b/install_template/templates/products/mongodb-foreign-data-wrapper/sles-12.njk @@ -0,0 +1,2 @@ +{% extends "products/mongodb-foreign-data-wrapper/base.njk" %} +{% set platformBaseTemplate = "sles-12" %} \ No newline at end of file diff --git a/install_template/templates/products/mongodb-foreign-data-wrapper/sles-12_ppc64le.njk b/install_template/templates/products/mongodb-foreign-data-wrapper/sles-12_ppc64le.njk new file mode 100644 index 00000000000..2de68a3f06d --- /dev/null +++ b/install_template/templates/products/mongodb-foreign-data-wrapper/sles-12_ppc64le.njk @@ -0,0 +1,2 @@ +{% extends "products/mongodb-foreign-data-wrapper/base.njk" %} +{% set platformBaseTemplate = "sles-12" %} \ No newline at end of file diff --git a/install_template/templates/products/mongodb-foreign-data-wrapper/sles-15.njk b/install_template/templates/products/mongodb-foreign-data-wrapper/sles-15.njk new file mode 100644 index 00000000000..78271b89b02 --- /dev/null +++ b/install_template/templates/products/mongodb-foreign-data-wrapper/sles-15.njk @@ -0,0 +1,2 @@ +{% extends "products/mongodb-foreign-data-wrapper/base.njk" %} +{% set platformBaseTemplate = "sles-15" %} \ No newline at end of file diff --git a/install_template/templates/products/mongodb-foreign-data-wrapper/sles-15_ppc64le.njk b/install_template/templates/products/mongodb-foreign-data-wrapper/sles-15_ppc64le.njk new file mode 100644 index 00000000000..ba16bf9795d --- /dev/null +++ b/install_template/templates/products/mongodb-foreign-data-wrapper/sles-15_ppc64le.njk @@ -0,0 +1,3 @@ +{% extends "products/mongodb-foreign-data-wrapper/base.njk" %} +{% set platformBaseTemplate = "sles-15" %} +{% set includePPC = true %} \ No newline at end of file diff --git a/install_template/templates/products/mongodb-foreign-data-wrapper/ubuntu-18.04.njk b/install_template/templates/products/mongodb-foreign-data-wrapper/ubuntu-18.04.njk new file mode 100644 index 00000000000..92f02ffc543 --- /dev/null +++ b/install_template/templates/products/mongodb-foreign-data-wrapper/ubuntu-18.04.njk @@ -0,0 +1 @@ +{% extends "products/mongodb-foreign-data-wrapper/debian-10.njk" %} diff --git a/install_template/templates/products/mongodb-foreign-data-wrapper/ubuntu-20.04.njk b/install_template/templates/products/mongodb-foreign-data-wrapper/ubuntu-20.04.njk new file mode 100644 index 00000000000..92f02ffc543 --- /dev/null +++ b/install_template/templates/products/mongodb-foreign-data-wrapper/ubuntu-20.04.njk @@ -0,0 +1 @@ +{% extends "products/mongodb-foreign-data-wrapper/debian-10.njk" %} diff --git a/install_template/templates/products/mysql-foreign-data-wrapper/almalinux-8-or-rocky-linux-8.njk b/install_template/templates/products/mysql-foreign-data-wrapper/almalinux-8-or-rocky-linux-8.njk new file mode 100644 index 00000000000..6a52895a4e5 --- /dev/null +++ b/install_template/templates/products/mysql-foreign-data-wrapper/almalinux-8-or-rocky-linux-8.njk @@ -0,0 +1,10 @@ +{% extends "products/mysql-foreign-data-wrapper/base.njk" %} +{% set platformBaseTemplate = "almalinux-8-or-rocky-linux-8" %} +{% block prerequisites %} +{{ super() }} +1. Disable the built-in PostgreSQL module: + + ```sh + dnf -qy module disable postgresql + ``` +{% endblock prerequisites %} \ No newline at end of file diff --git a/install_template/templates/products/mysql-foreign-data-wrapper/base.njk b/install_template/templates/products/mysql-foreign-data-wrapper/base.njk new file mode 100644 index 00000000000..c8cd9977bdd --- /dev/null +++ b/install_template/templates/products/mysql-foreign-data-wrapper/base.njk @@ -0,0 +1,2 @@ +{% extends "platformBase/" + platformBaseTemplate + '.njk' %} +{% set packageName %}edb-as{{ product.version | replace(".", "") }}-mysql8_fdw{% endset %} diff --git a/install_template/templates/products/mysql-foreign-data-wrapper/centos-7.njk b/install_template/templates/products/mysql-foreign-data-wrapper/centos-7.njk new file mode 100644 index 00000000000..3b83c16d289 --- /dev/null +++ b/install_template/templates/products/mysql-foreign-data-wrapper/centos-7.njk @@ -0,0 +1,2 @@ +{% extends "products/mysql-foreign-data-wrapper/base.njk" %} +{% set platformBaseTemplate = "centos-7" %} \ No newline at end of file diff --git a/install_template/templates/products/mysql-foreign-data-wrapper/centos-7_ppc64le.njk b/install_template/templates/products/mysql-foreign-data-wrapper/centos-7_ppc64le.njk new file mode 100644 index 00000000000..13e9a41605d --- /dev/null +++ b/install_template/templates/products/mysql-foreign-data-wrapper/centos-7_ppc64le.njk @@ -0,0 +1,2 @@ +{% extends "products/mysql-foreign-data-wrapper/centos-7.njk" %} +{% set includePPC = true %} diff --git a/install_template/templates/products/mysql-foreign-data-wrapper/debian-10.njk b/install_template/templates/products/mysql-foreign-data-wrapper/debian-10.njk new file mode 100644 index 00000000000..5c78f1e2bfe --- /dev/null +++ b/install_template/templates/products/mysql-foreign-data-wrapper/debian-10.njk @@ -0,0 +1,2 @@ +{% extends "products/mysql-foreign-data-wrapper/base.njk" %} +{% set platformBaseTemplate = "debian-10" %} \ No newline at end of file diff --git a/install_template/templates/products/mysql-foreign-data-wrapper/debian-9.njk b/install_template/templates/products/mysql-foreign-data-wrapper/debian-9.njk new file mode 100644 index 00000000000..4a4937ed637 --- /dev/null +++ b/install_template/templates/products/mysql-foreign-data-wrapper/debian-9.njk @@ -0,0 +1,2 @@ +{% extends "products/mysql-foreign-data-wrapper/base.njk" %} +{% set platformBaseTemplate = "debian-9" %} \ No newline at end of file diff --git a/install_template/templates/products/mysql-foreign-data-wrapper/rhel-7-or-ol-7.njk b/install_template/templates/products/mysql-foreign-data-wrapper/rhel-7-or-ol-7.njk new file mode 100644 index 00000000000..3e29f41d483 --- /dev/null +++ b/install_template/templates/products/mysql-foreign-data-wrapper/rhel-7-or-ol-7.njk @@ -0,0 +1,2 @@ +{% extends "products/mysql-foreign-data-wrapper/base.njk" %} +{% set platformBaseTemplate = "rhel-7-or-ol-7" %} \ No newline at end of file diff --git a/install_template/templates/products/mysql-foreign-data-wrapper/rhel-7-or-ol-7_ppc64le.njk b/install_template/templates/products/mysql-foreign-data-wrapper/rhel-7-or-ol-7_ppc64le.njk new file mode 100644 index 00000000000..19bebf87857 --- /dev/null +++ b/install_template/templates/products/mysql-foreign-data-wrapper/rhel-7-or-ol-7_ppc64le.njk @@ -0,0 +1,2 @@ +{% extends "products/mysql-foreign-data-wrapper/rhel-7-or-ol-7.njk" %} +{% set includePPC = true %} \ No newline at end of file diff --git a/install_template/templates/products/mysql-foreign-data-wrapper/rhel-8-or-ol-8.njk b/install_template/templates/products/mysql-foreign-data-wrapper/rhel-8-or-ol-8.njk new file mode 100644 index 00000000000..cd91fd8d8d3 --- /dev/null +++ b/install_template/templates/products/mysql-foreign-data-wrapper/rhel-8-or-ol-8.njk @@ -0,0 +1,2 @@ +{% extends "products/mysql-foreign-data-wrapper/base.njk" %} +{% set platformBaseTemplate = "rhel-8-or-ol-8" %} \ No newline at end of file diff --git a/install_template/templates/products/mysql-foreign-data-wrapper/sles-12.njk b/install_template/templates/products/mysql-foreign-data-wrapper/sles-12.njk new file mode 100644 index 00000000000..790c0035136 --- /dev/null +++ b/install_template/templates/products/mysql-foreign-data-wrapper/sles-12.njk @@ -0,0 +1,34 @@ +{% extends "products/mysql-foreign-data-wrapper/base.njk" %} +{% set platformBaseTemplate = "sles-12" %} +{% block prerequisites %} +Setting up the repository is a one time task. If you have already set up your repository, you do not need to perform these steps. +```shell +# Install the repository configuration and enter your EDB repository +# credentials when prompted +zypper addrepo https://zypp.enterprisedb.com/suse/edb-sles.repo + +# Install SUSEConnect to register the host with SUSE, allowing access +# to SUSE repositories +zypper install SUSEConnect + +# Register the host with SUSE, allowing access to SUSE repositories +# Replace 'REGISTRATION_CODE' and 'EMAIL' with your SUSE registration +# information +SUSEConnect -r 'REGISTRATION_CODE' -e 'EMAIL' + +# Install the MySQL community repository +wget https://dev.mysql.com/get/mysql80-community-release-sles12-5.noarch.rpm +rpm --import /etc/RPM-GPG-KEY-mysql-2022 + +# Enable the MySQL8 repository and disable the MySQL 5 repository +zypper modifyrepo -e mysql80-community +zypper modifyrepo -d mysql57-community + +# Activate the required SUSE modules +SUSEConnect -p PackageHub/12.5/x86_64 +SUSEConnect -p sle-sdk/12.5/x86_64 + +# Refresh the metadata +zypper refresh +``` +{% endblock prerequisites %} \ No newline at end of file diff --git a/install_template/templates/products/mysql-foreign-data-wrapper/sles-12_ppc64le.njk b/install_template/templates/products/mysql-foreign-data-wrapper/sles-12_ppc64le.njk new file mode 100644 index 00000000000..f3842f2818f --- /dev/null +++ b/install_template/templates/products/mysql-foreign-data-wrapper/sles-12_ppc64le.njk @@ -0,0 +1,26 @@ +{% extends "products/mysql-foreign-data-wrapper/base.njk" %} +{% set platformBaseTemplate = "sles-12" %} +{% block prerequisites %} +Setting up the repository is a one time task. If you have already set up your repository, you do not need to perform these steps. +```shell +# Install the repository configuration and enter your EDB repository +# credentials when prompted +zypper addrepo https://zypp.enterprisedb.com/suse/edb-sles.repo + +# Install SUSEConnect to register the host with SUSE, allowing access +# to SUSE repositories +zypper install SUSEConnect + +# Register the host with SUSE, allowing access to SUSE repositories +# Replace 'REGISTRATION_CODE' and 'EMAIL' with your SUSE +# registration information +SUSEConnect -r 'REGISTRATION_CODE' -e 'EMAIL' + +# Activate the required SUSE modules +SUSEConnect -p PackageHub/12.5/ppc64le +SUSEConnect -p sle-sdk/12.5/ppc64le + +# Refresh the metadata +zypper refresh +``` +{% endblock prerequisites %} \ No newline at end of file diff --git a/install_template/templates/products/mysql-foreign-data-wrapper/sles-15.njk b/install_template/templates/products/mysql-foreign-data-wrapper/sles-15.njk new file mode 100644 index 00000000000..27a0505cc3c --- /dev/null +++ b/install_template/templates/products/mysql-foreign-data-wrapper/sles-15.njk @@ -0,0 +1,29 @@ +{% extends "products/mysql-foreign-data-wrapper/base.njk" %} +{% set platformBaseTemplate = "sles-15" %} +{% block prerequisites %} +Setting up the repository is a one time task. If you have already set up your repository, you do not need to perform these steps. +```shell +# Install the repository configuration and enter your EDB repository +# credentials when prompted +zypper addrepo https://zypp.enterprisedb.com/suse/edb-sles.repo + +# Install SUSEConnect to register the host with SUSE, allowing access +# to SUSE repositories +zypper install SUSEConnect + +# Register the host with SUSE, allowing access to SUSE repositories +# Replace 'REGISTRATION_CODE' and 'EMAIL' with your SUSE +# registration information +SUSEConnect -r 'REGISTRATION_CODE' -e 'EMAIL' + +# Activate the required SUSE module +SUSEConnect -p PackageHub/15.3/x86_64 + +# Install the community MySQL repository +rpm -i https://dev.mysql.com/get/mysql80-community-release-sl15-5.noarch.rpm +rpm --import /etc/RPM-GPG-KEY-mysql-2022 + +# Refresh the metadata +zypper refresh +``` +{% endblock prerequisites %} diff --git a/install_template/templates/products/mysql-foreign-data-wrapper/sles-15_ppc64le.njk b/install_template/templates/products/mysql-foreign-data-wrapper/sles-15_ppc64le.njk new file mode 100644 index 00000000000..a7a800c1fb5 --- /dev/null +++ b/install_template/templates/products/mysql-foreign-data-wrapper/sles-15_ppc64le.njk @@ -0,0 +1,30 @@ +{% extends "products/mysql-foreign-data-wrapper/base.njk" %} +{% set platformBaseTemplate = "sles-15" %} +{% set includePPC = true %} +{% block prerequisites %} +Setting up the repository is a one time task. If you have already set up your repository, you do not need to perform these steps. +```shell +# Install the repository configuration and enter your EDB repository +# credentials when prompted +zypper addrepo https://zypp.enterprisedb.com/suse/edb-sles.repo + +# Install SUSEConnect to register the host with SUSE, allowing access +# to SUSE repositories +zypper install SUSEConnect + +# Register the host with SUSE, allowing access to SUSE repositories +# Replace 'REGISTRATION_CODE' and 'EMAIL' with your SUSE +# registration information +SUSEConnect -r 'REGISTRATION_CODE' -e 'EMAIL' + +# Activate the required SUSE module +SUSEConnect -p PackageHub/15.3/{{ platform.arch }} + +# Install the community MySQL repository +rpm -i https://dev.mysql.com/get/mysql80-community-release-sl15-5.noarch.rpm +rpm --import /etc/RPM-GPG-KEY-mysql-2022 + +# Refresh the metadata +zypper refresh +``` +{% endblock prerequisites %} \ No newline at end of file diff --git a/install_template/templates/products/mysql-foreign-data-wrapper/ubuntu-18.04.njk b/install_template/templates/products/mysql-foreign-data-wrapper/ubuntu-18.04.njk new file mode 100644 index 00000000000..036eb7a22bd --- /dev/null +++ b/install_template/templates/products/mysql-foreign-data-wrapper/ubuntu-18.04.njk @@ -0,0 +1 @@ +{% extends "products/mysql-foreign-data-wrapper/debian-10.njk" %} diff --git a/install_template/templates/products/mysql-foreign-data-wrapper/ubuntu-20.04.njk b/install_template/templates/products/mysql-foreign-data-wrapper/ubuntu-20.04.njk new file mode 100644 index 00000000000..036eb7a22bd --- /dev/null +++ b/install_template/templates/products/mysql-foreign-data-wrapper/ubuntu-20.04.njk @@ -0,0 +1 @@ +{% extends "products/mysql-foreign-data-wrapper/debian-10.njk" %} diff --git a/install_template/templates/products/postgis/almalinux-8-or-rocky-linux-8.njk b/install_template/templates/products/postgis/almalinux-8-or-rocky-linux-8.njk new file mode 100644 index 00000000000..16aa508638d --- /dev/null +++ b/install_template/templates/products/postgis/almalinux-8-or-rocky-linux-8.njk @@ -0,0 +1,10 @@ +{% extends "products/postgis/base.njk" %} +{% set platformBaseTemplate = "almalinux-8-or-rocky-linux-8" %} +{% block prerequisites %} +{{ super() }} +1. Disable the built-in PostgreSQL module: + + ```sh + dnf -qy module disable postgresql + ``` +{% endblock prerequisites %} \ No newline at end of file diff --git a/install_template/templates/products/postgis/base.njk b/install_template/templates/products/postgis/base.njk new file mode 100644 index 00000000000..6f7d1badffd --- /dev/null +++ b/install_template/templates/products/postgis/base.njk @@ -0,0 +1,8 @@ +{% extends "platformBase/" + platformBaseTemplate + '.njk' %} +{% set packageName %}edb-as-postgis3{% endset %} +{% block installCommand %} +```shell +zypper -n install {{ packageName }} +``` +Where `` is the version of PostGIS 3 you are installing. +{% endblock installCommand %} diff --git a/install_template/templates/products/postgis/centos-7.njk b/install_template/templates/products/postgis/centos-7.njk new file mode 100644 index 00000000000..a128c5f2e5e --- /dev/null +++ b/install_template/templates/products/postgis/centos-7.njk @@ -0,0 +1,2 @@ +{% extends "products/postgis/base.njk" %} +{% set platformBaseTemplate = "centos-7" %} \ No newline at end of file diff --git a/install_template/templates/products/postgis/centos-7_ppc64le.njk b/install_template/templates/products/postgis/centos-7_ppc64le.njk new file mode 100644 index 00000000000..f9650069c56 --- /dev/null +++ b/install_template/templates/products/postgis/centos-7_ppc64le.njk @@ -0,0 +1,2 @@ +{% extends "products/postgis/centos-7.njk" %} +{% set includePPC = true %} diff --git a/install_template/templates/products/postgis/debian-10.njk b/install_template/templates/products/postgis/debian-10.njk new file mode 100644 index 00000000000..4e234539763 --- /dev/null +++ b/install_template/templates/products/postgis/debian-10.njk @@ -0,0 +1,2 @@ +{% extends "products/postgis/base.njk" %} +{% set platformBaseTemplate = "debian-10" %} \ No newline at end of file diff --git a/install_template/templates/products/postgis/debian-9.njk b/install_template/templates/products/postgis/debian-9.njk new file mode 100644 index 00000000000..f909e5dd276 --- /dev/null +++ b/install_template/templates/products/postgis/debian-9.njk @@ -0,0 +1,2 @@ +{% extends "products/postgis/base.njk" %} +{% set platformBaseTemplate = "debian-9" %} \ No newline at end of file diff --git a/install_template/templates/products/postgis/rhel-7-or-ol-7.njk b/install_template/templates/products/postgis/rhel-7-or-ol-7.njk new file mode 100644 index 00000000000..85e4bbe5ba7 --- /dev/null +++ b/install_template/templates/products/postgis/rhel-7-or-ol-7.njk @@ -0,0 +1,2 @@ +{% extends "products/postgis/base.njk" %} +{% set platformBaseTemplate = "rhel-7-or-ol-7" %} \ No newline at end of file diff --git a/install_template/templates/products/postgis/rhel-7-or-ol-7_ppc64le.njk b/install_template/templates/products/postgis/rhel-7-or-ol-7_ppc64le.njk new file mode 100644 index 00000000000..4e7737ac703 --- /dev/null +++ b/install_template/templates/products/postgis/rhel-7-or-ol-7_ppc64le.njk @@ -0,0 +1,2 @@ +{% extends "products/postgis/rhel-7-or-ol-7.njk" %} +{% set includePPC = true %} \ No newline at end of file diff --git a/install_template/templates/products/postgis/rhel-8-or-ol-8.njk b/install_template/templates/products/postgis/rhel-8-or-ol-8.njk new file mode 100644 index 00000000000..70648b65b0d --- /dev/null +++ b/install_template/templates/products/postgis/rhel-8-or-ol-8.njk @@ -0,0 +1,2 @@ +{% extends "products/postgis/base.njk" %} +{% set platformBaseTemplate = "rhel-8-or-ol-8" %} \ No newline at end of file diff --git a/install_template/templates/products/postgis/sles-12.njk b/install_template/templates/products/postgis/sles-12.njk new file mode 100644 index 00000000000..16ebf7fb77b --- /dev/null +++ b/install_template/templates/products/postgis/sles-12.njk @@ -0,0 +1,2 @@ +{% extends "products/postgis/base.njk" %} +{% set platformBaseTemplate = "sles-12" %} \ No newline at end of file diff --git a/install_template/templates/products/postgis/sles-12_ppc64le.njk b/install_template/templates/products/postgis/sles-12_ppc64le.njk new file mode 100644 index 00000000000..16ebf7fb77b --- /dev/null +++ b/install_template/templates/products/postgis/sles-12_ppc64le.njk @@ -0,0 +1,2 @@ +{% extends "products/postgis/base.njk" %} +{% set platformBaseTemplate = "sles-12" %} \ No newline at end of file diff --git a/install_template/templates/products/postgis/sles-15.njk b/install_template/templates/products/postgis/sles-15.njk new file mode 100644 index 00000000000..08bbced44ac --- /dev/null +++ b/install_template/templates/products/postgis/sles-15.njk @@ -0,0 +1,2 @@ +{% extends "products/postgis/base.njk" %} +{% set platformBaseTemplate = "sles-15" %} diff --git a/install_template/templates/products/postgis/sles-15_ppc64le.njk b/install_template/templates/products/postgis/sles-15_ppc64le.njk new file mode 100644 index 00000000000..a407d728ddb --- /dev/null +++ b/install_template/templates/products/postgis/sles-15_ppc64le.njk @@ -0,0 +1,3 @@ +{% extends "products/postgis/base.njk" %} +{% set platformBaseTemplate = "sles-15" %} +{% set includePPC = true %} diff --git a/install_template/templates/products/postgis/ubuntu-18.04.njk b/install_template/templates/products/postgis/ubuntu-18.04.njk new file mode 100644 index 00000000000..2a847610e42 --- /dev/null +++ b/install_template/templates/products/postgis/ubuntu-18.04.njk @@ -0,0 +1 @@ +{% extends "products/postgis/debian-10.njk" %} diff --git a/install_template/templates/products/postgis/ubuntu-20.04.njk b/install_template/templates/products/postgis/ubuntu-20.04.njk new file mode 100644 index 00000000000..2a847610e42 --- /dev/null +++ b/install_template/templates/products/postgis/ubuntu-20.04.njk @@ -0,0 +1 @@ +{% extends "products/postgis/debian-10.njk" %} diff --git a/install_template/templates/products/postgres-enterprise-manager/almalinux-8-or-rocky-linux-8.njk b/install_template/templates/products/postgres-enterprise-manager/almalinux-8-or-rocky-linux-8.njk new file mode 100644 index 00000000000..8bd483dec71 --- /dev/null +++ b/install_template/templates/products/postgres-enterprise-manager/almalinux-8-or-rocky-linux-8.njk @@ -0,0 +1,10 @@ +{% extends "products/postgres-enterprise-manager/base.njk" %} +{% set platformBaseTemplate = "almalinux-8-or-rocky-linux-8" %} +{% block prerequisites %} +{{ super() }} +1. Disable the built-in PostgreSQL module: + + ```sh + dnf -qy module disable postgresql + ``` +{% endblock prerequisites %} \ No newline at end of file diff --git a/install_template/templates/products/postgres-enterprise-manager/base.njk b/install_template/templates/products/postgres-enterprise-manager/base.njk new file mode 100644 index 00000000000..89b284a3e7e --- /dev/null +++ b/install_template/templates/products/postgres-enterprise-manager/base.njk @@ -0,0 +1,13 @@ +{% extends "platformBase/" + platformBaseTemplate + '.njk' %} +{% set packageName %}edb-pem{% endset %} +{% block postinstallMenu %}- [Performing the initial configuration](#initial-configuration){% endblock postinstallMenu %} +{% block postinstall %} +## Initial configuration + +```shell +# You can configure the PEM server using the following command: +/usr/edb/pem/bin/configure-pem-server.sh +``` + +For more details, see [Configuring the PEM Server on Linux](https://www.enterprisedb.com/docs/pem/latest/pem_inst_guide_linux/04_installing_postgres_enterprise_manager/05_configuring_the_pem_server_on_linux/). +{% endblock postinstall %} \ No newline at end of file diff --git a/install_template/templates/products/postgres-enterprise-manager/centos-7.njk b/install_template/templates/products/postgres-enterprise-manager/centos-7.njk new file mode 100644 index 00000000000..7c4e64b6d51 --- /dev/null +++ b/install_template/templates/products/postgres-enterprise-manager/centos-7.njk @@ -0,0 +1,2 @@ +{% extends "products/postgres-enterprise-manager/base.njk" %} +{% set platformBaseTemplate = "centos-7" %} \ No newline at end of file diff --git a/install_template/templates/products/postgres-enterprise-manager/centos-7_ppc64le.njk b/install_template/templates/products/postgres-enterprise-manager/centos-7_ppc64le.njk new file mode 100644 index 00000000000..aa1dad644ab --- /dev/null +++ b/install_template/templates/products/postgres-enterprise-manager/centos-7_ppc64le.njk @@ -0,0 +1,2 @@ +{% extends "products/postgres-enterprise-manager/centos-7.njk" %} +{% set includePPC = true %} diff --git a/install_template/templates/products/postgres-enterprise-manager/debian-10.njk b/install_template/templates/products/postgres-enterprise-manager/debian-10.njk new file mode 100644 index 00000000000..f4ec9da10c6 --- /dev/null +++ b/install_template/templates/products/postgres-enterprise-manager/debian-10.njk @@ -0,0 +1,2 @@ +{% extends "products/postgres-enterprise-manager/base.njk" %} +{% set platformBaseTemplate = "debian-10" %} \ No newline at end of file diff --git a/install_template/templates/products/postgres-enterprise-manager/debian-9.njk b/install_template/templates/products/postgres-enterprise-manager/debian-9.njk new file mode 100644 index 00000000000..43e09f5e6d4 --- /dev/null +++ b/install_template/templates/products/postgres-enterprise-manager/debian-9.njk @@ -0,0 +1,2 @@ +{% extends "products/postgres-enterprise-manager/base.njk" %} +{% set platformBaseTemplate = "debian-9" %} \ No newline at end of file diff --git a/install_template/templates/products/postgres-enterprise-manager/rhel-7-or-ol-7.njk b/install_template/templates/products/postgres-enterprise-manager/rhel-7-or-ol-7.njk new file mode 100644 index 00000000000..3ce509d892d --- /dev/null +++ b/install_template/templates/products/postgres-enterprise-manager/rhel-7-or-ol-7.njk @@ -0,0 +1,2 @@ +{% extends "products/postgres-enterprise-manager/base.njk" %} +{% set platformBaseTemplate = "rhel-7-or-ol-7" %} \ No newline at end of file diff --git a/install_template/templates/products/postgres-enterprise-manager/rhel-7-or-ol-7_ppc64le.njk b/install_template/templates/products/postgres-enterprise-manager/rhel-7-or-ol-7_ppc64le.njk new file mode 100644 index 00000000000..f4dddc560a1 --- /dev/null +++ b/install_template/templates/products/postgres-enterprise-manager/rhel-7-or-ol-7_ppc64le.njk @@ -0,0 +1,2 @@ +{% extends "products/postgres-enterprise-manager/rhel-7-or-ol-7.njk" %} +{% set includePPC = true %} \ No newline at end of file diff --git a/install_template/templates/products/postgres-enterprise-manager/rhel-8-or-ol-8.njk b/install_template/templates/products/postgres-enterprise-manager/rhel-8-or-ol-8.njk new file mode 100644 index 00000000000..c030a2ee0bb --- /dev/null +++ b/install_template/templates/products/postgres-enterprise-manager/rhel-8-or-ol-8.njk @@ -0,0 +1,2 @@ +{% extends "products/postgres-enterprise-manager/base.njk" %} +{% set platformBaseTemplate = "rhel-8-or-ol-8" %} \ No newline at end of file diff --git a/install_template/templates/products/postgres-enterprise-manager/sles-12.njk b/install_template/templates/products/postgres-enterprise-manager/sles-12.njk new file mode 100644 index 00000000000..6badf7f8103 --- /dev/null +++ b/install_template/templates/products/postgres-enterprise-manager/sles-12.njk @@ -0,0 +1,9 @@ +{% extends "products/postgres-enterprise-manager/base.njk" %} +{% set platformBaseTemplate = "sles-12" %} +{% block prerequisites %} +{{ super() }} +# Install the following repository for PEM dependencies +```shell +zypper addrepo https://download.opensuse.org/repositories/Apache:/Modules/SLE_12_SP5/Apache:Modules.repo +``` +{% endblock prerequisites %} diff --git a/install_template/templates/products/postgres-enterprise-manager/sles-12_ppc64le.njk b/install_template/templates/products/postgres-enterprise-manager/sles-12_ppc64le.njk new file mode 100644 index 00000000000..6badf7f8103 --- /dev/null +++ b/install_template/templates/products/postgres-enterprise-manager/sles-12_ppc64le.njk @@ -0,0 +1,9 @@ +{% extends "products/postgres-enterprise-manager/base.njk" %} +{% set platformBaseTemplate = "sles-12" %} +{% block prerequisites %} +{{ super() }} +# Install the following repository for PEM dependencies +```shell +zypper addrepo https://download.opensuse.org/repositories/Apache:/Modules/SLE_12_SP5/Apache:Modules.repo +``` +{% endblock prerequisites %} diff --git a/install_template/templates/products/postgres-enterprise-manager/sles-15.njk b/install_template/templates/products/postgres-enterprise-manager/sles-15.njk new file mode 100644 index 00000000000..155f729d413 --- /dev/null +++ b/install_template/templates/products/postgres-enterprise-manager/sles-15.njk @@ -0,0 +1,9 @@ +{% extends "products/postgres-enterprise-manager/base.njk" %} +{% set platformBaseTemplate = "sles-15" %} +{% block prerequisites %} +{{ super() }} +# Install the following repository for PEM dependencies +```shell +zypper addrepo https://download.opensuse.org/repositories/Apache:/Modules/SLE_15_SP3/Apache:Modules.repo +``` +{% endblock prerequisites %} \ No newline at end of file diff --git a/install_template/templates/products/postgres-enterprise-manager/sles-15_ppc64le.njk b/install_template/templates/products/postgres-enterprise-manager/sles-15_ppc64le.njk new file mode 100644 index 00000000000..5ea544029dc --- /dev/null +++ b/install_template/templates/products/postgres-enterprise-manager/sles-15_ppc64le.njk @@ -0,0 +1,10 @@ +{% extends "products/postgres-enterprise-manager/base.njk" %} +{% set platformBaseTemplate = "sles-15" %} +{% set includePPC = true %} +{% block prerequisites %} +{{ super() }} +# Install the following repository for PEM dependencies +```shell +zypper addrepo https://download.opensuse.org/repositories/Apache:/Modules/SLE_15_SP3/Apache:Modules.repo +``` +{% endblock prerequisites %} diff --git a/install_template/templates/products/postgres-enterprise-manager/ubuntu-18.04.njk b/install_template/templates/products/postgres-enterprise-manager/ubuntu-18.04.njk new file mode 100644 index 00000000000..24bd85e2c44 --- /dev/null +++ b/install_template/templates/products/postgres-enterprise-manager/ubuntu-18.04.njk @@ -0,0 +1 @@ +{% extends "products/postgres-enterprise-manager/debian-10.njk" %} diff --git a/install_template/templates/products/postgres-enterprise-manager/ubuntu-20.04.njk b/install_template/templates/products/postgres-enterprise-manager/ubuntu-20.04.njk new file mode 100644 index 00000000000..24bd85e2c44 --- /dev/null +++ b/install_template/templates/products/postgres-enterprise-manager/ubuntu-20.04.njk @@ -0,0 +1 @@ +{% extends "products/postgres-enterprise-manager/debian-10.njk" %} diff --git a/install_template/templates/products/replication-manager/almalinux-8-or-rocky-linux-8.njk b/install_template/templates/products/replication-manager/almalinux-8-or-rocky-linux-8.njk new file mode 100644 index 00000000000..38bf92e85b2 --- /dev/null +++ b/install_template/templates/products/replication-manager/almalinux-8-or-rocky-linux-8.njk @@ -0,0 +1,10 @@ +{% extends "products/replication-manager/base.njk" %} +{% set platformBaseTemplate = "almalinux-8-or-rocky-linux-8" %} +{% block prerequisites %} +{{ super() }} +1. Disable the built-in PostgreSQL module: + + ```sh + dnf -qy module disable postgresql + ``` +{% endblock prerequisites %} \ No newline at end of file diff --git a/install_template/templates/products/replication-manager/base.njk b/install_template/templates/products/replication-manager/base.njk new file mode 100644 index 00000000000..cb8e3e49f76 --- /dev/null +++ b/install_template/templates/products/replication-manager/base.njk @@ -0,0 +1,2 @@ +{% extends "platformBase/" + platformBaseTemplate + '.njk' %} +{% set packageName %}edb-xdb{% endset %} diff --git a/install_template/templates/products/replication-manager/centos-7.njk b/install_template/templates/products/replication-manager/centos-7.njk new file mode 100644 index 00000000000..a779fca8090 --- /dev/null +++ b/install_template/templates/products/replication-manager/centos-7.njk @@ -0,0 +1,2 @@ +{% extends "products/replication-manager/base.njk" %} +{% set platformBaseTemplate = "centos-7" %} \ No newline at end of file diff --git a/install_template/templates/products/replication-manager/centos-7_ppc64le.njk b/install_template/templates/products/replication-manager/centos-7_ppc64le.njk new file mode 100644 index 00000000000..e313531ac2c --- /dev/null +++ b/install_template/templates/products/replication-manager/centos-7_ppc64le.njk @@ -0,0 +1,2 @@ +{% extends "products/replication-manager/centos-7.njk" %} +{% set includePPC = true %} diff --git a/install_template/templates/products/replication-manager/debian-10.njk b/install_template/templates/products/replication-manager/debian-10.njk new file mode 100644 index 00000000000..1c971078589 --- /dev/null +++ b/install_template/templates/products/replication-manager/debian-10.njk @@ -0,0 +1,2 @@ +{% extends "products/replication-manager/base.njk" %} +{% set platformBaseTemplate = "debian-10" %} \ No newline at end of file diff --git a/install_template/templates/products/replication-manager/debian-9.njk b/install_template/templates/products/replication-manager/debian-9.njk new file mode 100644 index 00000000000..d91d455ef6f --- /dev/null +++ b/install_template/templates/products/replication-manager/debian-9.njk @@ -0,0 +1,2 @@ +{% extends "products/replication-manager/base.njk" %} +{% set platformBaseTemplate = "debian-9" %} \ No newline at end of file diff --git a/install_template/templates/products/replication-manager/rhel-7-or-ol-7.njk b/install_template/templates/products/replication-manager/rhel-7-or-ol-7.njk new file mode 100644 index 00000000000..6f45c5ad4bf --- /dev/null +++ b/install_template/templates/products/replication-manager/rhel-7-or-ol-7.njk @@ -0,0 +1,2 @@ +{% extends "products/replication-manager/base.njk" %} +{% set platformBaseTemplate = "rhel-7-or-ol-7" %} \ No newline at end of file diff --git a/install_template/templates/products/replication-manager/rhel-7-or-ol-7_ppc64le.njk b/install_template/templates/products/replication-manager/rhel-7-or-ol-7_ppc64le.njk new file mode 100644 index 00000000000..79d15d47dd7 --- /dev/null +++ b/install_template/templates/products/replication-manager/rhel-7-or-ol-7_ppc64le.njk @@ -0,0 +1,2 @@ +{% extends "products/replication-manager/rhel-7-or-ol-7.njk" %} +{% set includePPC = true %} \ No newline at end of file diff --git a/install_template/templates/products/replication-manager/rhel-8-or-ol-8.njk b/install_template/templates/products/replication-manager/rhel-8-or-ol-8.njk new file mode 100644 index 00000000000..1124d209322 --- /dev/null +++ b/install_template/templates/products/replication-manager/rhel-8-or-ol-8.njk @@ -0,0 +1,2 @@ +{% extends "products/replication-manager/base.njk" %} +{% set platformBaseTemplate = "rhel-8-or-ol-8" %} \ No newline at end of file diff --git a/install_template/templates/products/replication-manager/sles-12.njk b/install_template/templates/products/replication-manager/sles-12.njk new file mode 100644 index 00000000000..a27209db545 --- /dev/null +++ b/install_template/templates/products/replication-manager/sles-12.njk @@ -0,0 +1,2 @@ +{% extends "products/replication-manager/base.njk" %} +{% set platformBaseTemplate = "sles-12" %} \ No newline at end of file diff --git a/install_template/templates/products/replication-manager/sles-12_ppc64le.njk b/install_template/templates/products/replication-manager/sles-12_ppc64le.njk new file mode 100644 index 00000000000..a27209db545 --- /dev/null +++ b/install_template/templates/products/replication-manager/sles-12_ppc64le.njk @@ -0,0 +1,2 @@ +{% extends "products/replication-manager/base.njk" %} +{% set platformBaseTemplate = "sles-12" %} \ No newline at end of file diff --git a/install_template/templates/products/replication-manager/sles-15.njk b/install_template/templates/products/replication-manager/sles-15.njk new file mode 100644 index 00000000000..14bc7aa5abb --- /dev/null +++ b/install_template/templates/products/replication-manager/sles-15.njk @@ -0,0 +1,2 @@ +{% extends "products/replication-manager/base.njk" %} +{% set platformBaseTemplate = "sles-15" %} \ No newline at end of file diff --git a/install_template/templates/products/replication-manager/sles-15_ppc64le.njk b/install_template/templates/products/replication-manager/sles-15_ppc64le.njk new file mode 100644 index 00000000000..8fa2837f6f1 --- /dev/null +++ b/install_template/templates/products/replication-manager/sles-15_ppc64le.njk @@ -0,0 +1,3 @@ +{% extends "products/replication-manager/base.njk" %} +{% set platformBaseTemplate = "sles-15" %} +{% set includePPC = true %} \ No newline at end of file diff --git a/install_template/templates/products/replication-manager/ubuntu-18.04.njk b/install_template/templates/products/replication-manager/ubuntu-18.04.njk new file mode 100644 index 00000000000..6265540ff01 --- /dev/null +++ b/install_template/templates/products/replication-manager/ubuntu-18.04.njk @@ -0,0 +1 @@ +{% extends "products/replication-manager/debian-10.njk" %} diff --git a/install_template/templates/products/replication-manager/ubuntu-20.04.njk b/install_template/templates/products/replication-manager/ubuntu-20.04.njk new file mode 100644 index 00000000000..6265540ff01 --- /dev/null +++ b/install_template/templates/products/replication-manager/ubuntu-20.04.njk @@ -0,0 +1 @@ +{% extends "products/replication-manager/debian-10.njk" %} diff --git a/install_template/templates/products/slony-replication/almalinux-8-or-rocky-linux-8.njk b/install_template/templates/products/slony-replication/almalinux-8-or-rocky-linux-8.njk new file mode 100644 index 00000000000..cc88958c019 --- /dev/null +++ b/install_template/templates/products/slony-replication/almalinux-8-or-rocky-linux-8.njk @@ -0,0 +1,10 @@ +{% extends "products/slony-replication/base.njk" %} +{% set platformBaseTemplate = "almalinux-8-or-rocky-linux-8" %} +{% block prerequisites %} +{{ super() }} +1. Disable the built-in PostgreSQL module: + + ```sh + dnf -qy module disable postgresql + ``` +{% endblock prerequisites %} \ No newline at end of file diff --git a/install_template/templates/products/slony-replication/base.njk b/install_template/templates/products/slony-replication/base.njk new file mode 100644 index 00000000000..1913897c0fe --- /dev/null +++ b/install_template/templates/products/slony-replication/base.njk @@ -0,0 +1,2 @@ +{% extends "platformBase/" + platformBaseTemplate + '.njk' %} +{% set packageName %}edb-as{{ product.version | replace(".", "") }}-slony-replication{% endset %} diff --git a/install_template/templates/products/slony-replication/centos-7.njk b/install_template/templates/products/slony-replication/centos-7.njk new file mode 100644 index 00000000000..4bf02c01d4c --- /dev/null +++ b/install_template/templates/products/slony-replication/centos-7.njk @@ -0,0 +1,2 @@ +{% extends "products/slony-replication/base.njk" %} +{% set platformBaseTemplate = "centos-7" %} \ No newline at end of file diff --git a/install_template/templates/products/slony-replication/centos-7_ppc64le.njk b/install_template/templates/products/slony-replication/centos-7_ppc64le.njk new file mode 100644 index 00000000000..065ad4086f6 --- /dev/null +++ b/install_template/templates/products/slony-replication/centos-7_ppc64le.njk @@ -0,0 +1,2 @@ +{% extends "products/slony-replication/centos-7.njk" %} +{% set includePPC = true %} diff --git a/install_template/templates/products/slony-replication/debian-10.njk b/install_template/templates/products/slony-replication/debian-10.njk new file mode 100644 index 00000000000..e23b9f8d310 --- /dev/null +++ b/install_template/templates/products/slony-replication/debian-10.njk @@ -0,0 +1,2 @@ +{% extends "products/slony-replication/base.njk" %} +{% set platformBaseTemplate = "debian-10" %} \ No newline at end of file diff --git a/install_template/templates/products/slony-replication/debian-9.njk b/install_template/templates/products/slony-replication/debian-9.njk new file mode 100644 index 00000000000..3aec469be7f --- /dev/null +++ b/install_template/templates/products/slony-replication/debian-9.njk @@ -0,0 +1,2 @@ +{% extends "products/slony-replication/base.njk" %} +{% set platformBaseTemplate = "debian-9" %} \ No newline at end of file diff --git a/install_template/templates/products/slony-replication/rhel-7-or-ol-7.njk b/install_template/templates/products/slony-replication/rhel-7-or-ol-7.njk new file mode 100644 index 00000000000..753e1c856d3 --- /dev/null +++ b/install_template/templates/products/slony-replication/rhel-7-or-ol-7.njk @@ -0,0 +1,2 @@ +{% extends "products/slony-replication/base.njk" %} +{% set platformBaseTemplate = "rhel-7-or-ol-7" %} \ No newline at end of file diff --git a/install_template/templates/products/slony-replication/rhel-7-or-ol-7_ppc64le.njk b/install_template/templates/products/slony-replication/rhel-7-or-ol-7_ppc64le.njk new file mode 100644 index 00000000000..e114375d0e7 --- /dev/null +++ b/install_template/templates/products/slony-replication/rhel-7-or-ol-7_ppc64le.njk @@ -0,0 +1,2 @@ +{% extends "products/slony-replication/rhel-7-or-ol-7.njk" %} +{% set includePPC = true %} \ No newline at end of file diff --git a/install_template/templates/products/slony-replication/rhel-8-or-ol-8.njk b/install_template/templates/products/slony-replication/rhel-8-or-ol-8.njk new file mode 100644 index 00000000000..8653e095df4 --- /dev/null +++ b/install_template/templates/products/slony-replication/rhel-8-or-ol-8.njk @@ -0,0 +1,2 @@ +{% extends "products/slony-replication/base.njk" %} +{% set platformBaseTemplate = "rhel-8-or-ol-8" %} \ No newline at end of file diff --git a/install_template/templates/products/slony-replication/sles-12.njk b/install_template/templates/products/slony-replication/sles-12.njk new file mode 100644 index 00000000000..f43b4af4794 --- /dev/null +++ b/install_template/templates/products/slony-replication/sles-12.njk @@ -0,0 +1,2 @@ +{% extends "products/slony-replication/base.njk" %} +{% set platformBaseTemplate = "sles-12" %} \ No newline at end of file diff --git a/install_template/templates/products/slony-replication/sles-12_ppc64le.njk b/install_template/templates/products/slony-replication/sles-12_ppc64le.njk new file mode 100644 index 00000000000..f43b4af4794 --- /dev/null +++ b/install_template/templates/products/slony-replication/sles-12_ppc64le.njk @@ -0,0 +1,2 @@ +{% extends "products/slony-replication/base.njk" %} +{% set platformBaseTemplate = "sles-12" %} \ No newline at end of file diff --git a/install_template/templates/products/slony-replication/sles-15.njk b/install_template/templates/products/slony-replication/sles-15.njk new file mode 100644 index 00000000000..fbc342784ee --- /dev/null +++ b/install_template/templates/products/slony-replication/sles-15.njk @@ -0,0 +1,2 @@ +{% extends "products/slony-replication/base.njk" %} +{% set platformBaseTemplate = "sles-15" %} \ No newline at end of file diff --git a/install_template/templates/products/slony-replication/sles-15_ppc64le.njk b/install_template/templates/products/slony-replication/sles-15_ppc64le.njk new file mode 100644 index 00000000000..eb96a147bec --- /dev/null +++ b/install_template/templates/products/slony-replication/sles-15_ppc64le.njk @@ -0,0 +1,3 @@ +{% extends "products/slony-replication/base.njk" %} +{% set platformBaseTemplate = "sles-15" %} +{% set includePPC = true %} \ No newline at end of file diff --git a/install_template/templates/products/slony-replication/ubuntu-18.04.njk b/install_template/templates/products/slony-replication/ubuntu-18.04.njk new file mode 100644 index 00000000000..064a819d021 --- /dev/null +++ b/install_template/templates/products/slony-replication/ubuntu-18.04.njk @@ -0,0 +1 @@ +{% extends "products/slony-replication/debian-10.njk" %} diff --git a/install_template/templates/products/slony-replication/ubuntu-20.04.njk b/install_template/templates/products/slony-replication/ubuntu-20.04.njk new file mode 100644 index 00000000000..064a819d021 --- /dev/null +++ b/install_template/templates/products/slony-replication/ubuntu-20.04.njk @@ -0,0 +1 @@ +{% extends "products/slony-replication/debian-10.njk" %} diff --git a/package.json b/package.json index 48ad8468d37..ab988bf98b2 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,9 @@ "docker:rebuild": "docker-compose -f docker/docker-compose.quickstart.yaml build --pull --no-cache", "fix-mtimes": "python3 scripts/source/git-restore-mtime.py --force", "format": "prettier --write src/**/*.js gatsby-*.js", + "install-docs:build": "docker-compose -f docker/docker-compose.install-template.yaml run --rm install-docs-template-renderer", + "install-docs:deploy": "docker-compose -f docker/docker-compose.install-template.yaml run --rm install-docs-template-renderer sh -c 'npm i && node deploy.mjs product_docs/docs'", + "install-docs:rebuild-docker-image": "docker-compose -f docker/docker-compose.install-template.yaml build --pull --no-cache", "logs": "docker-compose -f docker/docker-compose.quickstart.yaml logs -f", "pdf:build": "docker-compose -f docker/docker-compose.build-pdf.yaml run --rm --entrypoint scripts/pdf/generate_pdf.py docs-pdf-builder", "pdf:build-all": "for i in product_docs/docs/**/*/ ; do echo \"$i\"; npm run pdf:build ${i%} || exit 1; done", @@ -105,4 +108,4 @@ "type": "git", "url": "https://github.com/EnterpriseDB/docs" } -} \ No newline at end of file +} diff --git a/product_docs/docs/efm/4/03_installing_efm/index.mdx b/product_docs/docs/efm/4/03_installing_efm/index.mdx index cd8b474a062..7c33760940f 100644 --- a/product_docs/docs/efm/4/03_installing_efm/index.mdx +++ b/product_docs/docs/efm/4/03_installing_efm/index.mdx @@ -3,6 +3,7 @@ title: "Installing Failover Manager on Linux" navTitle: "Installing on Linux" redirects: - ../efm_user/03_installing_efm + - 13_initial_config.mdx legacyRedirectsGenerated: # This list is generated by a script. If you need add entries, use the `legacyRedirects` key. - "/edb-docs/d/edb-postgres-failover-manager/user-guides/user-guide/4.0/installing_efm.html" diff --git a/product_docs/docs/eprs/7/07_common_operations/09_offline_snapshot.mdx b/product_docs/docs/eprs/7/07_common_operations/09_offline_snapshot.mdx index b70c3e708c7..d3109ea2d6b 100644 --- a/product_docs/docs/eprs/7/07_common_operations/09_offline_snapshot.mdx +++ b/product_docs/docs/eprs/7/07_common_operations/09_offline_snapshot.mdx @@ -60,7 +60,7 @@ When set to `true`, the `offlineSnapshot` option prevents the usual creation of When adding the primary node in a multi-master replication system, leave the **Replicate Publication Schema** and **Perform Initial Snapshot** boxes cleared (see [Creating more primary nodes](../06_mmr_operation/03_creating_primary_nodes/#creating_primary_nodes)). -When `offlineSnapshot` is set to `true`, this configuration has the direct effect in the control schema by setting column `has_initial_snapshot` to a value of `O`. This setting indicates an offline snapshot is used for the target subscription or primary node represented by the row. Column `has_initial_snapshot` is set in table xdb_publication_subscriptions for a single-master replication system and in table xdb_MMR_pub_group for a multi-master replication system. +When `offlineSnapshot` is set to `true`, this configuration has the direct effect in the control schema by setting column `has_initial_snapshot` to a value of `O`. This setting indicates an offline snapshot is used for the target subscription or primary node represented by the row. Column `has_initial_snapshot` is set in table _edb_replicator_pub.xdb_publication_subscriptions for a single-master replication system and in table _edb_replicator_pub.xdb_mmr_pub_group for a multi-master replication system. After the first replication completes to the target subscription or primary node, `has_initial_snapshot` is changed to `Y` by Replication Server. @@ -90,15 +90,15 @@ To create a subscription from an offline snapshot: 1. Register the subscription server and add the subscription database definition as described in [Registering a subscription server](../05_smr_operation/03_creating_subscription/01_registering_subscription_server/#registering_subscription_server) and [Adding a subscription database](../05_smr_operation/03_creating_subscription/02_adding_subscription_database/#adding_subscription_database). -!!! Note - You must perform steps 3 and 4 before creating the subscription. You can repeat steps 3 through 9 each time you want to create another subscription from an offline snapshot. + !!! Note + You must perform steps 3 and 4 before creating the subscription. You can repeat steps 5 through 9 each time you want to create another subscription from an offline snapshot. 1. Modify the publication server configuration file if these options aren't already set as described by the following: - - Change the `offlineSnapshot` option to `true`. When you restart the publication server, `offlineSnapshot` set to `true` has two effects. One is that creating a subscription doesn't create the schema and subscription table definitions in the subscription database as is done with the default setting. The other is that creating a subscription sets a column in the control schema indicating an offline snapshot is used to load this subscription. + - Change the `offlineSnapshot` option to `true`. When you restart the publication server or reload the publication server's configuration via reloadconf, `offlineSnapshot` set to `true` has two effects. One is that creating a subscription doesn't create the schema and subscription table definitions in the subscription database as is done with the default setting. The other is that creating a subscription sets a column in the control schema indicating an offline snapshot is used to load this subscription. - Set the `batchInitialSync` option to the appropriate setting for your situation as discussed at the end of [Non-batch mode synchronization](#non_batch_mode_sync). -1. Restart the publication server if you modified the publication server configuration file in Step 3. See [Registering a publication server](../05_smr_operation/02_creating_publication/01_registering_publication_server/#registering_publication_server) to learn how to restart a publication server. +1. If you modified the publication server configuration file in Step 3, reload configuration of the publication server. See ["Reloading the Publication or Subscription Server Configuration File (reloadconf)"](../05_smr_operation/02_creating_publication/01_registering_publication_server/#registering_publication_server) for directions on reloading the publication server's configuration. 1. In the subscription database, create the schema and the subscription table definitions, and load the subscription tables from your offline data source. The subscription database user name used in [Adding a subscription database](../05_smr_operation/03_creating_subscription/02_adding_subscription_database/#adding_subscription_database) must have full privileges over the database objects created in this step. Also review the beginning of [Adding a subscription database](../05_smr_operation/03_creating_subscription/02_adding_subscription_database/#adding_subscription_database) regarding the rules as to how Replication Server creates the subscription definitions from the publication for each database type. You must follow these same conventions when you create the target definitions manually. @@ -108,7 +108,7 @@ To create a subscription from an offline snapshot: 1. If you aren't planning to load any other subscriptions using an offline snapshot at this time, change the `offlineSnapshot` option back to `false` and the `batchInitialSync` option to `true` in the publication server configuration file. -1. If you modified the publication server configuration file, restart the publication server. +1. If you modified the publication server configuration file in step 8, reload configuration of the publication server. ## Multi-master replication offline snapshot @@ -121,17 +121,17 @@ To create a primary node from an offline snapshot: 1. Register the publication server, add the primary definition node, and create the publication as described in [Creating a publication](../06_mmr_operation/02_creating_publication_mmr/#creating_publication_mmr). -!!! Note - You must perform the following steps before adding a primary node to be loaded by an offline snapshot. You can repeat Steps 2 through 10 each time you want to create another primary node from an offline snapshot. + !!! Note + You must perform the steps 3 and 4 before adding a primary node to be loaded by an offline snapshot. You can repeat Steps 5 through 10 each time you want to create another primary node from an offline snapshot. 1. Be sure there's no schedule defined on the replication system. If there is, remove the schedule until you complete this process. See [Removing a schedule](03_managing_schedule/#remove_schedule) for details. 1. Modify the publication server configuration file so the options are set as follows: - - Set the `offlineSnapshot` option to `true`. When the publication server is restarted, this setting has the effect that adding a primary node sets a column in the control schema indicating an offline snapshot is used to load this primary node. + - Set the `offlineSnapshot` option to `true`. When you restart the publication server or reload the publication server's configuration via reloadconf, this setting has the effect that adding a primary node sets a column in the control schema indicating an offline snapshot is used to load this primary node. - Set the `batchInitialSync` option to the appropriate setting for your situation as discussed at the end of [Non-batch mode synchronization](#non_batch_mode_sync). -1. If you modified the publication server configuration file, restart the publication server. See [Registering a publication server](../05_smr_operation/02_creating_publication/01_registering_publication_server/#registering_publication_server) to learn how to restart a publication server. +1. If you modified the publication server configuration file in step 3, reload configuration of the publication server. See ["Reloading the Publication or Subscription Server Configuration File (reloadconf)" ](../05_smr_operation/02_creating_publication/01_registering_publication_server/#registering_publication_server) for directions to reload the publication server's configuration. 1. In the database to use as the new primary node, create the schema and the table definitions, and load the tables from your offline data source. @@ -141,6 +141,6 @@ To create a primary node from an offline snapshot: 1. If you aren't planning to load any other primary nodes using an offline snapshot at this time, change the `offlineSnapshot` option back to `false` and the `batchInitialSync` option to `true` in the publication server configuration file. -1. If you modified the publication server configuration file, restart the publication server. +1. If you modified the publication server configuration file in step 8, reload configuration of the publication server. 1. Add the schedule again if you removed it. See [Creating a schedule](02_creating_schedule/#creating_schedule) to learn how to create a schedule. diff --git a/product_docs/docs/eprs/7/07_common_operations/11_using_ssl_connections.mdx b/product_docs/docs/eprs/7/07_common_operations/11_using_ssl_connections.mdx index d33b605cd47..63e3f94d32b 100644 --- a/product_docs/docs/eprs/7/07_common_operations/11_using_ssl_connections.mdx +++ b/product_docs/docs/eprs/7/07_common_operations/11_using_ssl_connections.mdx @@ -181,9 +181,13 @@ Before you begin, configure the client for SSL with trigger mode. The default location of these files is `{user.home}/.postgresql(e.g/var/lib/edb/.postgresql/)`. The file location can be overridden using SSL connection parameters or Postgres SSL environmental variables, see [Setting non-default paths using environment variables](#setting-non-default-paths-using-environment-variables) for more information. + !!!note + If you have installed Replication Server using the RPM install package from the EDB repository, the value of the {user.home} property is `/var/lib/edb/` and you need to create the `.postgresql` directory in this path to have a valid default client SSL directory path (`/var/lib/edb/.postgresql/`). + !!! + Copy and rename the files: ``` - $ cd /var/lib/pgsql/.postgresql/ + $ cd /var/lib/edb/.postgresql/ $ cp /var/lib/pgsql/14/data/server.crt postgresql.crt diff --git a/product_docs/docs/odbc_connector/13/11_odbc13_sles15_ppcle.mdx b/product_docs/docs/odbc_connector/13/03_installing_edb_odbc/01_installing_linux/ibm_power_ppc64le/11_odbc13_sles15_ppcle.mdx similarity index 100% rename from product_docs/docs/odbc_connector/13/11_odbc13_sles15_ppcle.mdx rename to product_docs/docs/odbc_connector/13/03_installing_edb_odbc/01_installing_linux/ibm_power_ppc64le/11_odbc13_sles15_ppcle.mdx diff --git a/product_docs/docs/odbc_connector/13/03_installing_edb_odbc/01_installing_linux/ibm_power_ppc64le/index.mdx b/product_docs/docs/odbc_connector/13/03_installing_edb_odbc/01_installing_linux/ibm_power_ppc64le/index.mdx index e4e579e14ca..2577cc8dcbb 100644 --- a/product_docs/docs/odbc_connector/13/03_installing_edb_odbc/01_installing_linux/ibm_power_ppc64le/index.mdx +++ b/product_docs/docs/odbc_connector/13/03_installing_edb_odbc/01_installing_linux/ibm_power_ppc64le/index.mdx @@ -6,6 +6,6 @@ navTitle: "IBM Power (ppc64le)" For operating system-specific install instructions, see: - [RHEL 8](09_odbc13_rhel8_ppcle) - - [RHEL 7](10_odbc13_rhel7_ppcle) - [SLES 12](12_odbc13_sles12_ppcle) + - [SLES 15](11_odbc13_sles15_ppcle) diff --git a/product_docs/docs/odbc_connector/13/03_installing_edb_odbc/01_installing_linux/index.mdx b/product_docs/docs/odbc_connector/13/03_installing_edb_odbc/01_installing_linux/index.mdx index 6272a86e20d..121a0aa3f43 100644 --- a/product_docs/docs/odbc_connector/13/03_installing_edb_odbc/01_installing_linux/index.mdx +++ b/product_docs/docs/odbc_connector/13/03_installing_edb_odbc/01_installing_linux/index.mdx @@ -12,7 +12,7 @@ For platform-specific install instructions, see: - Linux x86-64 (amd64): - [RHEL 8/OL 8](x86_amd64/01_odbc13_rhel8_x86) - + - [Rocky Linux 8/AlmaLinux 8](x86_amd64/02_odbc13_other_linux8_x86) - [RHEL 7/OL 7](x86_amd64/03_odbc13_rhel7_x86) - [CentOS 7](x86_amd64/04_odbc13_centos7_x86) @@ -23,9 +23,9 @@ For platform-specific install instructions, see: - Linux on IBM Power (ppc64le): - [RHEL 8](ibm_power_ppc64le/09_odbc13_rhel8_ppcle) - - [RHEL 7](ibm_power_ppc64le/10_odbc13_rhel7_ppcle) - [SLES 12](ibm_power_ppc64le/12_odbc13_sles12_ppcle) + - [SLES 15](ibm_power_ppc64le/11_odbc13_sles15_ppcle)