Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
241 commits
Select commit Hold shift + click to select a range
54524bd
Add pylint test
Maxghost33 Jan 12, 2019
6d92f1f
Test Error
Maxghost33 Jan 12, 2019
ace2884
Successfull Testing Error
Maxghost33 Jan 12, 2019
8732663
Add part Jenkinsfile
Maxghost33 Jan 12, 2019
061e487
Change Jenkinsfile + install pylint
Maxghost33 Jan 12, 2019
1aea09b
Change dockerfile
Maxghost33 Jan 12, 2019
8ba6cfa
Add check push image to Docker Registry
Maxghost33 Jan 12, 2019
6bc5ce8
Jenkinsfile without kubectl
Maxghost33 Jan 12, 2019
043f09c
Test kubectl apply
Maxghost33 Jan 14, 2019
c804949
Modify Jenkinsfile - add deploy
Maxghost33 Jan 14, 2019
efc0fe2
Use secret env
Maxghost33 Jan 14, 2019
0010721
Test integration
Maxghost33 Jan 15, 2019
a3176d5
Test integration#2
Maxghost33 Jan 15, 2019
a98a5e9
Test integration#2
Maxghost33 Jan 15, 2019
4f9f2a8
Update Jenkinsfile Kube plugins
Maxghost33 Jan 17, 2019
88e7e3a
Final Test
Maxghost33 Jan 17, 2019
4fc2d71
Final Test #2
Maxghost33 Jan 17, 2019
8d370fe
Final Test - FUCKKKKKKKKKKKK
Maxghost33 Jan 17, 2019
b75361d
GET - UPLOAD
Maxghost33 Jan 17, 2019
102225a
Add final Jenkinsfile
Maxghost33 Jan 18, 2019
9c2ed4a
Add final Jenkinsfile
Maxghost33 Jan 18, 2019
220590e
Add template.yml
Maxghost33 Jan 18, 2019
01647d5
Add latest file
Maxghost33 Jan 18, 2019
fba6325
Add again latest file
Maxghost33 Jan 18, 2019
bfc6096
Add testing scripts
Maxghost33 Jan 18, 2019
56a76db
Add testing scripts to pipeline
Maxghost33 Jan 18, 2019
c09b20b
Add pipelines error1
Maxghost33 Jan 18, 2019
7a77cb0
Next change
Maxghost33 Jan 18, 2019
5d7f9f5
Insecure registry
Maxghost33 Jan 18, 2019
6797423
Insecure registry
Maxghost33 Jan 18, 2019
cbec166
Insecure registry
Maxghost33 Jan 18, 2019
255a8df
Add daemon.json
Maxghost33 Jan 18, 2019
d5d46ff
Add daemon.json
Maxghost33 Jan 18, 2019
7dcbd35
Commit #1
Maxghost33 Jan 18, 2019
c8f4011
Debug GET-service
Maxghost33 Jan 21, 2019
ebf724e
Debug Final GET
Maxghost33 Jan 21, 2019
534717f
Debug image check
Maxghost33 Jan 22, 2019
c7d02ea
Debug image check
Maxghost33 Jan 22, 2019
0fcffd8
Change Jenkinsfile
Maxghost33 Jan 22, 2019
8fc28c1
Change pipeline
Maxghost33 Jan 22, 2019
ae148d3
Change pipeline
Maxghost33 Jan 22, 2019
1c53110
Change scripts sed
Maxghost33 Jan 22, 2019
2c6f265
Change test scripts
Maxghost33 Jan 22, 2019
032b34b
Change test scripts#2
Maxghost33 Jan 22, 2019
411f630
Working version
Maxghost33 Jan 22, 2019
a4d78df
Rename dockerfile
Maxghost33 Jan 22, 2019
2bc556f
Last 22.01 change
Maxghost33 Jan 22, 2019
66243b7
Change Git pull var
Maxghost33 Jan 23, 2019
81da0f4
Change Git pull var#2
Maxghost33 Jan 23, 2019
69b0ab9
Change app
Maxghost33 Jan 23, 2019
830584a
CHange GET Codes#3
Maxghost33 Jan 23, 2019
fbb035e
CHange GET Codes
Maxghost33 Jan 23, 2019
c101db4
E2E test GET Request
Maxghost33 Jan 23, 2019
a323a1a
Testing
Maxghost33 Jan 23, 2019
a9c1154
Testing
Maxghost33 Jan 23, 2019
3433db7
Indian Code
Maxghost33 Jan 23, 2019
def0adc
Indian Code#2
Maxghost33 Jan 23, 2019
b9be2b9
Indian Code#2
Maxghost33 Jan 23, 2019
4ec04f6
Indian Code#3
Maxghost33 Jan 23, 2019
0c9fc65
Indian Code#3
Maxghost33 Jan 23, 2019
fd3120b
Indian Code#3
Maxghost33 Jan 23, 2019
f4afa23
Change e2e testing namespace testing
Maxghost33 Jan 23, 2019
8e5f276
Add new E2E test
Maxghost33 Jan 24, 2019
dbc6590
E2E Testing
Maxghost33 Jan 24, 2019
7c77f85
E2E Testing
Maxghost33 Jan 24, 2019
379b36f
E2E Testing last script change
Maxghost33 Jan 24, 2019
e8fb916
Add new e2e
Maxghost33 Jan 24, 2019
d14a2d0
Commit night
Maxghost33 Jan 24, 2019
18cd738
New Jenkinsfile
Maxghost33 Jan 26, 2019
a8ead0f
Jenkinsfile
Maxghost33 Jan 26, 2019
e5a2be6
Jenkinsfile
Maxghost33 Jan 26, 2019
f13b69d
Jenkinsfile
Maxghost33 Jan 26, 2019
2254891
Jenkinsfile
Maxghost33 Jan 26, 2019
8c7f88f
Jenkinsfile
Maxghost33 Jan 26, 2019
816b310
Jenkinsfile
Maxghost33 Jan 26, 2019
bda03ee
Jenkinsfile
Maxghost33 Jan 26, 2019
65b2875
Jenkinsfile
Maxghost33 Jan 26, 2019
544b140
E2E.yaml
Maxghost33 Jan 27, 2019
abcc70e
E2E.yaml
Maxghost33 Jan 27, 2019
669f2c5
E2E.yaml
Maxghost33 Jan 27, 2019
045cb38
Last version on Sunday 27.01.2019
Maxghost33 Jan 27, 2019
5c9632b
Modify E2E tests
Maxghost33 Jan 27, 2019
de0ad02
Add copy modified myjob.yaml(Deploy environment)
Maxghost33 Jan 27, 2019
d68dccb
YML -> YAML
Maxghost33 Jan 27, 2019
b546e6b
Last version for Sunday 27.01.2019
Maxghost33 Jan 27, 2019
a6ef3c9
Delete temp files
Maxghost33 Jan 27, 2019
4fa1f76
ENV
Maxghost33 Jan 30, 2019
df0946b
ENV
Maxghost33 Jan 30, 2019
699e5b6
ENV
Maxghost33 Jan 30, 2019
c99927e
ENV
Maxghost33 Jan 30, 2019
577c4cb
ENV
Maxghost33 Jan 30, 2019
abc7eeb
ENV
Maxghost33 Jan 30, 2019
38c17c5
ENV
Maxghost33 Jan 30, 2019
767074d
Test
Maxghost33 Jan 30, 2019
6392323
Test
Maxghost33 Jan 30, 2019
2a31b04
Test
Maxghost33 Jan 31, 2019
52d8828
Test
Maxghost33 Jan 31, 2019
e8ffff9
Test
Maxghost33 Jan 31, 2019
d822ee6
Test
Maxghost33 Jan 31, 2019
cd2f102
Test
Maxghost33 Jan 31, 2019
c0758ef
Test
Maxghost33 Jan 31, 2019
3ef27ec
Test
Maxghost33 Jan 31, 2019
88aed2d
Test
Maxghost33 Jan 31, 2019
7512af8
Test
Maxghost33 Jan 31, 2019
6541f6c
Test
Maxghost33 Jan 31, 2019
30e81d2
Test
Maxghost33 Jan 31, 2019
d727239
GitTag concepts
Maxghost33 Jan 31, 2019
44d1782
Check registry tag
Maxghost33 Feb 1, 2019
560456d
Check registry tag
Maxghost33 Feb 1, 2019
89c83e0
Test check tag
Maxghost33 Feb 1, 2019
7433416
Test Jenkins
Maxghost33 Feb 3, 2019
6bb0dd9
Test Jenkins
Maxghost33 Feb 3, 2019
62f84be
Test Jenkins
Maxghost33 Feb 3, 2019
d11f18c
Test Jenkins
Maxghost33 Feb 3, 2019
cf7b8ac
Test Jenkins
Maxghost33 Feb 3, 2019
0bfc147
Test Jenkins
Maxghost33 Feb 3, 2019
f69d0ca
Test Jenkins
Maxghost33 Feb 3, 2019
bc9c015
Test Jenkins
Maxghost33 Feb 3, 2019
859bbeb
Test Jenkins
Maxghost33 Feb 3, 2019
e707e75
Test Jenkins
Maxghost33 Feb 3, 2019
09996de
Test Jenkins
Maxghost33 Feb 3, 2019
11945fd
Test Jenkins
Maxghost33 Feb 3, 2019
05cb4ee
Test Jenkins#2
Maxghost33 Feb 3, 2019
42ff4d8
Test e2e again
Maxghost33 Feb 3, 2019
3257ad1
Stage 3
Maxghost33 Feb 3, 2019
e51ca4f
Stage 3
Maxghost33 Feb 3, 2019
872dc1b
Stage 3 1 commit
Maxghost33 Feb 3, 2019
51d5505
Stage 3 - Test after deploy
Maxghost33 Feb 3, 2019
f1de1ce
First failed test
Maxghost33 Feb 3, 2019
029b2ac
Init test
Maxghost33 Feb 3, 2019
f192876
1
Maxghost33 Feb 3, 2019
10f6ea6
Sleep commit
Maxghost33 Feb 3, 2019
d1223c8
Last Test
Maxghost33 Feb 3, 2019
35c412b
Test#4
Maxghost33 Feb 3, 2019
57f0364
Version 4.0
Maxghost33 Feb 3, 2019
89064c9
Without git pull#1
Maxghost33 Feb 5, 2019
8d7bbb2
Without git pull#2
Maxghost33 Feb 5, 2019
a0e4be0
Without git pull#2
Maxghost33 Feb 5, 2019
d79eb5e
Without git pull#2
Maxghost33 Feb 5, 2019
26f1cbf
Without pull
Maxghost33 Feb 6, 2019
312c171
Without pull
Maxghost33 Feb 6, 2019
f11b72a
Without pull#2
Maxghost33 Feb 6, 2019
b255aa1
Without pull
Maxghost33 Feb 6, 2019
9e8452f
Without pull
Maxghost33 Feb 6, 2019
668830a
Without pull#3
Maxghost33 Feb 7, 2019
3bb08e4
Without pull
Maxghost33 Feb 8, 2019
04d0e63
Without pull 08.02.2019
Maxghost33 Feb 8, 2019
8f2e525
Without pull 08.02.2018#1
Maxghost33 Feb 8, 2019
cbd0c78
Without pull 08.02.2018#1
Maxghost33 Feb 8, 2019
f68b1ef
Without pull 08.02.2019#3
Maxghost33 Feb 8, 2019
9beb828
Last without helm
Maxghost33 Feb 8, 2019
d4e057d
Test Jenkinsfile Helm E2E-testing
Maxghost33 Feb 10, 2019
97e5d3b
Test Jenkinsfile Helm E2E-testing
Maxghost33 Feb 10, 2019
8f82e4e
Test Jenkinsfile Helm E2E-testing
Maxghost33 Feb 10, 2019
d0c28e5
Test Jenkinsfile Helm E2E-testing
Maxghost33 Feb 10, 2019
b94928b
Test Jenkinsfile Helm E2E-testing
Maxghost33 Feb 10, 2019
8c5bbc0
Test Jenkinsfile Helm E2E-testing
Maxghost33 Feb 10, 2019
c581238
Test Jenkinsfile Helm E2E-testing
Maxghost33 Feb 10, 2019
bd95239
Test Jenkinsfile Helm E2E-testing
Maxghost33 Feb 10, 2019
9b94f1c
Test Jenkinsfile Helm E2E-testing
Maxghost33 Feb 10, 2019
eb12389
Test Jenkinsfile Helm E2E-testing
Maxghost33 Feb 10, 2019
5b9bd84
Test Jenkinsfile Helm E2E-testing
Maxghost33 Feb 10, 2019
40f4f25
Test Jenkinsfile Helm E2E-testing
Maxghost33 Feb 10, 2019
f1583fb
Add testing helm charts for Deploy
Maxghost33 Feb 10, 2019
479f949
Add testing helm charts for Deploy
Maxghost33 Feb 10, 2019
126dd53
Add testing helm charts for Deploy
Maxghost33 Feb 10, 2019
2c9581f
Add testing helm charts for Deploy
Maxghost33 Feb 10, 2019
930c1aa
Add testing helm charts for Deploy
Maxghost33 Feb 10, 2019
9af5bc5
Add testing helm charts for Deploy
Maxghost33 Feb 10, 2019
5be762b
Add testing helm charts for Deploy
Maxghost33 Feb 10, 2019
6bcfb87
Add testing helm charts for Deploy
Maxghost33 Feb 10, 2019
6ded879
Add testing helm charts for Deploy
Maxghost33 Feb 10, 2019
875d5af
Add testing helm charts for Deploy
Maxghost33 Feb 10, 2019
35a3ffb
Add testing helm charts for Deploy
Maxghost33 Feb 10, 2019
420ee7f
Add testing helm charts for Deploy
Maxghost33 Feb 11, 2019
ff076c2
String HELM JENKINS
Maxghost33 Feb 11, 2019
614bfea
String HELM JENKINS
Maxghost33 Feb 11, 2019
f4d9a82
String HELM JENKINS
Maxghost33 Feb 11, 2019
8e46658
String HELM JENKINS
Maxghost33 Feb 11, 2019
b66fe61
String HELM JENKINS#2
Maxghost33 Feb 11, 2019
f3b1a3d
String HELM JENKINS#2
Maxghost33 Feb 11, 2019
435a8f0
Different part of E2E
Maxghost33 Feb 11, 2019
eab5c50
Different part of E2E
Maxghost33 Feb 11, 2019
10dda6a
Different part of E2E
Maxghost33 Feb 11, 2019
85b8d17
Different part of E2E
Maxghost33 Feb 11, 2019
f8bf63b
Helm
Maxghost33 Feb 11, 2019
7899c58
Helm
Maxghost33 Feb 11, 2019
326d208
Final testing
Maxghost33 Feb 11, 2019
6ab4081
Test ISTIO - add annotations
Maxghost33 Feb 11, 2019
0f18a69
Add db-secret
Maxghost33 Feb 11, 2019
e60459f
Troubleshooting DB
Maxghost33 Feb 11, 2019
40493a8
Test Deploy
Maxghost33 Feb 11, 2019
7b85872
Test Deploy
Maxghost33 Feb 11, 2019
8658663
Test Deploy Final
Maxghost33 Feb 11, 2019
29584b9
BG - Arch
Maxghost33 Feb 12, 2019
98a77f4
Add Delete Pod Job
Maxghost33 Feb 12, 2019
67e44b4
Result not local
Maxghost33 Feb 12, 2019
5a3e778
Test Helm charts
Maxghost33 Feb 12, 2019
bc0c4ef
Test Git Jenkinsfile Istio
Maxghost33 Feb 12, 2019
f6289a5
Bug resolve
Maxghost33 Feb 12, 2019
8a5476e
Add ISTION ANN
Maxghost33 Feb 12, 2019
e37aed7
TEST
Maxghost33 Feb 12, 2019
5ad8c0e
Versions
Maxghost33 Feb 12, 2019
f34bdbb
Bug resolve
Maxghost33 Feb 12, 2019
d9fe9aa
Add POST to deploy
Maxghost33 Feb 13, 2019
0727a99
Add POST to deploy
Maxghost33 Feb 13, 2019
7868ea9
Add POST to deploy
Maxghost33 Feb 13, 2019
2a269c1
Add POST to deploy-prod
Maxghost33 Feb 13, 2019
67df5ea
Add deploy POST
Maxghost33 Feb 13, 2019
6f1ccc7
TEST
Maxghost33 Feb 13, 2019
0992b7d
TEST
Maxghost33 Feb 13, 2019
a2b784a
TEST POST
Maxghost33 Feb 13, 2019
615801d
TEST DEPLOY POST
Maxghost33 Feb 13, 2019
c7ec7e9
DEPLOY POST
Maxghost33 Feb 13, 2019
20c0205
TEST BG DEPLOY
Maxghost33 Feb 13, 2019
14ac106
TEST DEPLOY POST
Maxghost33 Feb 13, 2019
bf86542
ADD CHANGE PORT
Maxghost33 Feb 13, 2019
a8447d4
TEST POST v67
Maxghost33 Feb 13, 2019
a8ca014
TEST POST v67
Maxghost33 Feb 13, 2019
205635b
23
Maxghost33 Feb 13, 2019
f0efee5
TEST B/G
Maxghost33 Feb 14, 2019
51e996e
TEST B/G Ver1
Maxghost33 Feb 14, 2019
85cc7ac
GIT HUB PERIOD#2
Maxghost33 Feb 14, 2019
c631bfc
B/G Ver 2
Maxghost33 Feb 14, 2019
f86ff88
B/G v3
Maxghost33 Feb 14, 2019
27f96bc
TEST B/G Ver4
Maxghost33 Feb 14, 2019
dae0b9d
B/G v5
Maxghost33 Feb 14, 2019
f38486b
TEST B/G v6
Maxghost33 Feb 14, 2019
d9b1254
TEST B/G v6
Maxghost33 Feb 14, 2019
a5367d7
TEST B/G v6
Maxghost33 Feb 14, 2019
71461e7
ISTIO FUCKING RELEASE
Maxghost33 Feb 14, 2019
ab16a65
TEST B/G v45
Maxghost33 Feb 14, 2019
050c6ab
TEST B/G v45
Maxghost33 Feb 14, 2019
986c494
Deploy B/G
Maxghost33 Feb 14, 2019
abdb10c
TEST B/G v51
Maxghost33 Feb 14, 2019
558b0f0
TEST B/G
Maxghost33 Feb 14, 2019
6b68019
TEST BG 02:42 15.02.2019
Maxghost33 Feb 15, 2019
19727b2
TEST
Maxghost33 Feb 15, 2019
b3dfe9b
TEST
Maxghost33 Feb 15, 2019
e1bc302
TEST
Maxghost33 Feb 15, 2019
6f947e1
DEMO
Maxghost33 Feb 15, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions DockerFolder/HELM_KUBECTL/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
FROM alpine

