Skip to content

Commit

Permalink
Copy provider config in garm folder
Browse files Browse the repository at this point in the history
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
  • Loading branch information
gabriel-samfira committed Dec 18, 2023
1 parent a8f468b commit 5d596aa
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/integration/scripts/setup-garm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ CONTRIB_DIR="$PWD/contrib"
CONFIG_DIR="$PWD/test/integration/config"
CONFIG_DIR_PROV="$PWD/test/integration/provider"
PROVIDER_BIN_DIR="/opt/garm/providers.d/lxd"
export LXD_PROVIDER_EXECUTABLE="$PROVIDER_BIN_DIR/garm-provider-lxd"
export LXD_PROVIDER_CONFIG="$CONFIG_DIR/garm-provider-lxd.toml"

if [[ ! -f $BINARIES_DIR/garm ]] || [[ ! -f $BINARIES_DIR/garm-cli ]]; then
echo "ERROR: Please build GARM binaries first"
Expand Down Expand Up @@ -52,6 +50,10 @@ pushd ~/garm-provider-lxd
go build -o $LXD_PROVIDER_EXECUTABLE
popd

export LXD_PROVIDER_CONFIG="/etc/garm/garm-provider-lxd.toml"
export LXD_PROVIDER_EXECUTABLE="$PROVIDER_BIN_DIR/garm-provider-lxd"
sudo cp $CONFIG_DIR/garm-provider-lxd.toml $LXD_PROVIDER_CONFIG

sudo mkdir -p /etc/garm
cat $CONFIG_DIR/config.toml | envsubst | sudo tee /etc/garm/config.toml
sudo chown -R garm:garm /etc/garm
Expand Down

0 comments on commit 5d596aa

Please sign in to comment.