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

Python package: Disable pypi workflow for forks and improve help message #766

Merged
merged 2 commits into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ env:
jobs:
pypi-publish:
name: Upload release to PyPI
if: github.repository == 'ceph/ceph-nvmeof'
runs-on: ubuntu-latest
permissions:
id-token: write
Expand Down
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,16 @@ The same configuration can also be manually run:
These can also be run by setting environment variables `CEPH_NVMEOF_SERVER_ADDRESS` and `CEPH_NVMEOF_SERVER_PORT` before running nvmeof-cli commands, example:
```
export CEPH_NVMEOF_SERVER_ADDRESS=x.x.x.x
export CEPH_NVMEOF_SERVER_PORT=5500
cat <<EOF > /etc/ceph/nvmeof-cli.env
CEPH_NVMEOF_SERVER_ADDRESS=x.x.x.x
CEPH_NVMEOF_SERVER_PORT=5500
EOF
// using containers
docker-compose run --it <container_image> subsystem add --subsystem nqn.2016-06.io.spdk:cnode1
docker-compose run --env-file /etc/ceph/nvmeof-cli.env -it <container_image> subsystem add --subsystem nqn.2016-06.io.spdk:cnode1
// using pypi package
source /etc/ceph/nvmeof-cli.env
ceph-nvmeof subsystem add --subsystem nqn.2016-06.io.spdk:cnode1
```
Expand Down
4 changes: 2 additions & 2 deletions control/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,13 @@ def __init__(self):
"--server-address",
default=(os.getenv('CEPH_NVMEOF_SERVER_ADDRESS') or "localhost"),
type=str,
help="Server address",
help="Server address (default: CEPH_NVMEOF_SERVER_ADDRESS env variable or 'localhost')",
)
self.parser.add_argument(
"--server-port",
default=int(os.getenv('CEPH_NVMEOF_SERVER_PORT') or "5500"),
type=int,
help="Server port",
help="Server port (default: CEPH_NVMEOF_SERVER_PORT env variable or '5500')",
)
self.parser.add_argument(
"--client-key",
Expand Down
Loading