Friday, October 21, 2016

Ansible Notes

Syntax highlighting for Ansible Files in Sublime Text 3 in OSX
 cd ~/Library/Application Support/Sublime Text 3/Packages  
 git clone https://github.com/clifford-github/sublime-ansible.git Ansible  
In Sublime Text. Click > View >  Syntax > Ansible

Wednesday, October 19, 2016

MYSQL Notes

Changing Mysql root password
 mysqladmin -u root -p password  

Logging to mysql and use a database
 mysql -u root -p ;
  

Some commands
 show databases;  
 use <database_name>;  
 use tables;  
 select * from <table_name>;  

Wednesday, September 21, 2016

Renewing my Puppet Professional Certification

I have been a Puppet Professional Certified since 2013. Renewed my certification twice(2014 and 2015). So i got this email that i can take PPT-204 System Administration Using Puppet exam for FREE until October.
Best thing in taking certifications is that you will always force your self to study and upgrade your skills that will beneficial to your work.

Currently I'm using linuxacademy.com, Learning Puppet4 and Puppetlabs official Documentation as my learning tool


Introduction to Puppet Enterprise
Puppet-Professional-Certification-Study-Guide

"use of an 'exec' is generally an indication of a poorly written manifest :) "
-- Learning Puppet 4, Jo Rhett

Update: So i've took the exam and PASSED. Guilty as i am not reviewing that much for the exam, my score is not that high(i suspect that it is within the thin line of passing and failing hahaha). Was able to PASS though it was perhaps due to my experience with Puppet i was able to answer some of the questions right.

Tips for those who will take PPT-204, stick with the Exam Objectives and you will be good to go.


https://puppet.com/support-services/certification/professional-overview
https://puppet.com/support-services/certification/2016-professional-practice-exam
https://puppet.com/blog/puppet-professional-2016-exam-coming

Sunday, January 24, 2016

Virtualbox CLI

List running vms in Virtualbox
 VBoxManage list runningvms  

Take VM snapshot
 VBoxManage snapshot centos702 take snap1-before-ldap 

Save VM State
 VBoxManage controlvm centos701 savestate 

Starting a VM
 VBoxManage startvm centos702 

Linux Foundation Certified System Administrator Domain and Competencies v.2.16

Domains and Competencies V2.16

ESSENTIAL COMMANDS - 25%
  • Identify the component of the Linux distribution that a file belongs to
  • Install Linux Distribution to physical media
  • Install Linux Distribution over a network
  • Install Linux Distribution into a virtual disk image
  • Log into graphical and text mode consoles
  • Search for files
  • Evaluate and compare the basic file system features and options
  • Compare text files
  • Compare binary files
  • Identify different types of files
  • Create and edit text files
  • Use input-output redirection (e.g. >, >>, |, 2>)
  • Analyze text using basic regular expressions
  • Access remote systems securely using CLI
  • Archive, compress, unpack, and uncompress files
  • Create, delete, copy, and move files and directories
  • Create hard and soft links
  • List, set, and change standard file permissions
  • Read, and use system documentation
  • Manipulate file content programmatically
  • Transfer files securely via the network
  • Manage access to the root account
  • Perform disk image management
  • Use version control tools
  • Run commands on many systems simultaneously

Operation of Running Systems - 20%

  • Boot, reboot, and shut down a system safely
  • Boot systems into different runlevels manually
  • Install, configure and troubleshoot the bootloader
  • Manage shared libraries
  • Change the priority of a process
  • Identify resource utilization by process
  • Locate and analyze system log files
  • Schedule tasks to run at a set date and time
  • Verify completion of scheduled jobs
  • Manipulate Linux system during the boot process
  • Manipulate Linux system during the recovery process
  • Support incident management for outages/trouble
  • Identify and resolve system performance bottlenecks and platform instability
  • Update hardware to provide required functionality and security
  • Update operating systems to provide required functionality and security
  • Update software to provide required functionality and security
  • Update the kernel and ensure the system is bootable
  • Verify the integrity and availability of hardware
  • Verify the integrity and availability of resources
  • Verify the integrity and availability of key processes
  • Change kernel runtime parameters, persistent and non-persistent
  • Use scripting to automate system maintenance tasks
  • Manage the startup process and services
  • List and identify SELinux/AppArmor file and process contexts
  • Produce and deliver reports on system use (processor, memory, disk, and network), outages, and user requests
  • Update packages from the network, a remote repository, or from the local file system
  • Configure and modify SELinux/AppArmor policies
  • Monitor security and conduct audits
  • Script automation tools to make work faster and more accurate
  • Develop and test disaster recovery plans
  • Maintain systems via configuration management tools
  • Train team members on new technology or changes to existing systems
  • Develop system disaster recovery tests
  • Install software from source

