nasa-pds-engineering-node / pds-registry-app

(deprecated) See https://github.com/NASA-PDS/registry for new and improved capability.
https://nasa-pds.github.io/registry/
Other
1 stars 1 forks source link

As a developer I want to start the registry with a single command #208

Closed ramesh-maddegoda closed 2 years ago

ramesh-maddegoda commented 2 years ago

Motivation

So that it is quick to deploy and test

Additional details

We need to start 3 services:

We will use docker-compose to orchestrate the docker images.

We will save the resources in nasa-pds/registry repository

We should use as much as possible the existing Docker images and context where they are used:

Acceptance criteria

Given the registry docker documentation on https://github.com/NASA-PDS/registry/tree/main/docker When I perform a single command I expect an up and running registry (including the API ) with some test data in it

jordanpadams commented 2 years ago

@tloubrieu-jpl @ramesh-maddegoda one thing I would like to keep in mind in terms of this repo and how we deploy this is how the users may be interacting with these tools. It may make sense for us to split out Ingestion Tools vs Registry Services since they are very distinct components of the system.

my two cents anyways...

tloubrieu-jpl commented 2 years ago

We will first focus on the harvest/registry-manager service dockerized.

Then we will see how to set the main registry service, that will include the integration with AWS (see with Jimmie) to limit redundancy.

jordanpadams commented 2 years ago

@ramesh-maddegoda feel free to add new issues to the repo and from the right column of the newly created ticket, you should be able to select this as the "parent epic". feel free to create blank tickets for the tasks if you do not think they warrant detailed Feature Request stories.

tloubrieu-jpl commented 2 years ago

@ramesh-maddegoda note that @nutjob4life mentioned that "Running mvn inside a Dockerfile is just plain wrong. Docker images should only have those items needed to run the application, not build them." in ticket https://github.com/NASA-PDS/pds-api/issues/112 . Just be aware of that in case you were not.

Also feel free to commit and push your work in a branch in the NASA-PDS/registry repository anytime, that is convenient to share our status and any interim results.

tloubrieu-jpl commented 2 years ago

@ramesh-maddegoda , also note that @nutjob4life has wrote some note on how to start with the API in the wiki page https://github.com/NASA-PDS/nasa-pds.github.io/wiki/Running-the-Latest-PDS-API-(Registry-API)-Locally

I missed to mention that earlier, I forgot the document existed. Hopefully we would like that to be made more simple and possibly avoid the need for this specific page (or at least shorten it) thanks to a better component organization.

ramesh-maddegoda commented 2 years ago

@ramesh-maddegoda , also note that @nutjob4life has wrote some note on how to start with the API in the wiki page https://github.com/NASA-PDS/nasa-pds.github.io/wiki/Running-the-Latest-PDS-API-(Registry-API)-Locally

I missed to mention that earlier, I forgot the document existed. Hopefully we would like that to be made more simple and possibly avoid the need for this specific page (or at least shorten it) thanks to a better component organization.

Yes, @tloubrieu-jpl. I completely agree that we should not run maven command inside a Dockerfile.

Also, I noticed that in https://github.com/NASA-PDS/registry-api-service/blob/main/docker/Dockerfile.local, it is pulling an Ubuntu image (which can consume time and space). Was there a specific reason to pull FROM ubuntu:20.04?

If not, we can follow a more minimalistic approach to run a spring boot application (such as registry-api-service) as shown in the official spring boot documentation on docker as follows.

FROM openjdk:8-jdk-alpine
ARG JAR_FILE=target/*.jar
COPY ${JAR_FILE} app.jar
ENTRYPOINT ["java","-jar","/app.jar"]

Please ignore the JDK 8 version in the above example. The Reduce size of docker image with spring boot application has OpenJDK 11 examples.

tloubrieu-jpl commented 2 years ago

Right @ramesh-maddegoda , there are a couple of Dockerfile in https://github.com/NASA-PDS/registry-api-service/blob/main/docker/ and maybe some of them are obsolete. That is we need to ask @jimmie which Dockerfile is used for the AWS deployment and re-use the same as he does if possible.

tloubrieu-jpl commented 2 years ago

Once this ticket is done, we will be able to clean the unused dockerfiles.

ramesh-maddegoda commented 2 years ago

Right @ramesh-maddegoda , there are a couple of Dockerfile in https://github.com/NASA-PDS/registry-api-service/blob/main/docker/ and maybe some of them are obsolete. That is we need to ask @jimmie which Dockerfile is used for the AWS deployment and re-use the same as he does if possible.

It seems the Ubuntu pull I mentioned was only in Dockerfile.local. And, other Dockerfiles use FROM openjdk:11-slim, which is great. I will reuse those images.

nutjob4life commented 2 years ago

Granular tasks in progress.