Skip to content

Instantly share code, notes, and snippets.

View ictus4u's full-sized avatar
🚀

Walter Gomez ictus4u

🚀
View GitHub Profile
pipeline {
agent any
parameters {
string(defaultValue: '', description: 'The name of the organization working on this repository.', name: 'orgName')
}
stages{
stage("Create Repo Piplines") {
steps {
@ictus4u
ictus4u / 01nginx-tls-sni.md
Created September 12, 2022 04:56 — forked from kekru/01nginx-tls-sni.md
nginx TLS SNI routing, based on subdomain pattern

Nginx TLS SNI routing, based on subdomain pattern

Nginx can be configured to route to a backend, based on the server's domain name, which is included in the SSL/TLS handshake (Server Name Indication, SNI).
This works for http upstream servers, but also for other protocols, that can be secured with TLS.

prerequisites

  • at least nginx 1.15.9 to use variables in ssl_certificate and ssl_certificate_key.
  • check nginx -V for the following:
    ...
    TLS SNI support enabled
@ictus4u
ictus4u / devops_best_practices.md
Created September 11, 2022 19:21 — forked from jpswade/devops_best_practices.md
Devops Best Practices Checklist

Find the original here article here: Devops Best Practices

DevOps started out as "Agile Systems Administration". In 2008, at the Agile Conference in Toronto, Andrew Shafer posted an offer to moderate an ad hoc "Birds of a Feather" meeting to discuss the topic of "Agile Infrastructure". Only one person showed up to discuss the topic: Patrick Debois. Their discussions and sharing of ideas with others advanced the concept of "agile systems administration". In that same year, Debois and Shafer formed an Agile Systems Administrator group on Google, with limited success. Patrick Debois did a presentation called "Infrastructure and Operations" addressing issues around involving more of the comp

@ictus4u
ictus4u / web-servers.md
Created September 2, 2022 15:34 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@ictus4u
ictus4u / gist:83431f1a0861d758fb43bcf5b0cb4673
Created August 18, 2022 04:21 — forked from ekoontz/gist:5130762
working with ldap admin tools
[root@centos1 ~]# ldapsearch -h localhost -D "cn=Manager,dc=openiam,dc=org" -w foobar -s sub "(&(objectClass=posixGroup)(cn=hdfs))"
# extended LDIF
#
# LDAPv3
# base <dc=openiam,dc=org> (default) with scope subtree
# filter: (&(objectClass=posixGroup)(cn=hdfs))
# requesting: ALL
#
# hdfs, Group, openiam.org
#!/bin/sh
## Fonction pour générer un password.
## "randpw" pour générer un mot de passe aléatoire de 32 caractères
## "randpw <n>" pour générer un mot de passe aléatoire de <n> caractères
randpw(){ < /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-32};echo;}
## Définir les mots de passe et les exporter pour qu'ils soient visibles des scripts.
cat > passwords << EOF
DATA_CONFIG_PASSWORD=`randpw`
DATA_ADMIN_PASSWORD=`randpw`
DATA_SERVICE_PASSWORD=`randpw`

環境

$ cat /etc/*release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.3 LTS"
NAME="Ubuntu"
VERSION="18.04.3 LTS (Bionic Beaver)"
# Go to ldap Folder and create a SSL Folder
cd /etc/ldap/
mkdir ssl
cd ssl/
# Create CA
openssl req \
-subj "/C=IN/ST=Maharashtra/L=Mumbai City/O=Information Security Systems/OU=IT Services/CN=OpenLDAP Test Server" \
FROM base/archlinux
RUN echo "installing openldap" \
&& sed 's/^CheckSpace/# CheckSpace/g' -i /etc/pacman.conf \
&& pacman -Syyu --noconfirm \
&& sed 's/^# CheckSpace/CheckSpace/g' -i /etc/pacman.conf \
&& pacman -S --noconfirm openldap
RUN echo "configuring openldap" \
&& sed -i 's/^suffix.*/suffix\t"dc=example,dc=org"/' /etc/openldap/slapd.conf \
OpenLDAP
基本的には書籍p.476-の手順に従っている。
パッケージインストール
sudo yum install openldap-servers openldap-clients libtool-ltdl
サービス自動起動
sudo systemctl enable slapd.service