Skip to content

Commit

Permalink
Merge pull request ceph#766 from VallariAg/pypkg-fixes
Browse files Browse the repository at this point in the history
Python package: Disable pypi workflow for forks and improve help message
  • Loading branch information
VallariAg authored Jul 29, 2024
2 parents cc291bd + ffc8022 commit 6bca7b3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
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

0 comments on commit 6bca7b3

Please sign in to comment.