Skip to content

Commit

Permalink
Updated
Browse files Browse the repository at this point in the history
  • Loading branch information
schijioke-uche committed Mar 15, 2021
1 parent e503a61 commit 88386f2
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 14 deletions.
30 changes: 20 additions & 10 deletions AksTerraform/terradeploy.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@

#!/usr/bin/env bash
#!/bin/bash

#Set the script for EOL
sed -i 's/\r//' terradeploy.sh

#Author: Jeffrey Solomon Chijioke-Uche (MSIT, MSIS) - United States
#Softwareid: MZ-68922876-0004
Expand All @@ -22,12 +25,17 @@
#-Az aks plugin.
#===================================================================================


function input(){
#input remote state storage path
REMOTE_STATE_ENDPOINT="https://{STORAGEACCOUNTNAME}.blob.core.windows.net/{CONTAINERNAME}/{ACCOUNTKEY}"
function sa(){
#Service Account: [DO NOT USE SERVICE PRINCIPAL]
SA_USR="{SUPPLY}"
SA_PWD="{SUPPLY}"
}

function authenticate(){
#Authenticate
az login -u $SA_USR --p $SA_PWD
cProcesswait
}

function init(){
#Initiate
Expand All @@ -52,20 +60,20 @@ cProcesswait

function apply(){
#Apply
terraform apply -auto-approve -var-file="aks.dev.tfvars" $REMOTE_STATE_ENDPOINT
terraform apply -auto-approve -input=false
cProcesswait
azure
}



#Process Wait:
function cProcesswait(){
sleep 10m & PID=$!
sleep 10s & PID=$!
echo -e "Please wait..."
printf "["
while kill -0 $PID 2> /dev/null; do
printf ""
sleep 10s
sleep 2
done
printf "] ${GREEN}done!${NOCOLOR}"
echo -e ""
Expand Down Expand Up @@ -103,9 +111,11 @@ function azure(){
I N F R A S T R U C T U R E AS C O D E D E P L O Y M E N T ${NOCOLOR}"
}
#Exec::::::::::::::::::::::#
Indicators
sa
authenticate
input
init
plan
apply
azure
#Exec::::::::::::::::::::::#
25 changes: 21 additions & 4 deletions Apps/appdeploy.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env bash

#Set the script for EOL
sed -i 's/\r//' appdeploy.sh

#Author: Jeffrey Solomon Chijioke-Uche (MSIT, MSIS) - United States.
#LinkedIn:
#Softwareid: MZ-68922876-0004
Expand All @@ -23,6 +26,18 @@
#-Az aks plugin.
#=============================================================================

function sa(){
#Service Account: [DO NOT USE SERVICE PRINCIPAL]
SA_USR="{SUPPLY}"
SA_PWD="{SUPPLY}"
}

function authenticate(){
#Authenticate
az login -u $SA_USR --p $SA_PWD
cProcesswait
}

#Param:
function Input(){
AKSCLUSTERRGROUP="{SUPPLY-YOUR-INFO}"
Expand All @@ -45,25 +60,25 @@ azure

#Process Wait:
function nProcesswait(){
sleep 10m & PID=$!
sleep 5s & PID=$!
echo -e "Waiting for created namespace to be ready..."
printf "["
while kill -0 $PID 2> /dev/null; do
printf ""
sleep 10s
sleep 2s
done
printf "] ${GREEN}done!${NOCOLOR}"
echo -e ""
}

#Process Wait:
function cProcesswait(){
sleep 10m & PID=$!
sleep 7s & PID=$!
echo -e "Waiting for created app to be ready..."
printf "["
while kill -0 $PID 2> /dev/null; do
printf ""
sleep 10s
sleep 2s
done
printf "] ${GREEN}done!${NOCOLOR}"
echo -e ""
Expand Down Expand Up @@ -101,6 +116,8 @@ function azure(){
I N F R A S T R U C T U R E AS C O D E D E P L O Y M E N T ${NOCOLOR}"
}
#Exec::::::::::::::::::::::#
sa
authenticate
Input
Indicators
Algorithm
Expand Down

0 comments on commit 88386f2

Please sign in to comment.