github.com/influxdata/telegraf@v1.30.3/scripts/install_incus.sh (about)

     1  #!/bin/bash
     2  set -eux
     3  
     4  sudo mkdir -p /etc/apt/keyrings
     5  sudo curl -fsSL https://pkgs.zabbly.com/key.asc -o /etc/apt/keyrings/zabbly.asc
     6  sudo sh -c 'cat <<EOF > /etc/apt/sources.list.d/zabbly-incus-stable.sources
     7  Enabled: yes
     8  Types: deb
     9  URIs: https://pkgs.zabbly.com/incus/stable
    10  Suites: $(. /etc/os-release && echo ${VERSION_CODENAME})
    11  Components: main
    12  Architectures: $(dpkg --print-architecture)
    13  Signed-By: /etc/apt/keyrings/zabbly.asc
    14  
    15  EOF'
    16  
    17  sudo apt-get update && sudo apt-get install --yes incus
    18  
    19  # On CircleCI instances do not have IPv6 enabled, force IPv4 usage only.
    20  cat <<EOF | sudo incus admin init --preseed
    21  networks:
    22  - name: incusbr0
    23    type: bridge
    24    config:
    25      ipv4.address: 192.168.100.1/24
    26      ipv4.nat: true
    27      ipv6.address: none
    28  storage_pools:
    29  - name: default
    30    driver: dir
    31  profiles:
    32  - name: default
    33    devices:
    34      eth0:
    35        name: eth0
    36        network: incusbr0
    37        type: nic
    38      root:
    39        path: /
    40        pool: default
    41        type: disk
    42  EOF
    43  
    44  # Disable the firewall to prevent issues with the default configuration.
    45  sudo ufw disable
    46  
    47  sudo usermod -a -G incus-admin "$(whoami)"