Skip to content

Commit 2f0c95d

Browse files
committed
Remove inconsistently used DOCKER_CTR_PREFIX variable
1 parent 0fac33f commit 2f0c95d

File tree

7 files changed

+21
-46
lines changed

7 files changed

+21
-46
lines changed

.dockerignore

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,11 @@
66
.idea
77
*.iml
88

9-
# Ignore Node Modules used locally
9+
# Ignore build files
1010
node_modules
11-
11+
/puppet/.modules
1212
# Ignore Compiled Vue App
1313
/anms-ui/release
14-
1514
# Ignore Data Directory
1615
/anms-ui/logs
1716

.env

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
#MQTT_PORT=11883
88

99

10-
11-
DOCKER_CTR_PREFIX=
1210
DOCKER_IMAGE_PREFIX=localhost/
1311
DOCKER_IMAGE_TAG=latest
1412

@@ -34,8 +32,8 @@ DB_HEALTHCHECK_USER=healthcheck
3432
DB_HEALTHCHECK_PASSWORD=healthcheck
3533

3634
GRAFANA_CONTAINER_PORT=3000
37-
GRAFANA_HOST_PORT=${DOCKER_CTR_PREFIX}grafana:${GRAFANA_CONTAINER_PORT}
38-
GRAFANA_PROXIES_PATH=localhost/${DOCKER_CTR_PREFIX}grafana
35+
GRAFANA_HOST_PORT=grafana:${GRAFANA_CONTAINER_PORT}
36+
GRAFANA_PROXIES_PATH=localhost/grafana
3937
REDIS_PORT=6379
4038
JS_AMP_PORT=3001
4139
ANMS_UI_HTTP_PORT=9030
@@ -48,7 +46,7 @@ LOGSTASH_MONITORING_PORT=9600
4846
KIBANA_PORT=5601
4947
ADMINER_PORT=8080
5048
RENDERER_PORT=8081
51-
RENDERER_HOST_PORT=${DOCKER_CTR_PREFIX}grafana-image-renderer:${RENDERER_PORT}
49+
RENDERER_HOST_PORT=grafana-image-renderer:${RENDERER_PORT}
5250
ION_MGR_PORT=8089
5351
HTTP_PORT=80
5452

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,13 +206,11 @@ docker-compose -f testenv-compose.yml up -d --force-recreate
206206

207207
The top-level `docker-compose.yml` uses the environment defined by the sibling file `.env`. Note: If using the legacy/deprecated build.sh script, that script may additionally override some environment variables.
208208

209-
Two principal options of the compose configuration, which are both defaulted to empty text, are:
209+
The principal options of the compose configuration are:
210210

211-
* `DOCKER_CTR_PREFIX` which controls any container name prefix added to all ANMS containers.
212-
This can be used to disambiguate container names on a shared host (specifically for common container names like `nginx` or `postgres`).
213211
* `DOCKER_IMAGE_PREFIX` which controls any image name prefix added to all ANMS images.
214212
For a local build, this can be left empty, but for builds intended to be pushed to a Docker image registry this can be set to the full path on the registry before the image names (e.g. `DOCKER_IMAGE_PREFIX=some.host.example.com:5000/path/to/images`).
215-
213+
* `HOST_SOCKDIR` which controls the source of the bind mount on `amp-manager` container for its transport socket. This can either be a volume name, for inter-container or non-root user use, or an absolute path on the host filesystem, used in the production deployment.
216214

217215

218216
### AMP Database Querying

docker-compose.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,16 @@
2121
##
2222

2323
# This configuration uses the environment variables:
24-
# DOCKER_CTR_PREFIX to contain a (default empty) container name prefix
2524
# DOCKER_IMAGE_PREFIX to contain a (default empty) image registry and path to all custom images
2625
# DOCKER_IMAGE_TAG to contain the image tag for custom images
2726
#
2827
name: anms
2928

