Wednesday, August 21, 2019

Terraform-workout- cr8ing n/w,sub,rt,etc


step 1:- create "network.tf" here we will add the network related stuf, vpc, subnet etc

resource "aws_vpc" "gopalvpc" {
  cidr_block       = "10.0.0.0/16"
  instance_tenancy = "default"

  tags = {
    Name = "gopalvpc"
  }
}


resource "aws_subnet" "gopalsub" {
  vpc_id     = "${aws_vpc.gopalvpc.id}"
  cidr_block = "10.0.1.0/24"

  tags = {
    Name = "gopalsub"
  }
}

resource "aws_internet_gateway" "gopalgw" {
  vpc_id = "${aws_vpc.gopalvpc.id}"

  tags = {
    Name = "gopalgw"
  }
}

resource "aws_route_table" "gopalr" {
  vpc_id = "${aws_vpc.gopalvpc.id}"

  route {
    cidr_block = "0.0.0.0/0"
    gateway_id = "${aws_internet_gateway.gopalgw.id}"
  }
  tags = {
    Name = "gopalr"
  }
}
  resource "aws_route_table_association" "gopala" {
  subnet_id      = "${aws_subnet.gopalsub.id}"
  route_table_id = "${aws_route_table.gopalr.id}"
}


================================================

step 2:- ec2.tf

resource "aws_instance" "web" {
  ami           = "ami-035b3c7efe6d061d5"
  instance_type = "t2.micro"
  key_name = "vm3key"

  tags = {
    Name = "HelloWorld"
  }
}

============================================

step 3:- Provider.tf

provider "aws" {
  version = "~> 2.0"
  region  = "us-east-1"
}




Tuesday, August 20, 2019

Openstack notes-2




Openstack- notes-1


Openstack -History from working Node

