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 demo environment to work with 1.0 #4808

Merged
merged 1 commit into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions changelog/+fix-demo.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update demo environment to work with Infrahub 1.0
4 changes: 2 additions & 2 deletions development/docker-compose-deps-nats.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ services:
retries: 20
start_period: 10s
task-manager:
profiles: [dev]
profiles: [demo, dev]
image: "${TASK_MANAGER_DOCKER_IMAGE:-prefecthq/prefect:3.0.3-python3.12}"
command: prefect server start --host 0.0.0.0 --ui
environment:
Expand All @@ -40,7 +40,7 @@ services:
depends_on:
- task-manager-db
task-manager-db:
profiles: [dev]
profiles: [demo, dev]
image: postgres:16-alpine
environment:
- POSTGRES_USER=postgres
Expand Down
4 changes: 2 additions & 2 deletions development/docker-compose-deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ services:
timeout: 5s
retries: 3
task-manager:
profiles: [dev]
profiles: [demo, dev]
image: "${TASK_MANAGER_DOCKER_IMAGE:-prefecthq/prefect:3.0.3-python3.12}"
command: prefect server start --host 0.0.0.0 --ui
environment:
Expand All @@ -37,7 +37,7 @@ services:
depends_on:
- task-manager-db
task-manager-db:
profiles: [dev]
profiles: [demo, dev]
image: postgres:16-alpine
environment:
- POSTGRES_USER=postgres
Expand Down
41 changes: 1 addition & 40 deletions development/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,47 +148,8 @@ services:
timeout: 5s
retries: 20
start_period: 10s
infrahub-git:
profiles: [demo]
deploy:
mode: replicated
replicas: 2
build:
context: ../
dockerfile: development/Dockerfile
target: backend
image: "${IMAGE_NAME}:${IMAGE_VER}"
pull_policy: always
command: infrahub git-agent start --debug
restart: unless-stopped
depends_on:
- server
environment:
<<: *infrahub_config
INFRAHUB_ADDRESS: http://server:8000
INFRAHUB_INTERNAL_ADDRESS: "http://server:8000"
INFRAHUB_GIT_REPOSITORIES_DIRECTORY: "/opt/infrahub/git"
INFRAHUB_PRODUCTION: false
INFRAHUB_LOG_LEVEL: DEBUG
INFRAHUB_API_TOKEN: 06438eb2-8019-4776-878c-0941b1f1d1ec
INFRAHUB_TIMEOUT: "${INFRAHUB_TIMEOUT:-60}"
INFRAHUB_BROKER_ADDRESS: message-queue
INFRAHUB_CACHE_ADDRESS: "${INFRAHUB_CACHE_ADDRESS:-cache}"
INFRAHUB_DB_ADDRESS: database
INFRAHUB_DB_USERNAME: neo4j
INFRAHUB_DB_PASSWORD: admin
INFRAHUB_DB_PORT: 7687
INFRAHUB_DB_PROTOCOL: bolt
INFRAHUB_STORAGE_DRIVER: local
volumes:
- "git_data:/opt/infrahub/git"
- "git_remote_data:/remote"
tty: true
labels:
com.github.run_id: "${GITHUB_RUN_ID:-unknown}"
com.github.job: "${JOB_NAME:-unknown}"
task-worker:
profiles: [dev]
profiles: [demo, dev]
deploy:
mode: replicated
replicas: 2
Expand Down
3 changes: 1 addition & 2 deletions tasks/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
INFRAHUB_DATABASE,
PYTHON_VER,
SERVICE_SERVER_NAME,
SERVICE_WORKER_NAME,
Namespace,
build_compose_files_cmd,
execute_command,
Expand All @@ -31,8 +32,6 @@

NAMESPACE = Namespace.DEFAULT

SERVICE_WORKER_NAME = "infrahub-git"


@task(optional=["database"])
def build(
Expand Down
Loading