After you have made changes to the MAAS source code it is often necessary to test in a real environment. Debian package can be built with uncommitted changes with the following command
$ make package-dev
This will create the directory ../build-area/
which contains the built Debian packages as well as the resource files used to create the packages.
To install the test packages run the following commands on your test host:
mkdir -p /tmp/maas-testing
scp $HOST:~/build-area/*.deb /tmp/maas-testing
sudo dpkg -i /tmp/maas-testing/*.deb
# Install any missing dependencies
sudo apt-get install -f -y
# Work around for LP:1702567
if [ ! -e /usr/lib/python3/dist-packages/metadataserver/user_data/templates/snippets/maas_api_helper.py ]; then
sudo ln -sr \
/usr/lib/python3/dist-packages/provisioningserver/refresh/maas_api_helper.py \
/usr/lib/python3/dist-packages/metadataserver/user_data/templates/snippets/maas_api_helper.py
fi
if [ ! -e /usr/lib/python3/dist-packages/provisioningserver/templates/pxe/config.commissioning.arm64.template ]; then
sudo ln -s \
config.commissioning.armhf.template \
/usr/lib/python3/dist-packages/provisioningserver/templates/pxe/config.commissioning.arm64.template
fi
if [ ! -e /usr/lib/python3/dist-packages/provisioningserver/templates/pxe/config.commissioning.armhf.template ]; then
sudo ln -s \
config.install.armhf.template \
/usr/lib/python3/dist-packages/provisioningserver/templates/pxe/config.commissioning.armhf.template
fi
if [ ! -e /usr/lib/python3/dist-packages/provisioningserver/templates/pxe/config.install.arm64.template ]; then
sudo ln -s \
config.install.armhf.template \
/usr/lib/python3/dist-packages/provisioningserver/templates/pxe/config.install.arm64.template
fi
if [ ! -e /usr/lib/python3/dist-packages/provisioningserver/templates/pxe/config.local.amd64.template ]; then
sudo ln -s \
config.local.i386.template \
/usr/lib/python3/dist-packages/provisioningserver/templates/pxe/config.local.amd64.template
fi
if [ ! -e /usr/lib/python3/dist-packages/provisioningserver/templates/pxe/config.xinstall.arm64.template ]; then
sudo ln -s \
config.xinstall.armhf.template \
/usr/lib/python3/dist-packages/provisioningserver/templates/pxe/config.xinstall.arm64.template
fi
if [ ! -e /usr/lib/python3/dist-packages/provisioningserver/templates/pxe/config.xinstall.armhf.template ]; then
sudo ln -s \
config.install.armhf.template \
/usr/lib/python3/dist-packages/provisioningserver/templates/pxe/config.xinstall.armhf.template
fi
if [ ! -e /usr/lib/python3/dist-packages/provisioningserver/templates/pxe/config.xinstall.ppc64el.template ]; then
sudo ln -s \
config.install.ppc64el.template \
/usr/lib/python3/dist-packages/provisioningserver/templates/pxe/config.xinstall.ppc64el.template
fi
if [ ! -e /usr/lib/python3/dist-packages/provisioningserver/templates/pxe/config.xinstall.s390x.template ]; then
sudo ln -s \
config.install.s390x.template \
/usr/lib/python3/dist-packages/provisioningserver/templates/pxe/config.xinstall.s390x.template
fi
if [ ! -e /usr/lib/python3/dist-packages/provisioningserver/templates/uefi/config.xinstall.template ]; then
sudo ln -s \
config.install.template \
/usr/lib/python3/dist-packages/provisioningserver/templates/uefi/config.xinstall.template
fi
if [ ! -e /usr/lib/python3/dist-packages/provisioningserver/templates/ipxe/config.commissioning.template ]; then
sudo ln -s \
config.install.template \
/usr/lib/python3/dist-packages/provisioningserver/templates/ipxe/config.commissioning.template
fi
if [ ! -e /usr/lib/python3/dist-packages/provisioningserver/templates/ipxe/config.enlist.template ]; then
sudo ln -s \
config.install.template \
/usr/lib/python3/dist-packages/provisioningserver/templates/ipxe/config.commissioning.template
fi
if [ ! -e /usr/lib/python3/dist-packages/provisioningserver/templates/ipxe/config.commissioning.template ]; then
sudo ln -s \
config.install.template \
/usr/lib/python3/dist-packages/provisioningserver/templates/ipxe/config.xinstall.template
fi
If you have made API changes to run maas refresh
to update the client.