root@servera Desktop]# yum repolist all
Loaded plugins: langpacks, product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Repository 'rhel7' is missing name in configuration, using id
repo id                                                     repo name                                                                   status
InstallMedia                                                Red Hat Enterprise Linux 7.1                                                disabled
juno                                                        [rhel]                                                                      enabled:   289
rhel7                                                       rhel7                                                                       enabled: 4,371
repolist: 4,660
[root@servera Desktop]# pwd
/root/Desktop
[root@servera Desktop]# history
    1  sudo yum update -y
    2  sudo yum install -y https://www.rdoproject.org/repos/rdo-release.rpm
    3  nmcti
    4  nmcli
    5  nmtui
    6  ifconfig -a
    7  pwd
    8  clear
    9  pwd
   10  cd /etc/sysconfig
   11  ls
   12  cd network-scripts/
   13  ls
   14  vi ifcfg-eno16777736
   15  service network restart
   16  ifconfig -a
   17  ping google.com
   18  ping www.google.com
   19  ping 192.168.63.111
   20  ping www.google.com
   21  ping 115.242.185.35
   22  service network restart
   23  ping 115.242.185.35
   24  ifconfig -a
   25  reboot
   26  ping 115.242.185.35
   27  service network restart
   28  ping www.google.com
   29  service network restart
   30  ifconfig -a
   31  ifconfig
   32  vi /etc/sysconfig/network-scripts/ifcfg-eno16777736
   33  reboot
   34  ifconfig -a
   35  setup
   36  uname -a
   37  nmcli
   38  cd /etc/sysconfig/network-scripts/
   39  ls
   40  cat ifcfg-eno16777736
   41  service netwok restart
   42  /etc/init.d/networking startus
   43  /etc/init.d/network status
   44  /etc/init.d/network restart
   45  journalctl -xn
   46  cd /etc
   47  vi hostname
   48  init 6
   49  pwd
   50  nmtui
   51  cd /etc/sysconfig/
   52  ls
   53  cd network-scripts/
   54  ls
   55  vi ifclear
   56  clear
   57  ls
   58  vi ifcfg-eno16777736
   59  ifconfig -a
   60  ifconfig -a
   61  cd /etc/sysconfig/network-scripts/
   62  ls
   63  vi ifcfg-eno16777736
   64  ifconfig -a
   65  ifconfig eno16777736 up
   66  service network restart
   67  service NetworkManager restart
   68  service networkmanager restart
   69  ifconfig -a
   70  init 6
   71  ifconfig -a
   72  service network restart
   73  ifconfig -a
   74  init 6
   75  ifconfig -a
   76  service network restart
   77  ifconfig -a
   78  servce network restart
   79  service network restart
   80  ifconfig -a
   81  service network restart
   82  service network restart
   83  init 6
   84  service network restart
   85  ifconfig
   86  systemctl restart network.service
   87  ifconfig
   88  ping 192.63.111
   89  ping 192.168.63.111
   90  cd /
   91  ls
   92  createrepo /opens/
   93  chmod -R 755 /opens/
   94  createrepo /opens/
   95  pwd
   96  cd opens
   97  ls
   98  createrepo /opens/juno-rpm/
   99  createrepo -v /opens/juno-rpm/
  100  createrepo /opens/juno-rpm/
  101  createrepo -v /opens/juno-rpm/
  102  pwd
  103  getinfo 0
  104  vi /etc/selinux/config
  105  systemctl stop firewalld.service
  106  systemctl stop NetworkManager.service
  107  cd /etc/yum.repos.d/
  108  ls
  109  vi juno.repo
  110  cd /opens/Packages/
  111  rpm -ivh createrepo-0.9.9-23.el7.noarch.rpm
  112  rpm -ivh vsftpd-3.0.2-9.el7.x86_64.rpm
  113  cd /
  114  createrepo -v /var/ftp/pub/Packages/
  115  cd /etc/yum.repos.d/
  116  ls
  117  vi juno.repo
  118  yum clean all
  119  yum list all
  120  vi juno.repo
  121  cd /
  122  cd /var/ftp/pub/
  123  chmod -R 777 Packages/
  124  yum clean all
  125  yum list all
  126  yum repolist all
  127  yum install -y openstack-packstack
  128  init 0
  129  yum install -y openstack-packstack
  130  clear
  131  ifconfig -a
  132  clear
  133  clear
  134  clear
  135  pwd
  136  clear
  137  clear
  138  history
  139  clear
  140  init 0
  141  history
  142  clear
  143  init 0
  144  openstack-packstack status
  145  openstack status
  146  ls
  147  clear
  148  ls
  149  cd Untitled\ Folder/
  150  ls
  151  ls
  152  cd /
  153  cd /etc/sysconfig/network-script/
  154  bash
  155  cd /etc/sysconfig/network-scripts/
  156  ls
  157  pwd
  158  cp ifcfg-eno16777736 /root
  159  pwd
  160  vi ifcfg-eno16777736
  161  vi ifcfg-eno16777736
  162  vi ifcfg-eno16777736
  163  pwd
  164  ls
  165  ls -ltr
  166  pwd
  167  vi ifcfg-br-ex
  168  history
  169  cp ifcfg-eno16777736 /etc/sysconfig/network-scripts/ifcfg-br-ex
  170  pwd
  171  vi ifcfg-br-ex
  172  pwd
  173  pwd
  174  cp /root/ifcfg-eno16777736 /etc/sysconfig/network-scripts/ifcfg-br-ex
  175  pwd
  176  vi ifcfg-br-ex
  177  vi ifcfg-br-ex
  178  systemctl restart network.service
  179  ovs-vsctl show
  180  hostname
  181  hostnamectl set-hostname servera.pod2.example.com
  182  clear
  183  history
  184  openstack-service status
  185  free -M
  186  free -m
  187  free -m
  188  init 6
  189  pwd
  190  ls
  191  clear
  192  yum repolis
  193  yum clean all
  194  yum repolist
  195  yum list all
  196  yum list all | more
  197  yum repolist all
  198  pwd
  199  history
[root@servera Desktop]#

ceph -integration sucess results on openstack node and ceph node- results

on Openstack node:-

143  glance --debug image-create --name "Cirros 0.3.4" --disk-format qcow2 --container-format bare --is-public true  --file cirros-0.3.4-x86_64-disk.img --progress
  144  glance image-list
  145  history
