There’s a few mutations that sort of seem like what I’m looking for, but they don’t seem to quite do what I’m hoping. My goal is to be able to set it to run say 3 VMs, in regions sea, fra, and nrt.
I’ve tried this, which seems like exactly what I’d want:
mutation scaleApp{
scaleApp(input: {
appId: "myappid",
regions: [{region: "sea", count: 1}, {region: "fra", count: 1}, {region: "nrt", count: 1}]
}){
delta {
fromCount,
region,
toCount
},
placement {
count,
region
}
}
}
Which returns:
{
"data": {
"scaleApp": {
"delta": [],
"placement": [
{
"count": 0,
"region": "ams"
},
{
"count": 1,
"region": "fra"
},
{
"count": 1,
"region": "lax"
},
{
"count": 1,
"region": "nrt"
},
{
"count": 1,
"region": "sea"
},
{
"count": 0,
"region": "sin"
},
{
"count": 0,
"region": "syd"
}
]
}
}
}
But when I check the status or regions with flyctl they’ll be totally different:
REGION DESIRED STATUS HEALTH CHECKS RESTARTS CREATED
lax(B) run running 1 total, 1 passing 0 2021-06-23T00:36:46Z
lax(B) run running 1 total, 1 passing 1 2021-06-23T00:36:46Z
ams(B) run running 1 total, 1 passing 3 2021-06-01T10:16:28Z
I know the way VMs are placed isn’t always straight forward, but I feel like I’m missing something here.
There’s also a bunch of extra regions tied to the app, so I’m guessing the scaleApp mutation is additive and not replacing the list. Do I need to remove the others as well?