Inventory in ansible

[mohammedrafi@ansible1 ~]$ ansible --version ansible 2.2.1.0 config file = /etc/ansible/ansible.cfg configured module search path = Default w/o overrides [mohammedrafi@ansible1 ~]$ vim /etc/ansible/hosts [web] 104.154.73.152 [db] 104.198.26.13 [mohammedrafi@ansible1 ~]$ ansible web --list-hosts hosts (1): 104.154.73.152 [mohammedrafi@ansible1 ~]$ ansible db --list-hosts hosts (1): 104.198.26.13 [mohammedrafi@ansible1 ~]$ ansible '*' --list-hosts hosts (2): 104.154.73.152 104.198.26.13 [mohammedrafi@ansible1 ~]$ mkdir dc1 … Continue reading Inventory in ansible

docker basics

[root@docker ~]# cat > /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@docker ~]# yum install docker-engine -y [root@docker ~]# docker --version Docker version 1.13.0, build 49bf474 [root@docker ~]# docker info Containers: 0 Running: 0 Paused: 0 Stopped: 0 Images: 3 Server Version: 1.13.0 Storage Driver: overlay Backing Filesystem: xfs Supports d_type: false Logging Driver: … Continue reading docker basics

kubernetes

[root@kubernetes1 ~]# yum info kubernetes Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: centos.mirrors.tds.net * extras: mirror.eboundhost.com * updates: repo.us.bigstepcloud.com Installed Packages Name : kubernetes Arch : x86_64 Version : 1.3.0 Release : 0.3.git86dc49a.el7 Size : 0.0 Repo : installed From repo : extras Summary : Container cluster management URL : k8s.io/kubernetes … Continue reading kubernetes

Openshift

[root@openshift ~]# yum install docker wget vim -y [root@openshift ~]# vim /etc/sysconfig/docker INSECURE_REGISTRY='--insecure-registry 172.30.0.0/16' [root@openshift ~]# systemctl restart docker [root@openshift ~]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE [root@openshift ~]# cd /tmp [root@openshift tmp]# wget https://github.com/openshift/origin/releases/download/v1.3.0/openshift-origin-server-v1.3.0-3ab7af3d097b57f933eccef684a714f2368804e7-linux-64bit.tar.gz [root@openshift tmp]# ls -l total 60912 -rw-r--r--. 1 root root 62373092 Sep 16 01:36 openshift-origin-server-v1.3.0-3ab7af3d097b57f933eccef684a714f2368804e7-linux-64bit.tar.gz [root@openshift tmp]# tar … Continue reading Openshift

Ansible-palybooks

mohammedrafi@NOC-RAFI:~$ ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key (/home/mohammedrafi/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/mohammedrafi/.ssh/id_rsa. Your public key has been saved in /home/mohammedrafi/.ssh/id_rsa.pub. The key fingerprint is: 33:b8:4d:8f:95:bc:ed:1a:12:f3:6c:09:9f:52:23:d0 mohammedrafi@NOC-RAFI The key's randomart image is: +--[ RSA 2048]----+ … Continue reading Ansible-palybooks

Puppet-Enterprise Installation On Centos-7

Download or cp tarball to server In Below example i have downloaded tar-ball [root@puppetenterprise ~]# wget https://s3.amazonaws.com/pe-builds/released/2016.5.1/puppet-enterprise-2016.5.1-el-7-x86_64.tar.gz --2017-01-16 02:31:46-- https://s3.amazonaws.com/pe-builds/released/2016.5.1/puppet-enterprise-2016.5.1-el-7-x86_64.tar.gz Resolving s3.amazonaws.com (s3.amazonaws.com)... 54.231.120.122 Connecting to s3.amazonaws.com (s3.amazonaws.com)|54.231.120.122|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 378391144 (361M) [application/x-tar] Saving to: ‘puppet-enterprise-2016.5.1-el-7-x86_64.tar.gz’ 100%[=====================================================================================================>] 37,83,91,144 11.5MB/s in 45s 2017-01-16 02:32:31 (8.10 MB/s) - ‘puppet-enterprise-2016.5.1-el-7-x86_64.tar.gz’ saved … Continue reading Puppet-Enterprise Installation On Centos-7

JBOSS Application-Server 7.1

[root@ansible1 ~]# yum install epel-release -y [root@ansible1 ~]# yum update -y [root@ansible1 ~]# yum install java-1.6.0-openjdk-devel -y [root@ansible1 ~]# java -version java version "1.6.0_41" OpenJDK Runtime Environment (IcedTea6 1.13.13) (rhel-1.13.13.1.el7_3-x86_64) OpenJDK 64-Bit Server VM (build 23.41-b41, mixed mode) [root@ansible1 ~]# yum install mlocate -y [root@ansible1 ~]# locate java locate: can not stat () `/var/lib/mlocate/mlocate.db': No … Continue reading JBOSS Application-Server 7.1

jenkins

imp url to refer http://pkg.jenkins-ci.org/redhat/ [root@jenkins ~]# sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat/jenkins.repo --2017-05-04 21:01:23-- https://pkg.jenkins.io/redhat/jenkins.repo Resolving pkg.jenkins.io (pkg.jenkins.io)... 52.202.51.185 Connecting to pkg.jenkins.io (pkg.jenkins.io)|52.202.51.185|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 71 Saving to: ‘/etc/yum.repos.d/jenkins.repo’ 100%[======================================================================================================>] 71 --.-K/s in 0s 2017-05-04 21:01:24 (6.99 MB/s) - ‘/etc/yum.repos.d/jenkins.repo’ saved [71/71] [root@jenkins ~]# sudo rpm --import https://pkg.jenkins.io/redhat/jenkins.io.key … Continue reading jenkins

Vagrant on Ubuntu

mohammedrafi@NOC-RAFI:~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 14.04.5 LTS Release: 14.04 Codename: trusty mohammedrafi@NOC-RAFI:~$ sudo apt-get install virtualbox mohammedrafi@NOC-RAFI:~$ sudo apt-get install vagrant mohammedrafi@NOC-RAFI:~$ vagrant --help Usage: vagrant [-v] [-h] command [] -v, --version Print the version and exit. -h, --help Print this help. Available subcommands: box manages boxes: … Continue reading Vagrant on Ubuntu

puppet doc

before — Applies a resource before the target resource. require — Applies a resource after the target resource. notify — Applies a resource before the target resource. The target resource refreshes if the notifying resource changes. subscribe — Applies a resource after the target resource. The subscribing resource refreshes if the target resource changes. # … Continue reading puppet doc