-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from QingCloudAppcenter/upgrade/1.7.5
Upgrade to 1.7.5
- Loading branch information
Showing
11 changed files
with
157 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
/files/tmp | ||
/make.retry | ||
hosts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{{- if eq $nodeRole "web" }} | ||
encrypted=$(echo -n {{ getv "/cluster/cluster_id" }}{{ getv "/cluster/global_uuid" }} | sha256sum | base64) | ||
coreSecret=${encrypted:0:16} | ||
encrypted=$(echo -n {{ getv "/cluster/user_id" }}{{ getv "/cluster/global_uuid" }} | sha256sum | base64) | ||
redisPassword=${encrypted:0:16} | ||
|
||
cat > /opt/app/conf/chartserver/env << CHART_SERVER_ENV_EOF | ||
## Settings should be set | ||
PORT=9999 | ||
|
||
# Only support redis now. If redis is setup, then enable cache | ||
CACHE=redis | ||
CACHE_REDIS_ADDR=redis:6379 | ||
CACHE_REDIS_PASSWORD=$redisPassword | ||
CACHE_REDIS_DB=3 | ||
|
||
# Credential for internal communication | ||
BASIC_AUTH_USER=chart_controller | ||
BASIC_AUTH_PASS=$coreSecret | ||
|
||
# Multiple tenants | ||
# Must be set with 1 to support project namespace | ||
DEPTH=1 | ||
|
||
{{- if len (ls "/hosts/storage_node") }} | ||
STORAGE=local | ||
STORAGE_LOCAL_ROOTDIR=/chart_storage | ||
{{- else }} | ||
STORAGE=amazon | ||
STORAGE_AMAZON_BUCKET={{ getv "/env/QS_BUCKET" }} | ||
STORAGE_AMAZON_PREFIX={{ getv "/env/QS_ROOT_DIRECTORY" "" }} | ||
{{- $qsRegion := getv "/env/QS_ZONE" "pek3a" }} | ||
STORAGE_AMAZON_REGION={{ $qsRegion }} | ||
{{- if eq (getv "/env/s3.url.used" "false") "true" }} | ||
STORAGE_AMAZON_ENDPOINT={{ getv "/env/QS_URL" }} | ||
{{- else }} | ||
{{- $qsUrl := split (getv "/env/QS_URL") "://" }} | ||
STORAGE_AMAZON_ENDPOINT={{ index $qsUrl 0}}://s3.{{ $qsRegion }}.{{ index $qsUrl 1 }} | ||
{{- end }} | ||
AWS_ACCESS_KEY_ID={{ getv "/env/QS_ACCESS" }} | ||
AWS_SECRET_ACCESS_KEY={{ getv "/env/QS_SECRET" }} | ||
{{- end }} | ||
|
||
## Settings with default values. Just put here for future changes | ||
DEBUG=false | ||
LOG_JSON=true | ||
DISABLE_METRICS=false | ||
DISABLE_API=false | ||
DISABLE_STATEFILES=false | ||
ALLOW_OVERWRITE=true | ||
CHART_URL= | ||
AUTH_ANONYMOUS_GET=false | ||
TLS_CERT= | ||
TLS_KEY= | ||
CONTEXT_PATH= | ||
INDEX_LIMIT=0 | ||
MAX_STORAGE_OBJECTS=0 | ||
MAX_UPLOAD_SIZE=20971520 | ||
CHART_POST_FORM_FIELD_NAME=chart | ||
PROV_POST_FORM_FIELD_NAME=prov | ||
CHART_SERVER_ENV_EOF | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
ansible/files/opt/app/conf/chartserver/docker-entrypoint.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
#/chart_storage is the directory in the contaienr for storing the chart artifacts | ||
#if storage driver is set to 'local' | ||
if [ -d /chart_storage ]; then | ||
if ! stat -c '%u:%g' /chart_storage | grep -q '10000:10000' ; then | ||
# 10000 is the id of harbor user/group. | ||
# Usually NFS Server does not allow changing owner of the export directory, | ||
# so need to skip this step and requires NFS Server admin to set its owner to 10000. | ||
chown 10000:10000 -R /chart_storage | ||
fi | ||
fi | ||
|
||
echo $UID | ||
/harbor/install_cert.sh | ||
|
||
#Start the server process | ||
sudo -E -H -u \#10000 sh -c "/chartserver/chartm" #Parameters are set by ENV | ||
set +e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters