Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

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

Closed
Tracked by #20
ramesh-maddegoda opened this issue Nov 12, 2021 · 10 comments
Closed
Tracked by #20

Comments

@ramesh-maddegoda
Copy link

ramesh-maddegoda commented Nov 12, 2021

Motivation

So that it is quick to deploy and test

Additional details

We need to start 3 services:

  • harvest/registry-mgr command line available, this need research on how it is best to deploy command line tools with docker
  • elasticsearch
  • registry-api-service

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:
- AWS --> Jimmie, https://github.com/NASA-PDS/registry-api-service
- On-prem production --> would only include harvest/registry-manager
- Continuous integration --> Eugene (https://github.com/nasa-pds/registry-ci/)

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

@ramesh-maddegoda ramesh-maddegoda self-assigned this Nov 12, 2021
@tloubrieu-jpl tloubrieu-jpl transferred this issue from nasa-pds-engineering-node/pds-registry-app Nov 12, 2021
@jordanpadams
Copy link
Contributor

@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
Copy link
Contributor

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 jordanpadams transferred this issue from NASA-PDS/registry Nov 16, 2021
@jordanpadams
Copy link
Contributor

@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
Copy link
Contributor

@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 NASA-PDS/pds-api#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
Copy link
Contributor

@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
Copy link
Author

@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
Copy link
Contributor

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
Copy link
Contributor

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

@ramesh-maddegoda
Copy link
Author

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
Copy link
Member

Granular tasks in progress.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants