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
#!/usr/bin/env bash | |
export AZURE_LOCATION=westeurope | |
export CLUSTER_FQDN="ruzickap2aks.k8s.mylabs.dev" | |
# CLUSTER_NAME must have max 12 character due to "--nodepool-name" parameter | |
export CLUSTER_NAME="${CLUSTER_FQDN%%.*}" | |
export KUBECONFIG="/tmp/kubeconfig-${CLUSTER_NAME}.conf" | |
set -euxo pipefail |
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
#!/usr/bin/env bash | |
export AZURE_LOCATION="westeurope" | |
export CLUSTER_FQDN="ruzickap1aks.k8s.mylabs.dev" | |
# CLUSTER_NAME must have max 12 character due to "--nodepool-name" parameter | |
export CLUSTER_NAME="${CLUSTER_FQDN%%.*}" | |
export KUBECONFIG="/tmp/kubeconfig-${CLUSTER_NAME}.conf" | |
set -euxo pipefail |
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
#!/usr/bin/env bash | |
export CLUSTER_NAME="ruzickap3" | |
export AWS_DEFAULT_REGION="eu-central-1" | |
export KUBECONFIG="/tmp/kubeconfig-${CLUSTER_NAME}.conf" | |
export TAGS="Owner=petr.ruzicka@gmail.com Environment=dev" | |
set -euxo pipefail |
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
echo "Turn OFF Firewall" | |
chkconfig firewalld off | |
service firewalld stop | |
echo "192.168.122.226 ipa.ec.example.com ipa" >> /etc/hosts | |
echo "Change DNS server to 192.168.122.247 (ad.example.com)" | |
cat >> /etc/dhcp/dhclient-eth0.conf << EOF | |
supersede domain-name-servers 192.168.122.247; |
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
# Install Vagrant and virsh command | |
dnf install -y libvirt-client vagrant-hostmanager vagrant-libvirt | |
# Allow to manage VMs via libvirt remotely (using TCP connection) | |
cat >> /etc/libvirt/libvirtd.conf << EOF | |
listen_tls = 0 | |
listen_tcp = 1 | |
listen_addr = "0.0.0.0" | |
auth_tcp = "none" |
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
--- | |
- name: Create Instance in AWS | |
hosts: localhost | |
connection: local | |
gather_facts: false | |
vars: | |
aws_access_key: "xxxxxx" | |
aws_secret_key: "xxxxxx" | |
security_token: "xxxxxx" |
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
#Download OVF tools | |
wget -q ftp://ftp.example.com/software/vmware/installation_scripts/vmware-ovftool.tar.gz -O /vmfs/volumes/My_Datastore/vmware-ovftool.tar.gz | |
# Extract ovftool content to /vmfs/volumes/My_Datastore | |
tar -xzf /vmfs/volumes/My_Datastore/vmware-ovftool.tar.gz -C /vmfs/volumes/My_Datastore/ | |
rm /vmfs/volumes/My_Datastore/vmware-ovftool.tar.gz | |
# Modify the ovftool script to work on ESXi | |
sed -i 's@^#!/bin/bash@#!/bin/sh@' /vmfs/volumes/My_Datastore/vmware-ovftool/ovftool |
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 -eux | |
DEVICE="sdc" | |
lsblk --output NAME,MODEL,MODEL | grep ${DEVICE} | |
read -r -p "Press enter to remove everything from ${DEVICE}" | |
curl -L https://downloads.raspberrypi.org/raspios_lite_arm64/images/raspios_lite_arm64-2022-09-26/2022-09-22-raspios-bullseye-arm64-lite.img.xz | xzcat | sudo dd of=/dev/${DEVICE} bs=4M | |
sudo partprobe /dev/${DEVICE} |
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
mkdir /data | |
mkfs.ext4 -L data /dev/mmcblk0p1 | |
uci add fstab mount | |
uci set fstab.@mount[-1].device=/dev/mmcblk0p1 | |
uci set fstab.@mount[-1].target=/data | |
uci set fstab.@mount[-1].fstype=ext4 | |
uci set fstab.@mount[-1].options=rw,sync,noatime,nodiratime | |
uci set fstab.@mount[-1].enabled=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
<?xml version="1.0" encoding="utf-8"?> | |
<unattend xmlns="urn:schemas-microsoft-com:unattend"> | |
<settings pass="windowsPE"> | |
<component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
<SetupUILanguage> | |
<UILanguage>en-US</UILanguage> | |
</SetupUILanguage> | |
<InputLocale>en-US</InputLocale> | |
<SystemLocale>en-US</SystemLocale> |