Skip to content
This repository has been archived by the owner on Jun 7, 2021. It is now read-only.

Add MongoDB example that works with prestarted MongoDB #196

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

scottmarlow
Copy link

No description provided.

@thorntail-ci
Copy link

Can one of the admins verify this patch?

3 similar comments
@thorntail-ci
Copy link

Can one of the admins verify this patch?

@thorntail-ci
Copy link

Can one of the admins verify this patch?

@thorntail-ci
Copy link

Can one of the admins verify this patch?

@scottmarlow
Copy link
Author

https://ci.wildfly-swarm.io/job/thorntail-examples-pull-request-linux might need some changes, will see what happens with this pr testing first! For local testing, I used Docker to start MongoDB.

<artifactId>example-microprofile-nosql</artifactId>

<name>Thorntail Examples: Microprofile NoSQL</name>
<description>Thorntail Examples: Microprofile NoSQL</description>
Copy link
Contributor

Choose a reason for hiding this comment

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

Microprofile -> MicroProfile

</services>
</resources>
</configuration>
</execution>
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't quite understand why this entire <execution> is needed. Seems to me your usage of FMP is unnecessarily complicated.

from:
kind: ImageStreamTag
name: example-microprofile:latest
type: ImageChange
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems the only thing you do here is specifying -Dswarm.project.stage. You don't need to add the full YAML, just what you need to add, FMP will generate the rest.

targetPort: 8080
to:
kind: Service
name: example-microprofile
Copy link
Contributor

Choose a reason for hiding this comment

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

I think FMP would generate the same thing.

targetPort: 8080
selector:
deploymentconfig: example-microprofile
type: LoadBalancer
Copy link
Contributor

Choose a reason for hiding this comment

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

I think FMP would generate the same thing.

public class MyResource {

@Inject @Named("mongodbtestprofile")
MongoDatabase database;
Copy link
Contributor

Choose a reason for hiding this comment

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

Indentation.

@Override
public Response toResponse(NotFoundException e) {
return Response
.status(Response.Status.OK)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should it really be 200?

@scottmarlow
Copy link
Author

Thanks for the review, I hope to spend more time on this soon, I also want to see if I can improve the password handling a bit also, to use a generated password instead of hard coding it.

@kenfinnigan
Copy link
Member

add to whitelist

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

Successfully merging this pull request may close these issues.

4 participants