Skip to content
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
23 changes: 11 additions & 12 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ View the information about Pis in your account from the command line:

.. code-block:: console

$ hostedpi list
$ hostedpi ls
pi123
pi234
pi345
Expand All @@ -56,23 +56,22 @@ View the information about Pis in your account from the command line:
└───────┴───────┴────────┴───────────┘

$ hostedpi table pi345 --full
┏━━━━━━━┳━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Name ┃ Model ┃ Memory ┃ CPU Speed ┃ NIC Speed ┃ Disk size ┃ Status ┃ Initialised keys ┃ IPv4 SSH port ┃
┡━━━━━━━╇━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ pi345 │ 4B │ 8 GB │ 2.0 GHz │ 1 Gbps │ 50 GB │ Powered on │ Yes │ 5387
└───────┴───────┴────────┴───────────┴───────────┴───────────┴────────────┴──────────────────┴───────────────┘
┏━━━━━━━┳━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━
┃ Name ┃ Model ┃ Memory ┃ CPU Speed ┃ NIC Speed ┃ Disk size ┃ Status ┃ Initialised keys ┃ IPv4 SSH port ┃ IPv6 Address ┃
┡━━━━━━━╇━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━
│ pi345 │ 4B │ 8 GB │ 2.0 GHz │ 1 Gbps │ 50 GB │ Powered on │ Yes │ 5381 │ 2a00:1098:8:17d::1
└───────┴───────┴────────┴───────────┴───────────┴───────────┴────────────┴──────────────────┴───────────────┴────────────────────

Provision a new Pi with your public key and SSH into it:

.. code-block:: console

$ hostedpi create mypi --model 3 --ssh-key-path ~/.ssh/id_rsa.pub --wait
Server provisioned
┏━━━━━━┳━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━┓
┃ Name ┃ Model ┃ Memory ┃ CPU Speed ┃
┡━━━━━━╇━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━┩
│ mypi | 3 │ 1 GB │ 1.2 GHz │
└──────┴───────┴────────┴───────────┘
┏━━━━━━┳━━━━━━━━━━━━━┓
┃ Name ┃ Status ┃
┡━━━━━━╇━━━━━━━━━━━━━┩
│ mypi │ Provisioned │
└──────┴─────────────┘
$ hostedpi ssh command mypi
ssh -p 5063 [email protected]
$ ssh -p 5063 [email protected]
Expand Down
23 changes: 21 additions & 2 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,31 @@ Changelog
Once the library reaches v1.0, it will be considered stable. Please consider giving feedback to
help stabilise the API.

Release 0.4.6 (2025-10-18)
==========================

- Allowed ``user`` to be ``None`` in :meth:`~hostedpi.pi.Pi.get_ipv4_ssh_command()`,
:meth:`~hostedpi.pi.Pi.get_ipv6_ssh_command()`, :meth:`~hostedpi.pi.Pi.get_ipv4_ssh_config()` and
:meth:`~hostedpi.pi.Pi.get_ipv6_ssh_config()` methods to :class:`~hostedpi.pi.Pi`
- Allowed ``user`` to be ``None`` in :meth:`~hostedpi.picloud.PiCloud.get_ipv4_ssh_config()` and
:meth:`~hostedpi.picloud.PiCloud.get_ipv6_ssh_config()` method to
:class:`~hostedpi.picloud.PiCloud`
- Removed ``--full`` option from :doc:`cli/create` command, and simplified the output to a single
table

Release 0.4.5 (2025-10-11)
==========================

- Fixup release

Release 0.4.4 (2025-10-10)
==========================

- Added :meth:`~hostedpi.pi.Pi.get_ipv6_ssh_command()` and
- Added :meth:`~hostedpi.pi.Pi.get_ipv4_ssh_command()`,
:meth:`~hostedpi.pi.Pi.get_ipv6_ssh_command()`, :meth:`~hostedpi.pi.Pi.get_ipv4_ssh_config()` and
:meth:`~hostedpi.pi.Pi.get_ipv6_ssh_config()` methods to :class:`~hostedpi.pi.Pi`
- Added :meth:`~hostedpi.picloud.PiCloud.get_ipv6_ssh_config()` method to
- Added :meth:`~hostedpi.picloud.PiCloud.get_ipv4_ssh_config()` and
:meth:`~hostedpi.picloud.PiCloud.get_ipv6_ssh_config()` method to
:class:`~hostedpi.picloud.PiCloud`

