-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
318 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
pushd $(dirname $0) &>/dev/null | ||
CURDIR=${PWD} | ||
popd &>/dev/null | ||
|
||
go clean -testcache | ||
go mod vendor | ||
|
||
export LOCALDEFS=${CURDIR}/../local.env | ||
export VERBOSE=-test.v | ||
export TEST_MODE=1 | ||
export TEST_SERVER_CONFIG=${CURDIR}/../config/server.json | ||
export TEST_PROVIDER_CONFIG=${CURDIR}/../config/lxd/provider.json | ||
export TEST_CONFIG=${CURDIR}/../config/lxd/config.json | ||
export TEST_MACHINES_CONFIG=${CURDIR}/../config/lxd/machines.json | ||
export PLATEFORM=lxd | ||
export DEFAULT_MACHINE=medium | ||
|
||
if [ ! -f "${LOCALDEFS}" ]; then | ||
echo "File ${LOCALDEFS} not found, exit test" | ||
exit 1 | ||
fi | ||
|
||
source ${LOCALDEFS} | ||
|
||
if [ -n "${SSH_PRIVATEKEY}" ] && [ ! -f ${HOME}/.ssh/${SSH_KEYFILE} ]; then | ||
mkdir -p ${HOME}/.ssh | ||
|
||
echo -n ${SSH_PRIVATEKEY} | base64 -d > ${HOME}/.ssh/${SSH_KEYFILE} | ||
|
||
chmod 0600 ${HOME}/.ssh/${SSH_KEYFILE} | ||
fi | ||
|
||
source "${CURDIR}/providers.sh" | ||
source "${CURDIR}/server.sh" | ||
source "${CURDIR}/nodegroup.sh" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"instance-name": "vm-autoscaled-test-${GITHUB_RUN_ID}", | ||
"instance-type": "tiny", | ||
"disk-size": 20480 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"tiny": { | ||
"memsize": 2048, | ||
"vcpus": 2, | ||
"disksize": 10240 | ||
}, | ||
"small": { | ||
"memsize": 4096, | ||
"vcpus": 2, | ||
"disksize": 20480 | ||
}, | ||
"medium": { | ||
"memsize": 4096, | ||
"vcpus": 4, | ||
"disksize": 20480 | ||
}, | ||
"large": { | ||
"memsize": 8192, | ||
"vcpus": 4, | ||
"disksize": 51200 | ||
}, | ||
"xlarge": { | ||
"memsize": 16384, | ||
"vcpus": 4, | ||
"disksize": 102400 | ||
}, | ||
"2xlarge": { | ||
"memsize": 16384, | ||
"vcpus": 8, | ||
"disksize": 102400 | ||
}, | ||
"4xlarge": { | ||
"memsize": 32768, | ||
"vcpus": 8, | ||
"disksize": 102400 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
{ | ||
"lxd-server-url": "unix:", | ||
"container-type": "container", | ||
"storage-pool": "default", | ||
"profiles": [ | ||
"default" | ||
], | ||
"project": "default", | ||
"nodegroup": "lxd-dev-k3s", | ||
"timeout": 300, | ||
"template-name": "ubuntu:noble", | ||
"remotes": { | ||
"images": { | ||
"Addr": "https://images.lxd.canonical.com", | ||
"AuthType": "", | ||
"Project": "", | ||
"Protocol": "simplestreams", | ||
"Public": true, | ||
"Global": false, | ||
"Static": false | ||
}, | ||
"ubuntu": { | ||
"Addr": "https://cloud-images.ubuntu.com/releases", | ||
"AuthType": "", | ||
"Project": "", | ||
"Protocol": "simplestreams", | ||
"Public": true, | ||
"Global": false, | ||
"Static": true | ||
}, | ||
"ubuntu-daily": { | ||
"Addr": "https://cloud-images.ubuntu.com/daily", | ||
"AuthType": "", | ||
"Project": "", | ||
"Protocol": "simplestreams", | ||
"Public": true, | ||
"Global": false, | ||
"Static": true | ||
}, | ||
"ubuntu-minimal": { | ||
"Addr": "https://cloud-images.ubuntu.com/minimal/releases/", | ||
"AuthType": "", | ||
"Project": "", | ||
"Protocol": "simplestreams", | ||
"Public": true, | ||
"Global": false, | ||
"Static": true | ||
}, | ||
"ubuntu-minimal-daily": { | ||
"Addr": "https://cloud-images.ubuntu.com/minimal/daily/", | ||
"AuthType": "", | ||
"Project": "", | ||
"Protocol": "simplestreams", | ||
"Public": true, | ||
"Global": false, | ||
"Static": true | ||
} | ||
}, | ||
"network": { | ||
"domain": "aldunelabs.private", | ||
"interfaces": [ | ||
{ | ||
"enabled": true, | ||
"primary": true, | ||
"network": "lxdbr0", | ||
"nic": "eth0", | ||
"dhcp": true | ||
} | ||
] | ||
} | ||
} |
Oops, something went wrong.