[Git][qa/jenkins.debian.net][master] reproducible: add more notes how to query resource usage from infomaniak.cloud thanks to zigo

Holger Levsen (@holger) gitlab at salsa.debian.org
Thu Apr 18 22:22:11 BST 2024



Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net


Commits:
ea1035e7 by Holger Levsen at 2024-04-18T23:21:58+02:00
reproducible: add more notes how to query resource usage from infomaniak.cloud thanks to zigo

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -


1 changed file:

- README.infrastructure


Changes:

=====================================
README.infrastructure
=====================================
@@ -28,7 +28,7 @@ https://tests.reproducible-builds.org/trbo.status.html as well as lacks some
 other, so it is advised to monitor both the shell script as well as that URL
 - and act on it.
 
-=== amd64 and i386 nodes
+=== amd64 and i386 nodes at IONOS.com
 
 amd64 and i386 nodes run as VMs in the IONOS cloud. Mattia and Holger have "physical"
 access including remote console and BIOS access.
@@ -71,7 +71,7 @@ $ openstack server reboot --hard 3f0aa9aa-14e3-4ff6-9616-a4d4ee7024e7
 more information: https://docs.infomaniak.cloud/ or openstack help or openstack server help
 to pre-calculate monthly costs: https://www.infomaniak.com/en/hosting/public-cloud/calculator
 
-getting usage information works, but I don't get it yet
+===== resources usage
 
 $ openstack rating summary get
 +----------------------------------+---------------+------------+---------------------+---------------------+
@@ -79,11 +79,67 @@ $ openstack rating summary get
 +----------------------------------+---------------+------------+---------------------+---------------------+
 | 57365b26774645c78dafa438f32b6002 | ALL           | 3176.09975 | 2024-04-01T00:00:00 | 2024-05-01T00:00:00 |
 +----------------------------------+---------------+------------+---------------------+---------------------+
+
+This means your project has spent 3176 ICU (Infomaniak Cloud Unit). We have
+something around 50 ICU = 1 EUR. So that's around 63.5 EUR so far since the
+beginning of the month. Note this is updated every hours, and has a delay of 3
+to 4 hours.
+
 $ openstack rating dataframes get
 [....]
 
-# both commands can have -b and -e (for begin and end) if you want to select a timeframe.
-
+$ openstack rating dataframe get --os-cloud reproducible \
+         -b 2024-04-18T03:00:00 --format json -c Resources | jq .
+
+will output something like this:
+
+  {
+    "Resources": [
+      {
+        "rating": "0.142681",
+        "service": "volume.size",
+        "desc": {
+          "volume_type": "CEPH_1_perf1",
+          "id": "da3b7ad1-884b-417e-9dd6-a082ce22dbc5",
+          "project_id": "57365b26774645c78dafa438f32b6002",
+          "tenant_id": "57365b26774645c78dafa438f32b6002"
+        },
+        "volume": "24",
+        "rate_value": "0.0059"
+      }
+    ]
+  }
+
+This is a 24 GB volume rated at 0.0059 ICU per hour and per GB, so 0.142681
+ICU per hour for 24 GB, or 0.00285362 EUR/hour.
+
+
+$ openstack rating summary get --os-cloud reproducible \
+        -b 2024-04-17T02:00:00 -e 2024-04-18T02:00:00 \
+         --format value -c Rate
+
+A query like this gives you how much you spent in a day:
+That's less than 4 EUR/day.
+
+BTW, one can also store the OpenStack credentials in a .yaml file:
+
+$ cat .config/openstack/clouds.yaml
+---
+clouds:
+  reproducible:
+    auth:
+      auth_url: https://api.pub1.infomaniak.cloud/identity/v3
+      username: 'PCU-E68O8LE'
+      project_name: 'PCP-E68O8LE'
+      password: '<password>'
+      user_domain_name: 'Default'
+    region_name: 'dc3-a'
+    interface: 'public'
+    identity_api_version: 3
+
+that's how one can use the "--os-cloud reproducible". Of course, you may store
+as many OpenStack credentials as you like there. I like this more than the env
+vars, because it's always there.
 
 === arm64 nodes
 



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/ea1035e7bd57ee2165d8ddd259d1d9b173482b75

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/ea1035e7bd57ee2165d8ddd259d1d9b173482b75
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/qa-jenkins-scm/attachments/20240418/9c7f9003/attachment-0001.htm>


More information about the Qa-jenkins-scm mailing list