Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • 12-create-a-config-generator-to-be-able-to-easily-create-topologies
  • 17-implement-qkdn-manager-dummy
  • 22-add-a-way-of-using-tracing
  • 3-create-db-connection-instead-of-using-memory-only
  • 32-enable-tls-for-all-local-settings-integration-tests-debug-etc
  • 37-improve-hostname-ip-handling
  • 44-block-incoming-keys-if-exceeding-max-key-fill-level
  • TUD-tests-real-hardware
  • add-docker-stats-script
  • add-inventory-manager
  • akms-ckms-api
  • akms-ckms-api-implementation
  • debug-ci
  • doc-update-figures-schematic
  • errors-in-chain
  • etsi-20-bordernode
  • etsi-20-bordernode-updated
  • extend-intercom-with-aes-auth-tag
  • kai_masterthesis
  • key-forwarding-and-delivery
  • ksa-key-delivery
  • martin-quipsec
  • master
  • renovate/code.fbi.h-da.de-danet-gnmi-target-digest
  • renovate/github.com-grpc-ecosystem-grpc-gateway-v2-2.x
  • renovate/github.com-openconfig-gnmi-0.x
  • renovate/golang.org-x-sys-0.x
  • renovate/golangci-golangci-lint-1.x
  • renovate/google.golang.org-genproto-googleapis-api-digest
  • renovate/google.golang.org-grpc-1.x
  • renovate/google.golang.org-protobuf-1.x
  • renovate/mongo-8.x
  • renovate/rabbitmq-4.x
  • request-health-checks-for-peers
  • scratch-container
  • telekom-ci
  • try-to-get-ltex-working-amd64
  • tud-testing
  • vustom-akms-ckms-branch
  • tud-testing-1
40 results

Target

Select target project
  • danet/quant
1 result
Select Git revision
  • 12-create-a-config-generator-to-be-able-to-easily-create-topologies
  • 17-implement-qkdn-manager-dummy
  • 22-add-a-way-of-using-tracing
  • 3-create-db-connection-instead-of-using-memory-only
  • 32-enable-tls-for-all-local-settings-integration-tests-debug-etc
  • 37-improve-hostname-ip-handling
  • 44-block-incoming-keys-if-exceeding-max-key-fill-level
  • TUD-tests-real-hardware
  • add-docker-stats-script
  • add-inventory-manager
  • akms-ckms-api
  • akms-ckms-api-implementation
  • debug-ci
  • doc-update-figures-schematic
  • errors-in-chain
  • etsi-20-bordernode
  • etsi-20-bordernode-updated
  • extend-intercom-with-aes-auth-tag
  • kai_masterthesis
  • key-forwarding-and-delivery
  • ksa-key-delivery
  • martin-quipsec
  • master
  • renovate/code.fbi.h-da.de-danet-gnmi-target-digest
  • renovate/github.com-grpc-ecosystem-grpc-gateway-v2-2.x
  • renovate/github.com-openconfig-gnmi-0.x
  • renovate/golang.org-x-sys-0.x
  • renovate/golangci-golangci-lint-1.x
  • renovate/google.golang.org-genproto-googleapis-api-digest
  • renovate/google.golang.org-grpc-1.x
  • renovate/google.golang.org-protobuf-1.x
  • renovate/mongo-8.x
  • renovate/rabbitmq-4.x
  • request-health-checks-for-peers
  • scratch-container
  • telekom-ci
  • try-to-get-ltex-working-amd64
  • tud-testing
  • vustom-akms-ckms-branch
  • tud-testing-1