ARG VCS_REF
ARG BUILD_DATE

# Metadata
LABEL org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.name="helm-kubectl" \
org.label-schema.url="https://hub.docker.com/r/dtzar/helm-kubectl/" \
org.label-schema.vcs-url="https://github.com/dtzar/helm-kubectl" \
org.label-schema.build-date=$BUILD_DATE

# Note: Latest version of kubectl may be found at:
# https://aur.archlinux.org/packages/kubectl-bin/
ENV KUBE_LATEST_VERSION="v1.13.2"
# Note: Latest version of helm may be found at:
# https://github.com/kubernetes/helm/releases
ENV HELM_VERSION="v2.12.3"

RUN apk add --no-cache ca-certificates bash git \
&& wget -q https://storage.googleapis.com/kubernetes-release/release/${KUBE_LATEST_VERSION}/bin/linux/amd64/kubectl -O /usr/local/bin/kubectl \
&& chmod +x /usr/local/bin/kubectl \
&& wget -q https://storage.googleapis.com/kubernetes-helm/helm-${HELM_VERSION}-linux-amd64.tar.gz -O - | tar -xzO linux-amd64/helm > /usr/local/bin/helm \
&& chmod +x /usr/local/bin/helm

WORKDIR /config

CMD bash
11 changes: 11 additions & 0 deletions DockerFolder/jenkins_docker_image
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from jenkinsci/jenkins:lts
USER root
#Install Docker
RUN apt-get -qq update && \
apt-get -qq -y install curl && \
curl -sSL https://get.docker.com/ | sh
# Install kubectl and helm
RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && \
chmod +x ./kubectl && \
mv ./kubectl /usr/local/bin/kubectl
RUN usermod -aG docker jenkins
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM python:3.6-alpine
MAINTAINER Maxim Zhovanik
WORKDIR /service/GET-SERV
Comment thread
Maxghost33 marked this conversation as resolved.
COPY . /service/GET-SERV
RUN pip install -r /service/GET-SERV/app/requirements.txt
CMD ["python", "/service/GET-SERV/app/app.py"]


263 changes: 263 additions & 0 deletions E2E.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,263 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: testing
---
apiVersion: v1
kind: ConfigMap
metadata:
namespace: testing
name: services-address
data:
POST_SERVICE_URL: post-service.testing.svc
VIEW_SERVICE_URL: get-service.testing.svc
DB_URL: db-service.testing.svc
URL_DB: db-service.testing.svc
---
apiVersion: v1
kind: Secret
metadata:
name: db-secret
namespace: testing
data:
username: ZGJhZG1pbg==
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not using Jenkins credentials to generate secret? it's the same as just putting them in plaintext in Deployment.

password: UGFzc3dvcmQ=
dbname: c3Jtc3lzdGVt
type: Opaque
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
namespace: testing
labels:
app: pvc-postgres
name: postgres-pvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 2Gi
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
namespace: testing
name: postgres
labels:
service: postgresdb
spec:
template:
metadata:
labels:
app: postgres
spec:
initContainers:
- name: volume-mount-hack
image: busybox
command: ["sh", "-c", "chown -R 999.999 /var/lib/postgresql/"]
volumeMounts:
- name: postgres-pv-claim
mountPath: /var/lib/postgresql/data
subPath: postgres
containers:
- image: postgres:9.6.2
name: postgresql
env:
- name: POSTGRES_DB
valueFrom:
secretKeyRef:
name: db-secret
key: dbname
- name: POSTGRES_USER
valueFrom:
secretKeyRef:
name: db-secret
key: username
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: db-secret
key: password
ports:
- containerPort: 5432
volumeMounts:
- name: postgres-pv-claim
mountPath: /var/lib/postgresql/data
subPath: postgres
volumes:
- name: postgres-pv-claim
persistentVolumeClaim:
claimName: postgres-pvc
---
kind: Service
apiVersion: v1
metadata:
namespace: testing
name: srmsystemdb
spec:
selector:
app: postgres
ports:
- protocol: TCP
port: 5432
targetPort: 5432
---
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: testing
name: db-service
spec:
selector:
matchLabels:
app: db-service
template:
metadata:
labels:
app: db-service
spec:
initContainers:
- image: 100.71.71.71:5000/init-container:${params.imageTagDB_}
name: init-container-postgres
env:
- name: PGDATABASE
valueFrom:
secretKeyRef:
name: db-secret
key: dbname
- name: PGUSER
valueFrom:
secretKeyRef:
name: db-secret
key: username
- name: PGPASSWORD
valueFrom:
secretKeyRef:
name: db-secret
key: password
command: ['sh', '-c', '/bin/bash /tmp/check_dump.sh']
containers:
- image: 100.71.71.71:5000/db-service:${params.imageTagDB_}
name: db-service
ports:
- containerPort: 5002
env:
- name: POSTGRES_HOST
value: srmsystemdb
- name: POSTGRES_PORT
value: '5432'
- name: PGDATABASE
valueFrom:
secretKeyRef:
name: db-secret
key: dbname
- name: PGUSER
valueFrom:
secretKeyRef:
name: db-secret
key: username
- name: PGPASSWORD
valueFrom:
secretKeyRef:
name: db-secret
key: password
---
kind: Service
apiVersion: v1
metadata:
namespace: testing
name: db-service
spec:
selector:
app: db-service
ports:
- protocol: TCP
port: 5002
targetPort: 5002
---
kind: Service
apiVersion: v1
metadata:
namespace: testing
name: ui-service
labels:
app: ui
spec:
selector:
app: ui
ports:
- protocol: TCP
port: 5000
targetPort: 5000
---
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: testing
name: ui-deployment
spec:
selector:
matchLabels:
app: ui
replicas: 1
template:
metadata:
labels:
app: ui
spec:
containers:
- name: ui
image: 100.71.71.71:5000/ui-service:${params.imageTagUI_}
ports:
- containerPort: 5000
env:
- name: VIEW_SERVICE_URL
valueFrom:
configMapKeyRef:
name: services-address
key: VIEW_SERVICE_URL
---
kind: Service
apiVersion: v1
metadata:
namespace: testing
name: get-service
labels:
app: get
spec:
selector:
app: get
ports:
- protocol: TCP
port: 5003
targetPort: 5003
---
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: testing
name: get-deployment
spec:
selector:
matchLabels:
app: get
replicas: 1
template:
metadata:
labels:
app: get
spec:
containers:
- name: get
image: 100.71.71.71:5000/get-service:${params.imageTagGET_}
ports:
- containerPort: 5003
env:
- name: URL_DB
valueFrom:
configMapKeyRef:
name: services-address
key: URL_DB
---
21 changes: 21 additions & 0 deletions Final_Magic/DeployCluster.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash
export NAME=kubern.cluster.k8s.local
export KOPS_STATE_STORE=s3://crm-system-k8s
kops create cluster --zones eu-west-1a ${NAME} --master-size=t2.small --node-size=t2.small --node-count=2 --master-volume-size=8 --node-volume-size=8
sleep 10
kops get cluster --name ${NAME} -oyaml > cluster.yaml
cat <<__EOF__>> cluster.yaml
fileAssets:
- content: |
{
"insecure-registries" : ["100.71.71.71:5000"]
}
name: insecure-registries
path: /etc/docker/daemon.json
roles:
- Master
- Node
__EOF__
sleep 5
kops replace -f cluster.yaml
kops update cluster ${NAME} --yes
54 changes: 54 additions & 0 deletions Final_Magic/DeployRegistry.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
apiVersion: v1
kind: Service
apiVersion: v1
metadata:
name: docker-registry
spec:
clusterIP: "100.71.71.71"
selector:
app: docker-registry
ports:
- name: http
protocol: TCP
port: 5000
targetPort: 5000
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: registry
spec:
replicas: 1
selector:
matchLabels:
app: docker-registry
template:
metadata:
labels:
app: docker-registry
spec:
containers:
- name: registry
image: registry:2
ports:
- name: registry-port
containerPort: 5000
volumeMounts:
- mountPath: /var/lib/registry
name: images
volumes:
- name: images
persistentVolumeClaim:
claimName: registry-pv-claim
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: registry-pv-claim
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
Loading