Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update main branch #61

Merged
merged 63 commits into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
4cb617e
Added '--all' flag to `docker ps` call of the testenv job. To collect…
kKdH Jan 26, 2024
75afdfe
CI -> Make test environment cleanup more vigilant
reimarstier Jan 26, 2024
e471133
Integration tests -> Reduce number of retries to reduce log spam.
mbfm Jan 25, 2024
d111661
CI xtask -> Serve doc book via port 4000, to avoid clash with THEO.
mbfm Jan 26, 2024
b044837
GitHub Actions -> Fix run-testenv job depending on build-cleo rather …
mbfm Jan 26, 2024
d314b61
Document system packages that need to be installed during initial setup.
mbfm Jan 26, 2024
29839bb
LEA -> Fix documentation for InvalidDeviceSelection.
mbfm Jan 26, 2024
5a8b52b
CI xtask -> Revert having backtraces enabled by default.
mbfm Jan 26, 2024
a989f7e
Reworked LEA's `ClusterConfigurator` to enhance usability.
mtwardawski Jan 19, 2024
8696994
Auth -> Add keycloak client for opendut-lea
reimarstier Jan 23, 2024
5e5e259
Auth -> Add keycloak configuration for LEA
reimarstier Jan 24, 2024
159737c
CI -> publish keycloak port in virtual machine
reimarstier Jan 23, 2024
ebb69a2
CI -> Enable TLS for keycloak in test environment
reimarstier Jan 25, 2024
5d181ed
Auth -> Add option to login with OIDC in LEA
reimarstier Jan 25, 2024
9c1e7f2
Auth -> Add OIDC env to CARL in testenv, increase timeout for keycloa…
reimarstier Jan 26, 2024
b684a28
CARL -> Remove LEA index.html check
reimarstier Jan 26, 2024
cb4348c
CARL -> Add flag to check if index.html of LEA is present
reimarstier Jan 26, 2024
6ff5b5e
Auth -> OIDC scopes: Use comma-separated list in configuration
reimarstier Jan 26, 2024
7db927f
EDGAR Setup Managed -> Print PeerId and CARL URL at the start.
mbfm Jan 26, 2024
0c28102
GitHub Actions -> Change auxiliary release tag name from 'nightly' to…
mbfm Jan 26, 2024
a25cc22
Cleaned up device_selector.rs and leader_selector.rs.
kKdH Jan 26, 2024
9da02ba
EDGAR Service -> Join network interfaces to bridge after receiving Cl…
mbfm Jan 26, 2024
f3b543a
Increased `retention-days` for docker logs in CI.
kKdH Jan 28, 2024
c97744b
CI -> rename edgar_router container to edgar-router, add note where t…
reimarstier Jan 29, 2024
d99284e
CI -> Add opendut-theo to edgar docker container
reimarstier Jan 29, 2024
202c8ee
CI -> Readd resources/tests to build theo in testenv
reimarstier Jan 29, 2024
9a2da22
CI -> move sepcial dockerignore file for EDGAR container
reimarstier Jan 29, 2024
a15710c
CI -> increase timeout in ping script
reimarstier Jan 29, 2024
77b8449
EDGAR+THEO -> Rename 'router' to 'leader'.
mbfm Jan 29, 2024
4a5825a
THEO -> Fix pings between peers not working.
mbfm Jan 29, 2024
04a696e
THEO -> Initial code for pinging device interfaces.
mbfm Jan 29, 2024
a627ce6
Auth -> Make OIDC optional
reimarstier Jan 30, 2024
30b3e9f
CI -> Remove edgar when testenv is destroyed
reimarstier Jan 30, 2024
f4f3e69
THEO -> Code cleanup.
mbfm Jan 30, 2024
78378df
THEO -> Initial command structure to have THEO called from within the…
mbfm Jan 30, 2024
816136e
THEO -> Ping the EDGAR-created bridges to ensure the VPN works.
mbfm Jan 31, 2024
92ebfdf
EDGAR Service -> (Re-)Create bridge when receiving ClusterAssignment.
mbfm Feb 1, 2024
60c9491
EDGAR Setup Unmanaged -> Get device interfaces via CLI flag rather th…
mbfm Feb 1, 2024
6f48e1f
Fix warnings.
mbfm Feb 1, 2024
fd972ee
Updated peer state diagram with a new 'unhealthy' state.
kKdH Feb 1, 2024
238718a
THEO -> Clean up EDGAR setup script.
mbfm Feb 1, 2024
cd165c5
Removed mermaid from the docs in favor of plantuml.
kKdH Feb 1, 2024
cef2a88
THEO -> Await network interfaces during EDGAR setup.
mbfm Feb 1, 2024
1a50a54
THEO -> Remove THEO distribution from containers.
mbfm Feb 1, 2024
f3bd039
Moved location from devices to peers
voelkera Jan 29, 2024
3799c0c
Introduced NewTypes for name, description, tags
mtwardawski Jan 30, 2024
4f65d86
Fixed failed pipeline run
voelkera Feb 1, 2024
8e943d3
Restructured 'opendut-vpn-netbird' crate.
kKdH Jan 29, 2024
ef8f0bb
Changed implementation `NetbirdManagementClient` to re-create a peer'…
kKdH Jan 30, 2024
f39ddb2
Cleaned-up the 'opendut-vpn-netbird' crate.
kKdH Jan 31, 2024
90a93c8
Added a warning to LEA's 'setup' tab for peers.
kKdH Feb 1, 2024
8dab4a8
Renamed CARL's gRPC endpoint `CreatePeerSetup` to `GeneratePeerSetup`.
kKdH Feb 1, 2024
24b0a67
Update github action upload-artifact to version 4.3.0 and download-ar…
mtwardawski Feb 2, 2024
27bcd39
CI xtask -> Install mdbook-plantuml instead of mdbook-mermaid for dis…
mbfm Feb 2, 2024
33ddb60
CI xtask -> Fix logs not being picked up by `tracing` anymore.
mbfm Feb 2, 2024
af753f3
CI xtask -> Introduce `cargo ci licenses texts` to generate a listing…
mbfm Feb 2, 2024
9ef1d50
CI xtask -> Make `cargo ci licenses sbom` only install dependencies o…
mbfm Feb 2, 2024
8a534b6
EDGAR Setup -> Code cleanup + improve error propagation.
mbfm Feb 7, 2024
a9ef67c
EDGAR Setup -> Explicitly do not create a home directory for the serv…
mbfm Feb 7, 2024
8971576
Fixed 'lea presence check' which failed in the case of an error.
kKdH Feb 8, 2024
2ca9d1b
github action: Added script to publish-release job to zip four SBOM's…
mtwardawski Feb 2, 2024
846fd08
EDGAR Setup -> More comprehensive handling of using root as the servi…
mbfm Feb 8, 2024
a7c96ec
Fixed netbird setup-key creation to resolve #69.
kKdH Feb 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .ci/cargo-deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,9 @@ unknown-git = "warn"
# if not specified. If it is specified but empty, no registries are allowed.
allow-registry = ["https://github.com/rust-lang/crates.io-index"]
# List of URLs for allowed Git repositories
allow-git = []
allow-git = [
"https://gitlab.com/kerkmann/leptos_oidc",
]

[sources.allow-org]
# 1 or more github.com organizations to allow git sources for
Expand Down
3 changes: 2 additions & 1 deletion .ci/docker/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ Vagrant.configure("2") do |config|
# share the root folder from the host (relative from where the Vagrantfile is located)
config.vm.synced_folder ".", repo_root, disabled: false, SharedFoldersEnableSymlinksCreate: false

# normal user is allowed to forward ports > 1024
# normal user is allowed to forward ports > 1024, restrict host_ip to localhost only (avoids publishing to all interfaces)
config.vm.network :forwarded_port, guest: 3000, host: 3000, host_ip: "127.0.0.1"
config.vm.network :forwarded_port, guest: 8081, host: 8081, host_ip: "127.0.0.1"

config.vm.provider "virtualbox" do |vb|
vb.name = machine[:hostname]
Expand Down
3 changes: 1 addition & 2 deletions .ci/docker/carl-on-host/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@ services:
volumes:
- "../../../resources/development/tls/:/etc/opendut-network/tls/:ro"

#ports:
# - "127.0.0.1:8082:8080" # traefik dashboard
networks:
opendutnet:
ipv4_address: 192.168.32.200
aliases:
- carl

Expand Down
10 changes: 7 additions & 3 deletions .ci/docker/carl/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,13 @@ services:
- OPENDUT_CARL_VPN_NETBIRD_HTTPS_ONLY=false
- OPENDUT_CARL_VPN_NETBIRD_AUTH_SECRET=$NETBIRD_API_TOKEN
- OPENDUT_CARL_VPN_NETBIRD_AUTH_TYPE=personal-access-token
# dynamically provided
# OIDC
- OPENDUT_CARL_NETWORK_OIDC_ENABLED=true
- OPENDUT_CARL_NETWORK_OIDC_LEA_CLIENT_ID=opendut-lea-client
- OPENDUT_CARL_NETWORK_OIDC_LEA_ISSUER_URL=https://keycloak/realms/opendut
- OPENDUT_CARL_NETWORK_OIDC_LEA_SCOPES=openid,profile,email

