diff --git a/.gitignore b/.gitignore index 529674f80148774ba3f79e6686f8fa46d109fa8e..f336d5da8f68066ad414b18eec9c291295ef074b 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ infra/dashboard/ .secret.sh infra/sources/shevastream/appsettings.json +infra/sources/status-site/do-secret.yaml infra/terraform/spaces/ diff --git a/infra/script.sh b/infra/script.sh index af90b4ad507ad75d14fe2d1b45f767d30d0828dd..e1f0a8274a906b008fac079852ae0ab36c17babf 100755 --- a/infra/script.sh +++ b/infra/script.sh @@ -153,7 +153,7 @@ cd $CWD echo "Deploying websites' settings" -# kubectl create secret -n status-site generic appsettings.production.yml --from-file=$STATUSSITECONFIG +kubectl create secret -n status-site generic appsettings.production.yml --from-file=$STATUSSITECONFIG kubectl create secret -n websites generic shevastream-appsettings --from-file=appsettings=sources/shevastream/appsettings.json echo "Generating config files" diff --git a/infra/sources/data.sh b/infra/sources/data.sh index 846ed2fc9ca497493b9ba6204a153d0ea8458be1..2fefd44f244ececfec5a7c25d98b90aab54d138f 100644 --- a/infra/sources/data.sh +++ b/infra/sources/data.sh @@ -11,7 +11,7 @@ SERVICES["mail-dbogatov-org"]="registry.dbogatov.org/dbogatov/nginx-proxies/mail SERVICES["dns-dbogatov-org"]="registry.dbogatov.org/dbogatov/nginx-proxies/dns-dbogatov-org:latest" SERVICES["webcam-dbogatov-org"]="registry.dbogatov.org/dbogatov/nginx-proxies/webcam-dbogatov-org:latest" SERVICES["ore-dbogatov-org"]="registry.dbogatov.org/bu/ore-benchmark/project-code/docs:master" -SERVICES["status-dbogatov-org"]="registry.dbogatov.org/dbogatov/nginx-proxies/status-dbogatov-org:latest" +# SERVICES["status-dbogatov-org"]="registry.dbogatov.org/dbogatov/nginx-proxies/status-dbogatov-org:latest" SERVICES["nigmatullina-org"]="registry.dbogatov.org/dbogatov/inara-cv:latest" diff --git a/infra/sources/shevastream/appsettings.template.json b/infra/sources/shevastream/appsettings.template.json new file mode 100644 index 0000000000000000000000000000000000000000..a2255ca3e4b62ccf417aef3de45a702743441323 --- /dev/null +++ b/infra/sources/shevastream/appsettings.template.json @@ -0,0 +1,37 @@ +{ + "Data": { + "Users": [{ + "Id": 1, + "FullName": "Dmytro Bogatov", + "NickName": "@dmytro", + "ImageUrl": "https://shevastream.com/images/team/dmytro.png", + "Position": "Засновник Sheva Stream, програміст", + "Occupation": "Worcester Polytechnic Institute, Computer Science, Class of 2017", + "Password": "__REPLACE__" + }, + { + "Id": 2, + "FullName": "Polina Guley", + "NickName": "@polly", + "ImageUrl": "https://shevastream.com/images/team/polina.png", + "Position": "Засновниця Sheva Stream", + "Occupation": "КНУ ім. Т. Шевченка", + "Password": "__REPLACE__" + }, + { + "Id": 3, + "FullName": "Anton Melnikov", + "NickName": "@melnikov", + "ImageUrl": "https://shevastream.com/images/team/anton.jpg", + "Position": "Засновник Sheva Stream", + "Occupation": "КНУ ім. Т. Шевченка", + "Password": "__REPLACE__" + } + ] + }, + "ReCaptcha": { + "Enable": true, + "SecretKey": "__REPLACE__", + "SiteKey": "__REPLACE__" + } +} diff --git a/infra/sources/status-site/do-secret.template b/infra/sources/status-site/do-secret.template new file mode 100644 index 0000000000000000000000000000000000000000..3252f7e3a172e74889ed37fd3d8911eae78247d8 --- /dev/null +++ b/infra/sources/status-site/do-secret.template @@ -0,0 +1,7 @@ +apiVersion: v1 +kind: Secret +metadata: + name: digitalocean + namespace: kube-system +stringData: + access-token: __SECRET__ diff --git a/infra/sources/status-site/gen-secret.sh b/infra/sources/status-site/gen-secret.sh new file mode 100755 index 0000000000000000000000000000000000000000..8584f0232348b75b3e535f0994a2d4703918e3fd --- /dev/null +++ b/infra/sources/status-site/gen-secret.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +set -e + +shopt -s globstar + +# Ensure that the CWD is set to script's location +cd "${0%/*}" +CWD=$(pwd) + +SECRET=$(cat ~/.config/digital-ocean/token) +cp do-secret.template do-secret.yaml +sed -i -e "s#__SECRET__#$SECRET#g" do-secret.yaml +rm ./*-e + +echo "Done!"