Release 0.4.3 (2025-07-25)
Expand Down
53 changes: 18 additions & 35 deletions docs/cli/create.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ Arguments

Names of the Raspberry Pi servers to provision

If no names are provided, a generated name will be generated. Use in combination with
:option:`--number` to create multiple servers with generated names.
If no names are provided, a name will be generated. Use in combination with :option:`--number`
to create multiple servers with generated names.

Options
=======
Expand Down Expand Up @@ -58,9 +58,6 @@ Options

Wait and poll for status to be available before returning

Supply with :option:`--full` to show the full table of Raspberry Pi server info when the server
is provisioned

.. option:: --ssh-key-path [path]

Path to the SSH key to install on the Raspberry Pi server
Expand All @@ -77,12 +74,6 @@ Options

Can be provided multiple times

.. option:: --full

Show full table of Raspberry Pi server info when the server is provisioned

Can only provided along with :option:`--wait`

.. option:: --help

Show this message and exit
Expand All @@ -95,30 +86,23 @@ Provision a new Pi 3 using the default Pi 3 spec, and wait for it to be provisio
.. code-block:: console

$ hostedpi create mypi --model 3 --wait
Server provisioned
┏━━━━━━━┳━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━┓
┃ Name ┃ Model ┃ Memory ┃ CPU Speed ┃
┡━━━━━━━╇━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━┩
│ mypi │ 3 │ 1 GB │ 1.2 GHz │
└───────┴───────┴────────┴───────────┘
┏━━━━━━┳━━━━━━━━━━━━━┓
┃ Name ┃ Status ┃
┡━━━━━━╇━━━━━━━━━━━━━┩
│ mypi │ Provisioned │
└──────┴─────────────┘

Provision two new Pi 4 servers with generated names, using the default Pi 4 spec:

.. code-block:: console

$ hostedpi create --model 4 --number 2 --wait
Server provisioned
┏━━━━━━━━━━━┳━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━┓
┃ Name ┃ Model ┃ Memory ┃ CPU Speed ┃
┡━━━━━━━━━━━╇━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━┩
│ c8046pxjf │ 4 │ 4 GB │ 1.5 GHz │
└───────────┴───────┴────────┴───────────┘
Server provisioned
┏━━━━━━━━━━━┳━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━┓
┃ Name ┃ Model ┃ Memory ┃ CPU Speed ┃
┡━━━━━━━━━━━╇━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━┩
│ c8046pg5e │ 4 │ 4 GB │ 1.5 GHz │
└───────────┴───────┴────────┴───────────┘
┏━━━━━━━━━━━┳━━━━━━━━━━━━━┓
┃ Name ┃ Status ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━┩
│ c8046pxjf │ Provisioned │
│ c8046pg5e │ Provisioned │
└───────────┴─────────────┘

.. warning::
If no :option:`names` are provided, and :option:`--wait` is not provided, the command will return
Expand All @@ -129,12 +113,11 @@ Provision a new Pi 4 using custom settings:
.. code-block:: console

$ hostedpi create mypi4 --model 4 --memory 8192 --cpu-speed 2000 --disk 60 --os-image rpi-jammy-arm64 --ssh-key-path ~/.ssh/id_rsa.pub --wait
Server provisioned
┏━━━━━━━┳━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━┓
┃ Name ┃ Model ┃ Memory ┃ CPU Speed ┃
┡━━━━━━━╇━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━┩
│ mypi4 │ 4 │ 8 GB │ 2.0 GHz │
└───────┴───────┴────────┴───────────┘
┏━━━━━━━┳━━━━━━━━━━━━━┓
┃ Name ┃ Status ┃
┡━━━━━━━╇━━━━━━━━━━━━━┩
│ mypi4 │ Provisioned │
└───────┴─────────────┘

.. note::

Expand Down
17 changes: 16 additions & 1 deletion docs/cli/ssh/command.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,18 @@ Options

The username to use when connecting

.. option:: --no-user

Don't include a username in SSH command

.. option:: --help

Show this message and exit

Usage
=====

Output the IPv4 SSH command for a Pi:
Output the default IPv4 SSH command for a Pi:

.. code-block:: console

