Skip to content

Commit

Permalink
chore: OVH migration (#1741)
Browse files Browse the repository at this point in the history
  • Loading branch information
matmut7 authored Mar 14, 2024
1 parent 1b5b9ff commit de6e8d2
Show file tree
Hide file tree
Showing 15 changed files with 25 additions and 115 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/expo-publish-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,6 @@ jobs:
yarn install
eas update --auto --non-interactive
env:
API_URL: "https://${{ steps.env.outputs.subdomain_backoffice }}.dev.fabrique.social.gouv.fr"
API_URL: "https://${{ steps.env.outputs.subdomain_backoffice }}.ovh.fabrique.social.gouv.fr"
BRANCH_NAME: ${{ steps.env.outputs.branch }}
YARN_IGNORE_NODE: "1"
YARN_IGNORE_NODE: "1"
2 changes: 1 addition & 1 deletion .github/workflows/expo-publish-preprod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
name: Publish PreProd
runs-on: ubuntu-latest
env:
API_URL: https://backoffice-1000jours-preprod.dev.fabrique.social.gouv.fr
API_URL: https://backoffice-1000jours-preprod.ovh.fabrique.social.gouv.fr
CLEAR_STORAGE: false
MATOMO_APPLICATION_ID: 46
MATOMO_ENABLED: true
Expand Down
11 changes: 1 addition & 10 deletions .kontinuous/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,4 @@ ciNamespace: ci-les1000jours
dependencies:
fabrique:
extends:
- name: buildkit-service
dependencies:
contrib:
preDeploy:
importSecrets:
options:
secrets:
les1000joursprodserver-backup-credentials:
les1000jours-dev-backups-access-key:
les1000jours-prod-backups-access-key:
- name: ovh
4 changes: 2 additions & 2 deletions .kontinuous/env/dev/templates/strapi.configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ data:
STRAPI_LOG_LEVEL: "debug"
NODE_ENV: "production"
SENTRY_DSN: https://[email protected]/62
RESOURCES_URL: "https://nos1000jours-web-pro-develop.dev.fabrique.social.gouv.fr/annexes/ressources-parents"
WIDGET_URL: "https://nos1000jours-blues-epds-widget-preprod.dev.fabrique.social.gouv.fr"
RESOURCES_URL: "https://nos1000jours-blues-epds-pro-preprod.ovh.fabrique.social.gouv.fr/annexes/ressources-parents"
WIDGET_URL: "https://nos1000jours-blues-epds-widget-preprod.ovh.fabrique.social.gouv.fr"
13 changes: 1 addition & 12 deletions .kontinuous/env/dev/values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@

app-strapi:
~needs: [pg, build-strapi]
~preDeploy.cleaner:
match:
kind: Deployment
Expand All @@ -11,19 +9,10 @@ app-strapi:
volumeMounts:
- mountPath: /app/public/uploads
name: uploads
envFrom:
- secretRef:
name: strapi
- configMapRef:
name: strapi-configmap
- secretRef:
name: "pg-app"
# - secretRef:
# name: azure-les1000jours-volume

pg:
~chart: pg
# this force ce PG cluster to be destroyed on redeploys
# this forces the PG cluster to be destroyed on redeploys
~preDeploy.cleaner:
match:
kind: Cluster
Expand Down
17 changes: 0 additions & 17 deletions .kontinuous/env/preprod/templates/azure-volume.sealed-secret.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions .kontinuous/env/preprod/templates/strapi.configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ data:
STRAPI_LOG_LEVEL: "debug"
NODE_ENV: "production"
SENTRY_DSN: https://[email protected]/62
RESOURCES_URL: "https://nos1000jours-web-pro-preprod.dev.fabrique.social.gouv.fr/annexes/ressources-parents"
WIDGET_URL: "https://nos1000jours-blues-epds-widget-preprod.dev.fabrique.social.gouv.fr"
RESOURCES_URL: "https://nos1000jours-blues-epds-pro-preprod.ovh.fabrique.social.gouv.fr/annexes/ressources-parents"
WIDGET_URL: "https://nos1000jours-blues-epds-widget-preprod.ovh.fabrique.social.gouv.fr"
18 changes: 0 additions & 18 deletions .kontinuous/env/preprod/templates/strapi.sealed-secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,3 @@ spec:
annotations: *a1
name: strapi
type: Opaque
---
apiVersion: bitnami.com/v1alpha1
kind: SealedSecret
metadata:
annotations: &a1
sealedsecrets.bitnami.com/cluster-wide: "true"
name: azure-les1000jours-volume
spec:
encryptedData:
azurestorageaccountkey: >-
AgASgwrqJJTwfTReL3VNlrenQa04pi/Ul80Bi/gzw5qWi6FbcDjMp+UjzNvGx+EL3VkuNspitCh5L1+Hz+zF49mBjE7joNtIUI5d6rnVkS/DSsei6wthpfU747hEpwSd1ZNNYobmMcmCDtcwX1RrgMcukQqRM/pSCTzLTs8mCvB1AYZ8FaOwOTmnG9R+OzoTIop7HNbgJEyCOdxWY+4UQNHGb3tVLfgE8wpZECYQ1c21kx63vAQyEdHlg6eKaMHqPNHufPhDy6E6cYsUNN/vW5oeeZs6AYeAPiXPMTvIH4OdVUMhPzffP1MdrLbwBOvOb1QQmtomH/nhbttO+2mtEQ4Qp4Aqvh7rtD0sUaS4UONd9gm6FrTpg2WZct5xya5s9VPg1bG3iQnQCZEsfzGIoIbrLo02DadPLQvY/5V/PbmzyK9jrMB0P2M25OvY7noS9c4IJ6p4XlPSGmfkMzYNQcM6KkTJT/794EeQVuu8E/gypTByaSSPgBXjqZJk3MckGATQvQ5YQ1cjPysyTNxAnYDq/ouPIIYiQF6Lg7kSj+N4NZZg5HyMBcOUrDqynG8cBkyHZVuwkS0agxXCk/fxTjG2Vi/gZhNAYbaAi1UPI59hT8xs0uqzuwn4a97tFnvhAD0Y6Sngjv0OLXniLp1D0lpSWwZL0HQCAo/qHea5ifkA1tOavluB5Xmk7BKVioJsNsTfK7kHcf+oeWWq4X9MA0S4Ap0D4a3aQJGu6cB/WR3U80aLYvnYHpUE+iwLRUp6+p0YfTeXXQKYBdqH/UGSzIy4Xzk03yXfbwJ5deWQCoPTYJYAhC+JT7Eq
azurestorageaccountname: >-
AgANbUFD/dvNvvdc7tbxYvarpvhi3VQ/qr9V+XO92ZL6hWhQ9dJnMJjMH4tP+8EJCbAoeAPD9gFvrRZZIJlWQip1ONRkDlcHFqEqoa1R/YmbfY9Hx9bAG2vhV4He6dwyRJGXEDD45uh5asL2g/zEh9e7eSJzzDbQbENloOnH/g8y/RUf7d851U8eP2G1fwXbBMLTGCCmuPWhk471rW0E0Dhr340pL6K2iVEfhxUTrhfcgnuotG/wgrkkTyX17DJdTs5xHS63chvf52akk35PRhAFHQXPBK9mcopeLlackGpECcoCMbtO0E63/8MXjj+keoHO6yaWoFtV5nI6E15lSpBRCC9L79/SvdjbYXb2zIOPIlket6Tdeu0wIRY3pza1thaP2cx3XqEMa25M5oRUpSdYt7jiC/63DPTrkpTnuyaIshvcIZ4KUl8YRdGTZOtWSJU6lSMWjhFXNS1Hpf1NZdb3L2uJeOYUesqFTRl0aod65O91Sn2Utfwh2Pvg9ENjQ/yI/3II5Gca1TEINty2KHqMXa3cB5/ZK9yuspLlAnv2cS9Xlm2R4S+EOO43hDPrkzmFDaWwcW+6dmbrJKNlNGKpKJmZ/4ACqh1f2wH6gTlTYodD+M+w946+K02KgWTAVmTmVvySo/okj5o4PDjp2QRU0GDOMgbVr87Yb71VoM5HGesyR9mPPbo+TXsFZVDRjUNLA4QcJle8NP8+fIu/qMw=
template:
metadata:
annotations: *a1
name: azure-les1000jours-volume
type: Opaque
11 changes: 6 additions & 5 deletions .kontinuous/env/preprod/values.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
app-strapi:
host: "backoffice-1000jours-preprod.dev.fabrique.social.gouv.fr"
~needs: [pg, build-strapi]
replicas: 1 # mandatory because volume is RWO
strategyType: Recreate # idem
addVolumes:
- uploads
volumeMounts:
- mountPath: /app/public/uploads
name: uploads
securityContext:
fsGroup: 1001

pg:
~chart: pg
# this force ce PG cluster to be destroyed on redeploys
# this forces the PG cluster to be destroyed on redeploys
~preDeploy.cleaner:
match:
kind: Cluster
value: true
cnpg-cluster:
backup:
~tpl~enabled: "false"
~tpl~enabled: "false"
recovery:
enabled: true
~tpl~database: "{{ .Values.global.pgDatabase }}"
Expand All @@ -34,4 +36,3 @@ pg:
region:
~tpl~name: "les1000jours-prod-backups-access-key"
key: bucket_region

16 changes: 0 additions & 16 deletions .kontinuous/env/prod/templates/azure-volume.sealed-secret.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions .kontinuous/env/prod/templates/netpol-pg.yml

This file was deleted.

10 changes: 4 additions & 6 deletions .kontinuous/env/prod/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@ global:
host: "les1000jours.fabrique.social.gouv.fr"

app-strapi:
certSecretName: strapi-cache-crt
host: "backoffice-les1000jours.fabrique.social.gouv.fr"
replicas: 1 # mandatory because volume is RWO
strategyType: Recreate # idem
addVolumes:
- uploads
volumeMounts:
- name: uploads
mountPath: /app/public/uploads
autoscale:
enabled: true
minReplicas: 2
maxReplicas: 5
securityContext:
fsGroup: 1001
6 changes: 2 additions & 4 deletions .kontinuous/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ global:

pg:
~chart: pg
backup:
name: ovh

app-strapi:
~chart: app
Expand All @@ -20,17 +22,13 @@ app-strapi:
limits:
cpu: 1
memory: 1Gi
# startupProbe:
# initialDelaySeconds: 30
envFrom:
- secretRef:
name: strapi
- configMapRef:
name: strapi-configmap
- secretRef:
name: "pg-app"
- secretRef:
name: azure-les1000jours-volume
env:
- name: BACKOFFICE_URL
value: "https://backoffice-{{ .Values.global.host }}"
Expand Down
4 changes: 2 additions & 2 deletions back/strapi/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ MAIL_PASSWORD=
MAIL_SEND_FROM=
MAIL_SEND_TO=

RESOURCES_URL=https://nos1000jours-web-pro.fabrique.social.gouv.fr/annexes/ressources-parents
WIDGET_URL=https://nos1000jours-blues-epds-widget-preprod.dev.fabrique.social.gouv.fr
RESOURCES_URL=https://nos1000jours-blues-epds-pro-preprod.ovh.fabrique.social.gouv.fr/annexes/ressources-parents
WIDGET_URL=https://nos1000jours-blues-epds-widget-preprod.ovh.fabrique.social.gouv.fr
4 changes: 2 additions & 2 deletions front/src/utils/search/search.util.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ describe("Search Util", () => {
hash: "tabac_7755f320e9",
height: 788,
id: "226",
url: "https://backoffice-1000jours-preprod.dev.fabrique.social.gouv.fr/uploads/tabac_7755f320e9.png",
url: "https://backoffice-1000jours-preprod.ovh.fabrique.social.gouv.fr/uploads/tabac_7755f320e9.png",
width: 940,
},
},
Expand Down Expand Up @@ -117,7 +117,7 @@ describe("Search Util", () => {
hash: "tabac_7755f320e9",
height: 788,
id: "226",
url: "https://backoffice-1000jours-preprod.dev.fabrique.social.gouv.fr/uploads/tabac_7755f320e9.png",
url: "https://backoffice-1000jours-preprod.ovh.fabrique.social.gouv.fr/uploads/tabac_7755f320e9.png",
width: 940,
},
},
Expand Down

0 comments on commit de6e8d2

Please sign in to comment.