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-3496] New install script and linting #7

Merged
merged 3 commits into from
Feb 12, 2024
Merged

Conversation

Otterverse
Copy link
Member

This PR lints the code, and significantly updates the install scripting to support provisioning better.

@@ -3,8 +3,14 @@
# This script installs viam-agent. It is intended to be run directly from a download, with a command such as:
# sudo /bin/sh -c "$(curl -fsSL https://storage.googleapis.com/packages.viam.com/apps/viam-agent/install.sh)"

# The preferred command should be copy/pasted from the robot's setup tab on app.viam.com
# It should auto-generate a command in the following format (with key/id info filled in)
# sudo /bin/sh -c "VIAM_API_KEY_ID=<KEYID> VIAM_API_KEY=<KEY> VIAM_PART_ID=<PARTID>; $(curl -fsSL https://storage.googleapis.com/packages.viam.com/apps/viam-agent/install.sh)"
Copy link
Member

Choose a reason for hiding this comment

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

This is future proofing the docs. But we still need to change the cloud app right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Correct, App still needs to implement. This was a comment saying what app should do. The actual README explains it as-currently-is however.


[Service]
Type=exec
Restart=always
RestartSec=1
Copy link
Member

Choose a reason for hiding this comment

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

OOC did you find 1s to be too short of an interval?

Copy link
Member Author

Choose a reason for hiding this comment

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

1s is always too fast, IMHO. If you're trying to debug an issue, having the log flooded with failures every second is annoying, and there's nothing 4 extra seconds is going to ruin, as this shouldn't have to restart often at all.

@Otterverse Otterverse merged commit 72c9a3d into main Feb 12, 2024
@Otterverse Otterverse deleted the provisioning2 branch February 12, 2024 18:42
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.

2 participants