Skip to content

Commit

Permalink
merge devel
Browse files Browse the repository at this point in the history
  • Loading branch information
usu committed May 21, 2024
2 parents dd199d7 + 8a9a39f commit 5c82d0c
Show file tree
Hide file tree
Showing 37 changed files with 850 additions and 270 deletions.
4 changes: 2 additions & 2 deletions .docker-hub/print/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# build stage
FROM node:20.12.2 AS build-stage
FROM node:20.13.1 AS build-stage
ARG SENTRY_AUTH_TOKEN
ARG SENTRY_ORG
ARG SENTRY_PRINT_PROJECT
Expand All @@ -22,7 +22,7 @@ COPY print .
RUN npm run build

# production stage
FROM node:20.12.2 AS production-stage
FROM node:20.13.1 AS production-stage
WORKDIR /app

COPY --from=build-stage /app/.output ./.output
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: '20.12.2'
node-version: '20.13.1'

- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
with:
Expand Down Expand Up @@ -92,7 +92,7 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: '20.12.2'
node-version: '20.13.1'

- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
with:
Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: '20.12.2'
node-version: '20.13.1'

- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
with:
Expand Down Expand Up @@ -150,7 +150,7 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: '20.12.2'
node-version: '20.13.1'

- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
with:
Expand Down Expand Up @@ -253,7 +253,7 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: '20.12.2'
node-version: '20.13.1'

- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
with:
Expand Down Expand Up @@ -296,7 +296,7 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: '20.12.2'
node-version: '20.13.1'

- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
with:
Expand Down Expand Up @@ -335,7 +335,7 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: '20.12.2'
node-version: '20.13.1'

- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
with:
Expand Down
2 changes: 0 additions & 2 deletions .helm/ecamp3/files/db-backup-restore-image/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '3.9'

services:
db-backup-restore-image:
image: ${CONTAINER_REGISTRY:-docker.io}/${REPO_OWNER:-ecamp}/ecamp3-db-backup-restore:${VERSION:-local}
Expand Down
1 change: 0 additions & 1 deletion .helm/ecamp3/files/db_backup_job/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '3.9'
services:
create-backup:
build:
Expand Down
1 change: 0 additions & 1 deletion .helm/ecamp3/files/hook_db_restore/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '3.9'
services:
restore-backup:
build:
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.12.2
20.13.1
6 changes: 2 additions & 4 deletions .ops/aws-setup/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
version: "3.9"

services:
aws-setup:
image: pulumi/pulumi-nodejs:3.115.2
image: pulumi/pulumi-nodejs:3.116.1
container_name: 'ecamp3-aws-setup'
volumes:
- ../../.prettierrc:/.prettierrc:delegated
Expand All @@ -15,7 +13,7 @@ services:
- AWS_DEFAULT_REGION=eu-west-3

aws-cli:
image: amazon/aws-cli:2.15.50
image: amazon/aws-cli:2.15.54
container_name: 'ecamp3-aws-cli'
volumes:
- ./.aws:/root/.aws:delegated
Expand Down
26 changes: 13 additions & 13 deletions .ops/aws-setup/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .ops/aws-setup/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"devDependencies": {
"@babel/eslint-parser": "7.24.5",
"@types/node": "20.12.8",
"@types/node": "20.12.12",
"eslint": "8.57.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-import": "2.29.1",
Expand Down
1 change: 1 addition & 0 deletions .ops/ecamp3-logging/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/charts
1 change: 1 addition & 0 deletions .ops/ecamp3-logging/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/deploy.sh
6 changes: 6 additions & 0 deletions .ops/ecamp3-logging/Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dependencies:
- name: fluent-operator
repository: https://fluent.github.io/helm-charts
version: 2.7.0
digest: sha256:5b2fd2ab5e6e313924a47c8825f2c15a6d288b7125d58c2202a897ee2981213b
generated: "2024-04-13T23:13:02.185555289+02:00"
29 changes: 29 additions & 0 deletions .ops/ecamp3-logging/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
apiVersion: v2
name: ecamp3-logging
description: Helm chart for deploying ecamp3-logging on Kubernetes
home: https://github.com/ecamp/ecamp3

# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: 0.1.0

dependencies:
- name: fluent-operator
version: 2.7.0
repository: https://fluent.github.io/helm-charts
34 changes: 34 additions & 0 deletions .ops/ecamp3-logging/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# ecamp3-logging

This is a helm chart to deploy an EFFK Stack (Elasticsearch, fluentbit, fluentd, Kibana) to a cluster where
ecamp3 is running.

## Prerequisites

You need to add the fluent helm repository:

```shell
helm repo add fluent https://fluent.github.io/helm-charts
helm repo update
```

## Provisioning of Kibana Configuration

There are 2 scripts to help create a consistent configuration between
different clusters. You need [curl](https://github.com/curl/curl) and [jq](https://github.com/jqlang/jq) for the scripts
to work.

To store the current dashboard, index-pattern and search in [kibana-objects.ndjson](files%2Fkibana%2Fkibana-objects.ndjson),
you can do the following:

```shell
kubectl -n ecamp3-logging port-forward services/kibana 5601:5601
sh files/kibana/dump-kibana-objects.sh
```

To restore [kibana-objects.ndjson](files%2Fkibana%2Fkibana-objects.ndjson) to a cluster, you can do the follwing:

```shell
kubectl -n ecamp3-logging port-forward services/kibana 5601:5601
sh files/kibana/restore-kibana-objects.sh
```
8 changes: 8 additions & 0 deletions .ops/ecamp3-logging/deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

set -e

SCRIPT_DIR=$(realpath "$(dirname "$0")")
cd $SCRIPT_DIR
# to debug: --dry-run --debug
helm dep build && helm upgrade --install ecamp3-logging --namespace=ecamp3-logging --create-namespace $SCRIPT_DIR
23 changes: 23 additions & 0 deletions .ops/ecamp3-logging/files/kibana/dump-kibana-objects.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

set -e

SCRIPT_DIR=$(realpath "$(dirname "$0")")

KIBANA_HOST=${KIBANA_HOST:-localhost:5601}

curl -X POST $KIBANA_HOST/api/saved_objects/_export \
-H 'kbn-xsrf: true' \
-H 'Content-Type: application/json' \
-d '
{
"type": [
"dashboard",
"index-pattern",
"search"
],
"excludeExportDetails": true
}' \
--silent \
| jq -S \
> $SCRIPT_DIR/kibana-objects.ndjson
Loading

0 comments on commit 5c82d0c

Please sign in to comment.