Skip to content

Instantly share code, notes, and snippets.

@rendoaw
rendoaw / linux.lvm.tutorial.md
Created June 7, 2015 01:37
Linux Basics – LVM (Logical Volume Manager) Tutorial

original source: https://ostechnix.wordpress.com/2013/02/03/linux-basics-lvm-logical-volume-manager-tutorial/

Linux Basics – LVM (Logical Volume Manager) Tutorial

February 3, 2013 ~ Admin Logical Volume Manager (LVM);

LVM is a tool for logical volume management which is used to allocating disks, striping, mirroring and resizing logical volumes. With LVM, a hard drive or set of hard drives is allocated to one or more physical volumes. LVM physical volumes can be placed on other block devices which might span two or more disks. Since a physical volume cannot span over multiple drives, to span over more than one drive, create one or more physical volumes per drive. The volume groups can be divided into logical volumes, which are assigned mount points, such as /home and / and file system types, such as ext2 or ext3 or ext4. When “partitions” reach their full capacity, free space from the volume group can be added to the logical volume to increase the size of the partition. When a new hard drive is added to th

@rendoaw
rendoaw / junos.netconf.text.format.md
Last active August 29, 2015 14:22
Junos netconf - send standard config and get standard show output

Send standard juniper stanza inside netconf

<rpc> 
    <edit-config> 
        <target> 
            <candidate/> 
        </target> 
        <config-text>
            <configuration-text>
# Option to add static routes with netmask
# RFC3442 routes: overrides routers option
option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;
# MS routes: adds extras to supplement routers option
option ms-classless-static-routes code 249 = array of unsigned integer 8;
# Local subnet
subnet 172.16.0.0 netmask 255.255.255.0 {
range 172.16.0.151 172.16.0.199;
option routers 172.16.0.1;
@rendoaw
rendoaw / new_gist_file_0
Created August 23, 2016 13:34
northstar junosvm sample config
system {
host-name northstar_junosvm;
root-authentication {
encrypted-password <encrypted password>; ## SECRET-DATA
}
login {
user northstar {
uid 2000;
class super-user;
authentication {

Keybase proof

I hereby claim:

  • I am rendoaw on github.
  • I am rendoaw (https://keybase.io/rendoaw) on keybase.
  • I have a public key ASCHC3NEi1Elw8Wn2EbZXenkVUEKhLGws6ozhHGsKeLgPgo

To claim this, I am signing this object:

@rendoaw
rendoaw / Ansible-Vault how-to.md
Created March 23, 2017 19:43 — forked from tristanfisher/Ansible-Vault how-to.md
A short tutorial on how to use Vault in your Ansible workflow. Ansible-vault allows you to more safely store sensitive information in a source code repository or on disk.

##Working with ansible-vault

I've been using a lot of Ansible lately and while almost everything has been great, finding a clean way to implement ansible-vault wasn't immediately apparent.

What I decided on was the following: put your secret information into a vars file, reference that vars file from your task, and encrypt the whole vars file using ansible-vault encrypt.

Let's use an example: You're writing an Ansible role and want to encrypt the spoiler for the movie Aliens.

rw@r1# show routing-options bmp
traceoptions {
file bmp.log size 10m;
flag all;
}
station ubuntu {
connection-mode active;
monitor enable;
station-address 192.168.153.74;
station-port 5555;
ip netns add ce-3-1
ip link set eth2 netns ce-3-1
ip netns exec ce-3-1 ip a
ip netns exec ce-3-1 vconfig add eth2 100
ip netns exec ce-3-1 ifconfig eth2 up
ip netns exec ce-3-1 ifconfig eth2.100 inet 10.11.12.3 netmask 255.255.255.0 up
ip netns exec ce-3-1 ifconfig eth2.100 up
ip netns exec ce-3-1 ip route add default via 10.11.12.103
ip netns exec ce-3-1 ip link set dev lo up
#!/usr/bin/env python
import os
import json
import datetime
from elasticsearch import Elasticsearch,helpers
import sys
import time
frr version 4.1-devyes
frr defaults traditional
hostname linux-93
username cumulus nopassword
!
service integrated-vtysh-config
!
log syslog informational
!
vrf vrf-110