Verified Commit 48341af7 authored by Dmytro Bogatov's avatar Dmytro Bogatov 💕

Deploy Taiwin.

parent 7a61cd54
Pipeline #3218 passed with stage
in 5 seconds
......@@ -24,6 +24,7 @@ deploy-latest:
- touch .secret.sh
- ./build-services.sh
- rm ./services/namespace.yaml
- TOKEN=$(curl -s https://$TOKEN@token.dbogatov.org | tr -d '[:space:]')
- kubectl --token=$TOKEN --server=https://k8sapi.dbogatov.org apply -R -f ./services/
tags:
- docker
......
......@@ -98,7 +98,7 @@ generate-service () {
cp sources/service/{service,deployment}.yaml services/$service
cp sources/service/ingress/{main,rule-*}.yaml services/$service/ingress
if [ "$service" == "webcam-dbogatov-org" ]
if [ "$service" == "webcam-dbogatov-org" ] || [ "$service" == "token-dbogatov-org" ]
then
auth="nginx.ingress.kubernetes.io/auth-type: basic"
fi
......
......@@ -100,7 +100,7 @@ NAMESPACES=("websites" "monitoring" "ingress" "status-site" "kube-system" "gitla
for namespace in ${NAMESPACES[@]}
do
kubectl create namespace "$namespace" || true # some of them already exist
kubectl create --namespace="$namespace" c"$CERTDIRPATH"/certificate.key --cert "$CERTDIRPATH"/certificate.crt || true # some of them already exist
kubectl create --namespace="$namespace" secret tls lets-encrypt --key "$CERTDIRPATH"/certificate.key --cert "$CERTDIRPATH"/certificate.crt || true # some of them already exist
kubectl create --namespace="$namespace" secret generic basic-auth --from-file=$CERTDIRPATH/auth || true # some of them already exist
kubectl --namespace="$namespace" create secret docker-registry regsecret --docker-server=registry.dbogatov.org --docker-username=dbogatov --docker-password=$DOCKERPASS --docker-email=dmytro@dbogatov.org
done
......@@ -180,3 +180,18 @@ DASHBOARD_TOKEN=$(kubectl -n kube-system describe secret $(kubectl -n kube-syste
DASHBOARD_TOKEN="${DASHBOARD_TOKEN:7:${#DASHBOARD_TOKEN}}"
echo $DASHBOARD_TOKEN
### upgrade proxy
cd token-proxy
rm -rf ./dist
mkdir ./dist
cp Dockerfile token.conf ./dist
cd ./dist
sed -i -e "s#__TOKEN__#$DASHBOARD_TOKEN#g" token.conf
docker build -t registry.dbogatov.org/dbogatov/proxy-registry .
docker push registry.dbogatov.org/dbogatov/proxy-registry
cd $CWD
rm -rf ./token-proxy/dist
./upgrade-service.sh token-dbogatov-org
......@@ -13,6 +13,7 @@ SERVICES["webcam-dbogatov-org"]="registry.dbogatov.org/dbogatov/nginx-proxies/we
SERVICES["ore-dbogatov-org"]="registry.dbogatov.org/bu/ore-benchmark/project-code/docs:master"
SERVICES["k8sapi-dbogatov-org"]="registry.dbogatov.org/dbogatov/nginx-proxies/k8sapi-dbogatov-org:latest"
SERVICES["cloz-dbogatov-org"]="registry.dbogatov.org/bu/ore-scheme/cloz-software-implementation:master"
SERVICES["token-dbogatov-org"]="registry.dbogatov.org/dbogatov/proxy-registry:latest"
SERVICES["nigmatullina-org"]="registry.dbogatov.org/dbogatov/inara-cv:latest"
......@@ -46,7 +47,7 @@ SERVICES["blog-bogatov-kiev-ua"]="registry.dbogatov.org/daddy/blog-bogatov-kiev-
declare -A DOMAINS
AVALUE="alice-workers.varis.dbogatov.org"
AVALUE="alice-workers.taiwin.dbogatov.org"
DOMAINS["dbogatov.org"]=$AVALUE
DOMAINS["dmytro.app"]=$AVALUE
......
......@@ -10,7 +10,7 @@ module "digital-ocean-alice" {
}
region = "nyc3"
dns_zone = "varis.dbogatov.org"
dns_zone = "taiwin.dbogatov.org"
cluster_name = "alice"
image = "coreos-stable"
......
FROM dbogatov/docker-images:nginx-latest
LABEL maintainer="Dmytro Bogatov <dmytro@dbogatov.org>"
COPY token.conf /etc/nginx/conf.d/
CMD ["nginx", "-g", "daemon off;"]
server {
listen 80 default_server;
listen [::]:80 default_server;
location / {
return 200 "__TOKEN__";
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment