Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1424 Add Menas Dockerfile #1429

Merged
merged 2 commits into from
Jul 13, 2020
Merged

Conversation

Zejnilovic
Copy link
Contributor

Closes #1424

@Zejnilovic
Copy link
Contributor Author

This is a 1st version PoC. In the next version, as a next step, we will be solving how to containerize without such a huge dependency on properties so we do not kill the portability that containers offer.

EXPOSE 8009

RUN rm -rf /usr/local/tomcat/webapps/*
COPY target/*.war /usr/local/tomcat/webapps/ROOT.war
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was wondering if you could try to package it as jar and just run the built jar instead of depending on Tomcat. If it's not a low hanging fruit, then it can be delayed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I know, a fat jar does not allow for any post-build server configuration. That would also mean problems with logging and persisting these. And in the end, we end up with a containerized application that is not portable.

Fat jar might be interesting to run a service ASAP for a PoC connection. But for it to be deployed, scaled and properly configured you will always choose a war. You don't want to have to rebuild/restart to change one or two values.

EXPOSE 8080
EXPOSE 8009

RUN rm -rf /usr/local/tomcat/webapps/*
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to remove all webapps? Doesn't this include the tomcat UIs?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no need for any extra management through UI since it is a single tomcat app. But if you want it there, we can leave it there. This would mean playing with the URLs as well

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we figure out way to automatically ship logs somewhere central, I'd say you're right. We could put in fluentd agent to forward the logs into S3 or cloudwatch in future. For now I'd say it may be useful to keep the management UIs for POC purposes, but I'm happy to be challenged on this :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

None of the original webapps have any implicit or explicit correlation with either Catalina(servlet container), Jasper (JSP Engine) or any other system component of Tomcat. So unless we need to have a management tool UI, there is no reason to keep them.
And honestly, I don't see the logs connection.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy, I'm not sure what's on those UIs tbh. Had a hope that it could provide some useful info/tools for debugging. Even if the online war upload.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For final version I would be for all removal. For POC maybe no need to bother?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For final version I would be for all removal. For POC maybe no need to bother?

PoC wise, this is easier for me. Later we might want to use tomcat:9-jdk8-openjdk-slim image which produces half of the image size.

@sonarcloud
Copy link

sonarcloud bot commented Jul 13, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@Zejnilovic Zejnilovic merged commit a817cfe into aws-poc Jul 13, 2020
@Zejnilovic Zejnilovic deleted the feature/1424-create-menas-dockerfile branch July 13, 2020 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants