Skip to content

Instantly share code, notes, and snippets.

View silvioramalho's full-sized avatar
😀
Always coding...

Silvio Ramalho silvioramalho

😀
Always coding...
View GitHub Profile
@silvioramalho
silvioramalho / django-hide-admin-from-main.py
Created June 14, 2020 02:04
Hide model from main admin list, but allow creation in inline editor
class OptionAdmin(admin.ModelAdmin):
def has_module_permission(self, request):
return False
@silvioramalho
silvioramalho / ip-netplan-setup.md
Created June 29, 2020 11:31
IP Setup on Ubuntu Server 20.04

IP Setup on Ubuntu Server 20.04

Edit netplan yaml

sudo nano /etc/netplan/00.....yaml

DHCP

@silvioramalho
silvioramalho / kubernetes.md
Last active July 3, 2020 23:31
Install Kubernetes on Ubuntu Server 20.04

Install Kubernetes on Ubuntu Server 20.04

Tweaks server configuration

sudo -s

swapoff -a
@silvioramalho
silvioramalho / kubertnetes-commands.md
Last active April 11, 2022 11:42
Kubernetes - Some Commands

Kubernetes Commands

Get Nodes

kubectl get nodes

NAME                STATUS    ROLES     AGE       VERSION

ubuntu-cluster-01 Ready  14s v1.18.1
@silvioramalho
silvioramalho / kubernetes-services.md
Last active July 1, 2020 01:01
Kubernetes - Services

Kubernetes - Services

Type of services

  1. Cluster

Return cluster valid IP

  1. Node Port
@silvioramalho
silvioramalho / kubernets-helm.md
Last active July 1, 2020 23:55
Kubernetes-Helm-Prometheus-Grafana

Setup Prometheus, Grafana

Docker

Install Docker and Kubernetes(kubelet, kubeadm, kubectl)

Setup Docker

sudo -s

@silvioramalho
silvioramalho / apm.md
Created July 4, 2020 00:46
APM - Application Performance Monitoring

APM - Application Performance Monitoring

NetData

Install:

sudo -s

hostname ubuntu-clusterXX

@silvioramalho
silvioramalho / lets-encrypt.md
Last active July 6, 2020 18:39
Instalando Let's Encrypt

Install Let's Encrypt

sudo add-apt-repository ppa:certbot/certbot
sudo apt update
sudo apt upgrade
sudo apt install python-certbot-nginx -y
sudo nginx -t
sudo systemctl reload nginx
@silvioramalho
silvioramalho / docker_ubuntu.md
Last active January 14, 2021 12:52
Install docker on Ubuntu

Install Docker on Ubuntu

sudo apt-get remove docker docker-engine docker.io

sudo apt-get update

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

sudo add-apt-repository \
@silvioramalho
silvioramalho / docker_commands.md
Last active March 22, 2021 14:57
Docker Commands