Amazon Ad

Featured Post

Friday, July 05, 2019

Friday, June 21, 2019

Kubernetes Cheatsheet - Most Useful Commands in One Place


Overview

The following is the most concise Kubernetes/K3S/K8S commands list.

General

kubectl create secret generic --from-literal=password=test123
kubectl get secrets

Pods & Nodes

kubectl get nodes
kubectl describe nodes
kubectl apply -f yml
kubectl get deploy
kubectl get pods -o wide
kubectl exec -it node bash
kubectl get svc —watch

kubectl version -o yaml
kubectl get rs
kubectl rollout status
Kubectl rollout History
kubectl apply —record=true

Install inside nodes for basic networking stuff:


apt-get install iputils-ping curl dnsutils iproute2 -y

Docker related

docker image build -t name something/something:0.1
docker image ls
docker login
docker image push image name

Storage related

kubectl get sc
kubectl describe sc
kubectl get pvc
kubectl get pv
kubectl describe pv


Scaling

kubectl get hpa
kubectl get clusterrolebindings
kubectl get ns

Certificates

openssl genrsa -out mia.key 2048
openssl req -new -key Mia.key -out Mia.csr -subj “/CN=Mia/O=orgname”
convert to .crt
OpenSSL x509 -req -in Mia.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out Mia.crt -days 365
kubectl config set-credentials mia —client-certificate=mia.crt —client-key=mia.key

Logins:

kubectl config set-context mia —cluster=clustername —namespace=ns1 —user=mia

kubectl use-context mia
kubectl config current-context

Sunday, February 03, 2019

esxcli profile commands


esxcli software sources profile list -d /vmfs/volumes/shares/storage/assman/install/VMware/vSphere_6.0/6.0U3/update-from-esxi6.0-6.0_update03.zip 
esxcli software sources profile list -d /vmfs/volumes/ds1/update-from-esxi6.0-6.0_update03.zip

esxcli software profile update -p ESXi-6.0.0-20170202001-standard -d /vmfs/volumes/ds1/update-from-esxi6.0-6.0_update03.zip

Useful OpenStack Neutron Commands


neutron subnet-create ext-net --name ext-subnet --allocation-pool start=172.21.50.1,end=172.21.50.100 --disable-dhcp --gateway 172.21.0.1 172.21.0.0/16
neutron subnet-create ext-net --name ext-subnet --allocation-pool start=172.21.50.1,end=172.21.50.100 --disable-dhcp --gateway 172.21.0.1 172.21.0.0/16

neutron net-create ext-net --shared --router:external True
neutron subnet-create ext-net --name ext-subnet --allocation-pool start=172.21.50.1,end=172.21.50.100 --disable-dhcp --gateway 172.21.0.1 172.21.0.0/16

neutron subnetpool-create --shared --is-default True --pool-prefix 172.21.3.0/24 --default-prefixlen 24 shared-default

router set --route destination=marketing_public,gateway=172.21.0.1 marketing-public-router

Tuesday, January 29, 2019

Some KVM Commands


virt-manager
virsh list —all
qemu-img create -f qcow2 -b vm6.qcow2 25G

Tuesday, January 22, 2019

DNS in PowerShell


Get-DnsClient
Set-DnsClientServerAddress -InterfaceIndex -ServerAddresses (“212.38.1.100”)
Add-Computer -DomainName “acme.com” -Credential (get-credential)

SuSE Updates


SuSEConnect -p sle-sdk/12/x86_64
zypper in -t srcpackage 'systemd'

zypper in -t pattern Basis-Devel
zypper in build

Update SuperMicro BIOS


Update bios:
sudo ./AlUpdate -f REDFISH_X10_377.bin -i lan -h 10.0.2.82 623 -u ADMIN -p ADMIN -r y

Monday, January 21, 2019

Jira and eazyBI Integration