[ceph@os ~(keystone_admin)]$ glance image-list
+--------------------------------------+--------------+-------------+------------------+----------+--------+
| ID                                   | Name         | Disk Format | Container Format | Size     | Status |
+--------------------------------------+--------------+-------------+------------------+----------+--------+
| 83d32299-9c74-46d1-b1d4-e956321edd33 | Cirros 0.3.4 | qcow2       | bare             | 13287936 | active |
+--------------------------------------+--------------+-------------+------------------+----------+--------+
[ceph@os ~(keystone_admin)]$ 


on ceph node:-

ceph.conf                                                                                                                                                          100%  386     0.4KB/s   00:00    
[ceph@node1 ceph]$ sudo rbd -p images ls
83d32299-9c74-46d1-b1d4-e956321edd33
[ceph@node1 ceph]$ 

Ceph Cluster sucessful configuration

Ceph Cluster successful configuration:-


Admin Node = ceph4 -------------------------- vip
visudo

Defaults:ceph !requiretty   ---------------------------------------- add this


ceph    ALL=(root)       NOPASSWD:ALL -----------------------add this line
ceph$ssh-keyge

[root@ceph4 ~]# cd /etc/yum.repos.d/
[root@ceph4 yum.repos.d]# ls
ceph.repo  OpenStack.repo  redhat.repo  rhel_dvd.repo  rhel_updates.repo
[root@ceph4 yum.repos.d]# pwd
/etc/yum.repos.d
[root@ceph4 yum.repos.d]# cd /root
[root@ceph4 ~]# ls
anaconda-ks.cfg  Ceph.repo  Desktop  Documents  Downloads  initial-setup-ks.cfg  Music  OpenStack.repo  Pictures  Public  rhel_dvd.repo  rhel_updates.repo  Templates  Videos
[root@ceph4 ~]#

125  ceph-deploy new node1
  126  exit
  127  ssh-key-gen
  128  ssh-keygen
  129  ssh-id-copy node3
  130  ssh-copy-id node3
  131  ssh-copy-id node2
  132  ssh-copy-id node1
  133  ssh-copy-id ceph4
  134  ssh node3
  135  ssh node2
  136  ssh node1
  137  pwd
  138  cd ceph-deploy/
  139  ll
  140  ceph-deploy new node1
  141  ll
  142  vi ceph.conf
  143  ceph-deploy install ceph4 node1 node2 node3
  144  ll
  145  ceph-deploy mon create-initial
  146  ll
  147  ssh node2
  148  ssh node3
  149  ceph-deploy osd prepare node2:/var/local/osd0 node3:/var/local/osd1
  150  ceph-deploy osd activate node2:/var/local/osd0 node3:/var/local/osd1
  151  ceph-deploy admin ceph4 node1 node2 node3
  152  sudo chmod +r /etc/ceph/ceph.client.admin.keyring
  153  ceph health
  154  sudo ceph -s
  155  history
[ceph@ceph4 ceph-deploy]$

=============================================

[root@node3 yum.repos.d]# history
    1  pwd
    2  hostnamectl set-hostname node3
    3  exit
    4  yum clean all
    5  pwd
    6  cd /etc/yum.repos.d/
    7  ll
    8  cd yum.repos.d/
    9  ls
   10  mv * ../
   11  yum repolist
   12  yum repolist all
   13  yum update all
   14  yum update -y
   15  vi /etc/hosts
   16  vi /etc/cron.hourly/ntpupdate
   17  systemctl status NetworkManager
   18  systemctl stop NetworkManager
   19  systemctl status NetworkManager
   20  systemctl disable  NetworkManager
   21  systemctl status NetworkManager
   22  systemctl status firewalld
   23  systemctl stop firewalld
   24  systemctl disable  firewalld
   25  systemctl status firewalld
   26   getenforce
   27  setenforce 0
   28   getenforce
   29  yum install ntp* -y
   30  sestatus
   31  visudo
   32  history
=======================================node 2================