Expand All @@ -53,13 +57,24 @@ Output the IPv4 SSH command for a Pi, with a custom username:
$ hostedpi ssh command mypi --username pi
ssh -p 5091 [email protected]

Output the IPv4 SSH command for a Pi, with no specified username:

.. code-block:: console

$ hostedpi ssh command mypi --no-user
ssh -p 5091 ssh.mypi.hostedpi.com

Output the IPv6 SSH command for a Pi:

.. code-block:: console

$ hostedpi ssh command mypi --ipv6
ssh [email protected]

.. warning::

You will need IPv6 connectivity to connect using the IPv6 address.

Output the IPv6 SSH command for a Pi, with a custom username and numeric address:

.. code-block:: console
Expand Down
16 changes: 16 additions & 0 deletions docs/cli/ssh/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ Options

The username to use when connecting

.. option:: --no-user

Don't include a username in SSH command

.. option:: --help

Show this message and exit
Expand Down Expand Up @@ -71,6 +75,10 @@ Output the IPv6 SSH config for a Pi:
user root
hostname mypi.hostedpi.com

.. warning::

You will need IPv6 connectivity to connect using the IPv6 address.

Output the IPv6 SSH config for a Pi, using a custom username and numeric address:

.. code-block:: console
Expand All @@ -80,6 +88,14 @@ Output the IPv6 SSH config for a Pi, using a custom username and numeric address
user pi
hostname 2a00:1098:8:14b::1

Output the IPv6 SSH config for a Pi, using the numeric address and specifying no username:

.. code-block:: console

$ hostedpi ssh config mypi --ipv6 --numeric --no-user
Host mypi
hostname 2a00:1098:8:14b::1

Output the IPv4 SSH config for multiple Pis:

.. code-block:: console
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import sphinx_rtd_theme


hostedpi_version = "0.4.5"
hostedpi_version = "0.4.6"


# -- General configuration ------------------------------------------------
Expand Down
23 changes: 11 additions & 12 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ View the information about Pis in your account from the command line:

.. code-block:: console

$ hostedpi list
$ hostedpi ls
pi123
pi234
pi345
Expand All @@ -56,23 +56,22 @@ View the information about Pis in your account from the command line:
└───────┴───────┴────────┴───────────┘

$ hostedpi table pi345 --full
┏━━━━━━━┳━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Name ┃ Model ┃ Memory ┃ CPU Speed ┃ NIC Speed ┃ Disk size ┃ Status ┃ Initialised keys ┃ IPv4 SSH port ┃
┡━━━━━━━╇━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ pi345 │ 4B │ 8 GB │ 2.0 GHz │ 1 Gbps │ 50 GB │ Powered on │ Yes │ 5387
└───────┴───────┴────────┴───────────┴───────────┴───────────┴────────────┴──────────────────┴───────────────┘
┏━━━━━━━┳━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━
┃ Name ┃ Model ┃ Memory ┃ CPU Speed ┃ NIC Speed ┃ Disk size ┃ Status ┃ Initialised keys ┃ IPv4 SSH port ┃ IPv6 Address ┃
┡━━━━━━━╇━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━
│ pi345 │ 4B │ 8 GB │ 2.0 GHz │ 1 Gbps │ 50 GB │ Powered on │ Yes │ 5381 │ 2a00:1098:8:17d::1
└───────┴───────┴────────┴───────────┴───────────┴───────────┴────────────┴──────────────────┴───────────────┴────────────────────

Provision a new Pi with your public key and SSH into it:

.. code-block:: console

$ hostedpi create mypi --model 3 --ssh-key-path ~/.ssh/id_rsa.pub --wait
Server provisioned
┏━━━━━━┳━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━┓
┃ Name ┃ Model ┃ Memory ┃ CPU Speed ┃
┡━━━━━━╇━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━┩
│ mypi | 3 │ 1 GB │ 1.2 GHz │
└──────┴───────┴────────┴───────────┘
┏━━━━━━┳━━━━━━━━━━━━━┓
┃ Name ┃ Status ┃
┡━━━━━━╇━━━━━━━━━━━━━┩
│ mypi │ Provisioned │
└──────┴─────────────┘
$ hostedpi ssh command mypi
ssh -p 5063 [email protected]
$ ssh -p 5063 [email protected]
Expand Down
Loading