If you have HA setup, multiple instances of services running on different nodes, then you must edit the yml configuration. Navigate to the docker-compose folder (/opt/nexus/docker-compose) and edit these files: - docker-compose.yml
- network.yml
- versiontag.yml
docker-compose.ymlFor each service, add one section in the docker-compose.yml file. Change the values for the following keys: - Service name
- Hostname
- Constraints
For example, if you want to deploy two policy services on two nodes you will have two configuration blocks as shown in the example below. No Format |
---|
policy:
# configure image tag from versiontag.yaml
hostname: policy
deploy:
mode: replicated
replicas: 1
placement:
constraints:
#If you need to set constraints using node name
#- node.hostname ==<node name>
# use node label
[node.labels.da-policy-service == true ]
resources:
limits:
cpus: "0.50"
memory: 512M
reservations:
cpus: "0.10"
memory: 128M
volumes:
- /opt/nexus/config/policy-service:/etc/nexus/policy-service:z
- /etc/localtime:/etc/localtime
- /etc/timezone:/etc/timezone
logging:
options:
max-size: 10m
policy1:
# configure image tag from versiontag.yaml
hostname: policy1
deploy:
mode: replicated
replicas: 1
placement:
constraints:
#If you need to set constraints using node name
#- node.hostname ==<node name>
# use node label
[node.labels.da-policy-service1 == true ]
resources:
limits:
cpus: "0.50"
memory: 512M
reservations:
cpus: "0.10"
memory: 128M
volumes:
- /opt/nexus/config/policy-service:/etc/nexus/policy-service:z
- /etc/localtime:/etc/localtime
- /etc/timezone:/etc/timezone
logging:
options:
max-size: 10m |
network.ymlFor each service add network configuration in the network.yml file. For example, if you want to deploy two policy services on two nodes you will have two blocks of configuration as shown below. - Service name: Service name should be identical to what is mentioned in docker-compose.yml.
Example: No Format |
---|
policy :
ports:
- target: 4443
published: 4443
mode: host
networks:
- da-overlay
policy1:
ports:
- target: 4443
published: 4443
mode: host
networks:
- da-overlay |
Also, make sure all the listeners that are used for access point Load balance are exposed in network.yml. versiontag.ymlAdd one line for each service. If you have two policy services with name policy and policy1, you will have entries for each service. Example: No Format |
---|
policy :
image: nexusimages.azurecr.io/smartid-digitalaccess/policy-service:6.0.x.xxxxx
policy1:
image: nexusimages.azurecr.io/smartid-digitalaccess/policy-service:6.0.x.xxxxx |
|