[root@node2 yum.repos.d]# history
    1  clear
    2  yum clean all
    3  yum repolist
    4  yum repolist all
    5  pwd
    6  ll
    7  cd /etc/yum.repos.d/
    8  ll
    9  cd yum.repos.d/
   10  ls
   11  pwd
   12  mv * ../
   13  ll
   14  pwd
   15  cd ..
   16  ll
   17  yum clean all
   18  yum repolist
   19  yum repolist all
   20  yum update -y
   21  vi /etc/hosts
   22  pwd
   23  vi /etc/cron.hourly/ntpupdate
   24  systemctl status NetworkManager
   25* systemctl stop NetworkManag
   26  systemctl status NetworkManager
   27  systemctl disable  NetworkManager
   28  systemctl status NetworkManager
   29  systemctl status firewalld
   30  systemctl stop firewalld
   31  systemctl disable  firewalld
   32   getenforce
   33  setenforce 0
   34   getenforce
   35  yum install ntp* -y
   36  sestatus
   37  visudo
   38  history
[root@node2 yum.repos.d]#
=====================================node 1==============================

 45  hostnamectl set-hostname node1
   46  exit
   47  df -h
   48  yum repolist
   49  yum clean all
   50  yum repolist all
   51  yum repolist
   52  pwd
   53  cd /etc/yum.repos.d/
   54  ls
   55  cd yum.repos.d/
   56  ls
   57  pwd
   58  mv * ../
   59  yum clean all
   60  yum repolist all
   61  yum repolist 
   62  yum update -y
   63  vi /etc/hosts
   64  vi /etc/cron.hourly/ntpupdate
   65  systemctl status NetworkManager
   66  systemctl status firewalld
   67   getenforce
   68  setenforce 0
   69   getenforce
   70  yum install ntpd
   71  yum install ntp* -y
   72  pwd
   73  ls
   74  cd /etc/
   75  vi ntp.conf 
   76  sestatus
   77  history
   78  sestatus
   79  visudo
   80  history
[root@node1 etc]# 

=====================================

[root@node1 cron.hourly]# pwd
/etc/cron.hourly
[root@node1 cron.hourly]# cat ntpupdate 
ntpdate 192.168.122.175
[root@node1 cron.hourly]# 

========================[root@node2 cron.hourly]# pwd
/etc/cron.hourly
[root@node2 cron.hourly]# cat ntpupdate 
ntpdate 192.168.122.175
[root@node2 cron.hourly]# 

===================================

[root@ceph4 ~]# cd /etc/yum.repos.d/
[root@ceph4 yum.repos.d]# ls
ceph.repo  OpenStack.repo  redhat.repo  rhel_dvd.repo  rhel_updates.repo
[root@ceph4 yum.repos.d]# pwd
/etc/yum.repos.d
[root@ceph4 yum.repos.d]# cd /root
[root@ceph4 ~]# ls
anaconda-ks.cfg  Ceph.repo  Desktop  Documents  Downloads  initial-setup-ks.cfg  Music  OpenStack.repo  Pictures  Public  rhel_dvd.repo  rhel_updates.repo  Templates  Videos
[root@ceph4 ~]# ll
total 12
-rw-------. 1 root root 1663 Jan  8 19:30 anaconda-ks.cfg
drwx------. 9 root root 4096 Dec 22 15:04 Ceph.repo
drwxr-xr-x. 2 root root    6 Jan 28 11:17 Desktop
drwxr-xr-x. 2 root root    6 Jan 28 11:17 Documents
drwxr-xr-x. 2 root root    6 Jan 28 11:17 Downloads
-rw-r--r--. 1 root root 1711 Jan  8 19:37 initial-setup-ks.cfg
drwxr-xr-x. 2 root root    6 Jan 28 11:17 Music
drwx------. 3 root root   25 Dec 22 15:04 OpenStack.repo
drwxr-xr-x. 2 root root    6 Jan 28 11:17 Pictures
drwxr-xr-x. 2 root root    6 Jan 28 11:17 Public
drwx------. 3 root root   16 Dec 22 14:57 rhel_dvd.repo
drwx------. 3 root root   25 Dec 22 15:04 rhel_updates.repo
drwxr-xr-x. 2 root root    6 Jan 28 11:17 Templates
drwxr-xr-x. 2 root root    6 Jan 28 11:17 Videos
[root@ceph4 ~]# pwd
/root
[root@ceph4 ~]# cat Ceph.repo/
cat: Ceph.repo/: Is a directory
[root@ceph4 ~]# cd Ceph.repo/
[root@ceph4 Ceph.repo]# ls
0.80.8  calamari-minions  calamari-server  ceph-deploy  epel  rhel-7-server-optional-rpms  rhel-7-server-rh-common-rpms
[root@ceph4 Ceph.repo]# ll
total 12
drwx------. 3 root root 4096 Dec 22 15:04 0.80.8
drwx------. 3 root root 4096 Dec 22 15:04 calamari-minions
drwx------. 3 root root 4096 Dec 22 15:04 calamari-server
drwx------. 3 root root   87 Dec 22 15:04 ceph-deploy
drwx------. 4 root root   36 Dec 22 15:04 epel
drwx------. 4 root root   36 Dec 22 15:04 rhel-7-server-optional-rpms
drwx------. 4 root root   36 Dec 22 15:04 rhel-7-server-rh-common-rpms
[root@ceph4 Ceph.repo]# cd ../rhel_dvd.repo/
[root@ceph4 rhel_dvd.repo]# ls
dvd
[root@ceph4 rhel_dvd.repo]# cd dvd/
[root@ceph4 dvd]# ls
addons  EFI  EULA  GPL  images  isolinux  LiveOS  media.repo  Packages  release-notes  repodata  RPM-GPG-KEY-redhat-beta  RPM-GPG-KEY-redhat-release  TRANS.TBL
[root@ceph4 dvd]# ll
total 352
drwx------.  4 root root     52 Feb 19  2015 addons
drwx------.  3 root root     17 Feb 19  2015 EFI
-rwxrwxrwx.  1 root root   8266 Apr  4  2014 EULA
-rwxrwxrwx.  1 root root  18092 Mar  6  2012 GPL
drwx------.  3 root root     54 Feb 19  2015 images
drwx------.  2 root root   4096 Feb 19  2015 isolinux
drwx------.  2 root root     41 Feb 19  2015 LiveOS
-rwxrwxrwx.  1 root root    114 Feb 19  2015 media.repo
drwx------.  2 root root 229376 Feb 19  2015 Packages
drwx------. 24 root root   4096 Feb 19  2015 release-notes
drwx------.  2 root root   4096 Feb 19  2015 repodata
-rwxrwxrwx.  1 root root   3375 Feb  2  2015 RPM-GPG-KEY-redhat-beta
-rwxrwxrwx.  1 root root   3211 Feb  2  2015 RPM-GPG-KEY-redhat-release
-rwxrwxrwx.  1 root root   1568 Feb 19  2015 TRANS.TBL
[root@ceph4 dvd]# cd ../../rhel_updates.repo/
You have new mail in /var/spool/mail/root
[root@ceph4 rhel_updates.repo]# ls
RHEL7-Errata
[root@ceph4 rhel_updates.repo]# cd RHEL7-Errata/
[root@ceph4 RHEL7-Errata]# ll
total 8
drwx------. 2 root root 4096 Dec 22 15:04 Packages
drwx------. 2 root root 4096 Dec 22 15:04 repodata
[root@ceph4 RHEL7-Errata]# 

====================================

root@ceph4 RHEL7-Errata]# cd /etc/yum.repos.d/
[root@ceph4 yum.repos.d]# ls
ceph.repo  OpenStack.repo  redhat.repo  rhel_dvd.repo  rhel_updates.repo
[root@ceph4 yum.repos.d]# ll
total 20
-rw-r--r--. 1 root root 775 Jan 14 04:38 ceph.repo
-rw-r--r--. 1 root root 147 Jan 14 04:54 OpenStack.repo
-rw-r--r--. 1 root root 358 Jan 14 05:15 redhat.repo
-rw-r--r--. 1 root root 113 Jan 14 05:03 rhel_dvd.repo
-rw-r--r--. 1 root root 143 Jan 14 05:04 rhel_updates.repo
[root@ceph4 yum.repos.d]# cat ceph.repo
[Ceph]
name=Ceph for RHEL7
baseurl=file:///root/Ceph.repo/0.80.8

