hyperledger / aries-cloudagent-python

Hyperledger Aries Cloud Agent Python (ACA-Py) is a foundation for building decentralized identity applications and services running in non-mobile environments.
https://wiki.hyperledger.org/display/aries
Apache License 2.0
403 stars 510 forks source link

Deploy Docker image of acapy cloudagent python #1943

Closed abhimin closed 1 year ago

abhimin commented 1 year ago

Hi, My requirement is to deploy the aries-cloudagent:py36-1.16-1_0.7.4 image in openshift. For this I have created a wrapper image and trying to deploy without docker compose in openshift. But condition is like only one port in the openshift used to expose the app.As per documentation acapy agent docker container require two ports to expose .so my requirement is to expose the container using one port and make acapy run without using docker compose. Please suggest for the acapy cloud agent container setup and cloud deployment. Also openshift using python version 3.8 while image version is 3.6 due to this getting ssl version compatibility issue and pods getting crashed.

swcurran commented 1 year ago

We've got lots of ACA-Py instances deployed to OpenShift so it's definitely possible. @WadeBarnes has built up a lot of scripts to manage this over time. I think the scripts themselves are specific to how our OpenShift environment is setup -- with Dev/Test/Prod workspaces for each deployment.

This folder contains the generic OpenShift settings for all the deployments -- e.g. the YAML file is probably useful. Then, we have tools that read, generate and use environment variables to override the specific settings for each deployment (Dev/Test/Prod for each ACA-Py deployment). You can look around the repo for the set of ACA-Py agents configured and deployed from the repo.

Hope that helps.

Balamurugan-G commented 1 year ago

@swcurran Per our company policy, we are allowed to use only https which would connect to a target port in container. We'll be able to connect to only one application port though the application listens on 2 ports. So do we have any option to run the agent in only one port through which we can handle the requests to AGENT_ADMIN_PORT and AGENT_HTTP_PORT?

WadeBarnes commented 1 year ago

@Balamurugan-G, We have a similar restriction. The example @swcurran pointed you to only has it's public interface exposed. With that configuration it's assumed the agent's controller would be accessing the admin interface internally to the namespace. An example of an agent configuration with both public and admin interfaces exposed can be found here. In this case separate routes (URLs) are used to direct traffic to the two different application ports.

Balamurugan-G commented 1 year ago

Hi @WadeBarnes, Thanks a lot for the response. The restriction in our organisation is we are allowed to expose only one container port (with existing templates). Per below service definition, two ports have been exposed which is not possible using our available templates. Could you tell me the possible solution to use this agent in our environment?

Balamurugan-G commented 1 year ago

@WadeBarnes, Also could you tell me how can we start the agent with ssl_context?

abhimin commented 1 year ago

Deployed successfully