Skip to content

Commit

Permalink
fix run init job. (labring#4202)
Browse files Browse the repository at this point in the history
Signed-off-by: yy <[email protected]>
  • Loading branch information
lingdie authored Oct 30, 2023
1 parent 97bd672 commit 1c91ef0
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions deploy/cloud/scripts/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,20 @@ function sealos_run_controller {
--env MONGO_URI="$mongodbUri"
}


function sealos_authorize {
sealos run tars/job-init.tar

# wait for admin user create
echo "Waiting for admin user create"

while [ -z "$(kubectl get ns ns-admin 2>/dev/null)" ]; do
sleep 1
done

kubectl apply -f manifests/free-license.yaml
}

function sealos_run_frontend {
echo "run desktop frontend"
sealos run tars/frontend-desktop.tar \
Expand All @@ -125,6 +139,9 @@ function sealos_run_frontend {
--env passwordEnabled="true" \
--config-file etc/sealos/desktop-config.yaml

# sealos authorize !!must run after sealos_run_controller frontend-desktop.tar and before sealos_run_frontend
sealos_authorize

echo "run applaunchpad frontend"
sealos run tars/frontend-applaunchpad.tar \
--env cloudDomain=$cloudDomain \
Expand Down Expand Up @@ -180,30 +197,13 @@ function resource_exists {
}


function sealos_authorize {
sealos run tars/job-init.tar

# wait for admin user create
echo "Waiting for admin user create"

while [ -z "$(kubectl get ns ns-admin 2>/dev/null)" ]; do
sleep 1
done

kubectl apply -f manifests/free-license.yaml
}


function install {
# gen mongodb uri and others
prepare

# sealos run controllers
sealos_run_controller

# sealos authorize !!must run after sealos_run_controller and before sealos_run_frontend
sealos_authorize

# sealos run frontends
sealos_run_frontend
}
Expand Down

0 comments on commit 1c91ef0

Please sign in to comment.