enabled=1
gpgcheck=0

[Ceph-deploy]
name=Ceph deploy
baseurl=file:///root/Ceph.repo/ceph-deploy
enabled=1
gpgcheck=0

[Calamari-minions]
name=Calamari Minions
baseurl=file:///root/Ceph.repo/calamari-minions
enabled=1
gpgcheck=0

[Calamari-server]
name=Calamari Server
baseurl=file:///root/Ceph.repo/calamari-server
enabled=1
gpgcheck=0

[rhel7-epel]
name=Extras Packages for RHEL7
baseurl=file:///root/Ceph.repo/epel
enabled=1
gpgcheck=0

[rhel7-optional]
name=Optional Packages for RHEL7
baseurl=file:///root/Ceph.repo/rhel-7-server-optional-rpms
enabled=1
gpgcheck=0

[rh-common]
name=Red Hat Common Packages for RHEL7
baseurl=file:///root/Ceph.repo/rhel-7-server-rh-common-rpms
enabled=1
gpgcheck=0
[root@ceph4 yum.repos.d]# ls
ceph.repo  OpenStack.repo  redhat.repo  rhel_dvd.repo  rhel_updates.repo
[root@ceph4 yum.repos.d]# cat OpenStack.repo
[OpenStack]
name=Red Hat Enterprise Linux OpenStack Platform 6.0 for RHEL 7
baseurl=file:///root/OpenStack.repo/RH7-RHOS-6.0/
enabled=1
gpgcheck=0
[root@ceph4 yum.repos.d]# cat redhat.repo
#
# Certificate-Based Repositories
# Managed by (rhsm) subscription-manager
#
# *** This file is auto-generated.  Changes made here will be over-written. ***
# *** Use "subscription-manager repo-override --help" if you wish to make changes. ***
#
# If this file is empty and this system is subscribed consider
# a "yum repolist" to refresh available repos
#[root@ceph4 yum.repos.d]# ls
ceph.repo  OpenStack.repo  redhat.repo  rhel_dvd.repo  rhel_updates.repo
[root@ceph4 yum.repos.d]# cat rhel_dvd.repo
[rhel_dvd]
gpgcheck = 0
enabled = 1
baseurl = file:///root/rhel_dvd.repo/dvd
name = Remote classroom copy of dvd
[root@ceph4 yum.repos.d]# ls
ceph.repo  OpenStack.repo  redhat.repo  rhel_dvd.repo  rhel_updates.repo
[root@ceph4 yum.repos.d]# cat rhel_updates.repo
[rhel_updates]
gpgcheck = 0
enabled = 1
baseurl = file:///root/rhel_updates.repo/RHEL7-Errata
name = Errata for RHEL 7 needed for RHEL OSP 6.0
[root@ceph4 yum.repos.d]#

leveraging Automation / CI/CD pipeline for Day2 activities? If yes what are those activities?

leveraging  Automation / CI/CD pipeline for Day2 activities? If yes what are those activities?

We leveraged Jenkins for CI/CD

The Benefits
Efficient Utilization of resource  – OpenStack allows us to set the desired level of over-subscription for CPU, Memory and Storage resources, and then to continuously monitor current allocation and utilization levels to tweak this accordingly, ultimately to get optimal utilization of resources.
End-To-End Automation – The entire test lifecycle is 100% automated, with very little manual intervention. This means very high developer productivity.
Better Visibility – Our DevOps folks have much better visibility into artifacts for current running builds and workloads. They are available for debugging and testing both via UI and API when needed.

The Ingredients (Requirements)
An OpenStack deployment configured with sufficient compute, memory, storage infrastructure to run our Jenkins CI/CD setup.
Vanilla VM images with base Operating System installed for our specific use case
Jenkins  to drive our CI/CD workflow pipeline
Our Version Control System (VCS)GIT to  manage our source code.