Review the demo account:

  • https://eazybi.com/accounts/1000/cubes
  • https://eazybi.com/accounts/1000/cubes/Issues/


Using eazyBI with Jira

Create a moving time range

  1. Drag the Time measure to the Rows area.
  2. Create a calculated time range:
    1. Click Time.
    2. Click Calculated members.
    3. Click Define new.
    4. Enter Last 60 days.
    5. Enter:
Aggregate(Filter(
  [Time].[Day].Members,
  DateBetween([Time].CurrentMember.StartDate,'60 days ago','today')
))



Enable core files in SuSE

https://www.suse.com/support/kb/doc/?id=3054866

Sunday, January 13, 2019

How to make sound work again in a MacOS without a reboot


Sometimes, sound output in a MacBook laptop is gone. To restart the sound driver, kill the coreaudiod service - it will restart automatically and sound output will be restored:

John-MacBook-Pro:~ eyal$ ps -ax|grep corea
81524 ??         0:00.08 /System/Library/Frameworks/LocalAuthentication.framework/Support/coreauthd
82158 ??         0:00.35 /usr/sbin/coreaudiod
82163 ttys001    0:00.00 grep corea
John-MacBook-Pro:~ eyal$ sudo pkill coreaudiod
John-MacBook-Pro:~ eyal$ ps -ax|grep corea
81524 ??         0:00.08 /System/Library/Frameworks/LocalAuthentication.framework/Support/coreauthd
82167 ??         0:00.30 /usr/sbin/coreaudiod
82172 ttys001    0:00.00 grep corea

Saturday, January 12, 2019

How to add comments in apidoc apiSuccessExample

There seems to be no built-in support for comments, however, '//' seems to work. For example:


