Installing Using Docker Containers
Complete the following steps to run the Protegrity Anonymization API on a host machine.
Ensure that you have completed the following prerequisites before deploying the Protegrity Anonymization API.
- Install Docker using the steps provided at https://docs.docker.com/engine/install/.
- Install Docker Compose using the steps provided at https://docs.docker.com/compose/install/.
To install the Protegrity Anonymization API:
Login to the machine as an administrator to install the Protegrity Anonymization API.
Obtain and extract the Protegrity Anonymization API files to a directory on your system.
- Download and extract the
ANON-API_DEB-ALL-64_x86-64_Docker-ALL-64_1.4.0.x.tgzfile. - Verify that the following files are available in the package:
ANON-REST-API_1.4.0.x.tgz: The files for working with the Protegrity Anonymization REST API.ANON-NOTEBOOK_1.4.0.x.tgz: The files for the Protegrity Anonymization API notebook.
- Download and extract the
Extract the
ANON-REST-API_1.4.0.x.tgzfile.Run the following command to load the API container:
docker load < ANON-API_1.4.0.x.tar.gzVerify that the image is successfully loaded using the following command:
docker imagesNavigate to the directory where the
ANON-NOTEBOOK_1.4.0.x.tgzfile is saved.Extract the
ANON-NOTEBOOK_1.4.0.x.tgzfile.Run the following command to load the container:
docker load < ANON-NOTEBOOK_1.4.0.x.tar.gzVerify that the image is successfully loaded using the following command:
docker imagesNote the image ID for the ANON-API and ANON-NOTEBOOK containers.
Navigate to the directory where the contents of the
ANON-REST-API_1.4.0.x.tgzfile are extracted.Update the
docker/docker-compose.yamlfile for the configuration that you require, such as the image ID.Update the
imagetags forscheduler,anon,anondb, andpty-workerwith the details of the Anon API Image.Update the
imagetags forminiowith the details of the Anon-Storage Image and workstation with the details of the Anon Workstation Image.Note: If required, then navigate to pty-worker and increase the
replicasparameter.An extract of the
docker-compose.yamlfile with the details updated is provided here as an example. Update the file based on your configuration.version: "3.1" services: anonstorage: image: quay.io/minio/minio:RELEASE.2022-10-29T06-21-33Z # Minio Image pulled from Public repo . . <existing configuration> . environment: # Protegrity default credentials for communicating with MinIO MINIO_ROOT_USER: anonuser MINIO_ROOT_PASSWORD: protegrity . . <existing configuration> . scheduler: image: **anonapi-1.4.0.x:latest** . . <existing configuration> . anon: image: **anonapi-1.4.0.x:latest** . . <existing configuration> . pty-worker: image: **anonapi-1.4.0.x:latest** . . <existing configuration> . anondb: image: **anonapi-1.4.0.x:latest** . . <existing configuration> . nginx-proxy: image: nginx:1.20.1 . . <existing configuration> . workstation: image: **anonworkstation-1.4.0.x:latest** restart: unless-stopped hostname: workstation container_name: pty-workstation # extra_hosts: #### Uncomment and edit this section for using jupyter-workstation to send request to Protegrity Anonymization-API # - "anon.protegrity.com: <IP_of_host_machine>" . . <existing configuration> .Note: You can specify the
IMAGE IDinstead of theREPOSITORY:TAGfor theimageattribute.Configure the Protegrity Anonymization API to use your custom SSL certificates, if required.
Note: The Protegrity Anonymization API provides its own set of certificates for SSL communication. Complete this step only to use custom certificates. Ensure you have the trusted CA
.pemfile, server certificate, and server key. The server certificate must be signed by the trusted CA.Only
.pemfiles are supported by the Protegrity Anonymization API.Docker Compose mounts the certificate files from the current directory in the compose file, under the nginx-proxy section, as shown here.
./cert:/.cert/:ZYou can mount the directory where you have obtained the trusted CA files or you can replace the certificates in the default directory.
Deploy the Protegrity Anonymization API to Docker using the following command.
docker-compose -f /path/to/docker-compose.yaml up -dVerify that the Docker containers are running using the following command.
docker psUpdate the
hostsfile with an entry of the IP address toanon.protegrity.com.Alternatively, update the server_name in the
Nginx.confproperty.server_name anon.protegrity.com;Update the host name as provided in the nginx-proxy config host name and as per your certificate.
Update the
hostsfile with the following code.<IP of Docker Host> <host name as of nginx.conf>For example,
192.168.1.120 anon.protegrity.com
The Protegrity Anonymization API is now visible using the Swagger UI. Use the URLs provided here to view the Protegrity Anonymization API using REST.
Use the following URL to view basic information about the Protegrity Anonymization API.
https://
/ Note: The default Hostname is
anon.protegrity.com. Ensure that you use the Hostname that you provided to access the Protegrity Anonymization API.Use the following URL to view the Swagger UI. The various Protegrity Anonymization APIs are visible on this page.
https://
/anonymization/api/v1/ui Use the following URL to view the contractual information for the Protegrity Anonymization API.
https://
/about
Feedback
Was this page helpful?