microstack/tools/lxd_build.sh
Dmitrii Shcherbakov 35ad8fbef0 Use microstack-support interface, drop devmode
With https://github.com/snapcore/snapd/pull/8926 merged and snapd 2.53.2
released we can now test changes without devmode.

Change-Id: I9980b171e537530d67f0a7eed332147f06fe7c3c
2021-11-26 18:23:03 +03:00

31 lines
883 B
Bash
Executable File

#!/bin/bash
set -ex
export PATH=/snap/bin:$PATH
export http_proxy HTTP_PROXY https_proxy HTTPS_PROXY
sudo apt update
# install Firefox which will be used for Web UI testing in a headless mode.
sudo apt install -y firefox-geckodriver python3-petname python3-selenium
# Setup snapd and snapcraft
# Install snapd if it isn't installed yet (needed to install the snapd snap itself).
sudo apt install -y snapd
sudo snap install --classic snapcraft
# Purge the LXD apt package in case it is still there.
sudo apt purge -y lxd lxd-client
sudo snap install lxd
sudo usermod -a -G lxd ${USER}
# Since the current shell does not have the lxd group gid, use newgrp.
newgrp lxd << END
set -ex
lxd init --auto
snapcraft --use-lxd --http-proxy=$HTTP_PROXY --https-proxy=$HTTPS_PROXY
# Delete the build container to free the storage space on a test node.
lxc delete snapcraft-microstack
END