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 | |
HOSTNAME="*.internal.cloudapp.net" | |
LOCATION=${1?Error: no location provided} | |
PASSPHRASE=${2?Error: no passphrase provided} | |
HOSTIP=${3?Error: no host ip provided} | |
openssl genrsa -aes256 -passout pass:$PASSPHRASE -out ca-key.pem 4096 | |
openssl req -new -x509 -days 365 -key ca-key.pem -sha256 -out ca.pem -passin pass:$PASSPHRASE -subj "/L=$LOCATION/CN=$HOSTNAME" | |
openssl genrsa -out server-key.pem 4096 |
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
& ((Split-Path $MyInvocation.MyCommand.Path) + "\Script2.ps1") $subscription_id $rg_name $rg_location $template_file_path $parameters_file_path |
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
# pip install pyyaml | |
from yaml import load, dump | |
yaml_file = open('configuration.yaml', 'r') | |
data = load(yaml_file) | |
configuration = namedtuple('struct', data.keys())(*data.values()) | |
yaml_file.close() |