-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feature/etcd-cluster-size-configuration
- Loading branch information
Showing
13 changed files
with
187 additions
and
103 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ on: | |
pull_request: | ||
|
||
permissions: | ||
contents: read | ||
contents: write | ||
|
||
concurrency: | ||
group: project-e00pjzzrtk1fs3yavy | ||
|
@@ -22,10 +22,11 @@ jobs: | |
max-parallel: 2 | ||
matrix: | ||
solution: | ||
- name: compute-testing | ||
- name: slurm | ||
- name: k8s-inference | ||
- name: k8s-training | ||
- name: slurm | ||
- name: compute-testing | ||
- name: wireguard | ||
|
||
defaults: | ||
run: | ||
|
@@ -61,6 +62,9 @@ jobs: | |
> ~/.s3cfg | ||
mkdir -p tests/reports | ||
- name: Install XMLStarlet | ||
run: sudo apt install -y xmlstarlet | ||
|
||
- name: Install Nebius CLI | ||
run: | | ||
curl -sSL https://storage.ai.nebius.cloud/nebius/install.sh | bash | ||
|
@@ -107,18 +111,46 @@ jobs: | |
|
||
# Run Terraform Tests | ||
- name: Terraform Test | ||
run: terraform test -verbose -junit-xml=tests/reports/TEST-result-${{ github.run_id }}.xml | ||
run: terraform test -junit-xml=tests/reports/TEST-result-${{ github.run_id }}.xml | ||
|
||
- name: Test Summary | ||
uses: test-summary/action@v2 | ||
with: | ||
paths: ${{ matrix.solution.name }}/tests/reports/TEST-result-${{ github.run_id }}.xml | ||
if: always() | ||
- name: Set date in report | ||
run: | | ||
xmlstarlet ed \ | ||
--inplace \ | ||
-i '/testsuites' -t attr -n timestamp -v $(date --iso-8601=seconds) \ | ||
-i '/testsuites/testsuite[*]' -t attr -n timestamp -v $(date --iso-8601=seconds) \ | ||
-i '/testsuites/testsuite[*]/testcase' -t attr -n timestamp -v $(date --iso-8601=seconds) \ | ||
tests/reports/TEST-result-${{ github.run_id }}.xml | ||
- name: Upload test results | ||
run: s3cmd sync tests/reports s3://terraform-test-reports/${{ matrix.solution.name }}/ | ||
if: always() | ||
|
||
- name: Load test report history | ||
uses: actions/checkout@v4 | ||
if: always() | ||
continue-on-error: true | ||
with: | ||
ref: gh-pages | ||
path: gh-pages | ||
|
||
- name: Build test report | ||
uses: simple-elf/[email protected] | ||
if: always() | ||
with: | ||
gh_pages: gh-pages | ||
subfolder: ${{ matrix.solution.name }} | ||
allure_results: ${{ matrix.solution.name }}/tests/reports | ||
|
||
- name: Publish test report | ||
uses: peaceiris/actions-gh-pages@v4 | ||
if: always() | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_branch: gh-pages | ||
publish_dir: allure-history | ||
keep_files: true | ||
|
||
cleanup-infra: | ||
name: 'Cleanup Infra' | ||
environment: | ||
|
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
run "create_cluster" { | ||
run "compute_testing_plan" { | ||
command = plan | ||
} |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,3 @@ | ||
output "wg_instance_pib" { | ||
value = trimsuffix(nebius_compute_v1_instance.wireguard_instance.status.network_interfaces[0].public_ip_address.address, "/32") | ||
} |
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 |
---|---|---|
@@ -1,5 +1,8 @@ | ||
#parent_id = "" | ||
#subnet_id = "" | ||
#ssh_user_name = "" | ||
#ssh_public_key = "" | ||
#public_ip_allocation_id = "" | ||
# parent_id = "" | ||
# subnet_id = "" | ||
# ssh_user_name = "ubuntu" | ||
# ssh_public_key = { | ||
# key = "put your public ssh key here" | ||
# path = "put path to ssh key here" | ||
# } | ||
# public_ip_allocation_id = "" |
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,32 @@ | ||
locals { | ||
test_wg_host = trimsuffix(nebius_compute_v1_instance.wireguard_instance.status.network_interfaces[0].public_ip_address.address, "/32") | ||
} | ||
|
||
resource "null_resource" "check_wireguard_instance" { | ||
count = var.test_mode ? 1 : 0 | ||
|
||
connection { | ||
user = "ubuntu" | ||
host = local.test_wg_host | ||
} | ||
|
||
provisioner "remote-exec" { | ||
inline = [ | ||
"set -eu", | ||
"cloud-init status --wait", | ||
"ip link show wg0", | ||
"systemctl -q status [email protected] > /dev/null", | ||
] | ||
} | ||
} | ||
|
||
|
||
resource "null_resource" "check_wireguard_web_ui" { | ||
depends_on = [null_resource.check_wireguard_instance] | ||
count = var.test_mode ? 1 : 0 | ||
|
||
provisioner "local-exec" { | ||
interpreter = ["bash", "-c"] | ||
command = "sleep 15 && curl ${local.test_wg_host}:5000" | ||
} | ||
} |
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,11 @@ | ||
run "wireguard_apply" { | ||
command = apply | ||
} | ||
|
||
run "test_mode_wireguard_apply" { | ||
command = apply | ||
|
||
variables { | ||
test_mode = true | ||
} | ||
} |
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