mirror of https://github.com/apache/superset.git
Reorganize steps (#11015)
Reorganize steps to 1. run db migrations 2. create default roles/permissions 3. create admin user 4. (optional) load examples
This commit is contained in:
parent
1dc05d4c12
commit
e52a399e18
|
@ -33,29 +33,29 @@ Init Step ${1}/${STEP_CNT} [${2}] -- ${3}
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Initialize the database
|
||||||
|
echo_step "1" "Starting" "Applying DB migrations"
|
||||||
|
superset db upgrade
|
||||||
|
echo_step "1" "Complete" "Applying DB migrations"
|
||||||
|
|
||||||
# Create an admin user
|
# Create an admin user
|
||||||
echo_step "1" "Starting" "Setting up admin user ( admin / admin )"
|
echo_step "2" "Starting" "Setting up admin user ( admin / admin )"
|
||||||
superset fab create-admin \
|
superset fab create-admin \
|
||||||
--username admin \
|
--username admin \
|
||||||
--firstname Superset \
|
--firstname Superset \
|
||||||
--lastname Admin \
|
--lastname Admin \
|
||||||
--email admin@superset.com \
|
--email admin@superset.com \
|
||||||
--password admin
|
--password admin
|
||||||
echo_step "1" "Complete" "Setting up admin user"
|
echo_step "2" "Complete" "Setting up admin user"
|
||||||
|
|
||||||
# Initialize the database
|
# Create default roles and permissions
|
||||||
echo_step "2" "Starting" "Applying DB migrations"
|
echo_step "3" "Starting" "Setting up roles and perms"
|
||||||
superset db upgrade
|
superset init
|
||||||
echo_step "2" "Complete" "Applying DB migrations"
|
echo_step "3" "Complete" "Setting up roles and perms"
|
||||||
|
|
||||||
if [ "$SUPERSET_LOAD_EXAMPLES" = "yes" ]; then
|
if [ "$SUPERSET_LOAD_EXAMPLES" = "yes" ]; then
|
||||||
# Load some data to play with
|
# Load some data to play with
|
||||||
echo_step "3" "Starting" "Loading examples"
|
echo_step "4" "Starting" "Loading examples"
|
||||||
superset load_examples
|
superset load_examples
|
||||||
echo_step "3" "Complete" "Loading examples"
|
echo_step "4" "Complete" "Loading examples"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Create default roles and permissions
|
|
||||||
echo_step "4" "Starting" "Setting up roles and perms"
|
|
||||||
superset init
|
|
||||||
echo_step "4" "Complete" "Setting up roles and perms"
|
|
||||||
|
|
Loading…
Reference in New Issue