feat: Add bootstrap support for skyline image

When docker run, specify the KOLLA_BOOSTRAP environment variable, the
skyline image will initialize the database, and if it is not specified,
the skyline service will be run in the normal way.
This provides the basis for subsequent docking with kolla-ansible.

Change-Id: I5eaad038b3ed3c3189f2b41e41c14d28a346ee88
This commit is contained in:
Gao Hanxiang 2021-07-26 10:49:44 -04:00
parent ee84ba0b8f
commit a0701711be
1 changed files with 6 additions and 0 deletions

View File

@ -7,6 +7,12 @@ echo "/usr/local/bin/gunicorn -c /etc/skyline/gunicorn.py skyline_apiserver.main
mapfile -t CMD < <(tail /run_command | xargs -n 1)
# kolla_extend_start
if [[ "${!KOLLA_BOOTSTRAP[*]}" ]]; then
cd /skyline/libs/skyline-apiserver/
make db_sync
exit 0
fi
nginx-generator -o /etc/nginx/nginx.conf
nginx