The three official CLIs drive feint without any
modification, with one configuration nuance per client that feint env reports
rather than leaving you to discover it. This page walks through the common commands
of all three providers, then the families that go further: block storage on
Scaleway and Exoscale, the golden image sequence, and quotas.
What you will get
By the end of this page, the three official CLIs will have created resources on your machine: a server on Scaleway, a Net on Outscale, a volume on Exoscale, each listed by its own command.
- Point each official CLI at the emulator without copying a variable.
- Read what the API returns when it differs from what the CLI displays.
- Create a block volume on Scaleway as well as on Exoscale.
- Walk the golden image sequence, in the order the API imposes.
Scaleway with scw
feint env scaleway produces the environment the official client needs. The
command writes only export lines on standard output, which makes eval safe;
remarks go to standard error.
eval "$(feint env scaleway)"scw instance server create name=web-01 type=DEV1-S image=ubuntu_jammy zone=fr-par-1scw instance server list zone=fr-par-1The variables produced point SCW_API_URL at http://127.0.0.1:4599 and
supply well-formed but fictitious credentials. That is enough: the SDKs
validate the shape of credentials client-side before sending anything, and the
emulator verifies no signature.
The server you create shows up immediately as running in the list, while the
protocol returns stopped at creation time. The explanation is not in the
emulator: scw instance server create sends a start action right after the
create. Queried directly, the emulator answers what Scaleway would:
{"name":"initial-state","state":"stopped"}Scaleway block storage
Scaleway serves block: volumes, their snapshots and the type catalogue. Two
formatting details are worth knowing because they fail the command before it even
reaches the emulator.
scw block volume create name=data from-empty.size=10G perf-iops=5000 zone=fr-par-1{"name":"data","type":"sbs","size":10000000000,"class":"sbs","iops":5000,"status":"available"}The size is written as 10G, a byte count being refused by the CLI where the
instance command accepts it, and perf-iops is mandatory. One implementation
detail is worth flagging for anyone writing a script: scw queries
/block/v1alpha1 where the Terraform provider queries /block/v1. Both
spellings answer, which saves you from choosing between two official clients of
the same cloud.
The golden image sequence
The golden image sequence is served end to end: a snapshot of the volume, an image cut from that snapshot, then deletion in the order the API imposes.
snap=$(scw instance snapshot create name=snap-source volume-id="$vol" zone=fr-par-1 -o json | jq -r .id)img=$(scw instance image create name=golden-image snapshot-id="$snap" arch=x86_64 zone=fr-par-1 -o json | jq -r .id)scw instance image list zone=fr-par-1["golden-image","ubuntu_jammy","debian_bookworm","debian_trixie","alpine","ubuntu_noble"]The image you create appears beside the frozen catalogue, and the deletion order is the real cloud's: as long as the image exists, the snapshot it is cut from refuses to go, with a message naming the culprit.
{"precondition":"resource_still_in_use","resource":"snapshot", "help_message":"the image 7f1db7e3-… is cut from this snapshot"}That is exactly the order Terraform walks when a single plan removes both, which makes this refusal useful rather than annoying. An image cut here starts nothing, though: a disk's bytes are the one thing an emulator cannot provide, and the limit is reported at boot rather than at creation.
Outscale with octl
Outscale's official client is octl, which replaces oapi-cli,
archived upstream. It reads the environment, and feint env outscale gives
it the right address form directly.
eval "$(feint env outscale)"octl iaas net create --ip-range 10.0.0.0/16octl iaas net listResolving alias to [octl iaas api CreateNet --output yaml --single --IpRange=10.0.0.0/16]IpRange: 10.0.0.0/16NetId: vpc-e3ece407State: availableThe first line deserves a word: octl announces that it resolves an alias to
the underlying API action. Aliases cover the common cases, and the
generic form stays available for any action, which makes it the direct
replacement for the older commands:
octl iaas api CreateKeypair --KeypairName=lab --PublicKey="$(cat ./id.pub)"octl iaas api CreatePublicIp{"Keypair": {"KeypairFingerprint": "2c:d6:e1:c9:22:d7:69:ee:ec:21:af:1e:0e:af:5c:1d", "KeypairName": "lab", "KeypairType": "ssh-ed25519"}}In JSON output, the same list shows the full Outscale envelope, the one
your code will have to decode: an array named after the resource type, and a
ResponseContext carrying the request identifier.
{ "Nets":[ { "IpRange":"10.0.0.0/16", "NetId":"vpc-3a31b260", "State":"available", "Tags":[], "Tenancy":"default" } ], "ResponseContext":{"RequestId":"3b25f637-a288-4839-b4aa-c3b1a709f6bb"}}Exoscale with exo
The exo CLI takes its endpoint from its configuration file, where
endpoint must be http://127.0.0.1:4599/v2. Note the /v2 suffix, which is
part of the address on this provider.
eval "$(feint env exoscale)"exo compute instance-type list| ID | FAMILY | SIZE ||--------------------------------------|----------|-------|| 21624abb-764e-4def-81d7-9fc54b5957fb | standard | tiny || b6cd1ff5-3a2f-4e9d-a4d1-8988c1191fe8 | standard | small |Two instance types only: that is the emulator's frozen catalogue, not Exoscale's inventory.
Exoscale block storage
Exoscale's block storage is served: volumes, snapshots, resizing and the attachment chain, all driven by the official CLI.
exo compute block-storage create lab-vol --size 10 --zone "$EXOSCALE_ZONE"exo compute block-storage list| ID | NAME | ZONE | SIZE | STATE ||--------------------------------------|---------|---------|--------|----------|| 7d4ca985-3365-44e4-aa5c-2ade17d51453 | lab-vol | ch-dk-2 | 10 GiB | detached |The detached state is that of a volume nothing carries yet. Every number a
volume publishes says the storage holds no bytes: the size is a declaration,
not an allocation, and What feint proves
states it in black and white.
Quotas
Quotas answer too, and they are more interesting than they look: the limit
is an invented value, like the catalogue, but usage is counted from the internal
store. An exo limits on a fresh emulator reports zero instances, and one more
after each create.
| RESOURCE | USED | MAX ||----------------------------|------|-----|| Compute instances | 0 | 100 || Compute instance snapshots | 0 | 100 || Compute instance templates | 0 | 100 |Key takeaways
feint env <provider>produces the expected environment;evalis enough forscw.octlreads the environment with an address already carrying/api/v1, andexoreads its configuration file with the/v2suffix.- The CLI may add calls: a server shown as
runningwas started byscw, not by the emulator. - Block storage is served on Scaleway and Exoscale, with sizes that cover no bytes.
- The golden image sequence respects the real cloud's deletion order, the one Terraform walks.