diff --git a/cmd/verUpgrade.go b/cmd/verUpgrade.go index 47d11aaa4..2a45ba23f 100644 --- a/cmd/verUpgrade.go +++ b/cmd/verUpgrade.go @@ -30,7 +30,10 @@ var upgradeCmd = &cobra.Command{ _ = downloadFile(downloadURL, f) c := exec.Command("bash", f.Name()) - // c.Stdin = os.Stdin + // pass the environment variables to the upgrade script + // so that GITHUB_TOKEN is available + c.Env = os.Environ() + c.Stdout = os.Stdout c.Stderr = os.Stderr err = c.Run() diff --git a/docs/install.md b/docs/install.md index 839eb862d..bc6e8852d 100644 --- a/docs/install.md +++ b/docs/install.md @@ -14,62 +14,99 @@ The following requirements must be satisfied to let containerlab tool run succes ### Install script -Containerlab can be installed using the [installation script](https://github.com/srl-labs/containerlab/blob/main/get.sh) which detects the operating system type and installs the relevant package: +Containerlab can be installed using the [installation script](https://github.com/srl-labs/containerlab/blob/main/get.sh) that detects the operating system type and installs the relevant package: -!!! note - Containerlab is distributed via deb/rpm packages, thus only Debian- and RHEL-like distributives can leverage package installation. - Other systems can follow the [manual installation](#manual-installation) procedure. +/// note +Containerlab is distributed via deb/rpm packages, thus only Debian- and RHEL-like distributives can leverage package installation. +Other systems can follow the [manual installation](#manual-installation) procedure. +/// + +/// tab | Latest release + +Download and install the latest release (may require `sudo`): ```bash -# download and install the latest release (may require sudo) bash -c "$(curl -sL https://get.containerlab.dev)" +``` + +/// -# download a specific version - 0.10.3 (may require sudo) +/// tab | Specific version + +Download a specific version. Versions can be found on the [Releases](https://github.com/srl-labs/containerlab/releases) page. + +```bash bash -c "$(curl -sL https://get.containerlab.dev)" -- -v 0.10.3 +``` + +/// + +/// tab | with `wget` +```bash # with wget bash -c "$(wget -qO - https://get.containerlab.dev)" ``` +/// + +Since the installation script uses GitHub API, users may hit the rate limit imposed by GitHub. To avoid this, users can pass their personal GitHub token as an env var to the installation script: + +```bash +GITHUB_TOKEN= bash -c "$(curl -sL https://get.containerlab.dev)" +``` + ### Package managers It is possible to install official containerlab releases via public APT/YUM repository. -=== "APT" - ```bash - echo "deb [trusted=yes] https://apt.fury.io/netdevops/ /" | \ - sudo tee -a /etc/apt/sources.list.d/netdevops.list - - sudo apt update && sudo apt install containerlab - ``` -=== "YUM" - ``` - yum-config-manager --add-repo=https://yum.fury.io/netdevops/ && \ - echo "gpgcheck=0" | sudo tee -a /etc/yum.repos.d/yum.fury.io_netdevops_.repo - - sudo yum install containerlab - ``` -=== "APK" - Download `.apk` package from [Github releases](https://github.com/srl-labs/containerlab/releases). -=== "AUR" - Arch Linux users can download a package from this [AUR repository](https://aur.archlinux.org/packages/containerlab-bin). - -??? "Manual package installation" - Alternatively, users can manually download the deb/rpm package from the [Github releases](https://github.com/srl-labs/containerlab/releases) page. - - example: - ```bash - # manually install latest release with package managers - LATEST=$(curl -s https://github.com/srl-labs/containerlab/releases/latest | sed -e 's/.*tag\/v\(.*\)\".*/\1/') - # with yum - yum install "https://github.com/srl-labs/containerlab/releases/download/v${LATEST}/containerlab_${LATEST}_linux_amd64.rpm" - # with dpkg - curl -sL -o /tmp/clab.deb "https://github.com/srl-labs/containerlab/releases/download/v${LATEST}/containerlab_${LATEST}_linux_amd64.deb" && dpkg -i /tmp/clab.deb - - # install specific release with yum - yum install https://github.com/srl-labs/containerlab/releases/download/v0.7.0/containerlab_0.7.0_linux_386.rpm - ``` +/// tab | APT + +```bash +echo "deb [trusted=yes] https://apt.fury.io/netdevops/ /" | \ +sudo tee -a /etc/apt/sources.list.d/netdevops.list + +sudo apt update && sudo apt install containerlab +``` + +/// +/// tab | YUM + +``` +yum-config-manager --add-repo=https://yum.fury.io/netdevops/ && \ +echo "gpgcheck=0" | sudo tee -a /etc/yum.repos.d/yum.fury.io_netdevops_.repo + +sudo yum install containerlab +``` +/// + +/// tab | APK +Download `.apk` package from [Github releases](https://github.com/srl-labs/containerlab/releases). +/// + +/// tab | AUR +Arch Linux users can download a package from this [AUR repository](https://aur.archlinux.org/packages/containerlab-bin). +/// + +/// details | Manual package installation +Alternatively, users can manually download the deb/rpm package from the [Github releases](https://github.com/srl-labs/containerlab/releases) page. + +example: + +```bash +# manually install latest release with package managers +LATEST=$(curl -s https://github.com/srl-labs/containerlab/releases/latest | sed -e 's/.*tag\/v\(.*\)\".*/\1/') +# with yum +yum install "https://github.com/srl-labs/containerlab/releases/download/v${LATEST}/containerlab_${LATEST}_linux_amd64.rpm" +# with dpkg +curl -sL -o /tmp/clab.deb "https://github.com/srl-labs/containerlab/releases/download/v${LATEST}/containerlab_${LATEST}_linux_amd64.deb" && dpkg -i /tmp/clab.deb + +# install specific release with yum +yum install https://github.com/srl-labs/containerlab/releases/download/v0.7.0/containerlab_0.7.0_linux_386.rpm +``` + +/// The package installer will put the `containerlab` binary in the `/usr/bin` directory as well as create the `/usr/bin/clab -> /usr/bin/containerlab` symlink. The symlink allows the users to save on typing when they use containerlab: `clab `. ### Container @@ -101,14 +138,17 @@ docker run --rm -it --privileged \ Within the started container you can use the same `containerlab deploy/destroy/inspect` commands to manage your labs. -!!!note - Containerlab' container command is itself `containerlab`, so you can deploy a lab without invoking a shell, for example: - ```bash - docker run --rm -it --privileged \ - # - -w $(pwd) \ - ghcr.io/srl-labs/clab deploy -t somelab.clab.yml - ``` +/// note +Containerlab' container command is itself `containerlab`, so you can deploy a lab without invoking a shell, for example: + +```bash +docker run --rm -it --privileged \ +# +-w $(pwd) \ +ghcr.io/srl-labs/clab deploy -t somelab.clab.yml +``` + +/// ### Manual installation @@ -145,8 +185,9 @@ bash Once installed, issue `sudo service docker start` to start the docker service inside WSL2 machine. -??? "Running VM-based routers inside WSL" - In Windows 11 with WSL2 it is now possible to [enable KVM support](https://serverfault.com/a/1115773/351978). Let us know if that worked for you in our [Discord](community.md). +/// details | Running VM-based routers inside WSL +In Windows 11 with WSL2 it is now possible to [enable KVM support](https://serverfault.com/a/1115773/351978). Let us know if that worked for you in our [Discord](community.md). +/// ### Apple macOS @@ -186,102 +227,107 @@ and start downloading the labs you want to run. Another option to run containerlab on ARM-based Macs is to use Docker in Docker approach. With this approach, a docker-in-docker container is launched on the macOS inside the VM providing a docker environment. This setup also works on other operating systems where Docker is available. Below is a step-by-step guide on how to set it up. -???tip "Docker in docker guide" - We'll provide an example of a custom [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers) that can be opened in [VSCode](https://code.visualstudio.com) with [Remote Development extension pack](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack) installed. - - Create `.devcontainer` directory in the root of the Containerlab repository with the following content: - - ```text - .devcontainer - |- devcontainer.json - |- Dockerfile - ``` - - === "Dockerfile" - - ```Dockerfile - # The devcontainer will be based on debian bullseye - # The base container already has entrypoint, vscode user account, etc. out of the box - FROM mcr.microsoft.com/vscode/devcontainers/base:bullseye - - # containelab version will be set in devcontainer.json - ARG _CLAB_VERSION - - # Set permissions for mounts in devcontainer.json - RUN mkdir -p /home/vscode/.vscode-server/bin - RUN chown -R vscode:vscode /home/vscode/.vscode-server - - # install some basic tools inside the container - # adjust this list based on your demands - RUN apt-get update && \ - apt-get upgrade -y && \ - apt-get install -y --no-install-recommends \ - sshpass \ - curl \ - iputils-ping \ - htop \ - yamllint \ - && rm -rf /var/lib/apt/lists/* \ - && rm -Rf /usr/share/doc && rm -Rf /usr/share/man \ - && apt-get clean - - # install preferred version of the containerlab - RUN bash -c "$(curl -sL https://get.containerlab.dev)" -- -v ${_CLAB_VERSION} - ``` - === "devcontainer.json" - - ```json - // For format details, see https://aka.ms/devcontainer.json. For config options, see the - // README at: https://github.com/devcontainers/templates/tree/main/src/python - { - "name": "clab-dev-container", - "build": { - "dockerfile": "Dockerfile", - "args": { - "_CLAB_VERSION": "0.47.2" - } - }, - "features": { - // Containerlab will run in a docker-in-docker container - // it is also possible to use docker-outside-docker feature - "ghcr.io/devcontainers/features/docker-in-docker:latest": { - "version": "latest" - } - // You can add other features from this list: https://github.com/orgs/devcontainers/packages?repo_name=features - // For example: - //"ghcr.io/devcontainers/features/go:latest": { - // "version": "1.21" - //} - - }, - // add any required extensions that must be pre-installed in the devcontainer - "customizations": { - "vscode": { - "extensions": [ - // various tools - "ms-azuretools.vscode-docker", - "tuxtina.json2yaml", - "vscode-icons-team.vscode-icons", - "mutantdino.resourcemonitor" - ] - } - }, - // This adds persistent mounts, so some configuration like docker credentials are saved for the vscode user and root (for sudo). - // Furthermore, your bash history and other configurations you made in your container users 'vscode' home are saved. - // .vscode-server is an anonymous volume. Gets destroyed on rebuild, which allows vscode to reinstall the extensions and dotfiles. - "mounts": [ - "source=clab-vscode-home-dir,target=/home/vscode,type=volume", - "source=clab-docker-root-config,target=/root/.docker,type=volume", - "target=/home/vscode/.vscode-server,type=volume" - ] +//// details | "Docker in docker guide" +We'll provide an example of a custom [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers) that can be opened in [VSCode](https://code.visualstudio.com) with [Remote Development extension pack](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack) installed. + +Create `.devcontainer` directory in the root of the Containerlab repository with the following content: + +```text +.devcontainer +|- devcontainer.json +|- Dockerfile +``` + +/// tab | Dockerfile + +```Dockerfile +# The devcontainer will be based on debian bullseye +# The base container already has entrypoint, vscode user account, etc. out of the box +FROM mcr.microsoft.com/vscode/devcontainers/base:bullseye + +# containelab version will be set in devcontainer.json +ARG _CLAB_VERSION + +# Set permissions for mounts in devcontainer.json +RUN mkdir -p /home/vscode/.vscode-server/bin +RUN chown -R vscode:vscode /home/vscode/.vscode-server + +# install some basic tools inside the container +# adjust this list based on your demands +RUN apt-get update && \ + apt-get upgrade -y && \ + apt-get install -y --no-install-recommends \ + sshpass \ + curl \ + iputils-ping \ + htop \ + yamllint \ + && rm -rf /var/lib/apt/lists/* \ + && rm -Rf /usr/share/doc && rm -Rf /usr/share/man \ + && apt-get clean + +# install preferred version of the containerlab +RUN bash -c "$(curl -sL https://get.containerlab.dev)" -- -v ${_CLAB_VERSION} +``` + +/// + +/// tab | devcontainer.json + +```json +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/python +{ + "name": "clab-dev-container", + "build": { + "dockerfile": "Dockerfile", + "args": { + "_CLAB_VERSION": "0.47.2" + } + }, + "features": { + // Containerlab will run in a docker-in-docker container + // it is also possible to use docker-outside-docker feature + "ghcr.io/devcontainers/features/docker-in-docker:latest": { + "version": "latest" + } + // You can add other features from this list: https://github.com/orgs/devcontainers/packages?repo_name=features + // For example: + //"ghcr.io/devcontainers/features/go:latest": { + // "version": "1.21" + //} + + }, + // add any required extensions that must be pre-installed in the devcontainer + "customizations": { + "vscode": { + "extensions": [ + // various tools + "ms-azuretools.vscode-docker", + "tuxtina.json2yaml", + "vscode-icons-team.vscode-icons", + "mutantdino.resourcemonitor" + ] } - ``` + }, + // This adds persistent mounts, so some configuration like docker credentials are saved for the vscode user and root (for sudo). + // Furthermore, your bash history and other configurations you made in your container users 'vscode' home are saved. + // .vscode-server is an anonymous volume. Gets destroyed on rebuild, which allows vscode to reinstall the extensions and dotfiles. + "mounts": [ + "source=clab-vscode-home-dir,target=/home/vscode,type=volume", + "source=clab-docker-root-config,target=/root/.docker,type=volume", + "target=/home/vscode/.vscode-server,type=volume" +] +} +``` - Once the devcontainer is defined as described above: +/// +Once the devcontainer is defined as described above: - * Open the devcontainer in VSCode - * Import the required images for your cLab inside the container (if you are using Docker-in-Docker option) - * Start your Containerlab +* Open the devcontainer in VSCode +* Import the required images for your cLab inside the container (if you are using Docker-in-Docker option) +* Start your Containerlab +//// #### Intel @@ -302,125 +348,144 @@ docker run --rm -it --privileged \ The first command in the snippet above sets the working directory which you intend to use on your macOS. The `~/clab` in the example above expands to `/Users//clab` and means that we intend to have our containerlab labs to be stored in this directory. -!!!note - 1. It is best to create a directory under the `~/some/path` unless you know what to do[^5] - 2. vrnetlab based nodes will not be able to start, since Docker VM does not support virtualization. - 3. Docker Desktop for Mac introduced cgroups v2 support in 4.3.0 version; to support the images that require cgroups v1 follow [these instructions](https://github.com/docker/for-mac/issues/6073). - 4. Docker Desktop relies on a LinuxKit based HyperKit VM. Unfortunately, it is shipped with a minimalist kernel, and some modules such as VRF are disabled by default. Follow [these instructions](https://medium.com/@notsinge/making-your-own-linuxkit-with-docker-for-mac-5c1234170fb1) to rebuild it with more modules. +/// note + +1. It is best to create a directory under the `~/some/path` unless you know what to do[^5] +2. vrnetlab based nodes will not be able to start, since Docker VM does not support virtualization. +3. Docker Desktop for Mac introduced cgroups v2 support in 4.3.0 version; to support the images that require cgroups v1 follow [these instructions](https://github.com/docker/for-mac/issues/6073). +4. Docker Desktop relies on a LinuxKit based HyperKit VM. Unfortunately, it is shipped with a minimalist kernel, and some modules such as VRF are disabled by default. Follow [these instructions](https://medium.com/@notsinge/making-your-own-linuxkit-with-docker-for-mac-5c1234170fb1) to rebuild it with more modules. +/// When the container is started, you will have a bash shell opened with the directory contents mounted from the macOS. There you can use `containerlab` commands right away. -???tip "Step by step example" - Let's imagine I want to run a lab with two SR Linux containers running directly on a macOS. - - First, I need to have Docker Desktop for Mac installed and running. - - Then I will create a directory under the `$HOME` path on my mac: - - ``` - mkdir -p ~/clab - ``` - - Then I will create a clab file defining my lab in the newly created directory: - - ```bash - cat < ~/clab/2srl.clab.yml - name: 2srl - - topology: - nodes: - srl1: - kind: srl - image: ghcr.io/nokia/srlinux - srl2: - kind: srl - image: ghcr.io/nokia/srlinux - - links: - - endpoints: ["srl1:e1-1", "srl2:e1-1"] - EOF - ``` - - Now when the clab file is there, launch the container and don't forget to use path to the directory you created: - - ```bash - CLAB_WORKDIR=~/clab - - docker run --rm -it --privileged \ - --network host \ - -v /var/run/docker.sock:/var/run/docker.sock \ - -v /run/netns:/run/netns \ - --pid="host" \ - -w $CLAB_WORKDIR \ - -v $CLAB_WORKDIR:$CLAB_WORKDIR \ - ghcr.io/srl-labs/clab bash - ``` - - Immediately you will get into the directory inside the container with your lab file available: - - ``` - root@docker-desktop:/Users/romandodin/clab# ls - 2srl.clab.yml - ``` - - Now you can launch the lab, as containerlab is already part of the image: - ``` - root@docker-desktop:/Users/romandodin/clab# clab dep -t 2srl.clab.yml - INFO[0000] Parsing & checking topology file: 2srl.clab.yml - INFO[0000] Creating lab directory: /Users/romandodin/clab/clab-2srl - INFO[0000] Creating root CA - INFO[0000] Creating docker network: Name='clab', IPv4Subnet='172.20.20.0/24', IPv6Subnet='2001:172:20:20::/64', MTU='1500' - INFO[0000] Creating container: srl1 - INFO[0000] Creating container: srl2 - INFO[0001] Creating virtual wire: srl1:e1-1 <--> srl2:e1-1 - INFO[0001] Adding containerlab host entries to /etc/hosts file - +---+----------------+--------------+-----------------------+------+-------+---------+----------------+----------------------+ - | # | Name | Container ID | Image | Kind | Group | State | IPv4 Address | IPv6 Address | - +---+----------------+--------------+-----------------------+------+-------+---------+----------------+----------------------+ - | 1 | clab-2srl-srl1 | 574bf836fb40 | ghcr.io/nokia/srlinux | srl | | running | 172.20.20.2/24 | 2001:172:20:20::2/64 | - | 2 | clab-2srl-srl2 | f88531a74ffb | ghcr.io/nokia/srlinux | srl | | running | 172.20.20.3/24 | 2001:172:20:20::3/64 | - +---+----------------+--------------+-----------------------+------+-------+---------+----------------+----------------------+ - ``` +/// details | Step-by-step example +Let's imagine I want to run a lab with two SR Linux containers running directly on a macOS. + +First, I need to have Docker Desktop for Mac installed and running. + +Then I will create a directory under the `$HOME` path on my mac: + +``` +mkdir -p ~/clab +``` + +Then I will create a clab file defining my lab in the newly created directory: + +```bash +cat < ~/clab/2srl.clab.yml +name: 2srl + +topology: + nodes: + srl1: + kind: srl + image: ghcr.io/nokia/srlinux + srl2: + kind: srl + image: ghcr.io/nokia/srlinux + + links: + - endpoints: ["srl1:e1-1", "srl2:e1-1"] +EOF +``` + +Now when the clab file is there, launch the container and don't forget to use path to the directory you created: + +```bash +CLAB_WORKDIR=~/clab + +docker run --rm -it --privileged \ + --network host \ + -v /var/run/docker.sock:/var/run/docker.sock \ + -v /run/netns:/run/netns \ + --pid="host" \ + -w $CLAB_WORKDIR \ + -v $CLAB_WORKDIR:$CLAB_WORKDIR \ + ghcr.io/srl-labs/clab bash +``` + +Immediately you will get into the directory inside the container with your lab file available: + +``` +root@docker-desktop:/Users/romandodin/clab# ls +2srl.clab.yml +``` + +Now you can launch the lab, as containerlab is already part of the image: + +``` +root@docker-desktop:/Users/romandodin/clab# clab dep -t 2srl.clab.yml +INFO[0000] Parsing & checking topology file: 2srl.clab.yml +INFO[0000] Creating lab directory: /Users/romandodin/clab/clab-2srl +INFO[0000] Creating root CA +INFO[0000] Creating docker network: Name='clab', IPv4Subnet='172.20.20.0/24', IPv6Subnet='2001:172:20:20::/64', MTU='1500' +INFO[0000] Creating container: srl1 +INFO[0000] Creating container: srl2 +INFO[0001] Creating virtual wire: srl1:e1-1 <--> srl2:e1-1 +INFO[0001] Adding containerlab host entries to /etc/hosts file ++---+----------------+--------------+-----------------------+------+-------+---------+----------------+----------------------+ +| # | Name | Container ID | Image | Kind | Group | State | IPv4 Address | IPv6 Address | ++---+----------------+--------------+-----------------------+------+-------+---------+----------------+----------------------+ +| 1 | clab-2srl-srl1 | 574bf836fb40 | ghcr.io/nokia/srlinux | srl | | running | 172.20.20.2/24 | 2001:172:20:20::2/64 | +| 2 | clab-2srl-srl2 | f88531a74ffb | ghcr.io/nokia/srlinux | srl | | running | 172.20.20.3/24 | 2001:172:20:20::3/64 | ++---+----------------+--------------+-----------------------+------+-------+---------+----------------+----------------------+ +``` + +/// ### Upgrade To upgrade `containerlab` to the latest available version issue the following command[^1]: ``` -containerlab version upgrade +sudo -E containerlab version upgrade ``` -This command will fetch the installation script and will upgrade the tool to its most recent version. +This command will fetch the installation script and will upgrade the tool to its most recent version. In case of GitHub rate limit, provide `GITHUB_TOKEN` env var with your personal GitHub token to the upgrade command. -or leverage `apt`/`yum` utilities if containerlab repo was added as explained in the [Package managers](#package-managers) section. +Or leverage `apt`/`yum` utilities if containerlab repo was added as explained in the [Package managers](#package-managers) section. ### From source To build containerlab from source: -=== "with go build" - To build containerlab from source, clone the repository and issue `go build` at its root. -=== "with goreleaser" - When we release containerlab we use [goreleaser](https://goreleaser.com/) project to build binaries for all supported platforms as well as the deb/rpm packages. - Users can install `goreleaser` and do the same locally by issuing the following command: - ``` - goreleaser --snapshot --skip-publish --rm-dist - ``` +/// tab | with `go build` +To build containerlab from source, clone the repository and issue `go build` at its root. +/// + +/// tab | with goreleaser +When we release containerlab we use [goreleaser](https://goreleaser.com/) project to build binaries for all supported platforms as well as the deb/rpm packages. +Users can install `goreleaser` and do the same locally by issuing the following command: + +``` +goreleaser --snapshot --skip-publish --rm-dist +``` + +/// ### Uninstall To uninstall containerlab when it was installed via installation script or packages: -=== "Debian-based system" - ``` - apt remove containerlab - ``` -=== "RPM-based systems" - ``` - yum remove containerlab - ``` -=== "Manual removal" - Containerlab binary is located at `/usr/bin/containerlab`. In addition to the binary, containerlab directory with static files may be found at `/etc/containerlab`. +/// tab | Debian-based system + +``` +apt remove containerlab +``` + +/// + +/// tab | RPM-based systems + +``` +yum remove containerlab +``` + +/// + +/// tab | Manual removal +Containerlab binary is located at `/usr/bin/containerlab`. In addition to the binary, containerlab directory with static files may be found at `/etc/containerlab`. +/// ### SELinux diff --git a/get.sh b/get.sh index 6a9db4925..24c40fea4 100644 --- a/get.sh +++ b/get.sh @@ -100,12 +100,18 @@ verifyOpenssl() { # or to the latest release available on github releases setDesiredVersion() { if [ "x$DESIRED_VERSION" == "x" ]; then + # check if GITHUB_TOKEN env var is set and use it for API calls + local gh_token=${GITHUB_TOKEN:-} + if [ ! -z "$gh_token" ]; then + local curl_auth_header=(-H "Authorization: Bearer ${GITHUB_TOKEN}") + local wget_auth_header=(--header="Authorization: Bearer ${GITHUB_TOKEN}") + fi # when desired version is not provided # get latest tag from the gh releases if type "curl" &>/dev/null; then - local latest_release_url=$(curl -s https://api.github.com/repos/$REPO_NAME/releases/latest | sed '5q;d' | cut -d '"' -f 4) + local latest_release_url=$(curl -s "${curl_auth_header[@]}" https://api.github.com/repos/$REPO_NAME/releases/latest | sed '5q;d' | cut -d '"' -f 4) if [ -z "$latest_release_url" ]; then - echo "Failed to retrieve latest release URL due to rate limiting. Please try again later." + echo "Failed to retrieve latest release URL due to rate limiting. Please provide env var GITHUB_TOKEN with your GitHub personal access token." exit 1 fi TAG=$(echo $latest_release_url | cut -d '"' -f 2 | awk -F "/" '{print $NF}') @@ -113,9 +119,9 @@ setDesiredVersion() { TAG_WO_VER=$(echo "${TAG}" | cut -c 2-) elif type "wget" &>/dev/null; then # get latest release info and get 5th line out of the response to get the URL - local latest_release_url=$(wget -q https://api.github.com/repos/$REPO_NAME/releases/latest -O- | sed '5q;d' | cut -d '"' -f 4) + local latest_release_url=$(wget -q "${wget_auth_header[@]}" https://api.github.com/repos/$REPO_NAME/releases/latest -O- | sed '5q;d' | cut -d '"' -f 4) if [ -z "$latest_release_url" ]; then - echo "Failed to retrieve latest release URL due to rate limiting. Please try again later." + echo "Failed to retrieve latest release URL due to rate limiting. Please provide env var GITHUB_TOKEN with your GitHub personal access token." exit 1 fi TAG=$(echo $latest_release_url | cut -d '"' -f 2 | awk -F "/" '{print $NF}') diff --git a/mkdocs.yml b/mkdocs.yml index 3c53fa1b0..7529c21ba 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -285,6 +285,11 @@ markdown_extensions: format: !!python/name:pymdownx.superfences.fence_code_format - pymdownx.tabbed: alternate_style: true + - pymdownx.blocks.tab: + alternate_style: true + - pymdownx.blocks.admonition + - pymdownx.blocks.definition + - pymdownx.blocks.details - pymdownx.tasklist: custom_checkbox: true - pymdownx.tilde