Proxmox installation on debian jessie

1. Add proxmox ve repository

echo "deb http://download.proxmox.com/debian jessie pve-no-subscription" > /etc/apt/sources.list.d/pve-install-repo.list

2. Add proxmox key

wget -O- "http://download.proxmox.com/debian/key.asc" | apt-key add -

3. Update system

apt update && apt dist-upgrade

4. Install proxmox-ve

apt-get install proxmox-ve ssh postfix ksm-control-daemon open-iscsi systemd-sysv

5. Connect to the proxmox admin web interface

https://youripaddress:8006

 

Install docker compose on ubuntu 16.04 / centos 7

  1. Download docker compose
sudo curl -L https://github.com/docker/compose/releases/download/1.18.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose

The latest version of docker compose can be found at https://github.com/docker/compose/releases

2. Set execute permission to the docker-compose

sudo chmod +x /usr/local/bin/docker-compose

3.   Test installation

$ docker-compose --version
docker-compose version 1.18.0, build 8dd22a9

 

4. Create docker-compose.yml file and add entries

eg:-

nginx:
 image: nginx
 ports:
 - "80:80"

5. To run the whole system

docker-compose up -d

 

 

 

Docker installation on ubuntu

  • Update the packages in the server

$ sudo apt-get update

  • Add docker GPG key

$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add –

  • Setup stable docker repository

$ sudo add-apt-repository “deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable”

  • Install docker-ce

$ sudo apt-get install docker-ce

  • Install a particular version of docker-ce

$ sudo apt-get install docker-ce=<VERSION>

  • Get system wide information about docker

$ sudo docker info

 

Proxmox backup and restore

To backup a vm and restore in a remote proxmox

1. How to backup

vzdump <vm id>

The backup will be created in /var/lib/vz/dump/ folder.

Note: qm list – will list the VM’s in that proxmox server

2. Restore in remote proxmox

Copy (scp) the backup .vma file to the remote server folder /var/lib/vz/images/.

cd /var/lib/vz/images/

qmrestore <backup-file> <vm-id>  –storage <storage-name>

eg: qmrestore backup-vm.vma 100 –storage datastore1

Jenkins backup and Restore

To backup Jenkins, backup the JENKINS_HOME folder.

To restore Jenkins, sync back the JENKINS_HOME folder and restart jenkins.

JENKINS_HOME  directory structure  looks like the following:

JENKINS_HOME
 +- config.xml     (jenkins root configuration)
 +- *.xml          (other site-wide configuration files)
 +- userContent    (files in this directory will be served under your http://server/userContent/)
 +- fingerprints   (stores fingerprint records)
 +- plugins        (stores plugins)
 +- workspace (working directory for the version control system)
     +- [JOBNAME] (sub directory for each job)
 +- jobs
     +- [JOBNAME]      (sub directory for each job)
         +- config.xml     (job configuration file)
         +- latest         (symbolic link to the last successful build)
         +- builds
             +- [BUILD_ID]     (for each build)
                 +- build.xml      (build result summary)
                 +- log            (log file)
                 +- changelog.xml  (change log)

 

Script to Backup Jenkins:

Backup Jobs configuration file :

 rsync -av --include='config.xml' --exclude='**/**/**' /var/lib/jenkins/jobs/ root@192.168.1.2:/var/lib/jenkins/jobs/

Backup main configuration files:

 rsync -av --include='config.xml' --exclude='**/**/**' /var/lib/jenkins/plugins/ root@192.168.1.2:/var/lib/jenkins/plugins/

Backup main configuration files:

 rsync -av --include='*.xml' --exclude='**/**/**' /var/lib/jenkins/ root@192.168.1.2:/var/lib/jenkins/

Backup users configuration :

 rsync -av /var/lib/jenkins/user* root@192.168.1.2:/var/lib/jenkins/

Script to restore Jenkins:

Copy back the /var/lib/jenkins/ folder in 192.168.1.2 to the Jenkins main server and restart the jenkins service.

rsync -av /var/lib/jenkins/ roo@192.168.1.1:/var/lib/jenkins/
systemctl restart jenkins

 

 

 

Install Jenkins in Centos 6.8

1. Install Java

$ yum install java

2.  Installing the Jenkins repo

$ wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo

3.  Import the verification key

$ rpm –import https://jenkins-ci.org/redhat/jenkins-ci.org.key

4. Install Jenkins

$ yum install jenkins

Note: Download and install RHEL repo if needed,

p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff}
span.s1 {font-variant-ligatures: no-common-ligatures}

 

wget http://ftp.riken.jp/Linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm

p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff}
span.s1 {font-variant-ligatures: no-common-ligatures}

rpm -ivh epel-release-6-8.noarch.rpm

5. Start Jenkins

$ service jenkins start

6. Access the Jenkins using the url http://<ip-address>:8080
Then copy and paste the key  Administrator password from the file /var/lib/jenkins/secrets/initialAdminPassword

p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff}
span.s1 {font-variant-ligatures: no-common-ligatures}

 

7.  Select and install the required plugins

 

8. Create user first Admin User

 

HP MSA Storage P2000 G3 – assigning new IP address using SSH

1. Login to  management console using SSH

2.  Show the current IP address setting using following command

show network-parameter

3.  Change IP address of controller A using following command

set network-parameters ip <IP_ADDRESS> netmask <NETMASK> gateway <GATEWAY> controller a

4. Restart controller A

restart mc a

5. Change IP address of contoller B using following command

set network-parameters ip <IP_ADDRESS> netmask <NETMASK> gateway <GATEWAY> controller b

6. restart controller B

restart mc a

 

RHEL 6.5 partition 3TB harddisk using gparted

RHEL 6.5 partition 3TB harddisk using gparted

For my senario,the fdisk -l shows 3TB hdd connected as /dev/sdb

1. So started parted using ,
parted /dev/sdb

2.  create gpt disk label,
mklabel gpt

3. change unit to TB
unit TB

4.  create 3TB partition
mkpart primary 0.00TB 3.00TB

5. fdisk -l , shows that a new partition /dev/sdb1 is created of 3TB in size

 

5.   To format as EXT4 filesystem,
mkfs.ext4 /dev/sdb1

Openstack Newton on CentOS 7 using packstack

1. Prerequisites
1.1 Hardware requirement 4GB RAM
1.2 $systemctl disable firewalld$systemctl stop firewalld$systemctl disable NetworkManager$systemctl stop NetworkManager$systemctl enable network$systemctl start network2. Setup software repositories

2.1  yum install -y
centos-release-openstack-newton
2.2 update the OS
yum update -y
3. Install packstack
4. Generate the answer file using packstack
5. Edit the answers.txt file and enable the required features..
6. Install openstack using the answer file

7.  Once the installation is complete , login to horizon using http://IP-address/dashboard
u: admin
p: password set for horizon in answer file