diff options
-rw-r--r-- | .obsidian/workspace.json | 100 | ||||
-rw-r--r-- | Ansible ad-hoc commands.md | 16 | ||||
-rw-r--r-- | Bash process substition (tmp file).md | 13 | ||||
-rw-r--r-- | Enable logging with Libvirt.md | 18 | ||||
-rw-r--r-- | Examples of proper JQ usage.md | 5 | ||||
-rw-r--r-- | GroupVPS Platform.md | 11 | ||||
-rw-r--r-- | Hypotheekrenteaftrek.md | 19 | ||||
-rw-r--r-- | Income tax statement and reductions from mortgage.md | 20 | ||||
-rw-r--r-- | Nix derivations.md | 5 | ||||
-rw-r--r-- | Nix flake.md | 20 | ||||
-rw-r--r-- | OVN Clusters.md | 59 | ||||
-rw-r--r-- | Prometheus endpoints.md | 10 | ||||
-rw-r--r-- | Reinstalling packages with APT.md | 6 | ||||
-rw-r--r-- | Use ssh -O exit user@host to exit a control master session.md | 6 | ||||
-rw-r--r-- | Using JQ to construct an array and filtering empty strings.md | 18 | ||||
-rw-r--r-- | ceilometer data is going into Prometheus as Ihor fixed the out of order issue.md | 10 | ||||
-rw-r--r-- | daily/22-Apr-2025.md | 32 | ||||
-rw-r--r-- | daily/23-Apr-2025.md | 68 | ||||
-rw-r--r-- | daily/24-Apr-2025.md | 7 | ||||
-rw-r--r-- | daily/25-Apr-2025.md | 17 |
20 files changed, 416 insertions, 44 deletions
diff --git a/.obsidian/workspace.json b/.obsidian/workspace.json index c2973af..3205eda 100644 --- a/.obsidian/workspace.json +++ b/.obsidian/workspace.json @@ -4,71 +4,86 @@ "type": "split", "children": [ { - "id": "f33c11cf18be28d7", + "id": "ec3db664ff2276a8", "type": "tabs", "children": [ { - "id": "3628dba7efa2e99a", + "id": "c28bb2cb6b37ee8a", "type": "leaf", "state": { "type": "markdown", "state": { - "file": "Freenet CPU steal graph.md", + "file": "Using Libvirt to manage QEMU image bitmaps.md", "mode": "source", "backlinks": true, "source": false }, "icon": "lucide-file", - "title": "Freenet CPU steal graph" + "title": "Using Libvirt to manage QEMU image bitmaps" } }, { - "id": "b1754e4cb810f3a0", + "id": "1308c4e6460da0ff", "type": "leaf", "state": { "type": "markdown", "state": { - "file": "How to show the mysql galera cluster status.md", + "file": "Examples of proper JQ usage.md", "mode": "source", "backlinks": true, "source": false }, "icon": "lucide-file", - "title": "How to show the mysql galera cluster status" + "title": "Examples of proper JQ usage" } }, { - "id": "5ac5819f83e59327", + "id": "f665cbd99b48e2f8", "type": "leaf", "state": { "type": "markdown", "state": { - "file": "Managing the amount of WSGI processes ran by apache is done from the apache site configuration.md", + "file": "Bash process substition (tmp file).md", "mode": "source", "backlinks": true, "source": false }, "icon": "lucide-file", - "title": "Managing the amount of WSGI processes ran by apache is done from the apache site configuration" + "title": "Bash process substition (tmp file)" } }, { - "id": "487149710eacf558", + "id": "b702b296d7bec9aa", "type": "leaf", "state": { "type": "markdown", "state": { - "file": "daily/18-Apr-2025.md", + "file": "About keyboard layout on Wayland.md", "mode": "source", "backlinks": true, "source": false }, "icon": "lucide-file", - "title": "18-Apr-2025" + "title": "About keyboard layout on Wayland" + } + }, + { + "id": "d5736e0335ccad0f", + "type": "leaf", + "state": { + "type": "markdown", + "state": { + "file": "Nix derivations.md", + "mode": "source", + "backlinks": true, + "source": false + }, + "icon": "lucide-file", + "title": "Nix derivations" } } ], - "currentTab": 3 + "currentTab": 4 } ], "direction": "vertical" @@ -99,10 +114,10 @@ "state": { "type": "search", "state": { - "query": "iptables", + "query": "stdenv:", "matchingCase": false, "explainSearch": false, - "collapseAll": false, + "collapseAll": true, "extraContext": false, "sortOrder": "alphabetical" }, @@ -120,7 +135,8 @@ "title": "Bookmarks" } } - ] + ], + "currentTab": 1 } ], "direction": "horizontal", @@ -219,34 +235,34 @@ "obsidian-excalidraw-plugin:New drawing": false } }, - "active": "487149710eacf558", + "active": "d5736e0335ccad0f", "lastOpenFiles": [ - "daily/15-Apr-2025.md", - "daily/18-Apr-2025.md", - "Working with Nix shells.md", - "Managing the amount of WSGI processes ran by apache is done from the apache site configuration.md", - "How to show the mysql galera cluster status.md", - "Freenet CPU steal graph.md", - "daily/17-Apr-2025.md", - "daily/14-Apr-2025.md", - "daily/16-Apr-2025.md", - "Debugging issues with updating Puppet dependency.md", - "It's recommended to use small-medium ARC for hypervisors where ZFS is used.md", - "How to RIP (grep).md", - "Using Libvirt to manage QEMU image bitmaps.md", - "Importing GPG keys from a keyserver.md", - "Exposing development headers on Nixos.md", + "Nix flake.md", + "Nix derivations.md", "About keyboard layout on Wayland.md", - "Benchmarking code in Golang.md", - "Testing Golang programs.md", - "How to properly do options in a bash script with getopt!.md", - "We don't support filesystem discard syscalls on our openstack platform.md", + "Automatic configuration deployment with NixOS.md", + "Booting a NixOS on OpenStack.md", + "Build custom modules as profiles to manage various NixOS hosts.md", + "daily/25-Apr-2025.md", + "Ansible ad-hoc commands.md", + "Bash process substition (tmp file).md", "Examples of proper JQ usage.md", - "Device mapper.md", - "daily/11-Apr-2025.md", - "daily/10-Apr-2025.md", - "List of tags I use in this Vault and their purpose.md", - "Managing Ceph on Devstack & OpenStack.md", + "Using JQ to construct an array and filtering empty strings.md", + "Using Libvirt to manage QEMU image bitmaps.md", + "daily/16-Apr-2025.md", + "daily/15-Apr-2025.md", + "daily/14-Apr-2025.md", + "daily/17-Apr-2025.md", + "daily/18-Apr-2025.md", + "daily/22-Apr-2025.md", + "daily/23-Apr-2025.md", + "daily/24-Apr-2025.md", + "OVN upgrade.md", + "OVN Clusters.md", + "Prometheus endpoints.md", + "ceilometer data is going into Prometheus as Ihor fixed the out of order issue.md", + "GroupVPS Platform.md", + "Income tax statement and reductions from mortgage.md", "daily", "ESP", "Excalidraw" diff --git a/Ansible ad-hoc commands.md b/Ansible ad-hoc commands.md new file mode 100644 index 0000000..38c4286 --- /dev/null +++ b/Ansible ad-hoc commands.md @@ -0,0 +1,16 @@ +--- +tags: + - ansible +--- +Configure ansible.cfg with:\ +``` +stdout_callback=json +bin_ansible_callbacks = True +``` +Outputs result as json, so we can jq it + +Can also be done with env var: +``` +ANSIBLE_LOAD_CALLBACK_PLUGINS=1 \ +ANSIBLE_STDOUT_CALLBACK=json \ +```
\ No newline at end of file diff --git a/Bash process substition (tmp file).md b/Bash process substition (tmp file).md new file mode 100644 index 0000000..3540f70 --- /dev/null +++ b/Bash process substition (tmp file).md @@ -0,0 +1,13 @@ +--- +tags: + - bash + - howto +--- +Process substitution connects the output of a command to a file. This enables a command to accept the output of multiple commands. +Useful with diff for example: + +```bash +diff <(ls dirA) <(ls dirB) +``` + +> Important! Don't but the <() inside quotes.. it will report: cannot find file
\ No newline at end of file diff --git a/Enable logging with Libvirt.md b/Enable logging with Libvirt.md new file mode 100644 index 0000000..526f39d --- /dev/null +++ b/Enable logging with Libvirt.md @@ -0,0 +1,18 @@ +--- +tags: + - libvirt + - howto +--- +Configure `/etc/libvirt/libvirtd.conf` + +set `log_filters` and `log_outputs`. + +### Tracing QMP queries +``` +log_filters="1:libvirt 1:qemu.qemu_monitor_json" +log_outputs="1:file:/var/log/libvirt/libvirtd.log" +``` + + +--- +https://libvirt.org/logging.html
\ No newline at end of file diff --git a/Examples of proper JQ usage.md b/Examples of proper JQ usage.md index b63ee4e..2b68d01 100644 --- a/Examples of proper JQ usage.md +++ b/Examples of proper JQ usage.md @@ -1,6 +1,5 @@ --- tags: - - linux - jq - howto --- @@ -8,4 +7,6 @@ Double escapes are important! ``` jq -r '.fixed_ips[] | select(.ip_address | test("\\.")) | .ip_address' -```
\ No newline at end of file +``` + +An example of constructing an array from stdin and filtering empty lines is found in [[Using JQ to construct an array and filtering empty strings]].
\ No newline at end of file diff --git a/GroupVPS Platform.md b/GroupVPS Platform.md new file mode 100644 index 0000000..f01a449 --- /dev/null +++ b/GroupVPS Platform.md @@ -0,0 +1,11 @@ +--- +tags: + - work + - groupvps +--- +Our [[OVN Clusters]]. + + + + +Nowadays [[ceilometer data is going into Prometheus as Ihor fixed the out of order issue]]
\ No newline at end of file diff --git a/Hypotheekrenteaftrek.md b/Hypotheekrenteaftrek.md new file mode 100644 index 0000000..3b2ba5f --- /dev/null +++ b/Hypotheekrenteaftrek.md @@ -0,0 +1,19 @@ +--- +tags: + - tax +--- +1ste hypotheek op of na 1 januari 2013 afgesloten: recht op 30 jaar hypotheekrenteaftrek. + +**Voorwaarden** +- Lening **moet** voor eigen woning zijn + - Koop, onderhoud, verbouwen allemaal valide +- Moet binnen 30 jaar aflossen + - Elk jaar moet er een bedrag afgelost worden + + +*Verhoging van lening* +Termijn gaat opnieuw in voor het verhoogde bedrag, originele bedrag behoud dus de oorspronkelijke termijn + +**Voorwaarden** +- Lening is voor koop duurdere eigen woning, verbouwing of onderhoud ervan. +- Moet ook binnen 30 jaar afgelost en elke jaar een bedrag aflossen.
\ No newline at end of file diff --git a/Income tax statement and reductions from mortgage.md b/Income tax statement and reductions from mortgage.md new file mode 100644 index 0000000..5df3c5f --- /dev/null +++ b/Income tax statement and reductions from mortgage.md @@ -0,0 +1,20 @@ +--- +tags: + - tax +--- +Income tax can be reduced in the year in which we buy a house. For us: +- 2024 bought house +- Filled in temporary income tax statement with Christiaan + - Used highest salary, from 2022 the year which i received a major bonus + - He calculated reducables: costs from receipt, interest rate + - [[Hypotheekrenteaftrek]]; 0.6% +- Definitive income tax statement: + - Got 142 euro more back, my salary over 2024 was lower than 2022 + - Belastingdienst calculates the reducable part based on cost details that we provide + - notary costs and such, all found on the receipt +- Following years will be easier: only hypotheekrenteaftrek. + + + +--- +https://www.belastingdienst.nl/wps/wcm/connect/bldcontentnl/belastingdienst/prive/inkomstenbelasting/aftrekposten/hypotheekrenteaftrek/
\ No newline at end of file diff --git a/Nix derivations.md b/Nix derivations.md new file mode 100644 index 0000000..9bd25a9 --- /dev/null +++ b/Nix derivations.md @@ -0,0 +1,5 @@ +--- +tags: + - nix +--- +Are sort of recipes for how to build a program.
\ No newline at end of file diff --git a/Nix flake.md b/Nix flake.md new file mode 100644 index 0000000..09b9b09 --- /dev/null +++ b/Nix flake.md @@ -0,0 +1,20 @@ +--- +tags: + - nix +--- +Root directory contains flake.nix: +Specifies inputs (other flakes) and outputs ([[Nix derivations]]). Allows pinning versions of inputs (dependencies) making it easier to write reproducable expressions. + +Avoid multiple nixpkgs by including a follows on the input: +``` +inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/<branch name>"; + hyprland = { + url = "github:hyprwm/Hyprland"; + inputs.nixpkgs.follows = "nixpkgs"; + }; +}; +``` + +Outputs: +[Flake check](https://github.com/NixOS/nix/blob/master/src/nix/flake-check.md) diff --git a/OVN Clusters.md b/OVN Clusters.md new file mode 100644 index 0000000..2bed4f3 --- /dev/null +++ b/OVN Clusters.md @@ -0,0 +1,59 @@ +--- +tags: + - work + - groupvps +--- +Created the following inventory and put it in ansible for the [[OVN upgrade]] +# CPH8 +``` +9cf3 (9cf3 at tcp:10.67.1.41:6644) (self) +d9b2 (d9b2 at tcp:10.67.9.41:6644) +6c0f (6c0f at tcp:10.67.1.42:6644) last msg 127 ms ago +``` +n01.network.vps1: 10.67.1.41 +n02.network.vps1: 10.67.1.42 +n01.network.vps2: 10.67.9.41 + + +vps1: 10.67.1.0/24 +vps2: 10.67.9.0/24 +vps3: 10.67.17.0/24 + +# LEJ1 +``` +6f0a (6f0a at tcp:10.69.9.41:6643) next_index=6378278 match_index=6378277 last msg 163 ms ago +6e42 (6e42 at tcp:10.69.1.41:6643) (self) next_index=6373918 match_index=6378277 +cec5 (cec5 at tcp:10.69.1.42:6643) next_index=6378278 match_index=6378277 last msg 163 ms ago +3f04 (3f04 at tcp:10.69.17.41:6643) next_index=6378278 match_index=6378277 last msg 163 ms ago + +``` +n01.network.vps1: 10.69.1.41 +n02.network.vps1: 10.69.1.42 +n01.network.vps2: 10.69.9.41 +n01.network.vps3: 10.69.17.41 + +vps1: 10.69.1.0/24 +vps2: 10.69.9.0/24 +vps3: 10.69.17.0/24 +# Freenet +``` +66b0 (66b0 at tcp:10.69.25.41:6643) (self) next_index=426770 match_index=433645 +0a3f (0a3f at tcp:10.69.33.41:6643) next_index=433646 match_index=433645 last msg 85 ms ago +8739 (8739 at tcp:10.69.41.41:6643) next_index=433646 match_index=433645 last msg 85 ms ago +``` +n01.network.vps1: 10.69.25.41 +n01.network.vps2: 10.69.33.41 +n01.network.vps3: 10.69.41.41 + +vps1: 10.69.25.0/24 +vps2: 10.69.33.0/24 +vps3: 10.69.41.0/24 +# Testpod +``` +5627 (5627 at tcp:10.64.101.4:6643) (self) next_index=452726 match_index=456341 +22de (22de at tcp:10.64.101.3:6643) next_index=456342 match_index=456341 last msg 280 ms ago +aed8 (aed8 at tcp:10.64.101.26:6643) next_index=456342 match_index=456341 last msg 280 ms ago +``` +n01.network: 10.64.101.4 +n01.compute: 10.64.101.3 +- [ ] n02.compute: 10.64.101.26
\ No newline at end of file diff --git a/Prometheus endpoints.md b/Prometheus endpoints.md new file mode 100644 index 0000000..081c1c9 --- /dev/null +++ b/Prometheus endpoints.md @@ -0,0 +1,10 @@ +--- +tags: + - groupvps + - work + - prometheus +--- +[[ceilometer data is going into Prometheus as Ihor fixed the out of order issue]] + +[Testpod](https://prometheus2.prv.h19-testpod-cph3.one.com) +- [Free memory](https://prometheus2.prv.h19-testpod-cph3.one.com/graph?g0.expr=instance%3Anode_memory_free%3Aratio%7Bnode%3D%22lxchost1.prv.vps1-testpod-cph3.one.com%22%7D&g0.tab=0&g0.display_mode=lines&g0.show_exemplars=0&g0.range_input=2h) diff --git a/Reinstalling packages with APT.md b/Reinstalling packages with APT.md new file mode 100644 index 0000000..f1ee6bf --- /dev/null +++ b/Reinstalling packages with APT.md @@ -0,0 +1,6 @@ +--- +tags: + - apt + - howto +--- +Simply run `apt reinstall <packagename>`
\ No newline at end of file diff --git a/Use ssh -O exit user@host to exit a control master session.md b/Use ssh -O exit user@host to exit a control master session.md new file mode 100644 index 0000000..b00b7b5 --- /dev/null +++ b/Use ssh -O exit user@host to exit a control master session.md @@ -0,0 +1,6 @@ +--- +tags: + - ssh + - howto +--- +To exit an existing session use `ssh -O exit <user>@<host>`
\ No newline at end of file diff --git a/Using JQ to construct an array and filtering empty strings.md b/Using JQ to construct an array and filtering empty strings.md new file mode 100644 index 0000000..d04c593 --- /dev/null +++ b/Using JQ to construct an array and filtering empty strings.md @@ -0,0 +1,18 @@ +--- +tags: + - jq + - howto +--- +Today I learned how to use JQ to construct an array from stdin, while also filtering empty strings. + +In below examples the -R switch makes jq process input as raw non-json data, and the -n switch stops it from discarding the first line. + +``` +sudo virsh checkpoint-list --name instance-0002c4d7 | jq -Rn '[inputs | if length > 0 then . else empty end]' +``` +^ Demonstrates use of empty + +``` +sudo virsh checkpoint-list --name instance-0002c4d7 | jq -Rn '[inputs | select(length > 0)]' +``` +^ easier using select
\ No newline at end of file diff --git a/ceilometer data is going into Prometheus as Ihor fixed the out of order issue.md b/ceilometer data is going into Prometheus as Ihor fixed the out of order issue.md new file mode 100644 index 0000000..f95653f --- /dev/null +++ b/ceilometer data is going into Prometheus as Ihor fixed the out of order issue.md @@ -0,0 +1,10 @@ +--- +tags: + - groupvps + - work + - openstack +--- +In the [VM Dashboard](https://grafana.one.com/d/nuqoyM4Vz/vm-dashboard) there are examples of usage of this. + +Useful examples: +`cpu{resource_id="97028f50-4a7c-4cd1-9de2-6e504d34cc8d"}`
\ No newline at end of file diff --git a/daily/22-Apr-2025.md b/daily/22-Apr-2025.md new file mode 100644 index 0000000..192eebe --- /dev/null +++ b/daily/22-Apr-2025.md @@ -0,0 +1,32 @@ +octavia ovn provider memory leak; found [bug report](https://bugs.launchpad.net/neutron/+bug/2065460) which looks very promising. Trying to patch the driver with this patchset to see if we can fix it. + + +# Interview Ali met Erik +Maand opzegtermijn, geen haast. + +Noemt control plane services +- keystone users projects +werkt voor leaseplan, reason layoff + +migratie workflow: +- legacy cluster + +Live migration, ceph shared, kan geen manier vinden om storage zonder intermediate host te migreren. + +Knows how live migration work. + +Explanation OpenStack, trace server create call: +- keystone, service catalog, token +- nova api, nova scheduler, nova conductor + - doesnt know individual, whole schedules server + - nova libvirt talks libvirt, creates vm + - host aggregates mentioned + flavor extra specs + - vm calls metadata @ 169.169... mentioned + - cloud-init +- nova wants port -> rabbit -> neutron +- neutron api, ovn controller + - ovn northd, nb, sb + - neutron ml2 plugin translates neutron to ovn nb + - northd translates nb to sb + - ovn controller reads sb and translate to ovs on compute +- glance image
\ No newline at end of file diff --git a/daily/23-Apr-2025.md b/daily/23-Apr-2025.md new file mode 100644 index 0000000..6c9b6c6 --- /dev/null +++ b/daily/23-Apr-2025.md @@ -0,0 +1,68 @@ + +# Interview Isabel +devops engineer 7yrs + +Provides maintainance os cloud + +exp with openstack: + - deploying new compute + - maintaining + - remember rabbitmq incident: queueing + - not used puppet + - ansible +exp with openstack: + - deploying new compute + - maintaining + - remember rabbitmq incident: queueing + - not used puppet + - ansible +#### Our questions +How are you in programming? +- Really like it, create many tools +- Python / ansible deploy infra automated instead of manually + - *Realised manual labor and automated it* + +How do you feel about going more into a development role? +- that's what im looking for, prefer to be making. + +Linux or windows experience? +- check fs +- processes +- administrative +- k8s many scripts + +How would you solve a problem where a VM is not starting? +- Check nova compute for error +- If ceilometer/logging check that +- Try with nova-compute to restart if down +- Reload instance (?) + +Have you ever had to go into openstack DBs? +- Not really, +- Do have SQL knowledge + +Do you know how to work with git? +- yes, branch system current job + +**Why are you leaving your current position?** +reason: different tech than banks +same company HCL as in spain, change contract + + +*Deployment, maintenance, and administration of cloud technologies +VMware, Azure, Openstack.* +**Does this mean workloads running on said clouds? Or does this also apply to managing infrastructure such as openstack?** + +*Bash scripting for Linux server automation.* **What sort of automation?** + +*Plan and execute migrations and patching from on-premises infrastructure +to ING Private cloud (IPC)* **Can you talk more about what kind of migrations** + +#### Isabel questions to us + +What does the usage of openstack look like from customer perspective? +- different kinds (brands, direct access) +Own DC? yes +Are you expecting me to create new components, or maintain? +- maintain, puppet etc, + diff --git a/daily/24-Apr-2025.md b/daily/24-Apr-2025.md new file mode 100644 index 0000000..371dd15 --- /dev/null +++ b/daily/24-Apr-2025.md @@ -0,0 +1,7 @@ +Ceilometer thaw/freeze gecheckt: linear vs unordered flow. Geen metrics testpod -> prod deploy + +Octavia / system test cph8 onderzocht: kon netwerk niet vinden in ovn. Restart resolved issue. + +OVN database cluster aanmerken in ansible ipv alle netwerk nodes zien als database hosts. Testen op testpod. + +Lijst controleren van backup contracten vs gobs. 170 active contracten vs 191 periodic backups waarvan er 44 disabled.
\ No newline at end of file diff --git a/daily/25-Apr-2025.md b/daily/25-Apr-2025.md new file mode 100644 index 0000000..9514ec3 --- /dev/null +++ b/daily/25-Apr-2025.md @@ -0,0 +1,17 @@ +Gobs OSC plugin pagination +Deploy goba with ceilometer thaw/freeze to prod + +# Tech interview Isabel +Intro +- [ ] What we will do: some questions then workshop +- [ ] Erik intro +- [ ] Isabel intro + +Questions: +- [ ] What is your experience with `git`, are you comfortable with it? +- [ ] Can you expand a little bit on your programming experiences, what are some examples of projects that you worked on? +- [ ] What did you do with Ansible? +- [ ] Can you talk a little about openstack, what is it and what are the most core components? +- [ ] Workshop + +Isabel questions: |