Entwicklung

Alles zu diesem Thema

5 essenzielle Tipps für robustes Bash-Scripting

5 essenzielle Tipps für robustes Bash-Scripting

Wir schreiben bei NETWAYS häufig Bash-Skripte für Prototyping und komplexe Ablaufsteuerungen. Da sich die Skriptsprache über die Jahre hinweg entwickelt hat, nehme ich gelegentlich etwas Zeit, um meinen Stil zu verbessern. Um die Beispiele zu verdeutlichen, habe ich folgendes TestSkript erstellt. Dieses nimmt Daten entgegen, schreibt sie in eine temporäre Datei und benennt diese dann in die Zieldatei um (Atomic Commit). #!/bin/bash # 1. Bashoptionen anpassen set -o errexit set -o pipefail set...

check_prometheus ist jetzt öffentlich verfügbar!

check_prometheus ist jetzt öffentlich verfügbar!

Monitoring ist komplex, das wissen wir hier bei NETWAYS leider zu gut. Deswegen laufen in der Infrastruktur auch mal gerne mehrere Tools für die Überwachung. Zwei gern gesehene Kandidaten sind dabei Icinga und Prometheus. Icinga und Prometheus erfüllen unterschiedliche Rollen im Monitoring, daher besteht oft Bedarf für eine Integration beider Tools. Genau dafür haben wir check_prometheus geschrieben, was wir nun der Öffentlichkeit zur Verfügung stellen....

Sommer, Sonne, Software – Rückblick CIVO NAVIGATE 2023

Sommer, Sonne, Software – Rückblick CIVO NAVIGATE 2023

Anfang Februar durfte ich nach Tampa, Florida reisen, um auf der IT-Konferenz Civo Navigate zu sprechen, die in diesem Rahmen zum ersten Mal stattfand. Mit Beiträgen rund um Kubernetes, Edge Computing, Machine Learning, DevOps, GitOps, Observability, Security und Cloud Native Transformation war das Angebot an Themen breit gefächert. Sicherlich vor allem aus diesem Grund (und nicht nur wegen Temperaturen bis zu 30 Grad und toller Location) fanden sich zusätzlich zu 50 angekündigten Speakern, u....

Ansible – How to create reusable tasks

Ansible – How to create reusable tasks

Ansible is known for its simplicity, lightweight footprint and flexibility to configure nearly any device in your infrastructure. Therefore it's used in large scale environments shared between teams or departments. Often tasks could be used in multiple playbooks to combine update routines, setting downtimes at an API or update data at the central asset management. To use external tasks in Ansible we use the include_task module. This module dynamically includes the tasks from the given file....

HUGO: Statische Websites generieren aus Markdown-Dateien

HUGO: Statische Websites generieren aus Markdown-Dateien

Im Studium hatte ich ein Seminar zur Webentwicklung - da haben wir einfache Websites in reinem HTML-Text mit etwas CSS drum herum geschrieben. Alternativ dazu wurde uns da noch die Benutzung des CMS (Content-Management-Systems) Wordpress erklärt. Im Zuge meiner Ausbildung bei der NETWAYS Professional Services durfte ich mich nun mit dem Static Site Generator Hugo auseinandersetzen. Ein Static Site Generator ist im Prinzip ein Tool das auf Basis von Rohdaten und Templates eine ganze statische...

Ansible – Loop over multiple tasks

Ansible – Loop over multiple tasks

The last time I wrote about Ansible and the possibility to use blocks to group multiple tasks. Which you can read here. Sadly this feature does not work with loop, so there is no clean way to loop over multiple tasks in a play without writing the same loop statement at tasks over and over. But when we come across the need of tasks which depend on each other, for example, we execute a script with a certain parameter and its result is necessary for the upcoming tasks. Let's go through a common...

Ansible – Use Blocks and Rescue Errors

Ansible is a widely used and powerful open-source configuration and deployment management tool. It can be used for simple repetitive daily tasks or complex application deployments, therefore Ansible is able to cover mostly any situation. Since version 2.0.0 Ansible introduced the usage of blocks, they provide the possibility to group or rescue failed tasks. On blocks we can assign most directives which are available for any other task at block level, only loops aren't available. - name: Update...

tmux – terminal multiplexer

In diesem Artikel möchte ich euch kurz das Tool tmux vorstellen, dass zu meinen Lieblingstools unter Linux gehört. In einem vorherigen Artikel hat Johannes schon einmal die Basisconfig von tmux gezeigt. Da tmux eine Server Client Struktur hat, bevorzuge ich es in der Regel die Finger von der tmux config zu lassen. Da man die sonst auf jedem Server pflegen muss, mit dem man arbeiten möchte. Leicht hat es an der Stelle derjenige, der Puppet oder Ansible nutzt und seine eigenen Server pflegt. Ich...

Ansible – should I use omit filter?

When we talk about Ansible, we more and more talk about AWX or Tower. This Tool comes in handy when you work with Ansible in a environment shared with colleagues or multiple teams.In AWX we can reuse the playbooks we developed and share them with our colleagues on a GUI Platform.Often we need a bit of understanding how a playbook is designed or if a variable need to be defined for the particular play. This can be much more tricky when sharing templates to people unaware of your work. This is...

GitLab-CI / YAML – Write less with Anchors, Extends and Hidden Keys

GitLab-CI / YAML – Write less with Anchors, Extends and Hidden Keys

Have you ever wanted to execute a GitLab-CI job for multiple operating systems and just copied every line of YAML multiple times?Anchors, extends and hidden keys are coming to rescue! Let's say you have two jobs and the only difference between them being a single environment variable: stages: - echo echo-hello: stage: echo script: - echo $ECHO_TEXT variables: ECHO_TEXT: "Hello world!" echo-bye: stage: echo script: - echo $ECHO_TEXT variables: ECHO_TEXT: "Bye bye!"   Anchors and extends...