Skip to content

Commit

Permalink
Update action
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrewgdewar committed Dec 17, 2024
2 parents 9d20f40 + 169c0b1 commit f6555ea
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 43 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/tang-actions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ on:
branches:
- main
paths-ignore:
- '**.md'
- "**.md"
pull_request:
paths-ignore:
- '**.md'
- "**.md"
jobs:
golangci:
name: Lint
Expand All @@ -16,7 +16,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: "1.23"
go-version: "1.22"
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
Expand All @@ -42,13 +42,17 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: "1.23"
go-version: "1.22"
- name: start pulp
uses: isbang/compose-action@v2.0.1
uses: isbang/compose-action@v2.0.2
with:
compose-file: docker-compose.yml
cwd: ./compose_files/pulp/
down-flags: --volumes
env:
PULP_DATABASE_PORT: 5434
PULP_API_PORT: 8087
PULP_CONTENT_PORT: 8088
- name: Wait for pulp
run: |
docker run --network=host --rm -v ${PWD}:/local curlimages/curl \
Expand All @@ -65,4 +69,4 @@ jobs:
DATABASE_PASSWORD: password
SERVER_URL: http://localhost:8087
SERVER_USERNAME: admin
SERVER_PASSWORD: password
SERVER_PASSWORD: password
54 changes: 27 additions & 27 deletions compose_files/pulp/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
version: '3'
services:
postgres:
image: "docker.io/library/postgres:13"
image: "docker.io/library/postgres:16"
ports:
- "5434:5432"
- "${PULP_DATABASE_PORT:-5432}:5432"
environment:
POSTGRES_USER: pulp
POSTGRES_PASSWORD: password
POSTGRES_DB: pulp
POSTGRES_INITDB_ARGS: '--auth-host=scram-sha-256'
POSTGRES_HOST_AUTH_METHOD: 'scram-sha-256'
POSTGRES_INITDB_ARGS: "--auth-host=scram-sha-256"
POSTGRES_HOST_AUTH_METHOD: "scram-sha-256"
volumes:
- "pg_data:/var/lib/postgresql"
- "./assets/postgres/passwd:/etc/passwd:Z"
Expand All @@ -22,6 +21,7 @@ services:

migration_service:
image: "quay.io/redhat-services-prod/pulp-services-tenant/pulp:latest"
platform: linux/amd64
depends_on:
postgres:
condition: service_healthy
Expand All @@ -30,10 +30,11 @@ services:
volumes:
- "./assets/settings.py:/etc/pulp/settings.py:z"
- "./assets/certs:/etc/pulp/certs:z"
- "pulp:/var/lib/pulp"
- "pulp:/var/lib/pulp"

set_init_password_service:
image: "quay.io/redhat-services-prod/pulp-services-tenant/pulp:latest"
image: "quay.io/redhat-services-prod/pulp-services-tenant/pulp:latest"
platform: linux/amd64
command: set_init_password.sh
depends_on:
migration_service:
Expand All @@ -51,16 +52,19 @@ services:
- "redis_data:/data"
restart: always
healthcheck:
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
test: ["CMD", "redis-cli", "--raw", "incr", "ping"]

pulp_api:
image: "quay.io/redhat-services-prod/pulp-services-tenant/pulp:latest"
platform: linux/amd64
deploy:
replicas: 1
command: [ 'pulp-api' ]
command: ["pulp-api"]
depends_on:
migration_service:
condition: service_completed_successfully
ports:
- ${PULP_API_PORT:-8080}:24817
hostname: pulp-api
user: pulp
volumes:
Expand All @@ -73,16 +77,21 @@ services:
PULP_ADMIN_PASSWORD: password
PULP_DOMAIN_ENABLED: "true"
PULP_API_ROOT: /api/pulp/
PULP_CONTENT_ORIGIN: "http://pulp.content:8081/"
PULP_CONTENT_PATH_PREFIX: "/pulp/content/"
restart: always

pulp_content:
image: "quay.io/redhat-services-prod/pulp-services-tenant/pulp:latest"
platform: linux/amd64
deploy:
replicas: 1
command: [ 'pulp-content' ]
command: ["pulp-content"]
depends_on:
migration_service:
condition: service_completed_successfully
ports:
- ${PULP_CONTENT_PORT:-8081}:24816
hostname: pulp-content
user: pulp
volumes:
Expand All @@ -94,28 +103,16 @@ services:
POSTGRES_SERVICE_HOST: postgres
PULP_DOMAIN_ENABLED: "true"
PULP_API_ROOT: /api/pulp/
restart: always

pulp_web:
image: "pulp/pulp-web:latest"
command: [ '/usr/bin/nginx.sh' ]
depends_on:
migration_service:
condition: service_completed_successfully
ports:
- "8087:8080"
hostname: pulp
user: root
volumes:
- "./assets/bin/nginx.sh:/usr/bin/nginx.sh:Z"
- "./assets/nginx/nginx.conf.template:/etc/opt/rh/rh-nginx116/nginx/nginx.conf.template:Z"
PULP_CONTENT_ORIGIN: "http://pulp.content:8081/"
PULP_CONTENT_PATH_PREFIX: "/pulp/content/"
restart: always

