Skip to content

Instantly share code, notes, and snippets.

🌴
On vacation

abdennour abdennour

🌴
On vacation
Block or report user

Report or block abdennour

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@abdennour
abdennour / README.md
Created Jul 2, 2019
Leverage Ansible inventory to SSH login
View README.md

Configuration

Put the file alongside the ansible.cfg (root project)

Usage

invenotry example

192.168.11.23 ansible_host=mynode.example.com
@abdennour
abdennour / install.sh
Created Jun 22, 2019
Install nginx on MacOs
View install.sh
brew install nginx
# Docroot is: /usr/local/var/www
# The default port has been set in /usr/local/etc/nginx/nginx.conf to 8080 so that
# nginx can run without sudo.
# nginx will load all files in /usr/local/etc/nginx/servers/.
# To have launchd start nginx now and restart at login:
@abdennour
abdennour / README.md
Last active Jun 15, 2019
Nginx Reverse Proxy for Nexus Docker Registries
View README.md

Overview

This is a solution of a common problem with Nexus Docker repositories. The administrator has to expose port for "pull", another port for "push", other ports for each hosted repository. This solution is about leveraging Nginx reverse proxy to avoid using these ports.

How it works ?

Given :

  • Nexus hostname is "nexus.example.com"
  • Nexus web port is 8081
@abdennour
abdennour / authentication.sh
Last active Jun 15, 2019
Add New Kubernetes User with Role biding
View authentication.sh
#!/bin/bash
# Usage: $0 myuser
k_user=${1}
#...
# 1. Step one: This new User generate a private key
openssl genrsa -out ${k_user}.pem 2048
@abdennour
abdennour / master.md
Created Jun 1, 2019
Kubernetes The easy way
View master.md
  1. Initializes cluster master node:
 kubeadm init --apiserver-advertise-address $(hostname -i)
  1. Initialize cluster networking:
@abdennour
abdennour / README.md
Last active Apr 27, 2019
Kubernetes with enabeled firewall
@abdennour
abdennour / firewalld_rhel_k3s.yml
Created Apr 26, 2019
Attempt to make k3s work on RHEL by an Ansible Playbook
View firewalld_rhel_k3s.yml
- name: k3s readiness
hosts: localhost
become: yes
tasks:
- name: firewalld is installed
yum:
name: firewalld
state: latest
- name: service is started
service:
View users.yml
---
- hosts: localhost
tasks:
- name: download user_list.yml
get_url:
url: http://files.example.com/user_list.yml
dest: /home/ansible/files/user_list.yml
- hosts: node1
@abdennour
abdennour / users.yml
Created Apr 26, 2019
playbook example
View users.yml
View the file *http://files.example.com/user_list.yml* from *control1*. Create a playbook in */home/ansible/exam/users.yml* that follows the instructions provided in the file.
Create the file /home/ansible/exam/users.yml containing the following:
---
- hosts: localhost
tasks:
- name: download user_list.yml
get_url:
url: http://files.example.com/user_list.yml
@abdennour
abdennour / install-certificate.sh
Created Apr 6, 2019
Install Certificate for Many clients
View install-certificate.sh
#!/bin/bash
# Usage: $0 java google.com 443
CLIENT=$1
HOST=$2
PORT=$3
# openssl s_client -servername $HOST -connect $HOST:$PORT </dev/null 2>/dev/null | openssl x509 -inform PEM -outform DER -out ${HOST}.cer
You can’t perform that action at this time.