Skip to content

Commit

Permalink
[docker-restapi]: add restapi config to config Db (#4495)
Browse files Browse the repository at this point in the history
  • Loading branch information
sumukhatv authored Apr 30, 2020
1 parent a539cf2 commit e1ba5b0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rules/docker-restapi.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ endif
$(DOCKER_RESTAPI)_CONTAINER_NAME = restapi
$(DOCKER_RESTAPI)_RUN_OPT += --cap-add NET_ADMIN --privileged -t
$(DOCKER_RESTAPI)_RUN_OPT += -v /var/run/redis/redis.sock:/var/run/redis/redis.sock
$(DOCKER_RESTAPI)_RUN_OPT += -v /etc/sonic/certificates:/etc/sonic/certificates:ro
$(DOCKER_RESTAPI)_RUN_OPT += -v /etc/sonic/credentials:/etc/sonic/credentials:ro
$(DOCKER_RESTAPI)_RUN_OPT += -p=8081:8081/tcp
$(DOCKER_RESTAPI)_RUN_OPT += -p=8090:8090/tcp

Expand Down
14 changes: 13 additions & 1 deletion src/sonic-config-engine/minigraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,19 @@ def parse_xml(filename, platform=None, port_config_file=None):
'ca_crt': '/etc/sonic/telemetry/dsmsroot.cer'
}
}

results['RESTAPI'] = {
'config': {
'client_auth': 'true',
'allow_insecure': 'false',
'log_level': 'trace'
},
'certs': {
'server_crt': '/etc/sonic/credentials/restapiserver.crt',
'server_key': '/etc/sonic/credentials/restapiserver.key',
'client_ca_crt': '/etc/sonic/credentials/restapiclient.crt',
'client_crt_cname': 'client.restapi.sonic'
}
}
# Do not configure the minigraph's mirror session, which is currently unused
# mirror_sessions = {}
# if erspan_dst:
Expand Down

0 comments on commit e1ba5b0

Please sign in to comment.