# dynamically provided
- OPENDUT_DOCKER_IMAGE_NAMESPACE
- OPENDUT_DOCKER_IMAGE_HOST
- OPENDUT_CARL_VERSION
Expand All @@ -44,8 +50,6 @@ services:
retries: 3
start_period: 40s

#ports:
# - "443"
networks:
opendutnet:
ipv4_address: 192.168.32.200
Expand Down
2 changes: 1 addition & 1 deletion .ci/docker/edgar/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ awk 'NF {sub(/\r/, ""); printf "%s\\n",$0;}' resources/development/tls/insecure-
```
docker compose build
docker compose up -d
docker exec -ti edgar_router /opt/wait_until_ready.sh
docker exec -ti edgar-leader /opt/wait_until_ready.sh
docker exec -ti edgar-peer-1 /opt/wait_until_ready.sh
docker exec -ti edgar-peer-1 /opt/pingall.sh
docker exec -ti edgar-peer-1 python3 /opt/delete_peers.py
Expand Down
6 changes: 3 additions & 3 deletions .ci/docker/edgar/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ version: "3.9"

services:

router:
container_name: edgar_router # defined DNS for the container
leader:
container_name: edgar-leader # defined DNS for the container
build:
context: ../../..
dockerfile: ./.ci/docker/edgar/Dockerfile
command: /opt/managed.sh router
command: /opt/managed.sh leader
#command: sleep infinity
volumes:
- ../../../target/ci/distribution/x86_64-unknown-linux-gnu/:/opt/artifacts
Expand Down
8 changes: 4 additions & 4 deletions .ci/docker/edgar/scripts/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,15 @@ check_timeout() {
}


debug_show_peers_requesting_router_ip() {
debug_show_peers_requesting_leader_ip() {
while true; do
lookups=$(grep router_ip.txt logs.txt | nl | awk '{print $1}' | tail -n1)
lookups=$(grep leader_ip.txt logs.txt | nl | awk '{print $1}' | tail -n1)
num_lookups=${lookups:-0}
echo "${num_lookups} of ${OPENDUT_EDGAR_REPLICAS} peers fetched the router_ip address."
echo "${num_lookups} of ${OPENDUT_EDGAR_REPLICAS} peers fetched the leader_ip address."
if [ "${num_lookups}" == "${OPENDUT_EDGAR_REPLICAS}" ]; then
break
else
echo "Waiting for peers to fetch router_ip address."
echo "Waiting for peers to fetch leader_ip address."
sleep 1
fi
done
Expand Down
61 changes: 44 additions & 17 deletions .ci/docker/edgar/scripts/managed.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,30 +16,30 @@ cleo_get_peer_id() {
fi
}

cleo_count_connected_peers() {
check_expected_number_of_connected_peers_in_cluster() {
expected="$1"
RESULT=$(opendut-cleo list --output json peers | jq -r '.[].status' | grep -c Connected)
cluster="$2"
RESULT=$(opendut-cleo list --output json peers | jq --arg CLUSTER "$cluster" -r '. | map(select(.name | contains($CLUSTER))) | .[].status' | grep -c Connected)
if [ "$RESULT" -eq "$expected" ]; then
return 0
else
return 1
fi
}

cleo_count_connected_peers_in_cluster() {
expected="$1"
cluster="$2"
RESULT=$(opendut-cleo list --output json peers | jq --arg CLUSTER "$cluster" -r '. | map(select(.name | contains($CLUSTER))) | .[].status' | grep -c Connected)
if [ "$RESULT" -eq "$expected" ]; then
return 0
else
return 1
check_interface_exists() {
interface="$1"

ip link show dev "$interface" > /dev/null
EXISTS=$?

if [ $EXISTS -ne 0 ]; then
echo "Network interface '$interface' does not exist."
return 1
fi
}

pre_flight_tasks() {
touch /etc/security/capability.conf

if ! type opendut-cleo > /dev/null; then
echo "Command 'opendut-cleo' not found."
exit 1
Expand All @@ -52,8 +52,12 @@ pre_flight_tasks
PEER_ID=$(uuidgen)
NAME="${OPENDUT_EDGAR_CLUSTER_NAME}_$(hostname)"
echo "Creating peer with name $NAME and id $PEER_ID"
opendut-cleo create peer --name "$NAME" --id "$PEER_ID"
opendut-cleo create device --peer-id "$PEER_ID" --name device-"$NAME" --interface eth0 --location "$NAME" --tags "$OPENDUT_EDGAR_CLUSTER_NAME"
opendut-cleo create peer --name "$NAME" --id "$PEER_ID" --location "$NAME"

DEVICE_INTERFACE="dut0"
ip link add $DEVICE_INTERFACE type dummy
ip link set dev $DEVICE_INTERFACE up
opendut-cleo create device --peer-id "$PEER_ID" --name device-"$NAME" --interface "$DEVICE_INTERFACE" --tag "$OPENDUT_EDGAR_CLUSTER_NAME"

PEER_SETUP_KEY=$(opendut-cleo generate-peer-setup --id "$PEER_ID")
echo "Setting up peer with setup key $PEER_SETUP_KEY"
Expand All @@ -69,14 +73,15 @@ done

expected_peer_count=$((OPENDUT_EDGAR_REPLICAS + 1))
START_TIME="$(date +%s)"
while ! cleo_count_connected_peers_in_cluster "$expected_peer_count" "$OPENDUT_EDGAR_CLUSTER_NAME"; do
while ! check_expected_number_of_connected_peers_in_cluster "$expected_peer_count" "$OPENDUT_EDGAR_CLUSTER_NAME"; do
check_timeout "$START_TIME" 600 || { echo "Timeout while waiting for other edgar peers in my cluster."; exit 1; }

echo "Waiting for all edgar peers in my cluster ..."
sleep 3
done

if [ "$1" == "router" ]; then

if [ "$1" == "leader" ]; then
DEVICES="$(opendut-cleo list --output=json devices | jq --arg NAME "$OPENDUT_EDGAR_CLUSTER_NAME" -r '.[] | select(.tags==$NAME).name' | xargs echo)"
echo "Enumerating devices to join cluster: $DEVICES"

Expand All @@ -91,8 +96,30 @@ if [ "$1" == "router" ]; then
CLUSTER_ID=$(echo "$RESPONSE" | jq -r '.id')
echo "Creating cluster deployment for id=$CLUSTER_ID"
opendut-cleo create cluster-deployment --id "$CLUSTER_ID"
echo "Success" | tee -a > /opt/signal/success.txt
fi


BRIDGE="br-opendut" # needs to match EDGAR's default
GRE_INTERFACE="gre-opendut0" # needs to match EDGAR's default prefix

check_edgar_interfaces_exist() {
check_interface_exists "$BRIDGE"
check_interface_exists "$GRE_INTERFACE"
}

START_TIME="$(date +%s)"
while ! check_edgar_interfaces_exist; do
check_timeout "$START_TIME" 600 || { echo "Timeout while waiting for the EDGAR-managed network interfaces to exist."; exit 1; }
echo "Waiting for the EDGAR-managed network interfaces to exist..."
sleep 3
done

BRIDGE_ADDRESS=$(ip -json address show dev eth0 | jq --raw-output '.[0].addr_info[0].local' | sed --expression 's#32#33#') # derive from existing address, by replacing '32' with '33'
ip address add "$BRIDGE_ADDRESS/24" dev "$BRIDGE"


if [ "$1" == "leader" ]; then
echo "Success" | tee -a > /opt/signal/success.txt
fi

trap die_with_success TERM
Expand Down
44 changes: 39 additions & 5 deletions .ci/docker/edgar/scripts/pingall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,61 @@

source "$(dirname "$0")/functions.sh"

ping_all_peers() {
ping_all_netbird_peers() {
REQUIRED_SUCCESS="$1"
IPS=$(netbird status --json | jq -r '.peers.details[].netbirdIp')

if [ -z "$IPS" ]; then #abort if no IPs returned
echo "Failed to determine IP addresses to ping."
return 1
fi

for ip in $IPS
do
if [ "$REQUIRED_SUCCESS" == "true" ]; then
fping --count=1 --timeout=1000 --retry=5 "$ip" || { echo "$ip did not respond"; return 1; }
else
fping --count=1 --timeout=1000 --retry=5 "$ip" || { echo "$ip did not respond"; sleep 10; }
fi
done
}

ping_all_dut_bridges() {
REQUIRED_SUCCESS="$1"
IPS=$(wg show all endpoints | grep -Eo '192.168.32.[0-9]+' | sed -e 's#32#33#')

if [ -z "$IPS" ]; then #abort if no IPs returned
echo "Failed to determine IP addresses to ping."
return 1
fi

for ip in $IPS
do
fping -c1 -t500 "$ip" || { echo "$ip did not respond"; sleep 3; }
if [ "$REQUIRED_SUCCESS" == "true" ]; then
fping --count=1 --timeout=1000 --retry=5 "$ip" || { echo "$ip did not respond"; return 1; }
else
fping --count=1 --timeout=1000 --retry=5 "$ip" || { echo "$ip did not respond"; sleep 10; }
fi
done
}


wait_for_peers_to_connect

echo "first ping may take multiple seconds"
ping_all_peers
ping_all_peers
ping_all_netbird_peers "false"
ping_all_netbird_peers "false"

set -e # exit on error
set -x # print each command

echo "-------------------------------------------------------------------------"
echo "Running ping test"
ping_all_peers
echo "Pinging NetBird peers..."
ping_all_netbird_peers "true"

echo "Pinging DUT bridges..."
ping_all_dut_bridges "true"

echo "SUCCESS"
exit 0
24 changes: 12 additions & 12 deletions .ci/docker/edgar/scripts/prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,38 +5,38 @@ trap die_with_error TERM


if [ -n "$1" ] ; then
/opt/opendut-edgar/opendut-edgar setup --no-confirm unmanaged --setup-key "$NETBIRD_SETUP_KEY" --management-url "${NETBIRD_MANAGEMENT_API}" --router=local
/opt/opendut-edgar/opendut-edgar setup --no-confirm unmanaged --setup-key "$NETBIRD_SETUP_KEY" --management-url "${NETBIRD_MANAGEMENT_API}" --leader=local

while ! netbird status | grep IP; do
echo "Waiting for netbird to start up..."
sleep 1
done
router_ip=$(netbird status | grep IP | grep -Eo "[0-9]+.[0-9]+.[0-9]+.[0-9]+")
leader_ip=$(netbird status | grep IP | grep -Eo "[0-9]+.[0-9]+.[0-9]+.[0-9]+")

echo "$router_ip" > router_ip.txt
echo "$leader_ip" > leader_ip.txt
python3 -m http.server 2> logs.txt &
python3 ip_provider.py 2> provider.txt &

debug_show_peers_requesting_router_ip
debug_show_peers_requesting_leader_ip
wait_for_peers_to_connect

/opt/opendut-edgar/opendut-edgar setup --no-confirm unmanaged --setup-key "$NETBIRD_SETUP_KEY" --management-url "${NETBIRD_MANAGEMENT_API}" --router=local
/opt/opendut-edgar/opendut-edgar setup --no-confirm unmanaged --setup-key "$NETBIRD_SETUP_KEY" --management-url "${NETBIRD_MANAGEMENT_API}" --leader=local
echo setting bridge ip
ip a a 192.168.100.1/24 dev br-opendut

else
echo waiting for router to come up
while ! curl -sf "http://edgar_router:8000" --output /dev/null; do
echo "Waiting for router to start up..."
echo waiting for leader to come up
while ! curl -sf "http://edgar-leader:8000" --output /dev/null; do
echo "Waiting for leader to start up..."
sleep 3
done

router_ip=$(curl --silent http://edgar_router:8000/router_ip.txt)
echo "Using router router_ip address $router_ip"
/opt/opendut-edgar/opendut-edgar setup --no-confirm unmanaged --setup-key "$NETBIRD_SETUP_KEY" --management-url "${NETBIRD_MANAGEMENT_API}" --router="$router_ip"
leader_ip=$(curl --silent http://edgar-leader:8000/leader_ip.txt)
echo "Using leader leader_ip address $leader_ip"
/opt/opendut-edgar/opendut-edgar setup --no-confirm unmanaged --setup-key "$NETBIRD_SETUP_KEY" --management-url "${NETBIRD_MANAGEMENT_API}" --leader="$leader_ip"

echo fetching bridge_ip
bridge_ip=$(curl --silent http://edgar_router:5000/)
bridge_ip=$(curl --silent http://edgar-leader:5000/)
bridge_ip="192.168.100.${bridge_ip}/24"
echo "Got bridge ip ${bridge_ip}"
ip a a "${bridge_ip}" dev br-opendut
Expand Down
2 changes: 1 addition & 1 deletion .ci/docker/firefox/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ Following features are included:
* Open url in remote session:
* https://carl
* http://netbird-ui
* http://keycloak
* https://keycloak
5 changes: 4 additions & 1 deletion .ci/docker/firefox/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ services:
- OPENDUT_HOSTS

volumes:
- /path/to/config:/config
- opendut_firefox:/config
shm_size: "1gb"
#restart: unless-stopped
networks:
Expand All @@ -29,3 +29,6 @@ networks:
opendutnet:
name: opendut_network
external: true # Use a pre-existing network

volumes:
opendut_firefox:
2 changes: 1 addition & 1 deletion .ci/docker/firefox/postinit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ if [ ! -e "/config/.firstrun" ]; then
echo "First run, opening a bunch of sites"
touch /config/.firstrun
# abc is the user firefox runs as
su - abc -c 'DISPLAY=:1 firefox http://keycloak'
su - abc -c 'DISPLAY=:1 firefox https://keycloak'
su - abc -c 'DISPLAY=:1 firefox http://netbird-ui'
su - abc -c 'DISPLAY=:1 firefox https://carl'
fi
4 changes: 4 additions & 0 deletions .ci/docker/keycloak/Dockerfile-keycloak-provision
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@ RUN mkdir -p /mnt/rootfs
RUN dnf remove -y subscription-manager
RUN dnf install --installroot /mnt/rootfs curl jq --releasever 9 --setopt install_weak_deps=false --nodocs -y; dnf --installroot /mnt/rootfs clean all
#RUN find /mnt/rootfs -name '*jq*'
COPY ./resources/development/tls/insecure-development-ca.pem /etc/pki/ca-trust/source/anchors/
RUN update-ca-trust


FROM quay.io/keycloak/keycloak:$KEYCLOAK_VERSION
USER root
COPY --from=ubi-micro-build /mnt/rootfs/usr/bin/curl /usr/bin/curl
COPY --from=ubi-micro-build /mnt/rootfs/usr/bin/jq /usr/bin/jq
COPY --from=ubi-micro-build /mnt/rootfs/usr/lib64/ /usr/lib64/
COPY --from=ubi-micro-build /etc/pki/ca-trust/extracted/ /etc/pki/ca-trust/extracted/

COPY ./.ci/docker/keycloak/keycloak_functions.sh /keycloak_functions.sh
COPY ./.ci/docker/keycloak/provision.sh /provision.sh
Expand Down
3 changes: 3 additions & 0 deletions .ci/docker/keycloak/Dockerfile-keycloak-server
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ RUN mkdir -p /mnt/rootfs
# Removes this warning "This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register."
RUN dnf remove -y subscription-manager
RUN dnf install --installroot /mnt/rootfs curl jq --releasever 9 --setopt install_weak_deps=false --nodocs -y; dnf --installroot /mnt/rootfs clean all
COPY ./resources/development/tls/insecure-development-ca.pem /etc/pki/ca-trust/source/anchors/
RUN update-ca-trust

# Documentation:
# https://www.keycloak.org/server/containers
Expand All @@ -23,6 +25,7 @@ USER root
COPY --from=ubi-micro-build /mnt/rootfs/usr/bin/curl /usr/bin/curl
COPY --from=ubi-micro-build /mnt/rootfs/usr/bin/jq /usr/bin/jq
COPY --from=ubi-micro-build /mnt/rootfs/usr/lib64/ /usr/lib64/
COPY --from=ubi-micro-build /etc/pki/ca-trust/extracted/ /etc/pki/ca-trust/extracted/

COPY --from=extension /src/keycloak-extension-playground/github-enterprise-identity-provider/target/github-enterprise-identity-provider-1.0.0.0-SNAPSHOT.jar /opt/keycloak/providers
RUN /opt/keycloak/bin/kc.sh build
Expand Down
Loading
Loading