Skip to content

Commit

Permalink
Merge pull request #963 from threefoldtech/development-run-tfrobot-ni…
Browse files Browse the repository at this point in the history
…ghtly

run tfrobot nightly
  • Loading branch information
Eslam-Nawara authored Mar 20, 2024
2 parents fcf0c9e + 8e7ea0a commit a1f093a
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 1 deletion.
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

0 comments on commit a1f093a

Please sign in to comment.