Skip to content

Instantly share code, notes, and snippets.

View isweluiz's full-sized avatar

Luiz isweluiz

View GitHub Profile

Rundeck with active directory authentication

rundeck-auth

Create A bind User and the Security Groups in Active Directory Before integrating Rundeck with Active Directory, we need to create a bind User and two security groups called rundeck_administrators and rundeck_users. Finally, add the appropriate users into those groups before proceeding.

Create jaas-activedirectory.conf file

Ansible

In an ideal world, all of your configuration information would be stored as Ansible variables, in the various places that Ansible lets you define variables (e.g., the vars section of your playbooks, files loaded by vars_files , files in the host_vars or group_vars directory).

Alas, the world is a messy place, and sometimes a piece of configuration data we need lives somewhere else. Maybe it’s in a text file or a .csv file, and we don’t want to just copy the data into an Ansible variable file because now you have to maintain two copies of the same data, and you believe in the DRY 2 principle. Or maybe the data isn’t maintained as a file at all; it’s maintained in a key-value storage service such as etcd.

Ansible has a feature called lookups that allows you to read i

@isweluiz
isweluiz / markdown-details-collapsible.md
Created April 13, 2022 10:13 — forked from pierrejoubert73/markdown-details-collapsible.md
How to add a collapsible section in markdown.

A collapsible section containing markdown

Click to expand!

Heading

  1. A numbered
  2. list
    • With some
    • Sub bullets

The video titled Introduction to Helm | Kubernetes Tutorial | Beginners Guide provides a comprehensive introduction to Helm, a package manager for Kubernetes. Below a summary of the key points:

  1. What is Helm?: Helm is a package manager for Kubernetes. It allows you to bring all of your YAML files together in what's called a chart. A chart can have a name, a description, and a version. A chart groups all these YAML files together in a templates folder.

  2. Why use Helm?: Helm is used to manage Kubernetes YAML files, which describe everything in Kubernetes, such as deployments, pods, services, config maps, secrets, and more. Helm makes these YAML files reusable, allowing you to inject parameters into them and reuse them among many applications and microservices.

  3. Creating a Helm Chart: A Helm chart is a unit of deployment made up of a set of YAML files. It can be for a microservice or any software like Redis, MySQL, Promet

@isweluiz
isweluiz / awk_netstat.sh
Created April 27, 2023 17:57 — forked from staaldraad/awk_netstat.sh
AWK to get details from /proc/net/tcp and /proc/net/udp when netstat and lsof are not available
# Gawk version
# Remote
grep -v "rem_address" /proc/net/tcp | awk '{x=strtonum("0x"substr($3,index($3,":")-2,2)); for (i=5; i>0; i-=2) x = x"."strtonum("0x"substr($3,i,2))}{print x":"strtonum("0x"substr($3,index($3,":")+1,4))}'
# Local
grep -v "rem_address" /proc/net/tcp | awk '{x=strtonum("0x"substr($2,index($2,":")-2,2)); for (i=5; i>0; i-=2) x = x"."strtonum("0x"substr($2,i,2))}{print x":"strtonum("0x"substr($2,index($2,":")+1,4))}'
# No Gawk
# Local
grep -v "rem_address" /proc/net/tcp | awk 'function hextodec(str,ret,n,i,k,c){
apt-get install python3-pip -y
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.6 1
sudo update-alternatives --config python
sudo update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1
sudo update-alternatives --config pip
pip install aws-cdk.cdk
@isweluiz
isweluiz / .gitignore
Last active February 27, 2023 22:29
Terraform .gitignore
# Local .terraform directories
**/.terraform/*
# Crash log files
crash.log
# Local tfstate files
*.tfstate
*.tfstate.*

Java versions compatible with jboss versions

JBossEap

Environment

Red Hat JBoss Enterprise Application Platform (EAP)

  • 7.x
  • 6.x
  • 5.x
  • 4.x

Ansible Inventory report with ansible-cmdb

Ansible-cmdb takes the output of Ansible's fact gathering and converts it into a static HTML overview page (and other things) containing system configuration information.

It supports multiple types of output (html, csv, sql, etc) and extending information gathered by Ansible with custom data. For each host it also shows the groups, host variables, custom variables and machine-local facts.

If catalina.out becomes 2GB in size or more, tomcat can crashes and fails to start without any error message. To avoid this scenario you should rotate catalina.out frequently. This article describes how to setup auto rotation of catalina.out on a linux/unix machine.

  1. Create this file
/etc/logrotate.d/tomcat-logs
  1. Copy the following contents into the above file