40 results
Show changes
Commits on Source (25)
Showing
with 116 additions and 63 deletions
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/python
{
"name": "ekms-develop-go",
"name": "quant-develop-go",
"build": {
"dockerfile": "Dockerfile"
},
......@@ -33,8 +33,8 @@
// Creates a named volume mounted to /home/vscode. Survives a rebuild.
// Creates a named volume mounted to /root/.docker. Survives a rebuild.
// Creates an anonymous volume mounted to /home/vscode/.vscode-server. Gets destroyed on rebuild, which allows vscode to reinstall the extensions and dotfiles.
"source=ekms-vscode-home-dir,target=/home/vscode,type=volume",
"source=ekms-docker-root-config,target=/root/.docker,type=volume",
"source=quant-vscode-home-dir,target=/home/vscode,type=volume",
"source=quant-docker-root-config,target=/root/.docker,type=volume",
"target=/home/vscode/.vscode-server,type=volume"
]
}
root = true
[*]
indent_style = space
indent_size = 4
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
end_of_line = lf
[{*.yaml, *.yml}]
indent_size = 2
[{Makefile,**.mk}]
# Use tabs for indentation (Makefiles require tabs)
indent_style = tab
artifacts/*
build_env.env
# tooling
build-tools/
artifacts/
# generated files
gostructs.go
......
......@@ -11,26 +11,24 @@ variables:
- name: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/docker:latest
alias: docker
variables:
TAG: $CI_COMMIT_SHA
DOCKER_TLS_CERTDIR: "/certs"
GOLANG_VERSION: "1.21"
before_script:
- apk add git
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker login -u $CI_DEPENDENCY_PROXY_USER -p $CI_DEPENDENCY_PROXY_PASSWORD $CI_DEPENDENCY_PROXY_SERVER
needs: []
build-ekms-ubuntu:
build-ekms:
script:
- TAG=${CI_COMMIT_BRANCH//\//-}
- IMAGE_NAME="$IMAGE_PATH/ubuntu"
- docker buildx build -t "$IMAGE_NAME:$TAG" -f Dockerfile --target "ubuntu" --build-arg "GITLAB_PROXY=${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/" .
- docker push "$IMAGE_NAME:$TAG"
- IMAGE_NAME="$IMAGE_PATH/ekms"
- TAG=$CI_COMMIT_REF_SLUG
- docker buildx build --push -t "$IMAGE_NAME:$TAG" -f ekms/Dockerfile --build-arg "GITLAB_PROXY=${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/" --build-arg GITLAB_LOGIN=${GITLAB_LOGIN} --build-arg GITLAB_TOKEN=${GITLAB_TOKEN} --build-arg GOLANG_VERSION=${GOLANG_VERSION} .
<<: *build
build-ekms-debian:
build-quantumlayer:
script:
- TAG=${CI_COMMIT_BRANCH//\//-}
- IMAGE_NAME="$IMAGE_PATH/debian"
- docker buildx build -t "$IMAGE_NAME:$TAG" -f Dockerfile --target "debian" --build-arg "GITLAB_PROXY=${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/" .
- docker push "$IMAGE_NAME:$TAG"
- IMAGE_NAME="$IMAGE_PATH/quantumlayer"
- TAG=$CI_COMMIT_REF_SLUG
- docker buildx build --push -t "$IMAGE_NAME:$TAG" -f quantumlayer/Dockerfile --build-arg "GITLAB_PROXY=${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/" --build-arg GITLAB_LOGIN=${GITLAB_LOGIN} --build-arg GITLAB_TOKEN=${GITLAB_TOKEN} --build-arg GOLANG_VERSION=${GOLANG_VERSION} .
<<: *build
[submodule "models/third_party/public"]
path = models/third_party/public
url = https://github.com/openconfig/public.git
[submodule "models/third_party/openconfig"]
path = models/third_party/openconfig
path = ekms/models/third_party/openconfig
url = https://github.com/openconfig/public.git
......@@ -7,12 +7,15 @@ TOOLS_DIR:= build-tools
GOSDN_PRG := $(MAKEFILE_DIR)$(TOOLS_DIR)
GOPATH := $(~/go)
GOBIN := $(GOSDN_PRG)
GOLANG_VERSION := 1.21
GOCMD=go
GOBUILD=$(GOCMD) build
GOCLEAN=$(GOCMD) clean
GOCLEAN=$(GOCMD) clean -cache -fuzzcache -testcache -modcache
BUILD_ARTIFACTS_PATH=artifacts
-include build_env.env
all: build
pre:
......@@ -25,22 +28,34 @@ install-tools:
go install github.com/andresterba/go-ygot-generator-generator@v0.0.4
@echo Finished installing development tooling
build: pre
CGO_ENABLED=0 $(GOBUILD) -o $(BUILD_ARTIFACTS_PATH)/ekms ./main.go
build-ekms: pre
CGO_ENABLED=0 $(GOBUILD) -o $(BUILD_ARTIFACTS_PATH)/ekms ./ekms/main.go
build-quantumlayer: pre
$(GOBUILD) -o $(BUILD_ARTIFACTS_PATH)/quantumlayer ./quantumlayer/example/main.go
build-debug: pre
$(GOBUILD) -gcflags="all=-N -l" -o $(BUILD_ARTIFACTS_PATH)/ekms ./main.go
quantumlayer-container:
docker buildx build --rm -t quantumlayer --load -f ./quantumlayer/Dockerfile --build-arg GITLAB_LOGIN=${GITLAB_LOGIN} --build-arg GITLAB_TOKEN=${GITLAB_TOKEN} --build-arg GOLANG_VERSION=${GOLANG_VERSION} .
ekms-build-debug: pre
$(GOBUILD) -gcflags="all=-N -l" -o $(BUILD_ARTIFACTS_PATH)/ekms ./ekms/main.go
generate-yang-models: install-tools
cd model &&\
../$(TOOLS_DIR)/go-ygot-generator-generator config.yaml gostructs.go &&\
cd ekms/model &&\
../../$(TOOLS_DIR)/go-ygot-generator-generator config.yaml gostructs.go &&\
go generate
container: build
docker buildx build --rm -t ekms --load -f ./Dockerfile .
ekms-container:
docker buildx build --rm -t ekms --load -f ./ekms/Dockerfile --build-arg GITLAB_LOGIN=${GITLAB_LOGIN} --build-arg GITLAB_TOKEN=${GITLAB_TOKEN} --build-arg GOLANG_VERSION=${GOLANG_VERSION} .
ekms-container-debug:
docker buildx build --rm -t ekms-debug --load -f ./ekms/Dockerfile.debug --build-arg GITLAB_LOGIN=${GITLAB_LOGIN} --build-arg GITLAB_TOKEN=${GITLAB_TOKEN} --build-arg GOLANG_VERSION=${GOLANG_VERSION} .
container-debug:
docker buildx build --rm -t ekms-debug --load -f ./Dockerfile.debug .
compose-up: ekms-container quantumlayer-container
docker-compose up -d
compose-down:
docker-compose down
self-certs:
mkdir -p ./artifacts/ssl/private
......@@ -57,11 +72,19 @@ generate-etsi-rest: generate-etsi-rest-client generate-etsi-rest-server
# Note 1: Make sure to install openapi-generator it is not installed automatically yet. https://github.com/OpenAPITools/openapi-generator#1---installation
# Note 2: Some unwanted files get removed during the code generation. Maybe adjust the files to delete in the future, if necessary.
generate-etsi-rest-client:
openapi-generator generate -i api/openapiv3/etsi14.yaml -g go -o api/go/rest/etsi/client --package-name etsi14 -v --git-host code.fbi.h-da.de --git-repo-id ekms/api/go/rest/etsi/client --git-user-id danet
rm api/go/rest/etsi/client/git_push.sh api/go/rest/etsi/client/go.mod api/go/rest/etsi/client/go.sum
openapi-generator generate -i ekms/api/openapiv3/etsi14.yaml -g go -o ekms/api/go/rest/etsi/client --package-name etsi14 -v --git-host code.fbi.h-da.de --git-repo-id ekms/api/go/rest/etsi/client --git-user-id danet
rm ekms/api/go/rest/etsi/client/git_push.sh ekms/api/go/rest/etsi/client/go.mod api/go/rest/etsi/client/go.sum
# Note 1: Make sure to install openapi-generator it is not installed automatically yet. https://github.com/OpenAPITools/openapi-generator#1---installation
# Note 2: Some unwanted files get removed during the code generation. Maybe adjust the files to delete in the future, if necessary.
generate-etsi-rest-server:
openapi-generator generate -i api/openapiv3/etsi14.yaml -g go-server -o api/go/rest/etsi/server --package-name etsi14 -v --git-host code.fbi.h-da.de --git-repo-id ekms/api/go/rest/etsi/server --git-user-id danet
rm api/go/rest/etsi/server/go.mod
openapi-generator generate -i ekms/api/openapiv3/etsi14.yaml -g go-server -o ekms/api/go/rest/etsi/server --package-name etsi14 -v --git-host code.fbi.h-da.de --git-repo-id ekms/api/go/rest/etsi/server --git-user-id danet
rm ekms/api/go/rest/etsi/server/go.mod
# Warning: Depending on your go and development configuration might also clean caches, modules and docker containers from your other projects.
clean:
rm -rf $(BUILD_ARTIFACTS_PATH)
rm -rf $(TOOLS_DIR)
$(GOCLEAN)
docker system prune -af
# Project Name
## Description
This is a basic readme file for the project.
## Usage
See the makefile for options.
To use private repos rename `build_env.env.example` to `build_env.env` and add valid credentials. If you have access, simply use your username and a GitLab access token.
Use `make compose-up` and `make compose-down`.
## Contributing
Contributions are welcome! Please follow these guidelines:
1. Fork the repository.
2. Create a new branch.
3. Make your changes.
4. Submit a pull request.
GITLAB_LOGIN=
GITLAB_TOKEN=
......@@ -2,8 +2,7 @@ version: '3'
services:
ekms01:
build:
dockerfile: Dockerfile
image: ekms
command: ["start", "--log", "debug", "--kms_config", "/tmp/kms/config/ekms01.yaml", "--insecure"]
volumes:
- ./config/ekms/example01.yaml:/tmp/kms/config/ekms01.yaml
......@@ -15,8 +14,7 @@ services:
ipv4_address: 172.100.20.10
ekms02:
build:
dockerfile: Dockerfile
image: ekms
command: ["start", "--log", "debug", "--kms_config", "/tmp/kms/config/ekms02.yaml", "--insecure"]
volumes:
- ./config/ekms/example02.yaml:/tmp/kms/config/ekms02.yaml
......@@ -28,7 +26,7 @@ services:
ipv4_address: 172.100.20.11
qlayer01:
image: quantumlayer:latest
image: quantumlayer
command: ["--config", "/tmp/quantumlayer/config/quantumlayer01.yaml"]
volumes:
- ./config/quantumlayer/example01.yaml:/tmp/quantumlayer/config/quantumlayer01.yaml
......@@ -37,7 +35,7 @@ services:
ipv4_address: 172.100.20.12
qlayer02:
image: quantumlayer:latest
image: quantumlayer
command: ["--config", "/tmp/quantumlayer/config/quantumlayer02.yaml"]
volumes:
- ./config/quantumlayer/example02.yaml:/tmp/quantumlayer/config/quantumlayer02.yaml
......
File moved
ARG GOLANG_VERSION=1.21
ARG BUILDARGS
ARG GITLAB_PROXY
FROM golang:$GOLANG_VERSION-bookworm as builder
FROM ${GITLAB_PROXY}golang:$GOLANG_VERSION-bookworm as builder
ARG GITLAB_LOGIN
ARG GITLAB_TOKEN
WORKDIR /ekms/
COPY . .
RUN echo "machine code.fbi.h-da.de login ${GITLAB_LOGIN} password ${GITLAB_TOKEN}" > ~/.netrc
WORKDIR /app/
COPY . .
RUN --mount=type=cache,target=/root/go/pkg/mod \
--mount=type=cache,target=/root/.cache/go-build \
make build
FROM ubuntu:22.04 as ubuntu
RUN apt-get update && apt-get upgrade -y
RUN apt-get install -y iproute2
RUN apt-get install -y iputils-ping
RUN apt-get install -y openssh-client openssh-server
RUN apt-get install -y libssl-dev
COPY --from=builder ekms/artifacts/ekms /usr/bin/ekms
EXPOSE 7030
EXPOSE 50900
ENTRYPOINT ["/usr/bin/ekms"]
CMD [ "start", "--log", "debug" ]
make build-ekms
FROM debian:11 as debian
FROM ${GITLAB_PROXY}debian:12-slim as debian
RUN apt-get update && apt-get upgrade -y
RUN apt-get install -y iproute2
RUN apt-get install -y iputils-ping
RUN apt-get install -y openssh-client openssh-server
RUN apt-get install -y libssl-dev
COPY --from=builder ekms/artifacts/ekms /usr/bin/ekms
COPY --from=builder app/artifacts/ekms /usr/bin/ekms
EXPOSE 7030
EXPOSE 50900
ENTRYPOINT ["/usr/bin/ekms"]
......
ARG GOLANG_VERSION=1.20.3
ARG GOLANG_VERSION=1.21
ARG BUILDARGS
FROM golang:$GOLANG_VERSION-buster as builder
WORKDIR /ekms/
FROM golang:$GOLANG_VERSION-bookworm as builder
ARG GITLAB_LOGIN
ARG GITLAB_TOKEN
RUN echo "machine code.fbi.h-da.de login ${GITLAB_LOGIN} password ${GITLAB_TOKEN}" > ~/.netrc
WORKDIR /app/
COPY . .
RUN --mount=type=cache,target=/root/go/pkg/mod \
--mount=type=cache,target=/root/.cache/go-build
RUN go install github.com/go-delve/delve/cmd/dlv@v1.20.2
RUN make build-debug
RUN make ekms-build-debug
FROM debian:11 as debian
EXPOSE 7030
......@@ -18,5 +21,5 @@ RUN apt-get install -y iputils-ping
RUN apt-get install -y openssh-client openssh-server
RUN apt-get install -y libssl-dev
COPY --from=builder /go/bin/dlv /debug/
COPY --from=builder /ekms/artifacts/ekms /debug/
COPY --from=builder /app/artifacts/ekms /debug/
CMD [ "/debug/dlv", "--listen=:4000", "--headless=true", "--log=true", "--accept-multiclient", "--api-version=2", "exec", "/debug/ekms", "start" ]
File moved
File moved