cloud

DevStack

DevStack XENA

sudo apt -y install git jq vim
sudo apt purge -y python3-distro-info
 
git clone --branch "stable/xena" https://opendev.org/openstack/devstack
 
HOST_IP=$(ip -o -4 -j a | jq -r '.[].addr_info[] | select(.dev == "ens3") .local')
echo ${HOST_IP}

DevStack XENA
https://openstack.goffinet.org/03-02-openstack-lab-devstack.html
http://lia.deis.unibo.it/Courses/CompNetworksM/1718/slides/NetworksM_Cloud180518_v1.pdf
https://opnfvblog.wordpress.com/2016/10/27/devstack-localconf/
https://01.org/sites/default/files/page/accelerating_openstack_networking_with_intel_architecture_rev008.pdf

nextcloud

# install nextcloud with snap
snap install nextcloud
 
sudo snap enable nextcloud
sudo snap disable nextcloud
 
# set domain
nextcloud.occ config:system:set trusted_domains 0 --value="nextcloud.example.com"

User
https://docs.nextcloud.com/server/15/admin_manual/configuration_server/occ_command.html#file-operations-label

# create user
export OC_PASS=pass1234
nextcloud.occ user:add --display-name "Foo Bar" --group=bar --password-from-env foo

Email

# create email
nextcloud.occ mail:account:create fobr "Foo Bar" foo.bar@example.com imap.example.com 143 off foo.bar pass1234 smtp.example.com 25 off foo.bar pass1234

Files
https://docs.nextcloud.com/server/15/admin_manual/configuration_server/occ_command.html#file-operations-label

# path
/var/snap/nextcloud/common/nextcloud/data/admin/file
 
# rescan files
nextcloud.occ files:scan --path=admin
nextcloud.occ files:scan --all
 
# external files
nextcloud.occ files_external:list
sudo snap connect nextcloud:removable-media

Calendar

cloud-config / cloud-init

Cloud config examples
https://cloudinit.readthedocs.io/en/latest/reference/examples.html

Network
https://cloudinit.readthedocs.io/en/latest/reference/network-config-format-v2.html

          cloud-init.network-config: |
            network:
              version: 2
              ethernets:
                mgmt-dev:
                  mtu: 9000
                  addresses:
                    - 10.33.1.21/20
                  routes:
                    - to: 10.33.0.0/16
                      via: 10.33.1.1
                    - to: 10.8.0.0/22
                      via: 10.33.1.1
                    - to: 192.168.252.0/23
                      via: 10.33.1.1
                  nameservers:
                    addresses:
                      - 10.8.1.74
                      - 10.8.1.174
                    search:
                      - dev.example.com
                mgmt-public:
                  addresses:
                    - 10.0.1.100/24
                  gateway4: 10.0.1.1

V1

user.network-config: |
version: 1
config:
    - type: physical
    name: dev-mgmt
    subnets:
      - type: static
        address: 10.33.20.40/20
        gateway: 10.33.16.1
        routes:
            - gateway: 10.33.16.1
              network: 10.33.0.0/16
        dns_nameservers:
            - 10.8.3.74
            - 10.8.3.174
        dns_search:
            - dev.i.example.com
    - type: physical
      name: dev-ipmi
      subnets:
    - type: static
      address: 10.32.20.40/20
      gateway: 10.32.16.1
network:
  version: 1
  config:
  - type: physical
    name: eth0
    subnets:
      - type: dhcp

Links
https://cloudinit.readthedocs.io/en/latest/topics/examples.html
https://wiki.archlinux.org/index.php/Cloud-init
https://www.digitalocean.com/community/tutorials/how-to-use-cloud-config-for-your-initial-server-setup
https://learn.hashicorp.com/tutorials/terraform/cloud-init

Incus

Ericsson H5321gw (Thinkpad T530)
# lsusb | grep Ericsson
Bus 003 Device 004: ID 0bdb:1926 Ericsson Business Mobile Networks BV

# fix kernel driver
echo "/etc/modprobe.d/avoid-mbib.conf" > options cdc_ncm prefer_mbim=N

cat < /etc/udev/rules.d/99-mbm.rules
ATTRS{idVendor}=="0bdb", ATTRS{idProduct}=="1926",
ENV{ID_USB_INTERFACE_NUM}=="09", ENV{MBM_CAPABILITY}="gps_nmea"
ATTRS{idVendor}=="0bdb", ATTRS{idProduct}=="1926",
ENV{ID_USB_INTERFACE_NUM}=="03", ENV{MBM_CAPABILITY}="gps_ctrl"
EOF

# force USB modem to only connect via EDGE and not 3G?