3029
networks:
3130
default:
32-
name: ${DOCKER_CTR_PREFIX}anms
31+
name: anms
3332
driver_opts:
34-
com.docker.network.bridge.name: br-${DOCKER_CTR_PREFIX}anms
33+
com.docker.network.bridge.name: br-anms
3534
com.docker.network.driver.mtu: 65535
3635

3736
volumes:
@@ -128,7 +127,7 @@ services:
128127

129128
postgres:
130129
hostname: postgres
131-
image: ${DOCKER_CTR_PREFIX}refdb-sql:${DOCKER_IMAGE_TAG}
130+
image: ${DOCKER_IMAGE_PREFIX}refdb-sql:${DOCKER_IMAGE_TAG}
132131
build:
133132
context: deps
134133
dockerfile: ansmsql.Dockerfile
@@ -291,7 +290,7 @@ services:
291290

292291
amp-manager:
293292
hostname: amp-manager
294-
image: ${DOCKER_CTR_PREFIX}amp-manager:${DOCKER_IMAGE_TAG}
293+
image: ${DOCKER_IMAGE_PREFIX}amp-manager:${DOCKER_IMAGE_TAG}
295294
build:
296295
context: deps
297296
dockerfile: reftools.Dockerfile

light-compose.yml

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,16 @@
2121
##
2222

2323
# This configuration uses the environment variables:
24-
# DOCKER_CTR_PREFIX to contain a (default empty) container name prefix
2524
# DOCKER_IMAGE_PREFIX to contain a (default empty) image registry and path to all custom images
2625
# DOCKER_IMAGE_TAG to contain the image tag for custom images
2726
#
2827
name: anms
2928

3029
networks:
3130
default:
32-
name: ${DOCKER_CTR_PREFIX}anms
31+
name: anms
3332
driver_opts:
34-
com.docker.network.bridge.name: br-${DOCKER_CTR_PREFIX}anms
33+
com.docker.network.bridge.name: br-anms
3534
com.docker.network.driver.mtu: 65535
3635

3736
volumes:
@@ -50,18 +49,13 @@ services:
5049
dockerfile: base.Dockerfile
5150
target: anms-base
5251
command: bash -c 'while true; do sleep 1; done' # Dummy loop to simplify dependency management
53-
builder-init:
54-
image: localhost/anms-init
55-
build:
56-
dockerfile: base.Dockerfile
57-
target: anms-init
58-
command: bash -c 'while true; do sleep 1; done' # Dummy loop to simplify dependency management
5952
builder-acelib:
6053
image: localhost/dtnma-acelib
6154
build:
6255
dockerfile: base.Dockerfile
6356
target: dtnma-acelib
6457
command: bash -c 'while true; do sleep 1; done' # Dummy loop to simplify dependency management
58+
6559
authnz:
6660
image: ${DOCKER_IMAGE_PREFIX}authnz:${DOCKER_IMAGE_TAG}
6761
build:
@@ -74,8 +68,6 @@ services:
7468
ports:
7569
- "${AUTHNZ_PORT:-80}:80"
7670
- "${AUTHNZ_HTTPS_PORT:-443}:443"
77-
depends_on:
78-
- builder-base
7971
environment:
8072
CAM_SERVER_URL: ${CAM_SERVER_URL}
8173
CAM_ADMIN_USER: ${CAM_ADMIN_USER}
@@ -113,7 +105,7 @@ services:
113105

114106
postgres:
115107
hostname: postgres
116-
image: ${DOCKER_CTR_PREFIX}refdb-sql:${DOCKER_IMAGE_TAG}
108+
image: ${DOCKER_IMAGE_PREFIX}refdb-sql:${DOCKER_IMAGE_TAG}
117109
build:
118110
context: deps
119111
dockerfile: ansmsql.Dockerfile
@@ -156,9 +148,6 @@ services:
156148
security_opt:
157149
- "label=type:transcoder.process"
158150
depends_on:
159-
builder-acelib:
160-
# Not expected to run, but needed here to ensure build dependency
161-
condition: service_started
162151
mqtt-broker:
163152
condition: service_healthy
164153

