Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run tfrobot nightly #963

Merged
merged 5 commits into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/tfrobot_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Tfrobot

defaults:
run:
working-directory: tfrobot
on:
schedule:
- cron: 0 4 * * *
workflow_dispatch:

jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false

steps:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.21"
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v4

- name: Get dependencies
run: |
go mod download
- name: Test
env:
MNEMONIC: ${{ secrets.MNEMONICS }}
NETWORK: main
# run: make integration
run: |
go run main.go deploy -c ./example/test.yaml
sleep 120 # sleep to make sure graphql is up to date
go run main.go cancel -c ./example/test.yaml -d
52 changes: 52 additions & 0 deletions tfrobot/example/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
node_groups:
- name: group_a
nodes_count: 3
free_cpu: 2
free_mru: 16
public_ip4: true

- name: group_b
nodes_count: 20
free_cpu: 2
free_mru: 8
free_ssd: 50

- name: group_c
nodes_count: 100
free_cpu: 2
free_mru: 8

vms:
- name: example_a #test deployment of vms with public ip
vms_count: 3
node_group: group_a
cpu: 1
mem: 1
public_ip4: true
flist: https://hub.grid.tf/tf-official-apps/base:latest.flist
entry_point: /sbin/zinit init
ssh_key: key1

- name: example_b #test deployment of vms with ssd storage
vms_count: 20
node_group: group_b
cpu: 1
mem: 4
ssd:
- size: 50
mount_point: /mnt/ssd
flist: https://hub.grid.tf/tf-official-apps/base:latest.flist
entry_point: /sbin/zinit init
ssh_key: key1

- name: example_c #test deployment of large number of vms
vms_count: 500
node_group: group_c
cpu: 1
mem: 1
flist: https://hub.grid.tf/tf-official-apps/base:latest.flist
entry_point: /sbin/zinit init
ssh_key: key1

ssh_keys:
key1: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCsnouceyLPDj1OFjMO0amzznxbSurxLbZ21WEY5o6uaBuhAlDa2zMIvN8gmeZZeJcKHZfOZI0+atVo0FCjFc2VWZX7LwasW4Lbb2MV3xk4RTlkIRlKov/Iyj8lcAXEnFIV81fpLZtTmk6ERp5gYIBYP2n5CISK0lCiWeu/QFerYa9lb1cYpo/+epSREts4ka80XifA12kWMKfDNJKcWqv4EZZyRyPTVTTxKSJzHahu+J+Kpg+fs65toRaDAuXDzwBLJ/d2qCeR3dfbJl681jiFUlS46ap4njSrnGLssSSwpbhxPEWF3lJ+mQFn14aPLQikq4lOhGUhq7BCYQH9RNkZ
2 changes: 1 addition & 1 deletion tfrobot/pkg/deployer/load.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ func loadGroupDeployments(ctx context.Context, tfPluginClient deployer.TFPluginC
errGroup.Go(func() error {
deployments, err := loadNodeDeployments(ctx, tfPluginClient, nodeID, contractIDs)
if err != nil {
return fmt.Errorf("could load deployments of node %d: %w", nodeID, err)
return err
}

lock.Lock()
Expand Down
Loading