optimiser-solver/docker-compose.yaml
Rudi Schlatte 72b2007bc4 Refine deployment process
- Build, upload solver docker image.

- Remove deployment job: the solver is not deployed on the Nebulous
  cluster, but is deployed by SAL on each app cluster.

- Adapt helm chart; SAL might use it to deploy the solver.

- Add AMPL license file contents to nebulous secrets store, pass it in
  via helm charts.  Note that it's ok to run without a license file.

- For testing purposes, add a docker-compose.yaml file

- Pacify hadolint: when installing packages in Dockerfile, specify
  package versions.

- Pacify shellcheck: fix warnings in start-solver.sh

- Pacify podman: do not use heredocs for RUN.

- Remove Spring Boot demo application.

Change-Id: I757a440d09082b5824f36a81cb82d6e5c169a699
2024-03-11 10:23:48 +01:00

47 lines
1.4 KiB
YAML

# This file tests starting the solver inside a container. Since the
# solver will not start without a connection to an ActiveMQ broker,
# start one alongside it.
# If we have an application id, run the solver like this:
#
# APPLICATION_ID="my_application_id" docker-compose up
#
services:
activemq:
image: apache/activemq-classic
ports:
- "61616:61616"
- "5672:5672"
- "8161:8161"
networks:
- nebulous-activemq
container_name: myActiveMQ
environment:
ACTIVEMQ_WEB_USER: admin
ACTIVEMQ_WEB_PASSWORD: admin
container_name: activemq
healthcheck:
test: curl -u admin:admin -H origin:localhost --silent --show-error "http://localhost:8161/api/jolokia/exec/org.apache.activemq:type=Broker,brokerName=localhost,service=Health/healthStatus" | tee /dev/tty | grep --silent -e 'Getting Worried' -e 'Good'
interval: 5s
timeout: 5s
retries: 5
solver:
image: nebulous/solver
depends_on:
activemq:
condition: service_healthy
links:
- activemq
networks:
- nebulous-activemq
environment:
ACTIVEMQ_HOST: activemq
APPLICATION_ID: ${APPLICATION_ID:-invalid-application-id}
# Note that an invalid license crashes the solver; no license lets it start
AMPL_LICENSE: ${AMPL_LICENSE}
container_name: solver
networks:
nebulous-activemq: