Skip to content

Commit

Permalink
Merge pull request #2649 from zaidmohd/arcbox_3.0
Browse files Browse the repository at this point in the history
Arcbox 3.0 - DevOps
  • Loading branch information
janegilring authored Aug 8, 2024
2 parents 6336b26 + 04878bd commit 7764217
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
16 changes: 8 additions & 8 deletions azure_jumpstart_arcbox/artifacts/DevOpsLogonScript.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -257,17 +257,18 @@ $kubeVipDaemonset | kubectl apply -f -
kubectl create configmap -n kube-system kubevip --from-literal range-global=$lowestServiceIp-$highestServiceIp
Start-Sleep -Seconds 30

Write-Header "Creating longhorn storage on K3scluster"
Write-Header "Creating longhorn storage on $($cluster.clusterName)"
kubectl apply -f "$Env:ArcBoxDir\longhorn.yaml" --kubeconfig $cluster.kubeConfig
Start-Sleep -Seconds 30
Write-Host "`n"
}

# # Longhorn setup for RWX-capable storage class
# Write-Header "Creating longhorn storage"
# kubectl apply -f "$Env:ArcBoxDir\longhorn.yaml"
# Start-Sleep -Seconds 30

foreach ($cluster in $clusters) {
if ($cluster.context -like '*-datasvc-k3s') {
$Env:KUBECONFIG=$cluster.kubeConfig
kubectx
}
}

# Create Kubernetes Namespaces
Write-Header "Creating K8s Namespaces"
Expand All @@ -281,7 +282,6 @@ foreach ($namespace in @('bookstore', 'bookbuyer', 'bookwarehouse')) {
kubectl label namespace $namespace istio-injection=enabled
}


#############################
# - Apply GitOps Configs
#############################
Expand Down Expand Up @@ -322,7 +322,7 @@ az k8s-configuration flux create `
--scope namespace `
--namespace bookstore `
--url $appClonedRepo `
--branch main--sync-interval 3s `
--branch main --sync-interval 3s `
--kustomization name=bookstore path=./bookstore/rbac-sample

# Create GitOps config for Hello-Arc application
Expand Down
6 changes: 6 additions & 0 deletions azure_jumpstart_arcbox/artifacts/installK3s.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ sed -i '10s/^/export k3sControlPlane=/' vars.sh

export vmName=$3

# Save the original stdout and stderr
exec 3>&1 4>&2

exec >installK3s-${vmName}.log
exec 2>&1

Expand Down Expand Up @@ -198,6 +201,9 @@ fi
echo ""
echo "Uploading the script logs to staging storage"
echo ""
# Restore the original stdout and stderr
exec 1>&3 2>&4 # Further commands will now output to the original stdout and stderr and not the log file

sleep 60
log="/home/$adminUsername/jumpstart_logs/installK3s-$vmName.log"
storageContainerNameLower=$(echo $storageContainerName | tr '[:upper:]' '[:lower:]')
Expand Down

0 comments on commit 7764217

Please sign in to comment.