Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arcbox 3.0 - DevOps #2649

Merged
merged 8 commits into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading