Tuesday, September 18, 2018

Setup Bridge On Ubuntu

Hello Kids,

This time I want to share about Bridge, bridge is like a real bridge that connect two river. In this case we want to connect our virtual machine inside your server into real word as a real connection using your real device like eth0 or eth1.

First you have to install bridge utility
sudo apt-get install bridge-utils

I suggest you to install it on localhost/ local server terminal because you have to disable eth0 network and redirect it to your bridge, so after bridge have been setup you could connect ssh via bridge.

brctl addbr br0

this command to add bridge, you could check your bridge using ip link, these command show your device list

brctl addif br0 eth0

this command to add interface in your bridge, so eth1 bridged to br0. 

edit network config in /etc/networking/interfaces 

auto br0
iface br0 inet dhcp
        bridge_ports eth0
        bridge_stp off
        bridge_fd 0
        bridge_maxwait 0
# br1 setup with static wan IPv4 with ISP router as gateway
auto br1
iface br1 inet static
        address 208.43.222.51
        network 255.255.255.248
        netmask 255.255.255.0
        broadcast 208.43.222.55
        gateway 208.43.222.49
        bridge_ports eth1
        bridge_stp off
        bridge_fd 0
        bridge_maxwait 0
and dont forget to restart networking, systemctl restart networking.services

tips : 
you could restart interface using : ip link set dev eth0 up/down equal to ifconfig eth0 down/up

Your Dad,



Update Bios Intel Server Board

Hello Kids,

Today i want to share about update bios on intel server board, first note it should be update offline using USB disk. The USB disk should be in fat32 or fat64 format.

This time we use EFI shell, EFI shell is shell in your bios, it could be accessed from your bios > boot manager > EFI shell.

Before that you should prepare your USB disk with the firmware upgrade using EFI. You could download it here. extract it and copy to you USB disk.

Once you entered EFI Shell, you could check where the USB disk reside using map -r command. usually it detect as fs1.

Change to fs1 directory >> fs: | check your directory >> dir | and run Startup.nsh

Voila your firmware has been updated.

After that  you could update FRU and SDR .Field Replacement Unit (FRU) to choose chipset if you buy using specific vendor and Sensor Data Record (SDR) to detect if there are an update in you board. 

You should run the FRUSDR load utility each time you upgrade or replace the hardware in your server, excluding add-in boards, hard drives, and RAM. For example, if you replace an array of fans, you need to run the utility. It programs the sensors that need to be monitored for server management.

Your Dad,

Wednesday, August 8, 2018

AWK

Hello Kids,

There is something useful when playing with linux, yep awk command.

here some clue for playing with awk command

awk [option] '/patter/ {action}' [input file]


-F spesify field spearator default space     : awk -F: '{print $1}' /etc/passwd
/patter/ regex pattern                                 : awk -F: '/root/ {print $1}' /etc/passwd

Tuesday, August 7, 2018

Ansible Ad-Hoc Command

Hi Kids,

Ansible could play in two mechanism :
  1. using ad-hoc command, useful for simple command
  2. using playbook, more complicated
First you have to install it form here

Here is some clue to starting Ansible :

HOST
  • config host ini /etc/ansible/hosts or using -i inverntory.ini
  • ansible_user=root default using ssh user
  • ansible_ssh_common_args='-o StrictHostKeyChecking=no' for disable from known host
  • ansible_ssh_private_key_file: "/home/ansible/.ssh/id_rsa"
  • [group]
    • [group:children] include from above group
    • [group:vars] var for ansible
Ad-Hoc COMMAND 

ansible -i inventory -m module -a "argument" 


Ping
ansible servers -m ping -i inventory.ini -b{ecome}

Systemctl
ansible all -m systemd -a "name=nginx state=started" -i inventory.ini -s

YUM
ansible loc -m yum -a "name=nginx state=present update_cache=true" -i inventory.ini -s
ansible loc -m yum -a "name=nginx state=absent" -i inventory.ini -b