pulp_worker:
image: "quay.io/redhat-services-prod/pulp-services-tenant/pulp:latest"
platform: linux/amd64
deploy:
replicas: 1
command: [ 'pulp-worker' ]
replicas: 2
command: ["pulp-worker"]
depends_on:
migration_service:
condition: service_completed_successfully
Expand All @@ -130,6 +127,9 @@ services:
POSTGRES_SERVICE_PORT: 5432
POSTGRES_SERVICE_HOST: postgres
PULP_DOMAIN_ENABLED: "true"
PULP_API_ROOT: /api/pulp/
PULP_CONTENT_ORIGIN: "http://pulp.content:8081/"
PULP_CONTENT_PATH_PREFIX: "/pulp/content/"
restart: always
volumes:
pulp:
Expand Down
18 changes: 10 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
module github.com/content-services/tang

go 1.23
go 1.22.0

toolchain go1.22.4

require (
github.com/content-services/zest/release/v2024 v2024.9.1726768195
github.com/content-services/zest/release/v2024 v2024.11.1731697894
github.com/google/uuid v1.6.0
github.com/jackc/pgx-zerolog v0.0.0-20230315001418-f978528409eb
github.com/jackc/pgx/v5 v5.7.1
github.com/rs/zerolog v1.33.0
github.com/spf13/viper v1.19.0
github.com/stretchr/testify v1.9.0
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0
golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f
)

require (
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/fsnotify/fsnotify v1.8.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect
Expand All @@ -37,10 +39,10 @@ require (
github.com/subosito/gotenv v1.6.0 // indirect
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.27.0 // indirect
golang.org/x/sync v0.8.0 // indirect
golang.org/x/sys v0.25.0 // indirect
golang.org/x/text v0.18.0 // indirect
golang.org/x/crypto v0.29.0 // indirect
golang.org/x/sync v0.9.0 // indirect
golang.org/x/sys v0.27.0 // indirect
golang.org/x/text v0.20.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
14 changes: 14 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ github.com/content-services/zest/release/v2024 v2024.3.1709674773 h1:kr7NX4UZhF9
github.com/content-services/zest/release/v2024 v2024.3.1709674773/go.mod h1:UnV5iAE/frEbOToKYweoIrRAQphmfv+2wN/fwr8ytcA=
github.com/content-services/zest/release/v2024 v2024.9.1726768195 h1:4OjES3YJ6GVfyoI6CDBg/RBkUWofaw4go4bkYEkQ6cY=
github.com/content-services/zest/release/v2024 v2024.9.1726768195/go.mod h1:UnV5iAE/frEbOToKYweoIrRAQphmfv+2wN/fwr8ytcA=
github.com/content-services/zest/release/v2024 v2024.11.1731697894 h1:DUQrNSNeeLRqdbfwZ7kW8w4hOvBWpRy3lW+YGUCd0zM=
github.com/content-services/zest/release/v2024 v2024.11.1731697894/go.mod h1:UnV5iAE/frEbOToKYweoIrRAQphmfv+2wN/fwr8ytcA=
github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand All @@ -11,6 +13,8 @@ github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHk
github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA=
github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM=
github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/8M=
github.com/fsnotify/fsnotify v1.8.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
Expand Down Expand Up @@ -111,25 +115,35 @@ golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY=
golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=
golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A=
golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70=
golang.org/x/crypto v0.29.0 h1:L5SG1JTTXupVV3n6sUqMTeWbjAyfPwoda2DLX8J8FrQ=
golang.org/x/crypto v0.29.0/go.mod h1:+F4F4N5hv6v38hfeYwTdx20oUvLLc+QfrE9Ax9HtgRg=
golang.org/x/exp v0.0.0-20231206192017-f3f8817b8deb h1:c0vyKkb6yr3KR7jEfJaOSv4lG7xPkbN6r52aJz1d8a8=
golang.org/x/exp v0.0.0-20231206192017-f3f8817b8deb/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI=
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 h1:e66Fs6Z+fZTbFBAxKfP3PALWBtpfqks2bwGcexMxgtk=
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0/go.mod h1:2TbTHSBQa924w8M6Xs1QcRcFwyucIwBGpK1p2f1YFFY=
golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f h1:XdNn9LlyWAhLVp6P/i8QYBW+hlyhrhei9uErw2B5GJo=
golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f/go.mod h1:D5SMRVC3C2/4+F/DB1wZsLRnSNimn2Sp/NPsCrsv8ak=
golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE=
golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ=
golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ=
golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc=
golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34=
golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s=
golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224=
golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
golang.org/x/text v0.20.0 h1:gK/Kv2otX8gz+wn7Rmb3vT96ZwuoxnQlY+HlJVj7Qug=
golang.org/x/text v0.20.0/go.mod h1:D4IsuqiFMhST5bX19pQ9ikHC2GsaKyk/oF+pn3ducp4=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
Expand Down
4 changes: 2 additions & 2 deletions mk/compose.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@

.PHONY: compose-up
compose-up: ## Start up service dependencies using podman(docker)-compose
$(PULP_COMPOSE_COMMAND)
PULP_DATABASE_PORT=5434 PULP_API_PORT=8087 PULP_CONTENT_PORT=8088 $(PULP_COMPOSE_COMMAND)

.PHONY: compose-down
compose-down: ## Shut down service dependencies using podman(docker)-compose
$(PULP_COMPOSE_DOWN_COMMAND)

.PHONY: compose-clean ## Clear out data (dbs, files) for service dependencies
compose-clean: compose-down
$(DOCKER) volume prune --force
$(DOCKER) volume prune --force

0 comments on commit f6555ea

Please sign in to comment.