@@ -175,9 +164,6 @@ services:
175164
DB_URI: postgresql://${DB_USER}:${DB_PASSWORD}@postgres/${DB_NAME}
176165
MQTT_HOST: mqtt-broker
177166
depends_on:
178-
builder-acelib:
179-
# Not expected to run, but needed here to ensure build dependency
180-
condition: service_started
181167
postgres:
182168
condition: service_healthy
183169
mqtt-broker:
@@ -203,9 +189,6 @@ services:
203189
ports:
204190
- "${ANMS_CORE_HTTP_PORT:-5555}:5555"
205191
depends_on:
206-
builder-acelib:
207-
# Not expected to run, but needed here to ensure build dependency
208-
condition: service_started
209192
amp-manager:
210193
condition: service_started
211194
postgres:
@@ -215,6 +198,7 @@ services:
215198

216199
amp-manager:
217200
hostname: amp-manager
201+
image: ${DOCKER_IMAGE_PREFIX}amp-manager:${DOCKER_IMAGE_TAG}
218202
build:
219203
context: deps
220204
dockerfile: reftools.Dockerfile

puppet/modules/anms/templates/env.epp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
#MQTT_PORT=11883
88

99

10-
11-
DOCKER_CTR_PREFIX=
1210
DOCKER_IMAGE_PREFIX=<%= $anms::ctr_image_prefix %>
1311
DOCKER_IMAGE_TAG=<%= $anms::ctr_image_tag %>
1412

@@ -34,8 +32,8 @@ DB_HEALTHCHECK_USER=healthcheck
3432
DB_HEALTHCHECK_PASSWORD=healthcheck
3533

3634
GRAFANA_CONTAINER_PORT=3000
37-
GRAFANA_HOST_PORT=${DOCKER_CTR_PREFIX}grafana:${GRAFANA_CONTAINER_PORT}
38-
GRAFANA_PROXIES_PATH=localhost/${DOCKER_CTR_PREFIX}grafana
35+
GRAFANA_HOST_PORT=grafana:${GRAFANA_CONTAINER_PORT}
36+
GRAFANA_PROXIES_PATH=localhost/grafana
3937
REDIS_PORT=6379
4038
JS_AMP_PORT=3001
4139
ANMS_UI_HTTP_PORT=9030
@@ -48,7 +46,7 @@ LOGSTASH_MONITORING_PORT=9600
4846
KIBANA_PORT=5601
4947
ADMINER_PORT=8080
5048
RENDERER_PORT=8081
51-
RENDERER_HOST_PORT=${DOCKER_CTR_PREFIX}grafana-image-renderer:${RENDERER_PORT}
49+
RENDERER_HOST_PORT=grafana-image-renderer:${RENDERER_PORT}
5250
ION_MGR_PORT=8089
5351
HTTP_PORT:80
5452

testenv-compose.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,16 @@
2121
##
2222

2323
# This configuration uses the environment variables:
24-
# DOCKER_CTR_PREFIX to contain a (default empty) container name prefix
2524
# DOCKER_IMAGE_PREFIX to contain a (default empty) image registry and path to all custom images
2625
# DOCKER_IMAGE_TAG to contain the image tag for custom images
2726
#
2827
name: testenv
2928

3029
networks:
3130
default:
32-
name: ${DOCKER_CTR_PREFIX}testenv
31+
name: testenv
3332
driver_opts:
34-
com.docker.network.bridge.name: br-${DOCKER_CTR_PREFIX}testenv
33+
com.docker.network.bridge.name: br-testenv
3534
com.docker.network.driver.mtu: 65535
3635
ipam:
3736
config:

0 commit comments

Comments
 (0)