Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
backoffice_server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
web-et-numerique
Factory
LLLE_Project
backoffice_server
Commits
0b33a15e
Commit
0b33a15e
authored
2 years ago
by
Rémi PAILHAREY
Browse files
Options
Downloads
Patches
Plain Diff
doc: updated k8s
parent
2db5cd59
No related branches found
No related tags found
2 merge requests
!73
Deploy Openshift v2
,
!65
MEP: removed Meilisearch
Pipeline
#51980
passed
2 years ago
Stage: quality
Stage: build
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
k8s/README.md
+13
-0
13 additions, 0 deletions
k8s/README.md
k8s/deployments/busybox-deployment.yml
+44
-0
44 additions, 0 deletions
k8s/deployments/busybox-deployment.yml
k8s/deployments/database-restore-deployment.yml
+51
-0
51 additions, 0 deletions
k8s/deployments/database-restore-deployment.yml
with
108 additions
and
0 deletions
k8s/README.md
+
13
−
0
View file @
0b33a15e
...
@@ -82,6 +82,12 @@ Configuration:
...
@@ -82,6 +82,12 @@ Configuration:
-
Copier le contenu du fichier k8s/services/ecolyo-agent-database-service.yml dedans
-
Copier le contenu du fichier k8s/services/ecolyo-agent-database-service.yml dedans
-
Lancer
`oc apply -f ecolyo-agent-database-service.yml`
-
Lancer
`oc apply -f ecolyo-agent-database-service.yml`
## Déployer un container de restauration de dump MySQL
-
Depuis VS Code, créer un fichier database-restore-deployment.yml
-
Copier le contenu du fichier k8s/deployments/database-restore-deployment.yml dedans
-
Lancer
`oc apply -f database-restore-deployment.yml`
### Déployer la base de données Meilisearch
### Déployer la base de données Meilisearch
-
Depuis VS Code, créer un fichier ecolyo-agent-meilisearch-deployment.yml
-
Depuis VS Code, créer un fichier ecolyo-agent-meilisearch-deployment.yml
...
@@ -145,3 +151,10 @@ Configuration:
...
@@ -145,3 +151,10 @@ Configuration:
```
s -F *.sql.gz | head -n -72 | xargs -r rm```
```
s -F *.sql.gz | head -n -72 | xargs -r rm```
- Répéter l'opération pour **mysql-dump-cronjob-daily** et **mysql-dump-cronjob-weekly**
- Répéter l'opération pour **mysql-dump-cronjob-daily** et **mysql-dump-cronjob-weekly**
## Restaurer un dump
- Monter un pod du déploiement "database-restore"
- Rentrer dans le terminal de ce pod
- Aller dans le dossier des dumps horaires `cd /dump/hourly` ou journaliers `cd /dump/hourly` ou hebdomadaires `cd /dump/weekly`
- Décompresser le dump souhaité `gz -d YYYY-MM-dd_hh:mm:ss.sql.gz`
- Restorer ce dump `mysql -uroot -p$MYSQL_ROOT_PASSWORD -h$DATABASE_HOST $MYSQL_DATABASE < YYYY-MM-dd_hh:mm:ss.sql`
This diff is collapsed.
Click to expand it.
k8s/deployments/busybox-deployment.yml
0 → 100644
+
44
−
0
View file @
0b33a15e
apiVersion
:
apps/v1
kind
:
Deployment
metadata
:
name
:
busybox
namespace
:
ns-selfdata-d01-syn
spec
:
selector
:
matchLabels
:
app
:
httpd
replicas
:
1
template
:
metadata
:
labels
:
app
:
httpd
spec
:
volumes
:
-
name
:
data
persistentVolumeClaim
:
claimName
:
pvc-4-ns-selfdata-d01-syn-claim
-
name
:
mysql
persistentVolumeClaim
:
claimName
:
pvc-3-ns-selfdata-d01-syn-claim
containers
:
-
name
:
busybox
image
:
'
busybox:latest'
command
:
-
sh
-
'
-c'
-
tail -f /dev/null
resources
:
limits
:
cpu
:
100m
memory
:
8Mi
requests
:
cpu
:
100m
memory
:
8Mi
volumeMounts
:
-
name
:
data
mountPath
:
/mnt/data
-
name
:
mysql
mountPath
:
/mnt/mysql
terminationMessagePath
:
/dev/termination-log
terminationMessagePolicy
:
File
imagePullPolicy
:
Always
\ No newline at end of file
This diff is collapsed.
Click to expand it.
k8s/deployments/database-restore-deployment.yml
0 → 100644
+
51
−
0
View file @
0b33a15e
apiVersion
:
apps/v1
kind
:
Deployment
metadata
:
name
:
database-restore
namespace
:
ns-selfdata-d01-syn
spec
:
selector
:
matchLabels
:
app
:
httpd
replicas
:
0
template
:
metadata
:
labels
:
app
:
httpd
spec
:
volumes
:
-
name
:
pvc-4-ns-selfdata-d01-syn-claim
persistentVolumeClaim
:
claimName
:
pvc-4-ns-selfdata-d01-syn-claim
containers
:
-
name
:
mysql-restore
image
:
'
mysql:5'
env
:
-
name
:
MYSQL_DATABASE
valueFrom
:
secretKeyRef
:
name
:
ecolyo-agent-database
key
:
name
-
name
:
MYSQL_ROOT_PASSWORD
valueFrom
:
secretKeyRef
:
name
:
ecolyo-agent-database
key
:
password
-
name
:
DATABASE_HOST
valueFrom
:
secretKeyRef
:
name
:
ecolyo-agent-database
key
:
host
-
resources
:
limits
:
cpu
:
100m
memory
:
256Mi
requests
:
cpu
:
100m
memory
:
256Mi
volumeMounts
:
-
name
:
pvc-4-ns-selfdata-d01-syn-claim
mountPath
:
/dump
terminationMessagePath
:
/dev/termination-log
terminationMessagePolicy
:
File
imagePullPolicy
:
IfNotPresent
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment