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

App Submission: Pluto #1790

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

Conversation

@whirmill
Copy link
Author

the missing folders warnings are handled in the pre-start hook.
the discovery service needs to be on the host network.

Copy link

🎉   Linting finished with no errors or warnings   🎉

Thank you for your submission! This is an automated linter that checks for common issues in pull requests to the Umbrel App Store.

Please review the linting results below and make any necessary changes to your submission.

Linting Results

Severity File Description
ℹ️ pluto/docker-compose.yml Service "discovery" uses host network mode:
The host network mode can lead to security vulnerabilities. If possible please use the default bridge network mode and expose the necessary ports.

Legend

Symbol Description
Error: This must be resolved before this PR can be merged.
⚠️ Warning: This is highly encouraged to be resolved, but is not strictly mandatory.
ℹ️ Info: This is just for your information.

@whirmill
Copy link
Author

whirmill commented Nov 13, 2024

what's next?

@nmfretz
Copy link
Contributor

nmfretz commented Nov 13, 2024

Thanks for this submission @whirmill, and for making changes based on the linter!

We've got our head down elsewhere right now, but will try and review this next week. Thanks for your patience.

@whirmill whirmill changed the title Added Pluto app App Submission: Pluto Nov 14, 2024
@whirmill
Copy link
Author

Hi,

Just checking in to see if there’s been any progress on this PR or if any additional input is needed from my side. I’d be happy to make adjustments or provide clarification if necessary. Let me know how we can move forward.

Thanks for your time!

@DerekBlueEyes
Copy link

DerekBlueEyes commented Jan 22, 2025

@nmfretz Pluto was intended to be a Umbrel first product, after more than 2 month if you don't wanna put Pluto on the store just tell us and we will change Product Launch approach.
Meanwhile we are forced to diversify the application and move on Start9.

let us know :D

p.s. just to be clear: no hard feelings, we are just stuck.

Copy link
Contributor

@nmfretz nmfretz left a comment

Choose a reason for hiding this comment

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

@whirmill @DerekBlueEyes I'm very sorry for the delay on my end! Thanks for being so patient. I'm able to work on app submission PRs this week, so will help get this to the app store 🚀

Meanwhile we are forced to diversify the application

This is a fantastic idea anyways, since you'll be able to maximize your userbase, as well as structure the app in such a way that it doesn't matter where it is run.

I have left a review below.

Comment on lines +1 to +9
datasources:
- name: Prometheus
type: prometheus
access: proxy
url: http://plutomining-pluto_prometheus_1:9090
isDefault: true
uid: PBFA97CFB590B2093
jsonData:
httpMethod: POST
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment relates to the entire conf/ directory:

One consideration for you here is that on app install everything from an app's repo is copied over, but on an app update, only a whitelist of files are copied:
https://github.com/getumbrel/umbrel/blob/bd8ced1b193d6d0eaa4a6811ba5a8c0cbb6776f2/packages/umbreld/source/modules/apps/legacy-compat/app-script#L662-L668

# App updates will only copy files from this whitelist:
UPDATE_FILES_WHITELIST_PRE="docker-compose.yml *.template exports.sh torrc hooks"

The idea here is that a user's app data doesn't get nuked on app update.

But what this means then is that if you need to make a change to the contents of a file in the conf/ directory, it will work for fresh app installs, but existing installs won't get the changes when they update. If you needed to make a change to these files (say like changing the port in the datasource.yaml) then you'd need to add some logic in a pre-start hook to handle this.

The other option here would be to package your own Docker images for grafana, prometheus, etc that give you a way to easily update these files for users.

discovery:
image: registry.gitlab.com/plutomining/pluto/pluto-discovery:0.6.0-rc.1@sha256:3da84654b98c07a64ffc93f14c525a742753f6afe776526de3adcf9c728169d0
network_mode: "host"
pid: host
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you know if pid is required in all the containers, or can we remove it? The goal here is to keep container permissions as low as possible without impacting app functionality

- PORT=7776
- AUTO_LISTEN=true
- DISCOVERY_SERVICE_HOST=http://172.17.0.1:7775
- GF_HOST=http://pluto_grafana_1:3000
Copy link
Contributor

Choose a reason for hiding this comment

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

Fantastic work using the full container names for services here and elsewhere in this compose file 👌

interval: 10s
timeout: 5s
retries: 5
user: "65534:65534"
Copy link
Contributor

Choose a reason for hiding this comment

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

Does prometheus need to run as user 65534? I see that in the pre-start hook you are chowning the data dir for prometheus as 1000.

depends_on:
prometheus:
condition: service_healthy
user: "472:472"
Copy link
Contributor

Choose a reason for hiding this comment

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

Does grafana need to run as user 472? I see that in the pre-start hook you are chowning the data dir for grafana as 1000.

Copy link
Contributor

Choose a reason for hiding this comment

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

This entire pre-start hook might be unnecessary.

When an app is installed on umbrelOS, the initial directories/files that are in this repo are created with user 1000:1000 permissions. So everything under pluto/conf/ and pluto/data/ will already be set up with those permissions.

A related thing here though is that I see the prometheus and grafana services in the compose file are defined with non-1000 users. Can these both be run as user 1000 as well?

@@ -0,0 +1,23 @@
manifestVersion: 1
Copy link
Contributor

Choose a reason for hiding this comment

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

If you end up needing to keep the pre-start hook then this version needs to be 1.1. If the hook is removed then this can stay as 1

name: Pluto
category: bitcoin
version: "0.6.0-rc.1"
tagline: Pluto
Copy link
Contributor

Choose a reason for hiding this comment

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

You can add a short tagline here so that users can see at a glance what Pluto is when they are browsing the app store. For example, you could do something like:

Manage and monitor open-source bitcoin mining devices

@nmfretz
Copy link
Contributor

nmfretz commented Feb 12, 2025

Also, @whirmill @DerekBlueEyes, do you guys have any ideas for text to include at the top of each gallery image? If you can come up with some, we'll get started on the gallery assets.

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.

3 participants