0

I'm currently writing some blue/green deployment scripts to provision VSIs on SoftLayer (aka IBM Bluemix aka IBMCloud), and I need to provision and attach a new iSCSI storage to every green machine, the blue VSI and iSCSI storage being canceled after a successful deploy. I use the ibmcloud command to provision the iSCSI disks, however it doesn't let me choose which billing method to use (Monthly or Hourly) and it uses the monthly billing by default.

Is there a way to specify to use the hourly billing method using the ibmcloud cli? If it's not possible, is it a feature that will be added to the cli? It seems like a critical feature in order to use the ibmcloud cli in automated deployment scripts.

JJJ
  • 32,902
  • 20
  • 89
  • 102
JuNX
  • 3
  • 1
  • What ibmcloud command are you using to provision the iSCSI disks. – F.Ojeda Jun 05 '18 at 22:30
  • I'm using something like `ibmcloud sl block volume-order --storage-type endurance --size 20 --tier 2 --datacenter tor01 --os-type LINUX --force` – JuNX Jun 05 '18 at 23:04

1 Answers1

0

It seems there is no option to change the value of the billing attribute per hour or month with the ibmcloud cli command.

See with this ibmcloud command the options that you can set.

ibmcloud sl block volume-options

I suggest you to use slcli instead of ibmcloud cli, you can order block storage endurance hourly with the following slcli command.

slcli block volume-order --storage-type endurance --size 20 --iops 4 --tier 2 --os-type LINUX --location tor01 --snapshot-size 10 --service-offering storage_as_a_service --billing hourly

To login in, use this slcli command:

slcli setup

Refence:

https://softlayer-python.readthedocs.io/en/latest/cli.html

F.Ojeda
  • 718
  • 1
  • 4
  • 8
  • It definitely seems like it's the most elegant way to do it, unfortunately I cannot upgrade to Python 2.7 for now. I ended up placing the orders for disks using the hourly billing method using the RESTFul API with curl calls, mixing solutions found [here](https://stackoverflow.com/q/44534168/9899789) and [here](https://stackoverflow.com/a/46186272/9899789). – JuNX Jun 06 '18 at 15:31