-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1388 from atsign-foundation/cpswan-policy-readmes
docs: Policy README
- Loading branch information
Showing
1 changed file
with
89 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,89 @@ | ||
A sample command-line application with an entrypoint in `bin/`, library code | ||
in `lib/`, and example unit test in `test/`. | ||
# NoPorts Admin API | ||
|
||
## Status | ||
|
||
The Admin API is currently in alpha, and we are working hard to make it | ||
sufficiently robust for production usage | ||
|
||
## Howto | ||
|
||
0. Download a NoPorts release that contains the policy alpha binaries | ||
(e.g. v5.7.0-alpha-6) | ||
|
||
1. Run the policy service (using a different atSign to any daemons connecting | ||
to the policy service): `npp_atserver -a @policy` | ||
|
||
2. Start the policy admin API: `np_admin -a @policy -n sshnp` | ||
|
||
3. Manage policy at: `http://localhost:3000`. In the UI, double-click on a | ||
field to edit it. Changes save immediately they are done. | ||
|
||
4. Connect one or more NoPorts daemons with `-p @policy`. | ||
|
||
## Systemd unit files | ||
|
||
`noports-policy.service`: | ||
|
||
```ini | ||
[Unit] | ||
Description=NoPorts Policy Service | ||
After=network-online.target | ||
|
||
[Install] | ||
WantedBy=multi-user.target | ||
|
||
[Service] | ||
Type=simple | ||
Restart=always | ||
RestartSec=3 | ||
|
||
# Configuration of NoPorts Policy service | ||
# This unit script is a template for the sshnpd background service. | ||
# You can configure the service by editing the variables below. | ||
|
||
# MANDATORY: User to run the daemon as | ||
User=noports | ||
|
||
# MANDATORY: Policy manager address (atSign) | ||
Environment=policy_atsign="@policy" | ||
|
||
# Comment to disable verbose logging | ||
Environment=v="-v" | ||
|
||
# The line below runs the noports policy service, with the options set above. | ||
# You can edit this line to further customize the service to your needs. | ||
ExecStart=/home/noports/sshnp/npp_atserver -a "$policy_atsign" "$v" | ||
``` | ||
|
||
`noports-policy-admin.service`: | ||
|
||
```ini | ||
[Unit] | ||
Description=NoPorts Policy Admin Service | ||
After=network-online.target | ||
|
||
[Install] | ||
WantedBy=multi-user.target | ||
|
||
[Service] | ||
Type=simple | ||
Restart=always | ||
RestartSec=3 | ||
|
||
# Configuration of NoPorts Policy Admin service | ||
# This unit script is a template for the sshnpd background service. | ||
# You can configure the service by editing the variables below. | ||
|
||
# MANDATORY: User to run the daemon as | ||
User=noports | ||
|
||
# MANDATORY: Policy manager address (atSign) | ||
Environment=policy_atsign="@policy" | ||
|
||
# Comment to disable verbose logging | ||
Environment=v="-v" | ||
|
||
# The line below runs the noports policy service, with the options set above. | ||
# You can edit this line to further customize the service to your needs. | ||
ExecStart=/home/noports/sshnp/np_admin -a "$policy_atsign" -n sshnp "$v" | ||
``` |