-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Use podman-compose for dev environment
- Loading branch information
1 parent
de088bd
commit 167c5b0
Showing
15 changed files
with
357 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1 @@ | ||
FROM registry.access.redhat.com/ubi7 | ||
|
||
RUN yum install go-toolset-1.19 git make curl gzip tar --enablerepo=rhel-7-server-devtools-rpms -y | ||
|
||
COPY ./entrypoint.sh /usr/bin/ | ||
RUN chmod +x /usr/bin/entrypoint.sh | ||
|
||
COPY ./enable_go_scl.sh /etc/profile.d/ | ||
RUN chmod +x /etc/profile.d/enable_go_scl.sh | ||
|
||
ENTRYPOINT ["entrypoint.sh"] | ||
FROM registry.access.redhat.com/ubi7/go-toolset:1.19 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
|
||
pushd $(dirname "$0")/.. | ||
DEVCONTAINER_PATH=$(pwd) | ||
popd | ||
|
||
LOCAL_COMPOSE_FILE=$DEVCONTAINER_PATH/docker-compose.local.yml | ||
|
||
if [ ! -f "$LOCAL_COMPOSE_FILE" ]; then | ||
cat >"$LOCAL_COMPOSE_FILE" <<EOF | ||
version: '3' | ||
services: | ||
host-metering: | ||
build: | ||
context: ${DEVCONTAINER_PATH} | ||
command: /bin/sh -c "while sleep 1000; do :; done" | ||
EOF | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
version: '3' | ||
|
||
services: | ||
host-metering: | ||
build: | ||
context: ./ | ||
dockerfile: ./Dockerfile | ||
volumes: | ||
- ../:/workspace/host-metering:Z | ||
|
||
prometheus: | ||
image: prometheus/prometheus | ||
ports: | ||
- 9090:9090 | ||
volumes: | ||
- ./local_prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:Z | ||
command: | ||
- '--config.file=/etc/prometheus/prometheus.yml' | ||
- '--storage.tsdb.path=/prometheus' | ||
- '--web.console.libraries=/usr/share/prometheus/console_libraries' | ||
- '--web.console.templates=/usr/share/prometheus/consoles' | ||
- '--web.enable-remote-write-receiver' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Test host-metering configuration file which writes to a local prometheus | ||
# and uses a test certificate and key. | ||
|
||
# E.g. could be used as: | ||
# ./host-metering -config hack/host-metering.conf daemon | ||
|
||
[host-metering] | ||
write_url=http://prometheus:9090/api/v1/write | ||
write_interval_sec=5 | ||
host_cert_path=./mocks/consumer/cert.pem | ||
host_cert_key_path=./mocks/consumer/key.pem | ||
collect_interval_sec=0 | ||
label_refresh_interval_sec=10 | ||
write_retry_attempts=4 | ||
write_retry_interval_sec=2 | ||
metrics_wal_path=./mocks/cpumetrics | ||
log_level=DEBUG |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"go.alternateTools": { | ||
"go": "/opt/rh/go-toolset-1.19/root/usr/bin/go" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
# Execute this script in the directory with test-cert.cnf | ||
# Purpose: Create a self-signed certificate for testing | ||
|
||
if [ -d consumer ]; then | ||
rm -rf consumer | ||
fi | ||
|
||
mkdir consumer | ||
|
||
openssl genrsa -out consumer/key.pem | ||
|
||
# To create a CSR for submitting to CA | ||
# openssl req -new -key test-cert.key -out test-cert.csr -config test-cert.cnf | ||
|
||
# Create a self-signed certificate | ||
openssl req -x509 -new -key consumer/key.pem -out consumer/cert.pem -config mock-cert.cnf | ||
|
||
# Show the certificate | ||
openssl x509 -in consumer/cert.pem -text -noout |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[req] | ||
prompt = no | ||
req_extensions = req_ext | ||
distinguished_name = dn | ||
|
||
[ dn ] | ||
C=US | ||
ST=North Carolina | ||
L=Raleigh | ||
O=Milton | ||
OU=Information Technology | ||
emailAddress[email protected] | ||
CN = test-host.host-metering.test | ||
|
||
[ req_ext ] | ||
subjectAltName = DNS:test-host.host-metering.test |
File renamed without changes.
Oops, something went wrong.