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

fix run init job. #4202

Merged
merged 1 commit into from
Oct 30, 2023
Merged
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
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
Loading