User and Group Management - 15%

  • Create, delete, and modify local user accounts
  • Create, delete, and modify local groups and group memberships
  • Manage system-wide environment profiles
  • Configure a client to use LDAP for user and group information
  • Configure a system to authenticate using Kerberos
  • Configure set-GID directories for collaboration
  • Manage template user environment
  • Configure user resource limits
  • Manage user processes
  • Configure PAM

Networking - 15%

  • Configure networking and hostname resolution statically or dynamically
  • Configure network services to start automatically at boot
  • Implement packet filtering
  • Configure firewall settings
  • Configure a system to perform Network Address Translation
  • Start, stop, and check the status of network services
  • Monitor network performance
  • Statically route IP traffic
  • Dynamically route IP traffic
  • Synchronize time using other network peers
  • Configure network traffic tunneling

Service Configuration - 10%

  • Configure a basic DNS server
  • Maintain a DNS zone
  • Configure a caching-only name server
  • Configure a caching-only name server to forward DNS queries
  • Configure an FTP server
  • Configure anonymous-only download on FTP servers
  • Provide/configure network shares via NFS
  • Provide/configure network shares via CIFS
  • Configure an smtp service
  • Restrict access to an smtp server
  • Configure a mail transfer agent (MTA) to accept inbound email from other systems
  • Configure an MTA to forward (relay) email through a smart host
  • Configure email aliases
  • Configure SSH servers and clients
  • Configure SSH-based remote access using public/private key pairs
  • Configure a DHCP server
  • Configure the HTTP proxy server
  • Restrict access to the HTTP proxy server
  • Configure an HTTP client to automatically use a proxy server
  • Configure an IMAP and IMAPS service
  • Configure host-based and user-based security for a service
  • Query and modify the behavior of system services at various run levels
  • Configure direct-attach and network printers
  • Configure an HTTP server
  • Configure HTTP server log files
  • Configure SSL with HTTP server
  • Set up name-based virtual web hosts
  • Deploy a basic web application
  • Restrict access to a web page
  • Configure time synchronization server
  • Synchronize time using other time synchronization peers
  • Configure a system to log to a remote system
  • Configure a PXE Boot server
  • Configure an LDAP server and schema 
  • Configure a system to accept logging from a remote system
  • Diagnose routine SELinux/AppArmor policy violations
  • Configure SELinux/AppArmor to support a service
  • Configure database server
  • Configure SELinux/AppArmor to confine a service

Virtualization - 5%

  • Configure a hypervisor to host virtual guests
  • Install Linux systems as virtual guests
  • Start, stop, modify the status of virtual machines
  • Access a VM console
  • Migrate a VM between two hosts
  • Configure systems to launch virtual machines at boot
  • Evaluate memory usage of virtual machines
  • Create light-weight virtualized guests via namespaces
  • Resize RAM or storage of VMs
  • Cloning and replicating VMs using images or snapshots

Storage Management - 10%

  • List, create, delete, and modify storage partitions
  • Create, migrate, and remove Physical Volumes
  • Assign Physical Volumes to Volume Groups
  • Create, modify and delete Logical Volumes
  • Extend existing Logical Volumes and filesystems
  • Create and configure encrypted partitions
  • Configure systems to mount file systems at or during boot
  • Configure and manage swap space
  • Add new partitions, and logical volumes
  • Create, mount, and unmount standard Linux file systems
  • Assemble partitions as RAID devices
  • Identify storage devices using block device attributes
  • Configure systems to mount standard, encrypted, and network file systems on demand
  • Create and manage filesystem Access Control Lists (ACLs)
  • Diagnose and correct file permission problems
  • Setup user and group disk quotas for filesystems
  • Restore default SELinux file contexts
  • Manage Linux file system features and flags
  • Configure remote block storage devices
  • Design and test backup/recovery strategies
  • Deploy, configure, and maintain high availability/clustering/replication
ref: https://training.linuxfoundation.org/upcoming-program-changes-for-the-lfcs-certification-exam

Saturday, January 23, 2016

Virtualbox VM ping duplicate

Having this ping duplicate in VM on Virtualbox

 [root@centos701 ~]# ping 192.168.1.1  
 PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.  
 64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=1.51 ms  
 64 bytes from 192.168.1.1: icmp_seq=1 ttl=63 time=1.56 ms (DUP!)  
 64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=18.9 ms  
 64 bytes from 192.168.1.1: icmp_seq=2 ttl=63 time=18.9 ms (DUP!)  
 64 bytes from 192.168.1.1: icmp_seq=3 ttl=64 time=1.68 ms  
 64 bytes from 192.168.1.1: icmp_seq=3 ttl=63 time=1.75 ms (DUP!)  

Solution: Disable your host's IP forwarding
 [root@fedora ~]# sysctl -w net.ipv4.ip_forward=0<br />  
 net.ipv4.ip_forward = 0  

Referrence:
http://linuxconfig.org/virtualbox-ping-from-virtual-machine-results-in-dup-duplicate-packages