Skip to content

Commit

Permalink
Refine doc
Browse files Browse the repository at this point in the history
  • Loading branch information
jondy committed Sep 21, 2023
1 parent 12b6978 commit 89b3abc
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
20 changes: 10 additions & 10 deletions docs/how-to/register.rst
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ Each docker host is an offlice device.
The prerequisite in docker host:

- offline device regfile ``pyarmor-device-regfile-xxxx.1.zip`` as above
- Pyarmor 8.3.7+
- Pyarmor 8.3.8+

The practice for group license with unlimited docker containers:

Expand All @@ -169,18 +169,18 @@ The practice for group license with unlimited docker containers:

First copy the following files to docker host:

- pyarmor-8.3.7.tar.gz
- pyarmor.cli.core-4.3.4-cp38-none-manylinux1_x86_64.whl
- pyarmor.cli.core-4.3.4-cp311-none-manylinux1_x86_64.whl
- pyarmor-8.3.8.tar.gz
- pyarmor.cli.core-4.3.5-cp38-none-manylinux1_x86_64.whl
- pyarmor.cli.core-4.3.5-cp311-none-manylinux1_x86_64.whl
- pyarmor-device-regfile-6000.1.zip

Then run the following commands in the docker host::

$ python3 --version
Python 3.8.10

$ pip install pyarmor.cli.core-4.3.4-cp38-none-manylinux1_x86_64.whl
$ pip install pyarmor-8.3.7.tar.bgz
$ pip install pyarmor.cli.core-4.3.5-cp38-none-manylinux1_x86_64.whl
$ pip install pyarmor-8.3.8.tar.bgz

Next start ``pyarmor-auth`` to listen the request from docker containers::

Expand All @@ -202,14 +202,14 @@ For Linux container run it with extra ``--add-host=host.docker.internal:host-gat

In docker host open third console to copy files to container::

$ docker cp pyarmor-8.3.7.tar.gz 86b180b28a50:/
$ docker cp pyarmor.cli.core-4.3.4-cp311-none-manylinux1_x86_64.whl 86b180b28a50:/
$ docker cp pyarmor-8.3.8.tar.gz 86b180b28a50:/
$ docker cp pyarmor.cli.core-4.3.5-cp311-none-manylinux1_x86_64.whl 86b180b28a50:/
$ docker cp pyarmor-device-regfile-6000.1.zip 86b180b28a50:/

In docker container, register Pyarmor with same device regfile. For example::

root@86b180b28a50:/# pip install pyarmor.cli.core-4.3.4-cp311-none-manylinux1_x86_64.whl
root@86b180b28a50:/# pip install pyarmor-8.3.7.tar.gz
root@86b180b28a50:/# pip install pyarmor.cli.core-4.3.5-cp311-none-manylinux1_x86_64.whl
root@86b180b28a50:/# pip install pyarmor-8.3.8.tar.gz
root@86b180b28a50:/# pyarmor reg pyarmor-device-regfile-6000.1.zip
root@86b180b28a50:/# echo "print('hello world')" > foo.py
root@86b180b28a50:/# pyarmor gen --enable-rft foo.py
Expand Down
6 changes: 3 additions & 3 deletions docs/licenses.rst
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,12 @@ Check device for group license

Check one device works for group license by this way:

* First install Pyarmor 8.3.7+ trial version in this device
* First install Pyarmor 8.3.8+ trial version in this device
* Got machine id by the following commands::

$ python -c"from pyarmor.cli.core.pytransform3 import get_hd_info
print(get_hd_info(18))"
b'ib04eb35da4f5378185c8663522e0a5e3'
print(get_hd_info(21))"
b'lb04eb35da4f5378185c8663522e0a5e3'

* Reboot this device, check machine id is same or not
* If machine id is same after each reboot, group license works in this device. Otherwise group license doesn't work in this device.
Expand Down
8 changes: 4 additions & 4 deletions docs/questions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -153,18 +153,18 @@ Registering

**Group license raises "ERROR request license token failed"**

First upgrade Pyarmor to 8.3.7+
First upgrade Pyarmor to 8.3.8+

Then register group license with debug option ``-d`` in offline device. For example::

$ pyarmor -d reg pyarmor-device-regfile-6000.4.zip

Check log, make sure current machine id is inclueded by offline regfile. For example::

DEBUG group license for machines: ['tokens/ib04eb35da4f5378185c8663522e0a5e3']
DEBUG got machine id: ib04eb35da4f5378185c8663522e0a5e3
DEBUG group license for machines: ['tokens/lb04eb35da4f5378185c8663522e0a5e3']
DEBUG got machine id: lb04eb35da4f5378185c8663522e0a5e3

If machine id is mismatched, please generate new device file for this device by Pyarmor 8.3.7+
If machine id is mismatched, please generate new device file for this device by Pyarmor 8.3.8+

For virtual machine, make sure machine id is same after reboot.

Expand Down

0 comments on commit 89b3abc

Please sign in to comment.