diff --git a/examples/threefold/tfgrid3deployer/filter.vsh b/examples/threefold/tfgrid3deployer/filter.vsh new file mode 100755 index 00000000..4738f5da --- /dev/null +++ b/examples/threefold/tfgrid3deployer/filter.vsh @@ -0,0 +1,20 @@ +#!/usr/bin/env -S v -gc none -cc tcc -d use_openssl -enable-globals -cg run + +import freeflowuniverse.herolib.threefold.grid3.deployer + +const gigabyte = u64(1024 * 1024 * 1024) + +// We can use any of the parameters for the corresponding Grid Proxy query +// https://gridproxy.grid.tf/swagger/index.html#/GridProxy/get_nodes + +filter := deployer.FilterNodesArgs{ + size: 5 + randomize: true + free_mru: 8 * gigabyte + free_sru: 50 * gigabyte + farm_name: 'FreeFarm' + status: 'up' +} + +nodes := deployer.filter_nodes(filter)! +println(nodes) diff --git a/examples/threefold/tfgrid3deployer/vm_gw_caddy/vm_gw_caddy.vsh b/examples/threefold/tfgrid3deployer/vm_gw_caddy/vm_gw_caddy.vsh index 25e826d1..fbec2d49 100755 --- a/examples/threefold/tfgrid3deployer/vm_gw_caddy/vm_gw_caddy.vsh +++ b/examples/threefold/tfgrid3deployer/vm_gw_caddy/vm_gw_caddy.vsh @@ -1,6 +1,5 @@ -#!/usr/bin/env -S v -gc none -d use_openssl -enable-globals -cg run +#!/usr/bin/env -S v -gc none -cc tcc -d use_openssl -enable-globals -cg run -//#!/usr/bin/env -S v -gc none -cc tcc -d use_openssl -enable-globals -cg run import freeflowuniverse.herolib.threefold.grid3.gridproxy import freeflowuniverse.herolib.threefold.grid3.deployer import freeflowuniverse.herolib.installers.threefold.griddriver