Skip to content

Commit

Permalink
feat: migration de l'outil de contrib (#766)
Browse files Browse the repository at this point in the history
  • Loading branch information
m-maillot authored Jun 1, 2022
1 parent 336159b commit 3fe04a7
Show file tree
Hide file tree
Showing 352 changed files with 23,565 additions and 2,840 deletions.
4 changes: 4 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,7 @@ HASURA_GRAPHQL_JWT_SECRET={"type": "HS256", "key": "a_pretty_long_secret_key_tha
ACTIONS_SECRET=a random string that will be verify when calling the webhook
PUBLICATION_SECRET=a random string that will be verify when calling the webhook

# Contributions
CDTN_API_URL=http://localhost:3003
# CDTN_API_URL=https://cdtn-api.fabrique.social.gouv.fr

7 changes: 7 additions & 0 deletions .github/workflows/preproduction.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ jobs:
- images: "cdtn-admin-export-elasticsearch"
path: "./targets/export-elasticsearch"
context: "."
- images: "cdtn-admin-contributions"
path: "./targets/contributions"
context: "."
args: |
NODE_ENV=production
CDTN_API_URL=https://cdtn-api.fabrique.social.gouv.fr
steps:
- name: Register docker images
uses: SocialGouv/actions/autodevops-build-register@v1
Expand All @@ -42,6 +48,7 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
dockerfile: "${{ matrix.path }}/Dockerfile"
dockercontext: "${{ matrix.context }}"
dockerbuildargs: ${{ matrix.args }}
environment: preprod

deploy:
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ jobs:
- images: "cdtn-admin-export-elasticsearch"
path: "./targets/export-elasticsearch"
context: "."
- images: "cdtn-admin-contributions"
path: "./targets/contributions"
context: "."
args: |
NODE_ENV=production
CDTN_API_URL=https://cdtn-api.fabrique.social.gouv.fr
steps:
- name: Register docker images
uses: SocialGouv/actions/autodevops-build-register@v1
Expand All @@ -40,6 +46,7 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
dockerfile: "${{ matrix.path }}/Dockerfile"
dockercontext: "${{ matrix.context }}"
dockerbuildargs: ${{ matrix.args }}
environment: prod

deploy:
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ jobs:
- images: "cdtn-admin-export-elasticsearch"
path: "./targets/export-elasticsearch"
context: "."
- images: "cdtn-admin-contributions"
path: "./targets/contributions"
context: "."
args: |
NODE_ENV=production
CDTN_API_URL=https://cdtn-api.fabrique.social.gouv.fr
steps:
- name: Register docker images
uses: SocialGouv/actions/autodevops-build-register@v1
Expand All @@ -42,6 +48,7 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
dockerfile: "${{ matrix.path }}/Dockerfile"
dockercontext: "${{ matrix.context }}"
dockerbuildargs: ${{ matrix.args }}

deploy:
name: Deploy
Expand Down
9 changes: 9 additions & 0 deletions .kube-workflow/dev/templates/contributions.configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
kind: ConfigMap
apiVersion: v1
metadata:
name: contributions
data:
CDTN_API_URL: "https://cdtn-api.fabrique.social.gouv.fr"
API_URI: "http://app-www"
HASURA_GRAPHQL_ENDPOINT: "http://hasura/v1/graphql"
NODE_ENV: "production"
17 changes: 17 additions & 0 deletions .kube-workflow/dev/templates/contributions.sealed-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
apiVersion: "bitnami.com/v1alpha1"
kind: "SealedSecret"
metadata:
annotations: &a1
sealedsecrets.bitnami.com/cluster-wide: "true"
name: contributions
namespace: null
spec:
encryptedData:
HASURA_GRAPHQL_ADMIN_SECRET: AgC4DoTx/Burraa4LQnxWJ8pa4gK7mSHWd4fFFUHWeVrTmcoxLRyVVqH8ajgXFBZ1uksTujs8LM0eDtxeO/d6e88y7lF8epCutVm/9Lr39E8eMA4zwMU6QNrCX4j34YRonf4vbOnlUfm88XKek7DTOsUsbTp5BbO/IrESzabBJ9ntLBAdCVK+j6eGZyCC44Vc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MtRvwvvz2LMsWhEuUyHpe5yLOvi5swhcGqX1ALxGxfxzV+O229WfuTmV/kGUmcHhdf/VXdJRa+PYS83YK39wC1ZsoXJvPjAvEMgoTaRE8NHPWVD2ookNwdiRQIoLrSrGMP6F+Team2KtCic9ONYnM2wwUj2JCQRkFX2LZXwm9g9uR/Leuyd/IL5+tczwfF+PHfs6TQv+uKVz2qoZQZk4myQ/0JwHluOSXHTwEWkvuwGYO8QMTDOTTdp4Dor3kN7hQZyvWf41V/EHmOoLeFsdpQkWexo1FWHRZYtgG7ZVrgs07bY65gY6c1tZOKFaWhacTuneiLosz79vxn5omsFpjOOiWdSQOPZU8GkGxqJVq16H3VJg==
template:
metadata:
annotations: *a1
name: contributions
type: "Opaque"
9 changes: 9 additions & 0 deletions .kube-workflow/preprod/templates/contributions.configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
kind: ConfigMap
apiVersion: v1
metadata:
name: contributions
data:
CDTN_API_URL: "https://cdtn-api.fabrique.social.gouv.fr"
API_URI: "http://app-www"
HASURA_GRAPHQL_ENDPOINT: "http://hasura/v1/graphql"
NODE_ENV: "production"
17 changes: 17 additions & 0 deletions .kube-workflow/preprod/templates/contributions.sealed-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
apiVersion: "bitnami.com/v1alpha1"
kind: "SealedSecret"
metadata:
annotations: &a1
sealedsecrets.bitnami.com/cluster-wide: "true"
name: contributions
namespace: null
spec:
encryptedData:
HASURA_GRAPHQL_ADMIN_SECRET: AgC4DoTx/Burraa4LQnxWJ8pa4gK7mSHWd4fFFUHWeVrTmcoxLRyVVqH8ajgXFBZ1uksTujs8LM0eDtxeO/d6e88y7lF8epCutVm/9Lr39E8eMA4zwMU6QNrCX4j34YRonf4vbOnlUfm88XKek7DTOsUsbTp5BbO/IrESzabBJ9ntLBAdCVK+j6eGZyCC44VcfszHoiQINwi0Iax66KuA4oUvpQuTdTbB20wr9vzZarMatDDQRYtjugtYFzQQA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kGUmcHhdf/VXdJRa+PYS83YK39wC1ZsoXJvPjAvEMgoTaRE8NHPWVD2ookNwdiRQIoLrSrGMP6F+Team2KtCic9ONYnM2wwUj2JCQRkFX2LZXwm9g9uR/Leuyd/IL5+tczwfF+PHfs6TQv+uKVz2qoZQZk4myQ/0JwHluOSXHTwEWkvuwGYO8QMTDOTTdp4Dor3kN7hQZyvWf41V/EHmOoLeFsdpQkWexo1FWHRZYtgG7ZVrgs07bY65gY6c1tZOKFaWhacTuneiLosz79vxn5omsFpjOOiWdSQOPZU8GkGxqJVq16H3VJg==
template:
metadata:
annotations: *a1
name: contributions
type: "Opaque"
10 changes: 10 additions & 0 deletions .kube-workflow/prod/templates/contributions.configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
kind: ConfigMap
apiVersion: v1
metadata:
name: contributions
data:
CDTN_API_URL: "https://cdtn-api.fabrique.social.gouv.fr"
API_URI: "http://app-www"
HASURA_GRAPHQL_ENDPOINT: "http://hasura/v1/graphql"
NODE_ENV: "production"

14 changes: 14 additions & 0 deletions .kube-workflow/prod/templates/contributions.sealed-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: "bitnami.com/v1alpha1"
kind: "SealedSecret"
metadata:
name: contributions
namespace: cdtn-admin
spec:
encryptedData:
HASURA_GRAPHQL_ADMIN_SECRET: AgA/oEQJToFMrm/N+uHwfhDnRu7XDNm+Bkioqq1a8cGNuwhNC51dl3rxHw0l4l4ggpcRsHR/gt4h1V/kHjsKtfKSl1opnvAqlHeEiFHMqs3Dv27o+rLR8xYxrbW//3ZXKXeQufIKkrg8eD4ZGzc9KvR/HdOQtJ4oG3hWc+Lq/47C55wfBWjvGRnrlGf4IcnmZ6JEK0mF+AukD6Jd+BFAyeVhzZ52/1W1w55rWNrOf3OkjUEJAwDVakqnkAjK42gGAZh25XvkvV23PUeopL5oX4GqmdQctMU12kX+QwPy+B0biIE9LKCeohAZlDfxY4KrUsXRnWD7W8M9Yp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8xttWJxs3An4jYihhGdBnA5IYcxiCzD8No2VIop89CKrCCtfsKnmBKvfbbVfk5Z3k+0DBmAO6NXqMQZ18mgVod6pjueB3YfLCoDH1L3hs31OH3lupzic9OY4MkKGkYn6Yppt/oErAp/Cc02bPm1QeUva2OUekZ9/Ar9EC6vvasohmBWbVEMLXV1xQPOxDHjTpGe6h26Ok3PJohQCxnfLw==
template:
metadata:
name: contributions
namespace: cdtn-admin
type: "Opaque"
6 changes: 6 additions & 0 deletions .kube-workflow/prod/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,9 @@ app-www:
env:
- name: "FRONTEND_HOST"
value: https://cdtn-admin.fabrique.social.gouv.fr

app-contributions:
host: cdtn-contributions.fabrique.social.gouv.fr
ingress:
annotations:
nginx.ingress.kubernetes.io/whitelist-source-range: 86.247.240.55,90.44.219.207,185.24.184.196,185.24.185.196,185.24.186.196,185.24.187.196,45.87.212.184,54.216.19.70,86.247.251.159,90.52.73.222,51.11.226.128,92.184.117.135,90.92.100.236,20.40.132.82,51.11.226.128,89.86.85.155
17 changes: 17 additions & 0 deletions .kube-workflow/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,23 @@ app-www:
cpu: "5m"
memory: "128Mi"

app-contributions:
probesPath: /
imagePackage: cdtn-admin-contributions
containerPort: 3200
envFrom:
- configMapRef:
name: contributions
- secretRef:
name: contributions
resources:
limits:
cpu: "1000m"
memory: "560Mi"
requests:
cpu: "5m"
memory: "128Mi"

app-export:
probesPath: /healthz
ingress:
Expand Down
2 changes: 1 addition & 1 deletion README-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ et pour remettre les utilisateurs par défaut
```sh
docker-compose exec -T postgres psql \
--dbname postgres --user postgres \
< .k8s/components/jobs/restore/post-restore.sql
< .kube-workflow/sql/post-restore.sql
```

### Alimenter l'elasticsearch en local (pour le CDTN frontend)
Expand Down
15 changes: 15 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,21 @@ services:
env_file:
- .env

contributions:
build:
context: .
dockerfile: targets/contributions/Dockerfile
shm_size: 512m
depends_on:
- hasura
- www
ports:
- "3200:3200"
environment:
API_URI: http://www
env_file:
- .env

ingester:
build:
context: .
Expand Down
20 changes: 10 additions & 10 deletions shared/logger/src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ test("should log less than or equal to info level to stdout", async () => {
expect(output.stderr).toMatchInlineSnapshot(`Array []`);
expect(output.stdout).toMatchInlineSnapshot(`
Array [
"{\\"message\\":\\"an error\\",\\"level\\":\\"error\\"}
"{\\"level\\":\\"error\\",\\"message\\":\\"an error\\"}
",
"{\\"message\\":\\"an warn\\",\\"level\\":\\"warn\\"}
"{\\"level\\":\\"warn\\",\\"message\\":\\"an warn\\"}
",
"{\\"message\\":\\"an info\\",\\"level\\":\\"info\\"}
"{\\"level\\":\\"info\\",\\"message\\":\\"an info\\"}
",
]
`);
Expand Down Expand Up @@ -59,19 +59,19 @@ test("should log all levels to stdout", async () => {
expect(output.stderr).toMatchInlineSnapshot(`Array []`);
expect(output.stdout).toMatchInlineSnapshot(`
Array [
"{\\"message\\":\\"an error\\",\\"level\\":\\"error\\"}
"{\\"level\\":\\"error\\",\\"message\\":\\"an error\\"}
",
"{\\"message\\":\\"an warn\\",\\"level\\":\\"warn\\"}
"{\\"level\\":\\"warn\\",\\"message\\":\\"an warn\\"}
",
"{\\"message\\":\\"an info\\",\\"level\\":\\"info\\"}
"{\\"level\\":\\"info\\",\\"message\\":\\"an info\\"}
",
"{\\"message\\":\\"an http\\",\\"level\\":\\"http\\"}
"{\\"level\\":\\"http\\",\\"message\\":\\"an http\\"}
",
"{\\"message\\":\\"an verbose\\",\\"level\\":\\"verbose\\"}
"{\\"level\\":\\"verbose\\",\\"message\\":\\"an verbose\\"}
",
"{\\"message\\":\\"an debug\\",\\"level\\":\\"debug\\"}
"{\\"level\\":\\"debug\\",\\"message\\":\\"an debug\\"}
",
"{\\"message\\":\\"an debug\\",\\"level\\":\\"silly\\"}
"{\\"level\\":\\"silly\\",\\"message\\":\\"an debug\\"}
",
]
`);
Expand Down
2 changes: 1 addition & 1 deletion targets/alert-cli/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG NODE_VERSION=14.18.0-slim
ARG NODE_VERSION=14.18.2-slim

# dist
FROM node:$NODE_VERSION AS dist
Expand Down
4 changes: 4 additions & 0 deletions targets/contributions/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"presets": ["next/babel"],
"plugins": [["@emotion"]]
}
3 changes: 3 additions & 0 deletions targets/contributions/.browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
last 2 Chrome versions
last 2 Edge versions
last 2 Firefox versions
11 changes: 11 additions & 0 deletions targets/contributions/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.next/
__tests__/
node_modules/
tests/

*.d.ts
*.md

jest.config.js
LICENSE

6 changes: 6 additions & 0 deletions targets/contributions/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.env.production
.eslintcache
.next
*.DS_Store
data/*
node_modules
44 changes: 44 additions & 0 deletions targets/contributions/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
ARG NODE_VERSION=14.18.2

FROM node:$NODE_VERSION AS dist

WORKDIR /app

ARG CDTN_API_URL
ENV CDTN_API_URL=$CDTN_API_URL

COPY shared/graphql-client/package.json /shared/graphql-client/package.json
COPY targets/contributions/package.json /targets/contributions/package.json
COPY package.json /package.json
COPY yarn.lock /yarn.lock

COPY . /

RUN yarn --frozen-lockfile

RUN yarn workspace @shared/graphql-client build

RUN yarn workspace @socialgouv/contibutions build

# app
FROM node:$NODE_VERSION

WORKDIR /app

COPY --from=dist shared/graphql-client/build /app/shared/graphql-client/build
COPY --from=dist shared/graphql-client/package.json /app/shared/graphql-client/package.json
COPY --from=dist targets/contributions/package.json /app/targets/contributions/package.json
COPY --from=dist targets/contributions/next.config.js /app/targets/contributions/next.config.js
COPY --from=dist targets/contributions/public /app/targets/contributions/public
COPY --from=dist targets/contributions/server /app/targets/contributions/server
COPY --from=dist targets/contributions/.next /app/targets/contributions/.next
COPY --from=dist targets/contributions/node_modules /app/targets/contributions/node_modules
COPY --from=dist package.json /app/package.json
COPY --from=dist node_modules /app/node_modules

USER 1000

ENV NODE_ENV=production
ENV NEXT_TELEMETRY_DISABLED=1

CMD ["yarn", "--cwd", "targets/contributions", "start"]
Loading

0 comments on commit 3fe04a7

Please sign in to comment.