* @apiSuccessExample Example data on success - Create volume
* [{
*       "_id": "V1", // This is a comment

How to ignore LUN numbers in VMware


ESXi setting:
Scsi.CompareLUNNumber = 0 (default 1)

If set to 0, LUN numbers will NOT be considered to identify LUNs.

Multisession iSCSI


root@mktgmysql3:~#  iscsiadm --mode session
tcp: [1] 172.91.40.35:3260,1 iqn.2018-12.com.vendor:server2
root@mktgmysql3:~# iscsiadm --mode session -r 1 --op new
Logging in to [iface: default, target: iqn.2018-12.com.vendor:server2, portal: 172.91.40.35,3260] (multiple)
Login to [iface: default, target: iqn.2018-12.com.vendor:server2, portal: 172.91.40.35,3260] successful.
root@mktgmysql3:~# iscsiadm --mode session
tcp: [1] 172.91.40.35:3260,1 iqn.2018-12.com.vendor:server2
tcp: [2] 172.91.40.35:3260,1 iqn.2018-12.com.vendor:server2
root@mktgmysql3:~# iscsiadm --mode session -r 1 --op new
Logging in to [iface: default, target: iqn.2018-12.com.vendor:server2, portal: 172.91.40.35,3260] (multiple)
Login to [iface: default, target: iqn.2018-12.com.vendor:server2, portal: 172.91.40.35,3260] successful.
root@mktgmysql3:~# iscsiadm --mode session -r 1 --op new
Logging in to [iface: default, target: iqn.2018-12.com.vendor:server2, portal: 172.91.40.35,3260] (multiple)
Login to [iface: default, target: iqn.2018-12.com.vendor:server2, portal: 172.91.40.35,3260] successful.
root@mktgmysql3:~# iscsiadm --mode session -r 1 --op new
Logging in to [iface: default, target: iqn.2018-12.com.vendor:server2, portal: 172.91.40.35,3260] (multiple)
Login to [iface: default, target: iqn.2018-12.com.vendor:server2, portal: 172.91.40.35,3260] successful.
root@mktgmysql3:~# iscsiadm --mode session -r 1 --op new
Logging in to [iface: default, target: iqn.2018-12.com.vendor:server2, portal: 172.91.40.35,3260] (multiple)
Login to [iface: default, target: iqn.2018-12.com.vendor:server2, portal: 172.91.40.35,3260] successful.
root@mktgmysql3:~# iscsiadm --mode session -r 1 --op new
Logging in to [iface: default, target: iqn.2018-12.com.vendor:server2, portal: 172.91.40.35,3260] (multiple)
Login to [iface: default, target: iqn.2018-12.com.vendor:server2, portal: 172.91.40.35,3260] successful.
root@mktgmysql3:~# iscsiadm --mode session -r 1 --op new
Logging in to [iface: default, target: iqn.2018-12.com.vendor:server2, portal: 172.91.40.35,3260] (multiple)
Login to [iface: default, target: iqn.2018-12.com.vendor:server2, portal: 172.91.40.35,3260] successful.
root@mktgmysql3:~# iscsiadm --mode session
tcp: [1] 172.91.40.35:3260,1 iqn.2018-12.com.vendor:server2
tcp: [2] 172.91.40.35:3260,1 iqn.2018-12.com.vendor:server2
tcp: [3] 172.91.40.35:3260,1 iqn.2018-12.com.vendor:server2
tcp: [4] 172.91.40.35:3260,1 iqn.2018-12.com.vendor:server2
tcp: [5] 172.91.40.35:3260,1 iqn.2018-12.com.vendor:server2
tcp: [6] 172.91.40.35:3260,1 iqn.2018-12.com.vendor:server2
tcp: [7] 172.91.40.35:3260,1 iqn.2018-12.com.vendor:server2
tcp: [8] 172.91.40.35:3260,1 iqn.2018-12.com.vendor:server2
root@mktgmysql3:~#

Speed up LUN discovery in VMware ESXi


VMware ESXi scans all luns from 0 to 255. However, it is possible to limit the scan to a lower number by modifying the Disk.MaxLUN parameter to improve LUN discovery speed.

How to convert a standard LUN to RDM



Clean up stale iSCSI devices


esxcli storage core claiming unclaim -t device -d t10.IET_____000100170000000000000000000000000000000000000000esxcli storage core claiming unclaim -t vendor -v

For more information:

Wednesday, January 09, 2019

VDBench 4 Corner Performance Tests Configuration


* Four corners testing

messagescan=no
ios_per_jvm=300000

hd=default,vdbench=/home/john/vdb,user=root,shell=ssh,jvms=32
hd=localhost,system=srv31.acme.com
hd=storage1.acme.com,system=srv21.acme.com
hd=storage2.acme.com,system=srv22.acme.com
hd=storage3.acme.com,system=srv23.acme.com
hd=storage4.acme.com,system=srv24.acme.com
hd=storage5.acme.com,system=srv25.acme.com

sd=r100,lun=/dev/sdc,size=10g,openflags=o_direct,threads=128

* Workload Definitions

wd=r10_seqwrite32k,host=(localhost),sd=r10,xfersize=32768,rdpct=0,seekpct=sequential
wd=r10_seqread32k,host=(localhost),sd=r10,xfersize=32768,rdpct=100,seekpct=sequential

wd=r10_randwrite4k,host=(localhost),sd=r10,xfersize=4096,rdpct=0,seekpct=random
wd=r10_randread4k,host=(localhost),sd=r10,xfersize=4096,rdpct=100,seekpct=random

* Runs

*rd=r10_seqread32k,wd=r10_seqread32k,iorate=curve,curve=(95,100),elapsed=10,interval=5
*rd=r10_seqwrite32k,wd=r10_seqwrite32k,iorate=curve,curve=(95,100),elapsed=10,interval=5
*rd=r10_randread4k,wd=r10_randread4k,iorate=curve,curve=(95,100),elapsed=10,interval=5
*rd=r10_randwrite4k,wd=r10_randwrite4k,iorate=curve,curve=(95,100),elapsed=10,interval=5

Sunday, January 06, 2019

LUN Statistics in ONTAP Classic


toaster> lun stats -z
toaster> sysstat -s -i 1
 CPU     NFS    CIFS   iSCSI     Net   kB/s    Disk   kB/s   iSCSI   kB/s  Cache
                                  in    out    read  write      in    out    age
  2%       0       0       0       0      0       0      0       0      0   >60
  2%       0       0       0       0      0       0      0       0      0   >60
  2%       0       0       4      17      1       0      0      16      0   >60
  2%       0       0       0       1      0       0      0       0      0   >60
  2%       0       0       0       0      0       0      0       0      0   >60
  2%       0       0       0       0      0       0      0       0      0   >60
  4%       0       0       1       4      0       0    818       4      0   >60
  4%       0       0       0       0      0      12     32       0      0   >60
  2%       0       0       0       0      0       0      0       0      0   >60
  5%       0       0       7       6   1856    1747      0       0   1788   >60
  3%       0       0      14    1901     38       0      0    1826      0     9
  2%       0       0       2       9      1       0      0       8      0     9
  2%       0       0       0       1      0       0      0       0      0     9
  2%       0       0       0       0      0       0      0       0      0     9
  2%       0       0       0       0      0       0      0       0      0     9
  2%       0       0       0       1      0       0      0       0      0     9
  2%       0       0       1       5      0       0      0       4      0     9
  5%       0       0       0       0      0       0   1859       0      0     9
  4%       0       0       0       0      0       0   2290       0      0     9
--
Summary Statistics (   19 samples  1 secs/sample)
 CPU     NFS    CIFS   iSCSI     Net   kB/s    Disk   kB/s   iSCSI   kB/s  Cache
                                  in    out    read  write      in    out    age
Min
  2%       0       0       0       0      0       0      0       0      0     9
Avg
  2%       0       0       1     102     99      92    263      97     94   >60
Max
  5%       0       0      14    1901   1856    1747   2290    1826   1788   >60
toaster> lun stats
    /vol/vol0/lun1  (0 hours, 0 minutes, 30 seconds)
        Read (kbytes)   Write (kbytes)  Read Ops  Write Ops
        1754            1834            7         26
toaster>


Useful esxcli VAAI commands


~ # esxcli storage core device vaai status get
t10.IET_____000100010000000000000000000000000000000000000000
   VAAI Plugin Name:
   ATS Status: supported
   Clone Status: unsupported
   Zero Status: supported
   Delete Status: unsupported
~ #

~ # esxcli system settings advanced list -o /DataMover/HardwareAcceleratedMove
   Path: /DataMover/HardwareAcceleratedMove
   Type: integer
   Int Value: 1
   Default Int Value: 1
   Min Value: 0
   Max Value: 1
   String Value:
   Default String Value:
   Valid Characters:
   Description: Enable hardware accelerated VMFS data movement (requires compliant hardware)
~ #

~ # esxcli system settings advanced list -o /DataMover/HardwareAcceleratedInit
   Path: /DataMover/HardwareAcceleratedInit
   Type: integer
   Int Value: 1
   Default Int Value: 1
   Min Value: 0
   Max Value: 1
   String Value:
   Default String Value:
   Valid Characters:
   Description: Enable hardware accelerated VMFS data initialization (requires compliant hardware)
~ #

~ # esxcli system settings advanced list -o /VMFS3/HardwareAcceleratedLocking
   Path: /VMFS3/HardwareAcceleratedLocking
   Type: integer
   Int Value: 1
   Default Int Value: 1
   Min Value: 0
   Max Value: 1
   String Value:
   Default String Value:
   Valid Characters:
   Description: Enable hardware accelerated VMFS locking (requires compliant hardware)
~ #

Interesting Articles on Windows Server Cluster Shared Volumes



Cluster Shared Vols:

Check an update of an RPM without actually updating it


yum check-update