Specs for one of our internal environment
Show  entriesSearch:
Total Server config Memory Storage Price
100Ghz CPU 500GB Memory and 2.5TB Storage 5 AMD Opteron G5 Model Servers - 2 Sockets 3GHz x 12 cores each (HP Proliant DL385) 100 GB Memory each DDR3 SDRAM 500 GB Storage ~4K price


Over-Allocation:
Show  entriesSearch:
Compute Memory Storage
We heavily over-allocate compute in this environment - 5x or 6x but can go up to 16x Memory overallocation is allowed up to 1.5x but in practice, we try not to reach that level as it results in slow-downs of non-test workloads Storage is COW and heavily utilized. In our setup, Storage tends to be the bottleneck


Workload
Show  entriesSearch:
VMs run each day VMs run at any given point Common VM configs
~1000 VM instances get started and torn down each day ~200-300 VMs running at any given point 1 vCPU - 1GB Mem - 10GB Storage, 1 vCPU - 4GB Mem - 8GB Storage

Procecedure:-

1) A running OCATA Openstack
2) Configure our Continuous Integration (CI) Server Jenkins


The Workflow
Step 1 – Developer pushes a changeset to Git
The moment a developer is ready to push a change to Git, a private branch gets created with a specific name pattern.

The Jenkins  builder is watching for activity on branches with this pattern. Once noticed, it pulls the changes from the branch to start the build chain process.

Step 2 – Run Unit-Tests and create build artifacts.
The first step of the chain is to do basic validation of the change by running unit tests. Jenkins slave is spawned to run unit tests on the component that the software changeset touches, as well as each dependent components. Any failures in unit tests halt the job immediately and the developer is notified.
If all the unit tests pass, build scripts specific to Platform9 are run to create build artifacts corresponding to our deployment.
NOTE This part will be specific to our own environment.

Step 3 – Deploy a Virtual Machine ‘Pod’
At this point, we are ready to trigger our integration tests. The Jenkins builder talks to our internal deployment of Platform9 and creates a Virtual Machine ‘Pod’. A Pod is simply a collection of golden Virtual Machine images needed to test out a given change. We standardize on a single Pod configuration for Platform9, you might have multiple Pods created in our environment – each specific to a given use case.

Platform9’s Pod consists of:

One or more Platform9 ‘controller’ VMs, deployed with Platform9 specific code
One or more database VMs
One or more hypervisor VMs to act as ‘hosts’ for our testing
The Jenkins builder communicates with Platform9 via REST APIs and deploys the Pod.

Step 4 – Configure the Virtual Machine ‘Pod’
Once the Pod is deployed, Jenkins builder communicates with Platform9 via REST APIs to configure the following:

– The Virtual Machines deployed within the Pod are Tagged with information about the specific build version being created, name of the user deploying the pod, etc. This data is useful for later tracking of the running Pods.
– Each VM in the Pod is customized with a default hostname, injected with ssh keys and a starter Ansible script to enable further customization via Ansible.  Platform9 makes all this customization easy and possible.
– Once the Pod is up and running, Ansible scripts running in the Jenkins builder communicate with the Pod and customizes the VMs to have a specific identity. This is the step that deploys Platform9 specific packages in one or more of the VMs in the Pod.

Step 5 – Create multiple copies of the ‘Pod’- run integration tests
Once the Pod is configured and ready, Jenkins builder snapshots the Pod to create new set of golden images. It then creates multiple copies of the Pod. Each individual copy is utilized for running a specific set of integration tests.

At this point, the Jenkins builder powers-on multiple Pod copies in parallel. Each Pod is then utilized to simulate a different configuration and run corresponding integration tests in parallel.

Step 6 – Pass or fail
If all integration tests pass, the changeset is automatically pushed into main git branch. For any failures, the appropriate developer is notified. All the build configurations are saved so that the developer can log into the Platform9 UI and work on appropriate Pods to debug the issues.

Step 7 – Cleanup
Finally a scheduled job runs periodic cleanup of usused VMs based on the tags.

How to use TMSH

How to use tmsh in F5 BIG-IP


Basic
§  TMSH can use from BIG-IP V10.0.0.
§  BIG-IP V11 don't use 'bigpipe' command. So you must use tmsh.

