Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Dmytro Bogatov
Setup-Manager
Commits
cd67b090
Verified
Commit
cd67b090
authored
Mar 14, 2018
by
Dmytro Bogatov
💕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add webcam service.
parent
defd8d50
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
8 deletions
+13
-8
infra/build-services.sh
infra/build-services.sh
+7
-0
infra/script.sh
infra/script.sh
+1
-1
infra/sources/data.sh
infra/sources/data.sh
+1
-0
infra/sources/service/ingress.yaml
infra/sources/service/ingress.yaml
+3
-7
lets-encrypt/domains.sh
lets-encrypt/domains.sh
+1
-0
No files found.
infra/build-services.sh
View file @
cd67b090
...
...
@@ -15,6 +15,7 @@ generate-service () {
service
=
$1
image
=
$2
replicas
=
$REPLICAS
auth
=
""
echo
"Generating
$service
configs..."
...
...
@@ -27,6 +28,11 @@ generate-service () {
replicas
=
"1"
fi
if
[
"
$service
"
==
"webcam-dbogatov-org"
]
then
auth
=
"ingress.kubernetes.io/auth-type: basic"
fi
if
[
"
$service
"
==
"moon-travel-com-ua"
]
then
URL
=
"moon-travel.com.ua"
...
...
@@ -47,6 +53,7 @@ generate-service () {
sed
-i
-e
"s#__NAME__#
$service
#g"
services/
$service
/
{
ingress,service,deployment
}
.yaml
sed
-i
-e
"s#__URL__#
$URL
#g"
services/
$service
/
{
ingress,service,deployment
}
.yaml
sed
-i
-e
"s#__REPLICAS__#
$replicas
#g"
services/
$service
/
{
ingress,service,deployment
}
.yaml
sed
-i
-e
"s#__AUTH__#
$auth
#g"
services/
$service
/
{
ingress,service,deployment
}
.yaml
}
...
...
infra/script.sh
View file @
cd67b090
...
...
@@ -104,9 +104,9 @@ for namespace in ${NAMESPACES[@]}
do
kubectl create namespace
$namespace
||
true
# some of them already exist
kubectl create
--namespace
=
$namespace
secret tls lets-encrypt
--key
$CERTDIRPATH
/certificate.key
--cert
$CERTDIRPATH
/certificate.crt
kubectl create
--namespace
=
$namespace
secret generic basic-auth
--from-file
=
$CERTDIRPATH
/auth
done
echo
"Deploying the registry secret"
kubectl
--namespace
=
websites create secret docker-registry regsecret
--docker-server
=
registry.dbogatov.org
--docker-username
=
dbogatov
--docker-password
=
$DOCKERPASS
--docker-email
=
dmytro@dbogatov.org
...
...
infra/sources/data.sh
View file @
cd67b090
...
...
@@ -9,6 +9,7 @@ SERVICES["socialimps-dbogatov-org"]="registry.dbogatov.org/dbogatov/cs-3043-grou
SERVICES[
"push-dbogatov-org"
]=
"registry.dbogatov.org/dbogatov/pushexpress:latest"
SERVICES[
"mail-dbogatov-org"
]=
"registry.dbogatov.org/dbogatov/nginx-proxies/mail-dbogatov-org:latest"
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[
"nigmatullina-org"
]=
"registry.dbogatov.org/dbogatov/inara-cv:latest"
...
...
infra/sources/service/ingress.yaml
View file @
cd67b090
...
...
@@ -8,6 +8,9 @@ metadata:
ingress.kubernetes.io/force-ssl-redirect
:
"
true"
ingress.kubernetes.io/ssl-redirect
:
"
true"
ingress.kubernetes.io/from-to-www-redirect
:
"
true"
ingress.kubernetes.io/auth-secret
:
basic-auth
ingress.kubernetes.io/auth-realm
:
"
Authentication
Required!"
__AUTH__
spec
:
tls
:
-
hosts
:
...
...
@@ -23,13 +26,6 @@ spec:
backend
:
serviceName
:
__NAME__
servicePort
:
80
-
host
:
"
www.__URL__"
http
:
paths
:
-
path
:
/
backend
:
serviceName
:
__NAME__
servicePort
:
80
-
host
:
"
__NAME__.cluster.dbogatov.org"
http
:
paths
:
...
...
lets-encrypt/domains.sh
View file @
cd67b090
...
...
@@ -17,6 +17,7 @@ DOMAINS["cluster.dbogatov.org"]=false
DOMAINS[
"grafana.dbogatov.org"
]=
false
DOMAINS[
"git.dbogatov.org"
]=
false
DOMAINS[
"pages.dbogatov.org"
]=
false
DOMAINS[
"webcam.dbogatov.org"
]=
false
DOMAINS[
"mattermost.dbogatov.org"
]=
false
DOMAINS[
"minecraft.dbogatov.org"
]=
false
DOMAINS[
"ci.dbogatov.org"
]=
false
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment