open-stack setup

[root@openstack ~]# yum update -y Note: keep enabled=1 in the repo file [root@openstack ~]# vim /etc/yum.repos.d/CentOS-Vault.repo [root@openstack ~]# yum -y install https://www.rdoproject.org/repos/rdo-release.rpm Loaded plugins: fastestmirror rdo-release.rpm | 3.7 kB 00:00:00 Examining /var/tmp/yum-root-8FvV4O/rdo-release.rpm: rdo-release-mitaka-5.noarch Marking /var/tmp/yum-root-8FvV4O/rdo-release.rpm to be installed Resolving Dependencies --> Running transaction check ---> Package rdo-release.noarch 0:mitaka-5 will be installed --> Finished Dependency Resolution … Continue reading open-stack setup

Docker

[root@localhost ~]# yum update [root@localhost ~]# uname -r 3.10.0-327.el7.x86_64 Add repo for docker vim /etc/yum.repos.d/docker.repo [dockerrepo] name=Docker Repository baseurl=https://yum.dockerproject.org/repo/main/centos/7/ enabled=1 gpgcheck=1 gpgkey=https://yum.dockerproject.org/gpg [root@localhost ~]# yum install docker-engine Loaded plugins: fastestmirror, langpacks Loading mirror speeds from cached hostfile * base: http://ftp.iitm.ac.in * extras: http://ftp.iitm.ac.in * updates: http://ftp.iitm.ac.in Resolving Dependencies --> Running transaction check ---> Package docker-engine.x86_64 … Continue reading Docker

HA proxy

      Load balancing can be performed at various layers in the Open Systems Interconnection (OSI) Reference Model for networking. Here we offer an overview of two load balancing options at two different layers in the model. Differences Between Layer 4 and Layer 7 Load Balancing Layer 4 load balancing operates at the intermediate … Continue reading HA proxy

proxy-server

What is a Proxy Server? A Proxy server is an intermediary machine, between a client and the actual server, which is used to filter or cache requests made by the client. This article is focused on the Different Caching Web Proxies. Normal (Regular/Caching) Proxy: A regular caching proxy server is a server which listens on … Continue reading proxy-server

NGINX AS REV PROXY

Nginx server [root@localhost ~]# yum install nginx [root@localhost ~]# ip a 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 52:54:00:1a:8c:8d brd ff:ff:ff:ff:ff:ff inet 192.168.122.229/24 brd … Continue reading NGINX AS REV PROXY

MBR recovery with live cd

[root@client ~]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sr0 11:0 1 1024M 0 rom sda 8:0 0 10G 0 disk ├─sda1 8:1 0 500M 0 part /boot └─sda2 8:2 0 9.5G 0 part ├─VolGroup-lv_root (dm-0) 253:0 0 8.5G 0 lvm / └─VolGroup-lv_swap (dm-1) 253:1 0 1G 0 lvm [SWAP] [root@client ~]# dd if=/dev/zero … Continue reading MBR recovery with live cd

Creating swap with dd command

[root@localhost ~]# swapon -s Filename Type Size Used Priority /dev/sda3 partition 1048572 0 -1 [root@localhost ~]# free -m total used free shared buffers cached Mem: 981 748 233 3 33 386 -/+ buffers/cache: 328 652 Swap: 1023 0 1023 Determine the size of the new swap file in megabytes and multiply by 1024 to determine … Continue reading Creating swap with dd command

omd through puppet

[root@puppetmaster ~]#puppet module search omd [root@puppetmaster ~]#puppet module install tanny1910-omd [root@puppetmaster ~]# puppet module search epel [root@puppetmaster ~]# puppet module install stahnma-epel [root@puppetmaster ~]# cat /etc/puppet/manifests/site.pp hiera_include("classes") [root@puppetmaster ~]# cat /etc/puppet/hieradata/common.yaml --- classes: - 'epel' - 'omd' - 'omd::check_mk::agent' - 'omd::check_mk::plugins::puppet' --------------------------------------------------- client -side -------------------------------------------- [root@puppetserver ~]# rpm -Uvh https://labs.consol.de/repo/stable/rhel7/i386/labs-consol-stable.rhel7.noarch.rpm Retrieving https://labs.consol.de/repo/stable/rhel7/i386/labs-consol-stable.rhel7.noarch.rpm Preparing... ################################# [100%] … Continue reading omd through puppet

Manage-Users

[root@server ~]# vim /etc/puppet/manifests/site.pp hiera_include('classes') node default { include users::students } --------------------------------------------------------------------- [root@server ~]# mkdir -p /etc/puppet/modules/users/manifests/ [root@server ~]# vim /etc/puppet/modules/users/manifests/students.pp class users::students { user { 'mohammed': ensure => present, groups => ['sudo', 'users'], managehome => 'true', shell => '/bin/bash', password => '$6$4T7f7FMX$hnSX1.CaAiKI1dSQnKdFX0T782N6QYOTFoU2V0A0tywyHR28jxNgcgSGCabFO5m20Fv4ulxokRLhraELyFfFu.', } group { "sudo": ensure => "present", } } --------------------------------------------------------------------- [root@server ~]# … Continue reading Manage-Users

ssh-puppet

[root@server ~]# puppet module search ssh Notice: Searching https://forgeapi.puppetlabs.com ... NAME DESCRIPTION AUTHOR KEYWORDS aptituz-ssh puppet module to manage ssh @aptituz hostkey openssh ssh systemsathomesdotcom-ssh puppet module to manage ssh @systemsathomesdotcom hostkey openssh ssh attachmentgenie-ssh Puppet ssh Module @attachmentgenie ssh-server ssh-client ssh thias-ssh SSH module @thias openssh ssh sshd spiette-ssh openssh server and client configuration … Continue reading ssh-puppet