Pages

Monday, January 4, 2016

Github / Git

GithHud Identification

git config --global user.email "david.pasek@gmail.com"
git config --global user.name "davidpasek" 

GithHub SSH authentication 

// *********** github SSH public key
ssh-keygen -C "david.pasek@gmail.com"
Add pub key (.ssh/id_rsa/id_rsa.pub) to GitHub ... Settings > SSH and GPG keys > New SSH key
 
// *********** Test if your ssh authentication works
ssh -T git@github.com 

// *********** Clone your existing repostiory - davidpasek/uw.cz-gitops
git clone git@github.com:davidpasek/uw.cz-gitops
or
git clone git@github.com:davidpasek/uw.cz-gitops.git 

Create new GitHub repository

// *********** Create new git repository from directory
Create a directory to contain the project.
Go into the new directory.
Type git init
Write some code.
Type git add -A to add all the files from current directory.
Type git commit
 
// *********** You must create the repository on GitHub manually
Type git remote add origin git@github.com:davidpasek/[REPOSITORY-NAME].git
Type git push push --set-upstream origin main

Clone existing GitHub repository

// *********** Clone existing github repository with username and token
git clone https://github.com/davidpasek/math4kids
 
// *********** Clone existing github repository with SSH key
git clone git@github.com:davidpasek/uw.cz-gitops.git

// *********** Add file to github

git status
git add file.html
git commit -m "Commit comment"

// push back to github
git push

// pull out from github
git pull

// *********** Add all files in local directory to github
git add -A
git commit -m "Initial add of files into the repository"
git push

// *********** Working with github - commit changes
git status
git pull
... working with files
git commit -a
git push
git status

GLOBAL CONFIG
git config --global user.name "David Pasek"
git config --global user.email david.pasek@gmail.com

Save credentials
$ git config credential.helper store
$ git push http://example.com/repo.git
Username: <type your username>
Password: <type your password>

[several days later]
$ git push http://example.com/repo.git
[your credentials are used automatically]

Q&A
Q: What is the difference between git clone and git checkout?
A: 
The man page for checkout: http://git-scm.com/docs/git-checkout
The man page for clone: http://git-scm.com/docs/git-clone
To sum it up, clone is for fetching repositories you don't have, checkout is for switching between branches in a repository you already have.

Links:
Visual GIT reference - http://marklodato.github.io/visual-git-guide/index-en.html
GIT Simple Guide - http://rogerdudler.github.io/git-guide/
How To Use Git Effectively -  https://www.digitalocean.com/community/tutorials/how-to-use-git-effectively

Monday, December 21, 2015

Code Samples

FYI posilam odkaz na novou iniciativu, kde VMware developeri a komunita sdileji priklady svych scriptu, workflows apod. pro ruzne ulohy, muze se hodit..


Wednesday, December 9, 2015

Wednesday, September 23, 2015

VMware’s Online Depot for VMware Image Builder

I am posting this because for some odd reason it seems nearly impossible to find this in any of Vmware’s documentation on ImageBuilder.  It mentions you can add online repo’s but never gives a link to their online repo with all the ESXi builds.

I recently ran across some links and blogs that listed that path.  So, in order to get the online depot imported use this:
Add-EsxSoftwareDepot https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml

esxcli software vib install -d Update-Depot

Saturday, September 12, 2015

VMware PowerCLI update

$esxcli = Get-EsxCli -VMhost 192.168.123.123
$esxcli.software.sources.profile.list("/vmfs/volumes/PRG0100-NETAPP02B-ISOARCHIVE01/ISO/VMware/5.5/ESXi550-201505002-build2718055.zip")
#$esxcli.software.profile.update($null, "/vmfs/volumes/PRG0100-NETAPP02B-ISOARCHIVE01/ISO/VMware/5.5/ESXi550-201505002-build2718055.zip", $null, $null, $null, $null, $null, "ESXi-5.5.0-20150504001-standard", $null)

Wednesday, September 9, 2015

Force10 ECMP & static Routes

Hi,
Just to clarify for group (as I got few email on this)
When a static route is configured it will be loaded in the routing table if the next interface (physical or vlan) is up but they won’t be any arp check on the next-hop (unless you set the PBR rules for that)
So a use case would be :

SW1 : static route to reach Lo(Sw2) / next hop = SW2 IP (in int vlan 2)
SW2 : static route to reach Lo(Sw1) / next hop = SW1 IP (in int vlan 2)

Lo(Sw1) ----- Sw1_Ten 0/1 --- (vlan inter 2)--- Sw2_Ten 0/2 ----- Lo(Sw2)

if the vlan 2 has other ports that are up, even though the link that interconnects sw1 and sw2 goes (physically) down,  the packet to the loopback get black hole (no route re-calculation since the static route is still in the routing table)
Regards,
Stéphane

From: Aich, Stephane
Sent: mardi 1 septembre 2015 22:42
To: Guerrero, Martin; WW Networking Domain
Subject: RE: ECMP & static Routes

Hi,
We’re not checking next hop availability (thought arp) for static routes you need to use PBR rules for that.
All of this being not related to ECMP.
Regards,
Stéphane

From: Guerrero, Martin
Sent: mardi 1 septembre 2015 20:27
To: WW Networking Domain
Subject: ECMP & static Routes

Dell - Internal Use - Confidential
Hi All,

I´m doing test with ECMP and static routes in order to provide route redundancy.

I configured the following:

ip ecmp weighted
ip route 12.1.1.9/32 10.197.107.235 weight 10
ip route 12.1.1.9/32 10.197.107.234 weight 20

It is not working when the first gateways goes down

It is something wrong on my configuration?

Any comment will be very appreciated

Regards.

Martin…