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

Add a certificate creation script #69

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

Conversation

hello-fazil
Copy link
Contributor

@hello-fazil hello-fazil commented Jul 10, 2024

Description

This PR adds a script to create certificates for the web teleop, which was previously part of the create ament_ws script from the Stretch Install repository. This has the advantage of modularizing the certificate creation step. It can be maintained only in this one stake-holding repository and just called from Stretch Install scripts.

Testing procedure

Before opening a pull request

From the top-level of this repository, run:

  • pre-commit run --all-files

To merge

  • Squash & Merge

@hello-fazil
Copy link
Contributor Author

This PR needs to be merged before merging the PR hello-robot/stretch_install#75

Copy link
Collaborator

@hello-amal hello-amal left a comment

Choose a reason for hiding this comment

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

See comments.

cd ..
touch .env
echo certfile=${HELLO_FLEET_ID}+6.pem >> .env
echo keyfile=${HELLO_FLEET_ID}+6-key.pem >> .env
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: newline at EOF.

@@ -2,6 +2,7 @@
import pathlib
import pprint
import subprocess
import sys
Copy link
Collaborator

Choose a reason for hiding this comment

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

You should rebase on top of master to eliminate this commit. (The reason this arises is the default merge strategy for this repo is Squash & Merge)

@@ -0,0 +1,15 @@
echo "Generating web interface certs..."
cd certificates
Copy link
Collaborator

Choose a reason for hiding this comment

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

Now that we've moved this script to this repo, its possible that users will run it from a different folder (e.g., the workspace root). I'd recommend adding a check for whether the certificates director exists, as a heuristic for whether the user is in the stretch_web_teleop folder. If it does not exist, the script should echo a message telling users it must be run from stretch_web_teleop, and exit.

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