login / quit

# tmsh
(tmos)#
(tmos)#quit
#

Tab : Commands List

# tmsh
(tmos)#
(tmos)#   <- o:p="" tab="">
Modules:
  /             auth          cli           gtm           ltm           net           sys           util          wom
Commands:
  create        exit          list          quit          restart       show          submit
  delete        help          load          reboot        run           start
  edit          install       modify        reset-stats   save          stop
(tmos)#

? : Help

# tmsh
(tmos)# ?
Modules:
  /            TMOS Command Line Interface
  auth         User accounts and authentication
  cli          Local user settings and configuration transactions
  gtm          Global Traffic Manager
  ltm          Local Traffic Manager
  net          Network configuration
  sys          General system configuration
  util         Utility programs that can be run from within tmsh
  wom          WAN Optimization
Commands:
  create       Create new configuration items
  delete       Remove configuration items
  edit         Update configuration using a text editor
  exit         Exit the current command mode
  help         View tmsh man pages
  install      Install an image or hotfix to a volume
  list         View configuration and settings
  load         Replace running configuration with configuration files
  modify       Update existing configuration items
  quit         Quit tmsh
  reboot       Reboot the system
  reset-stats  Reset runtime statistics
  restart      Restart BIG-IP services
  run          Run an external program
  save         Save the running configuration to configuration files
  show         View runtime information, statistics and status
  start        Start BIG-IP services
  stop         Stop BIG-IP services
  submit       Submit a batched transaction
(tmos)#
 
#
(tmos)# ltm
(tmos.ltm)# ?
Modules:
  /                     TMOS Command Line Interface
  /auth                 User accounts and authentication
  /cli                  Local user settings and configuration transactions
  /gtm                  Global Traffic Manager
  /ltm                  Local Traffic Manager
  /net                  Network configuration
  /sys                  General system configuration
  /util                 Utility programs that can be run from within tmsh
  /wom                  WAN Optimization
  auth                  Virtual server authentication configuration
  global-settings       Local Traffic Manager options
  monitor               LTM monitor templates
  persistence           Virtual server persistence configuration
  profile               Virtual server profile configuration
Components:
  data-group            Data group (aka. Class) Configuration
  default-node-monitor  Configure the default-monitor rule
  nat                   Network address translation configuration
  node                  Node specific pool member configuration
  pool                  Load balancing pool configuration
  rule                  iRules configuration
  snat                  Secure network address translation (SNAT) configuration
  snat-translation      SNAT translation address configuration
  snatpool              Collections of SNAT translation addresses
  traffic-class         Traffic Class Configuration
  virtual               Virtual server configuration
  virtual-address       Virtual server IP address configuration
Commands:
  create                Create new configuration items
  delete                Remove configuration items
  edit                  Update configuration using a text editor
  exit                  Exit the current command mode
  help                  View tmsh man pages
  install               Install an image or hotfix to a volume
  list                  View configuration and settings
  load                  Replace running configuration with configuration files
  modify                Update existing configuration items
  quit                  Quit tmsh
  reboot                Reboot the system
  reset-stats           Reset runtime statistics
  restart               Restart BIG-IP services
  run                   Run an external program
  save                  Save the running configuration to configuration files
  show                  View runtime information, statistics and status
  start                 Start BIG-IP services
  stop                  Stop BIG-IP services
  submit                Submit a batched transaction
(tmos.ltm)# list rule
ltm rule TEST {
(abbr)

How to use tmsh.

Method1
# tmsh show sys version

Method2
# tmsh
(tmos)# show net vlan VLAN_External

Method 3
(tmos)# net
(tmos.net)# self
(tmos.net.self)# list

tmsh tree

/ 
  +--- auth --- ldap
  |             user
  |
  +--- cli ---- history
  |
  |
  +--- gtm ---   pool
  |              link
  |
  |
  +--- ltm --- node
  |            pool
  |            virtual
  |
  +--- net --- vlan
  |            route
  |
  +--- sys --- log
  |            httpd
  |
  +-- util --- ping
  |            dig
  |
  +--- wom --- verify-config