Skip to content

Instantly share code, notes, and snippets.

:octocat:

Ruan Bekker ruanbekker

:octocat:
Block or report user

Report or block ruanbekker

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
@ruanbekker
ruanbekker / .drone.yml
Created Jan 25, 2020
Localstack with Drone and Gitea
View .drone.yml
---
kind: pipeline
type: docker
name: localstack
platform:
os: linux
arch: amd64
steps:
@ruanbekker
ruanbekker / setup_golang_app.md
Last active Jan 23, 2020
Setup a Basic Golang App
View setup_golang_app.md

Create the folder structure:

$ mkdir /x
$ mkdir bin src pkg
$ mkdir src/mycli

Set the environment:

@ruanbekker
ruanbekker / openvpn_docker.md
Created Jan 21, 2020
OpenVPN in Docker Containers
View openvpn_docker.md

OpenVPN Server

mkdir /root/vpndata
EXT_IP=$(curl -sL ip.ruan.dev)
docker run -v /root/vpndata:/etc/openvpn --rm ruanbekker/openvpn-server ovpn_genconfig -u udp://${EXT_IP}:3000
docker run -v /root/vpndata:/etc/openvpn --rm -it ruanbekker/openvpn-server ovpn_initpki
@ruanbekker
ruanbekker / docker-compose.yml
Created Jan 14, 2020
3 Node Elasticsearch Cluster for Docker
View docker-compose.yml
version: '2'
services:
es0:
container_name: es0
image: docker.elastic.co/elasticsearch/elasticsearch:6.8.6
container_name: es0
environment:
- ES_SKIP_SET_KERNEL_PARAMETERS=true
- cluster.name=docker-cluster
- node.name=es0
@ruanbekker
ruanbekker / multipass_k3s_multi_node.md
Created Jan 6, 2020
K3s Multi Node with Multipass
View multipass_k3s_multi_node.md
@ruanbekker
ruanbekker / multipass_k3s_single_node.md
Created Jan 6, 2020
K3S Single Node with Multipass
View multipass_k3s_single_node.md
@ruanbekker
ruanbekker / multipass_create_vm.md
Created Jan 6, 2020
Provision a VM with Multipass
View multipass_create_vm.md

Install Multipass on Mac

$ brew cask install multipass

Create a SSH Key

$ sh-keygen -b 2048 -f ~/.ssh/multipass -t rsa -q -N ""
@ruanbekker
ruanbekker / elasticsearch_in_lxd.md
Created Dec 27, 2019
Fix Elasticsearch issues in LXD/LXC containers
View elasticsearch_in_lxd.md

Errors like this appear when you start elasticsearch in a container:

$ journalctl -xe
Dec 27 16:50:17 elasticsearch-03 mount[62]: mount: /sys/kernel/config: cannot mount configfs read-only.
Dec 27 16:50:17 elasticsearch-03 systemd-sysctl[63]: Couldn't write '262144' to 'vm/max_map_count', ignoring: Read-only file system
Dec 27 16:50:17 elasticsearch-03 systemd-sysctl[63]: Couldn't write '1' to 'fs/protected_hardlinks', ignoring: Read-only file system
Dec 27 16:50:17 elasticsearch-03 systemd-sysctl[63]: Couldn't write '1' to 'fs/protected_symlinks', ignoring: Read-only file system

$ /etc/init.d/elasticsearch status
@ruanbekker
ruanbekker / set_static_ip_linux_debian.md
Created Dec 27, 2019
Set a Static IP Address for Debian Based Linux Distros
View set_static_ip_linux_debian.md

Edit the interfaces config:

$ cat /etc/network/interfaces
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp
@ruanbekker
ruanbekker / gitea-drone-postgres-local.yml
Created Dec 19, 2019
Drone + Gitea + Postgres on Docker (Local)
View gitea-drone-postgres-local.yml
version: "2"
services:
gitea:
image: gitea/gitea:latest
container_name: gitea
environment:
- APP_NAME=Gitea
- USER_UID=1000
- USER_GID=1000
You can’t perform that action at this time.