-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Thomas Perelle
committed
Feb 9, 2021
1 parent
691cc32
commit b9e84c2
Showing
32 changed files
with
1,437 additions
and
5 deletions.
There are no files selected for viewing
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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<mxfile host="Chrome" modified="2021-02-09T09:59:41.412Z" agent="5.0 (Macintosh; Intel Mac OS X 11_2_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.146 Safari/537.36" etag="VXW6PYkiOWR9hrlSnSMn" version="14.2.9" type="device"><diagram id="8IBC5YIdZTFhsr8UUqcM" name="Page-1">7V1Zl6KwEv41fc69D3JYRR9V1LFHbFsdHX3pg0ArNooXcOPX3wqLgomtjrhMTzsLEGIIVV9VKpVK+cSVpuuqrczHsqXp5hNLa+snTnpiWYYVOTigkk1QksuxQcHINrSw0q6gbXh6WEiHpQtD051ERdeyTNeYJwtVazbTVTdRpti2tUpWe7fM5FPnykjHCtqqYuKlPUNzx2Epk83vbvzQjdE4fHSOFYMbUyWqHL6JM1Y0axUr4spPXMm2LDc4m65LuomIF9El+F7lwN1tx2x95p7yhUnfzJcFL5PTLO/ncz8/7OrVTMidpWIuwhcOO+tuIgrY1mKm6agR+okrrsaGq7fnioruroDnUDZ2pyZcMXCqKc7Yr4suHNe2PvSSZVq23xSX9T9w590wzah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q0sBzvz7HZXeHaN6r1Dvw6tLffj+AJ7Fcw3vlxMdgzoFF643qG7jo0zXJyO6Yayi4ypsi6lPyuu6VIYjIGUqw3NeBXQPrt06aIDGhgdZKqPz9UsP+jQpb+RpGb0H47fV3rYFfYLntPmV7D0X4dmrhvThRMewTw68xwK0AwPPXMMzmJeKBdplMB9WV/narLsZlkaT/kSbgJZhZa/gymxrDNqG7nsVs94ZMYBDkGOQ704NyrqThlde/2zvkNAMNBZw/SRz96wh+oBpdM4PTTO5pLePIaxBiYQ5rJjCHJY4euFbdZbB5PULrI6n+5Pgd3efM3gmuhsYsoTou4Q4HLEfPzOZjm50FYk26xXsSTaR6zOXdFtsA1rOzWeV4TkqG7dTk96s2OavIwmuCratbGLVwlnlZcYsGWPkTbYOEXk332X7qVikk7RCENPKUpHg9d7cNpVttETROiES94GS3x2fjeLMuk1SuyzL7e3mC3b3HNwZfapSIDR8vTR3RIjgLq9viPwJRBgufx2IEBpODSJwaVsoQG1XHayssWxpSJWX/w8=</diagram></mxfile> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#!/bin/bash | ||
|
||
VAULT_NAME=hub-and-spoke-vault | ||
KEY_PREFIX=aks | ||
TMP_DIR=./temp | ||
|
||
function generate { | ||
echo "generate..." | ||
ssh-keygen -b 4096 \ | ||
-t rsa \ | ||
-f ${TMP_DIR}/${KEY_PREFIX}-${envCurrent}.rsa \ | ||
-N '' \ | ||
<<<y 2>&1 >/dev/null | ||
} | ||
function send { | ||
echo "send..." | ||
az keyvault secret set --vault-name $VAULT_NAME \ | ||
-n "aks-${envCurrent}-ssh-priv" \ | ||
-f "${TMP_DIR}/${KEY_PREFIX}-${envCurrent}.rsa" | ||
az keyvault secret set --vault-name $VAULT_NAME \ | ||
-n "aks-${envCurrent}-ssh-pub" \ | ||
-f "${TMP_DIR}/${KEY_PREFIX}-${envCurrent}.rsa.pub" | ||
} | ||
function clean { | ||
echo "clean..." | ||
rm -f ${TMP_DIR}/*.rsa* | ||
} | ||
|
||
function process { | ||
generate | ||
send | ||
clean | ||
} | ||
|
||
# Main | ||
envList=( dev staging prod ) | ||
envCurrent="" | ||
if [ ! -z "$1" ]; then | ||
for item in "${envList[@]}"; do | ||
if [ $1 == $item ]; then | ||
echo "Current environment is $1" | ||
envCurrent=$1 | ||
process | ||
exit | ||
fi | ||
done | ||
if [ "$envCurrent" == "" ]; then | ||
echo "Environment name incorrect !" | ||
echo "Use a value in the list: ${envList[@]}" | ||
fi | ||
else | ||
echo "You must pass an environment name." | ||
echo "Use a value in the list: ${envList[@]}" | ||
fi |
Empty file.
Oops, something went wrong.