This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#################################################### | |
# Script Name: CreateTenantOfferWithPowerShell.ps1 | |
# Author Name: Carlos Vargas | |
# Version : 1.0 | |
#################################################### | |
clear | |
Write-Host "**************** Azure Stack Create Tenant Offers *********************" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Author: Carlos Vargas | |
# Version 1:0 | |
# Scriptname: Get-AzureStackNatIP.ps1 | |
$natip = Invoke-Command -ComputerName mas-bgpnat01 -ScriptBlock {Get-NetIPConfiguration | ? {$_.IPv4DefaultGateway -ne $null } | Foreach {$_.IPv4Address.IPAddress}} | |
Write-Output "Your IP Address for VPN is : $natip" | Out-File $env:userprofile\downloads\natip.txt | |
Get-Content $env:userprofile\downloads\natip.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
/sbin/route add -net 192.168.102.0/27 -interface $1 | |
/sbin/route add -net 192.168.105.0/27 -interface $1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Author: Carlos Vargas | |
# Version 1:0 | |
# Scriptname: Get-AzureStackRootCAcert.ps1 | |
Write-Verbose "Retrieving Azure Stack Root Authority certificate..." -Verbose | |
$cert = Invoke-Command -ComputerName mas-ca01 -ScriptBlock { Get-ChildItem cert:\currentuser\root | where-object {$_.Subject -eq "CN=AzureStackCertificationAuthority, DC=AzureStack, DC=local"} } | |
if($cert -ne $null) | |
{ | |
if($cert.GetType().IsArray) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# | |
mkdir vmware | |
cd vmware | |
wget https://github.com/vmware/docker-volume-vsphere/releases/download/1.0.beta/docker-volume-vsphere-1.0.beta-1.x86_64.rpm | |
wget https://github.com/vmware/docker-volume-vsphere/releases/download/1.0.beta/docker-volume-vsphere_1.0.beta_amd64.deb | |
wget https://github.com/vmware/docker-volume-vsphere/releases/download/1.0.beta/vmware-esx-vmdkops-1.0.beta.vib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Author: Carlos Vargas (ContainerKing.Ninja) | |
# Script: centos4mesos.sh | |
echo "Configure Hostname Script" | |
curl https://gitlab.com/carlosvargas/devops/raw/master/CentOS/hostname>/tmp/hostname && chmod +x /tmp/hostname && sudo cp /tmp/hostname /etc/init.d/ | |
ln -s /etc/init.d/hostname /etc/rc3.d/S11hostname | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Author: Carlos Vargas (ContainerKing.Ninja) | |
# Filename: /etc/dhcp/dhclient.d/hostname | |
# Purpose: Used by dhclient-script to set the hostname of the system | |
# to match the DNS information for the host as provided by | |
# DHCP. | |
# | |
hostname=$(ip addr show eth0 | grep "inet\b" | awk '{print $2}' | cut -d/ -f1 | awk -F'.' '{print $1"-"$2"-"$3"-"$4}') | |
echo $hostname > /etc/hostname | |
hostname $hostname |