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
Param( | |
[Parameter(Mandatory = $true, | |
HelpMessage="ResourceGroup name of the vm")] | |
[ValidateNotNullOrEmpty()] | |
[string]$rgName, | |
[Parameter(Mandatory = $true, | |
HelpMessage="VM name")] | |
[ValidateNotNullOrEmpty()] | |
[string]$vmName, |
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
$sizeInBytes = (((16 * 1024) * 1024) * 1024) - 1 | |
Get-Disk | Where-Object PartitionStyle -eq "RAW" | Where-Object Size -gt $sizeInBytes | Initialize-Disk -PartitionStyle MBR -Confirm:$False -PassThru | New-Partition -AssignDriveLetter -UseMaximumSize | Format-Volume -FileSystem NTFS -Confirm:$False |
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 | |
set -x | |
if ! [ -x "$(command -v curl)" ]; then | |
echo 'Error: curl not installed, script cannot run' >&2 | |
exit 1 | |
fi | |
echo "y" | mkfs.ext4 /dev/disk/azure/scsi1/lun1 | |
mkdir /data1 | |
echo "/dev/disk/azure/scsi1/lun1 /data1 ext4 defaults,nofail 0 0" >>/etc/fstab | |
mount -a |
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 | |
set -x | |
pvcreate -f /dev/disk/azure/scsi1/lun1 | |
vgcreate vg0 /dev/disk/azure/scsi1/lun1 | |
lvcreate -l100%FREE -n lv0 vg0 | |
echo "y" | mkfs.ext4 /dev/mapper/vg0-lv0 | |
mkdir /data1 | |
echo "/dev/mapper/vg0-lv0 /data1 ext4 defaults,nofail 0 0" >>/etc/fstab |
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
Param( | |
[Parameter(Mandatory = $true, | |
HelpMessage="URL to the secret stored in the keyvault")] | |
[ValidateNotNullOrEmpty()] | |
[string]$secretUrl, | |
[Parameter(Mandatory = $false, | |
HelpMessage="URL to the KEK")] | |
[ValidateNotNullOrEmpty()] | |
[string]$kekUrl, |
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
Param( | |
[Parameter(Mandatory = $true, | |
HelpMessage="URL to the secret stored in the keyvault")] | |
[ValidateNotNullOrEmpty()] | |
[string]$secretUrl, | |
[Parameter(Mandatory = $true, | |
HelpMessage="URL to the KEK, can be empty")] | |
[AllowEmptyString()] | |
[string]$kekUrl, |