Compare commits
21 commits
feature/IP
...
developmen
Author | SHA1 | Date | |
---|---|---|---|
6cb0e5962b | |||
3be5d357b9 | |||
adf76c431a | |||
bd7ba14b57 | |||
3084f84764 | |||
b711e94ddd | |||
3819407e69 | |||
a4afb7fe31 | |||
![]() |
c56dc288b6 | ||
3e4f90e1f5 | |||
b66b6f953a | |||
b09f1fd853 | |||
8c27f2f322 | |||
0b2c70ec3c | |||
1f6a768b78 | |||
2862d9cd3c | |||
c300623450 | |||
986b975121 | |||
75bcadc8a5 | |||
74a1c5046f | |||
dd065a4897 |
11 changed files with 1780 additions and 950 deletions
52
.github/workflows/build-and-push.yaml
vendored
52
.github/workflows/build-and-push.yaml
vendored
|
@ -1,37 +1,51 @@
|
|||
name: Create and publish a Docker image
|
||||
name: ci
|
||||
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: docker
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
build:
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
- name: Repository meta
|
||||
steps:
|
||||
-
|
||||
name: Repository meta
|
||||
id: repository
|
||||
run: |
|
||||
registry=${{ github.server_url }}
|
||||
registry=${registry##http*://}
|
||||
echo "registry=${registry}" >> "$GITHUB_OUTPUT"
|
||||
echo "registry=${registry}"
|
||||
repository="$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]')"
|
||||
echo "repository=${repository}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Docker meta
|
||||
echo "repository=${repository}"
|
||||
-
|
||||
name: Docker meta
|
||||
uses: docker/metadata-action@v5
|
||||
id: docker
|
||||
with:
|
||||
images: ${{ steps.repository.outputs.registry }}/${{ steps.repository.outputs.repository }}
|
||||
|
||||
- name: Build and push
|
||||
uses: https://codeberg.org/umglurf/kaniko-action@main
|
||||
-
|
||||
name: Login to registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ steps.repository.outputs.registry }}
|
||||
username: ${{ secrets.PACKAGES_USER }}
|
||||
password: ${{ secrets.PACKAGES_TOKEN }}
|
||||
-
|
||||
name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
with:
|
||||
buildkitd-flags: '--allow-insecure-entitlement network.host'
|
||||
driver-opts: network=host
|
||||
-
|
||||
name: Build and push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
credentials: |
|
||||
${{ steps.repository.outputs.registry }}=${{ github.repository }}:${{ secrets.PACKAGES_TOKEN }}
|
||||
destinations: |
|
||||
${{ steps.docker.outputs.tags }}
|
||||
push: true
|
||||
allow: network.host
|
||||
network: host
|
||||
platforms: linux/amd64,linux/arm64
|
||||
tags: ${{ steps.docker.outputs.tags }}
|
||||
|
|
27
Dockerfile
27
Dockerfile
|
@ -14,9 +14,9 @@ RUN find packages \! -name "package.json" -mindepth 2 -maxdepth 2 -exec rm -rf {
|
|||
# Stage 2 - Install dependencies and build packages
|
||||
FROM node:20.18.1 AS build
|
||||
|
||||
# Required for macOS
|
||||
# Required for arm64
|
||||
RUN apt update -y
|
||||
RUN apt install -y python3 make gcc build-essential
|
||||
RUN apt install -y python3 make gcc build-essential bash
|
||||
|
||||
USER node
|
||||
WORKDIR /app
|
||||
|
@ -50,24 +50,21 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
|||
RUN yarn config set python /usr/bin/python3
|
||||
|
||||
# Add kubectl for the kube apply plugin.
|
||||
# Add cnoe-cli
|
||||
# Add mkdocs for the TechDocs plugin.
|
||||
RUN curl -L -o /usr/local/bin/kubectl https://dl.k8s.io/release/v1.29.9/bin/linux/amd64/kubectl && chmod +x /usr/local/bin/kubectl
|
||||
|
||||
RUN curl -L -O https://github.com/cnoe-io/cnoe-cli/releases/download/v0.1.0/cnoe_Linux_x86_64.tar.gz && \
|
||||
curl -L -O https://github.com/cnoe-io/cnoe-cli/releases/download/v0.1.0/checksums.txt && \
|
||||
sha256sum -c --strict --status --ignore-missing checksums.txt && \
|
||||
tar -xzf cnoe_Linux_x86_64.tar.gz && \
|
||||
mv cnoe /usr/bin/cnoe-cli && \
|
||||
chmod +x /usr/bin/cnoe-cli && \
|
||||
rm checksums.txt cnoe_Linux_x86_64.tar.gz
|
||||
COPY ./cnoe-wrapper.sh /usr/bin/cnoe
|
||||
RUN chmod +x /usr/bin/cnoe
|
||||
RUN if test "$(uname -m)" = "x86_64"; \
|
||||
then \
|
||||
curl -L -o /usr/local/bin/kubectl https://dl.k8s.io/release/v1.29.9/bin/linux/amd64/kubectl; \
|
||||
fi
|
||||
RUN if test "$(uname -m)" != "x86_64"; \
|
||||
then \
|
||||
curl -L -o /usr/local/bin/kubectl https://dl.k8s.io/release/v1.29.9/bin/linux/arm64/kubectl; \
|
||||
fi
|
||||
RUN chmod +x /usr/local/bin/kubectl
|
||||
|
||||
ENV VIRTUAL_ENV=/opt/venv
|
||||
RUN python3 -m venv $VIRTUAL_ENV
|
||||
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
|
||||
RUN pip3 install 'mkdocs-techdocs-core==1.4.2'
|
||||
RUN pip3 install 'mkdocs-techdocs-core==1.4.2' 'mkdocs-awesome-pages-plugin==2.10.1'
|
||||
|
||||
# From here on we use the least-privileged `node` user to run the backend.
|
||||
USER node
|
||||
|
|
38
README.md
38
README.md
|
@ -1,43 +1,25 @@
|
|||
# CNOE Backstage
|
||||
# EDP Backstage
|
||||
|
||||
This repository contains code for the [Backstage](https://backstage.io) images used by the CNOE stacks.
|
||||
The EDP bespoke version of backstage.
|
||||
|
||||
With respect to the CNOE stack (where eDF originates from) it is comparable to https://github.com/cnoe-io/backstage-app
|
||||
|
||||
At the time writing CNOE-backstage-app is "version": "1.28.4"
|
||||
|
||||
## Container Images
|
||||
|
||||
Container images are pushed to the GitHub Container Registry and available [here](https://github.com/cnoe-io/backstage-app/pkgs/container/backstage-app).
|
||||
Container images are pushed to the Cefor Container Registry and available [here](https://forgejo.edf-bootstrap.cx.fg1.ffm.osc.live/DevFW-CICD/-/packages/container/backstage-edp/).
|
||||
|
||||
|
||||
## Local Development
|
||||
|
||||
Use of [**idpbuilder**](https://github.com/cnoe-io/idpbuilder) is recommended for local setup.
|
||||
See [the instructions](https://github.com/cnoe-io/idpbuilder?tab=readme-ov-file#getting-started) in the idpbuilder repository for details.
|
||||
Use of [**edpbuilder**](https://forgejo.edf-bootstrap.cx.fg1.ffm.osc.live/DevFW/edpbuilder.git) is recommended for local setup.
|
||||
|
||||
### Create your local cluster
|
||||
|
||||
Once idpbuilder is installed on your computer, create a stack that you are interested in. For example:
|
||||
Once edpbuilder is installed on your computer, create a stack that you are interested in. For example:
|
||||
|
||||
```bash
|
||||
./idpbuilder create -p https://github.com/cnoe-io/stacks//ref-implementation
|
||||
```
|
||||
|
||||
Wait for ArgoCD applications to be healthy:
|
||||
|
||||
```bash
|
||||
$ kubectl get applications -A
|
||||
|
||||
NAMESPACE NAME SYNC STATUS HEALTH STATUS
|
||||
argocd argo-workflows Synced Healthy
|
||||
argocd argocd Synced Healthy
|
||||
argocd backstage Synced Healthy
|
||||
argocd backstage-templates Synced Healthy
|
||||
argocd coredns Synced Healthy
|
||||
argocd external-secrets Synced Healthy
|
||||
argocd gitea Synced Healthy
|
||||
argocd keycloak Synced Healthy
|
||||
argocd metric-server Synced Healthy
|
||||
argocd nginx Synced Healthy
|
||||
argocd spark-operator Synced Healthy
|
||||
```
|
||||
> Hint: From here on this is the old CNOE README .... no guarantee that this works as described!
|
||||
|
||||
### Update Backstage application config
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"version": "1.36.1"
|
||||
"version": "1.38.1"
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.30.0",
|
||||
"@backstage/cli": "^0.32.0",
|
||||
"@backstage/e2e-test-utils": "^0.1.1",
|
||||
"@playwright/test": "^1.32.3",
|
||||
"@spotify/prettier-config": "^12.0.0",
|
||||
|
|
|
@ -16,31 +16,31 @@
|
|||
"dependencies": {
|
||||
"@backstage-community/plugin-github-actions": "^0.6.16",
|
||||
"@backstage-community/plugin-tech-radar": "^0.7.4",
|
||||
"@backstage/app-defaults": "^1.5.17",
|
||||
"@backstage/app-defaults": "^1.6.1",
|
||||
"@backstage/catalog-model": "^1.7.3",
|
||||
"@backstage/cli": "^0.30.0",
|
||||
"@backstage/core-app-api": "^1.15.5",
|
||||
"@backstage/core-components": "^0.16.4",
|
||||
"@backstage/core-plugin-api": "^1.10.4",
|
||||
"@backstage/integration-react": "^1.2.4",
|
||||
"@backstage/plugin-api-docs": "^0.12.4",
|
||||
"@backstage/plugin-catalog": "^1.27.0",
|
||||
"@backstage/cli": "^0.32.0",
|
||||
"@backstage/core-app-api": "^1.16.1",
|
||||
"@backstage/core-components": "^0.17.1",
|
||||
"@backstage/core-plugin-api": "^1.10.6",
|
||||
"@backstage/integration-react": "^1.2.6",
|
||||
"@backstage/plugin-api-docs": "^0.12.6",
|
||||
"@backstage/plugin-catalog": "^1.29.0",
|
||||
"@backstage/plugin-catalog-common": "^1.1.3",
|
||||
"@backstage/plugin-catalog-graph": "^0.4.16",
|
||||
"@backstage/plugin-catalog-import": "^0.12.10",
|
||||
"@backstage/plugin-catalog-react": "^1.15.2",
|
||||
"@backstage/plugin-home": "^0.8.5",
|
||||
"@backstage/plugin-kubernetes": "^0.12.4",
|
||||
"@backstage/plugin-org": "^0.6.36",
|
||||
"@backstage/plugin-permission-react": "^0.4.31",
|
||||
"@backstage/plugin-scaffolder": "^1.28.0",
|
||||
"@backstage/plugin-search": "^1.4.23",
|
||||
"@backstage/plugin-search-react": "^1.8.6",
|
||||
"@backstage/plugin-techdocs": "^1.12.3",
|
||||
"@backstage/plugin-techdocs-module-addons-contrib": "^1.1.21",
|
||||
"@backstage/plugin-techdocs-react": "^1.2.14",
|
||||
"@backstage/plugin-user-settings": "^0.8.19",
|
||||
"@backstage/theme": "^0.6.4",
|
||||
"@backstage/plugin-catalog-graph": "^0.4.18",
|
||||
"@backstage/plugin-catalog-import": "^0.12.13",
|
||||
"@backstage/plugin-catalog-react": "^1.17.0",
|
||||
"@backstage/plugin-home": "^0.8.7",
|
||||
"@backstage/plugin-kubernetes": "^0.12.6",
|
||||
"@backstage/plugin-org": "^0.6.38",
|
||||
"@backstage/plugin-permission-react": "^0.4.33",
|
||||
"@backstage/plugin-scaffolder": "^1.30.1",
|
||||
"@backstage/plugin-search": "^1.4.25",
|
||||
"@backstage/plugin-search-react": "^1.8.8",
|
||||
"@backstage/plugin-techdocs": "^1.12.5",
|
||||
"@backstage/plugin-techdocs-module-addons-contrib": "^1.1.23",
|
||||
"@backstage/plugin-techdocs-react": "^1.2.16",
|
||||
"@backstage/plugin-user-settings": "^0.8.21",
|
||||
"@backstage/theme": "^0.6.5",
|
||||
"@material-ui/core": "^4.12.2",
|
||||
"@material-ui/icons": "^4.9.1",
|
||||
"@roadiehq/backstage-plugin-argo-cd": "^2.5.1",
|
||||
|
@ -52,7 +52,7 @@
|
|||
"react-use": "^17.2.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/test-utils": "^1.7.5",
|
||||
"@backstage/test-utils": "^1.7.7",
|
||||
"@playwright/test": "^1.32.3",
|
||||
"@testing-library/dom": "^9.0.0",
|
||||
"@testing-library/jest-dom": "^6.0.0",
|
||||
|
|
|
@ -17,35 +17,35 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@backstage/backend-common": "^0.25.0",
|
||||
"@backstage/backend-defaults": "^0.8.1",
|
||||
"@backstage/backend-plugin-api": "^1.2.0",
|
||||
"@backstage/backend-defaults": "^0.9.0",
|
||||
"@backstage/backend-plugin-api": "^1.3.0",
|
||||
"@backstage/backend-tasks": "^0.6.1",
|
||||
"@backstage/catalog-client": "^1.9.1",
|
||||
"@backstage/catalog-model": "^1.7.3",
|
||||
"@backstage/config": "^1.3.2",
|
||||
"@backstage/errors": "^1.2.7",
|
||||
"@backstage/integration": "^1.16.1",
|
||||
"@backstage/plugin-app-backend": "^0.4.5",
|
||||
"@backstage/plugin-auth-backend": "^0.24.3",
|
||||
"@backstage/plugin-auth-backend-module-guest-provider": "^0.2.5",
|
||||
"@backstage/plugin-auth-backend-module-oidc-provider": "^0.4.0",
|
||||
"@backstage/plugin-auth-node": "^0.6.0",
|
||||
"@backstage/plugin-catalog-backend": "^1.31.0",
|
||||
"@backstage/plugin-catalog-backend-module-scaffolder-entity-model": "^0.2.5",
|
||||
"@backstage/plugin-kubernetes-backend": "^0.19.3",
|
||||
"@backstage/integration": "^1.16.3",
|
||||
"@backstage/plugin-app-backend": "^0.5.1",
|
||||
"@backstage/plugin-auth-backend": "^0.24.5",
|
||||
"@backstage/plugin-auth-backend-module-guest-provider": "^0.2.7",
|
||||
"@backstage/plugin-auth-backend-module-oidc-provider": "^0.4.2",
|
||||
"@backstage/plugin-auth-node": "^0.6.2",
|
||||
"@backstage/plugin-catalog-backend": "^1.32.1",
|
||||
"@backstage/plugin-catalog-backend-module-scaffolder-entity-model": "^0.2.7",
|
||||
"@backstage/plugin-kubernetes-backend": "^0.19.5",
|
||||
"@backstage/plugin-permission-common": "^0.8.4",
|
||||
"@backstage/plugin-permission-node": "^0.8.8",
|
||||
"@backstage/plugin-proxy-backend": "^0.5.11",
|
||||
"@backstage/plugin-scaffolder-backend": "^1.30.0",
|
||||
"@backstage/plugin-scaffolder-backend-module-gitea": "^0.2.6",
|
||||
"@backstage/plugin-scaffolder-backend-module-github": "^0.6.0",
|
||||
"@backstage/plugin-scaffolder-node": "^0.7.0",
|
||||
"@backstage/plugin-search-backend": "^1.8.2",
|
||||
"@backstage/plugin-search-backend-module-catalog": "^0.3.1",
|
||||
"@backstage/plugin-search-backend-module-pg": "^0.5.41",
|
||||
"@backstage/plugin-search-backend-module-techdocs": "^0.3.6",
|
||||
"@backstage/plugin-search-backend-node": "^1.3.8",
|
||||
"@backstage/plugin-techdocs-backend": "^1.11.6",
|
||||
"@backstage/plugin-permission-node": "^0.9.1",
|
||||
"@backstage/plugin-proxy-backend": "^0.6.1",
|
||||
"@backstage/plugin-scaffolder-backend": "^1.32.1",
|
||||
"@backstage/plugin-scaffolder-backend-module-gitea": "^0.2.8",
|
||||
"@backstage/plugin-scaffolder-backend-module-github": "^0.7.0",
|
||||
"@backstage/plugin-scaffolder-node": "^0.8.1",
|
||||
"@backstage/plugin-search-backend": "^2.0.1",
|
||||
"@backstage/plugin-search-backend-module-catalog": "^0.3.3",
|
||||
"@backstage/plugin-search-backend-module-pg": "^0.5.43",
|
||||
"@backstage/plugin-search-backend-module-techdocs": "^0.4.1",
|
||||
"@backstage/plugin-search-backend-node": "^1.3.10",
|
||||
"@backstage/plugin-techdocs-backend": "^2.0.1",
|
||||
"@backstage/types": "^1.2.1",
|
||||
"@kubernetes/client-node": "~0.20.0",
|
||||
"@roadiehq/backstage-plugin-argo-cd-backend": "3.1.0",
|
||||
|
@ -62,7 +62,7 @@
|
|||
"winston": "^3.2.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.30.0",
|
||||
"@backstage/cli": "^0.32.0",
|
||||
"@types/dockerode": "^3.3.0",
|
||||
"@types/express": "^4.17.6",
|
||||
"@types/express-serve-static-core": "^4.17.5",
|
||||
|
|
|
@ -42,4 +42,4 @@ backend.add(
|
|||
backend.add(authModuleKeycloakOIDCProvider);
|
||||
backend.add(cnoeScaffolderActions);
|
||||
|
||||
backend.start();
|
||||
backend.start();
|
|
@ -4,16 +4,6 @@ import { examples } from './gitea-actions';
|
|||
import { Logger } from 'winston';
|
||||
import { ArgoService } from '@roadiehq/backstage-plugin-argo-cd-backend';
|
||||
import { createRouter } from '@roadiehq/backstage-plugin-argo-cd-backend';
|
||||
//import { PluginEnvironment } from '../types';
|
||||
|
||||
|
||||
/*export default async function createPlugin({
|
||||
logger,
|
||||
config,
|
||||
}: PluginEnvironment) {
|
||||
return await createRouter({ logger, config });
|
||||
}*/
|
||||
|
||||
import { loggerToWinstonLogger } from '@backstage/backend-common';
|
||||
|
||||
import {
|
||||
|
@ -31,7 +21,6 @@ export const argocdPlugin = createBackendPlugin({
|
|||
reader: coreServices.urlReader,
|
||||
discovery: coreServices.discovery,
|
||||
auth: coreServices.auth,
|
||||
//tokenManager: coreServices.tokenManager,
|
||||
httpRouter: coreServices.httpRouter,
|
||||
},
|
||||
async init({
|
||||
|
@ -50,8 +39,6 @@ export const argocdPlugin = createBackendPlugin({
|
|||
},
|
||||
});
|
||||
|
||||
|
||||
|
||||
export function createArgoCDApp(options: { config: Config; logger: Logger }) {
|
||||
const { config, logger } = options;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { createRouter } from '@backstage/plugin-proxy-backend';
|
||||
import { createRouter } from '@roadiehq/backstage-plugin-argo-cd-backend';
|
||||
import { Router } from 'express';
|
||||
import { PluginEnvironment } from '../types';
|
||||
|
||||
|
@ -7,7 +7,6 @@ export default async function createPlugin(
|
|||
): Promise<Router> {
|
||||
return await createRouter({
|
||||
logger: env.logger,
|
||||
config: env.config,
|
||||
discovery: env.discovery,
|
||||
config: env.config
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue