bisos.dnsCap 0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- bisos_dnscap-0.1/PKG-INFO +280 -0
- bisos_dnscap-0.1/README.rst +248 -0
- bisos_dnscap-0.1/_description.org +195 -0
- bisos_dnscap-0.1/bin/airflow-here-dns.pcs +33 -0
- bisos_dnscap-0.1/bin/dnsCap_seed.cs +245 -0
- bisos_dnscap-0.1/bin/exmpl-here-dns.pcs +33 -0
- bisos_dnscap-0.1/bisos/__init__.py +1 -0
- bisos_dnscap-0.1/bisos/dnsCap/__init__.py +0 -0
- bisos_dnscap-0.1/bisos/dnsCap/dnsCap_csu.py +396 -0
- bisos_dnscap-0.1/bisos/dnsCap/dnsCap_seed.py +116 -0
- bisos_dnscap-0.1/bisos/dnsCap/dnsCap_seedInfo.py +191 -0
- bisos_dnscap-0.1/bisos.dnsCap.egg-info/PKG-INFO +280 -0
- bisos_dnscap-0.1/bisos.dnsCap.egg-info/SOURCES.txt +19 -0
- bisos_dnscap-0.1/bisos.dnsCap.egg-info/dependency_links.txt +1 -0
- bisos_dnscap-0.1/bisos.dnsCap.egg-info/not-zip-safe +1 -0
- bisos_dnscap-0.1/bisos.dnsCap.egg-info/requires.txt +7 -0
- bisos_dnscap-0.1/bisos.dnsCap.egg-info/top_level.txt +1 -0
- bisos_dnscap-0.1/lh-agpl3-LICENSE.txt +679 -0
- bisos_dnscap-0.1/pyproject.toml +8 -0
- bisos_dnscap-0.1/setup.cfg +4 -0
- bisos_dnscap-0.1/setup.py +113 -0
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
|
+
Name: bisos.dnsCap
|
|
3
|
+
Version: 0.1
|
|
4
|
+
Summary: bisos.dnsCap: DNS Management Facilities for BISOS Capabilities
|
|
5
|
+
Author: Mohsen Banan
|
|
6
|
+
Author-email: libre@mohsen.1.banan.byname.net
|
|
7
|
+
Maintainer: Mohsen Banan
|
|
8
|
+
Maintainer-email: libre@mohsen.1.banan.byname.net
|
|
9
|
+
License: AGPL
|
|
10
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Operating System :: POSIX
|
|
13
|
+
Classifier: Programming Language :: Python
|
|
14
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
15
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
16
|
+
Requires-Dist: bisos
|
|
17
|
+
Requires-Dist: bisos.b
|
|
18
|
+
Requires-Dist: bisos.common
|
|
19
|
+
Requires-Dist: bisos.csPlayer
|
|
20
|
+
Requires-Dist: bisos.csSeed
|
|
21
|
+
Requires-Dist: setuptools==75.8.0
|
|
22
|
+
Requires-Dist: wheel==0.38.4
|
|
23
|
+
Dynamic: author
|
|
24
|
+
Dynamic: author-email
|
|
25
|
+
Dynamic: classifier
|
|
26
|
+
Dynamic: description
|
|
27
|
+
Dynamic: license
|
|
28
|
+
Dynamic: maintainer
|
|
29
|
+
Dynamic: maintainer-email
|
|
30
|
+
Dynamic: requires-dist
|
|
31
|
+
Dynamic: summary
|
|
32
|
+
|
|
33
|
+
==============================================================
|
|
34
|
+
bisos.dnsCap: DNS Management Facilities for BISOS Capabilities
|
|
35
|
+
==============================================================
|
|
36
|
+
|
|
37
|
+
.. contents::
|
|
38
|
+
:depth: 3
|
|
39
|
+
..
|
|
40
|
+
|
|
41
|
+
Overview
|
|
42
|
+
========
|
|
43
|
+
|
|
44
|
+
*bisos.dnsCap* provides DNS management facilities that contribute to
|
|
45
|
+
BISOS **Capabilities**. In BISOS, a **Capability** is a specific
|
|
46
|
+
concept, specified and realized through *bisos.capability*. ``dnsCap``
|
|
47
|
+
is not itself a Capability; it is one ingredient — the DNS aspect — of a
|
|
48
|
+
full **CBS** (Capability Bundle Specification), alongside sibling
|
|
49
|
+
aspects such as ``webCap`` and ``sbom``.
|
|
50
|
+
|
|
51
|
+
Concretely, ``dnsCap`` supplies the DNS naming an application needs. Its
|
|
52
|
+
first backend maintains ``/etc/hosts`` entries for the ``.here`` domain
|
|
53
|
+
(e.g. ``airflow.here``), using the ``bisos.banna`` dblock machinery to
|
|
54
|
+
keep those entries in sync.
|
|
55
|
+
|
|
56
|
+
``dnsCap_seed.cs`` is a seed. Common usages take the form of a
|
|
57
|
+
``<name>-here-dns.pcs`` plant that names the fqdn to manage.
|
|
58
|
+
|
|
59
|
+
.. _table-of-contents:
|
|
60
|
+
|
|
61
|
+
Table of Contents TOC
|
|
62
|
+
=====================
|
|
63
|
+
|
|
64
|
+
- `Overview <#overview>`__
|
|
65
|
+
- `Relation to BISOS Capabilities <#relation-to-bisos-capabilities>`__
|
|
66
|
+
- `Part of BISOS — ByStar Internet Services Operating
|
|
67
|
+
System <#part-of-bisos--bystar-internet-services-operating-system>`__
|
|
68
|
+
- `bisos.dnsCap is a Command-Only PyCS
|
|
69
|
+
Facility <#bisosdnscap-is-a-command-only-pycs-facility>`__
|
|
70
|
+
- `Installation <#installation>`__
|
|
71
|
+
|
|
72
|
+
- `Installation With pip <#installation-with-pip>`__
|
|
73
|
+
- `Installation With pipx <#installation-with-pipx>`__
|
|
74
|
+
|
|
75
|
+
- `Usage <#usage>`__
|
|
76
|
+
|
|
77
|
+
- `Example: managing airflow.here in
|
|
78
|
+
/etc/hosts <#example-managing-airflowhere-in-etchosts>`__
|
|
79
|
+
- `Commands <#commands>`__
|
|
80
|
+
|
|
81
|
+
- `Key Files <#key-files>`__
|
|
82
|
+
- `Documentation and Blee-Panels <#documentation-and-blee-panels>`__
|
|
83
|
+
- `Support <#support>`__
|
|
84
|
+
- `Planned Improvements <#planned-improvements>`__
|
|
85
|
+
|
|
86
|
+
Relation to BISOS Capabilities
|
|
87
|
+
==============================
|
|
88
|
+
|
|
89
|
+
A BISOS **Capability** is specified and realized by *bisos.capability*
|
|
90
|
+
as a **CBS** (Capability Bundle Specification) — a bundle of component
|
|
91
|
+
aspects. ``dnsCap`` is the DNS aspect of that bundle. Its sibling
|
|
92
|
+
aspects include:
|
|
93
|
+
|
|
94
|
+
- ``dnsCap`` — DNS naming (this package): ``/etc/hosts`` and, later,
|
|
95
|
+
other DNS backends.
|
|
96
|
+
- ``webCap`` — the web-service aspect.
|
|
97
|
+
- ``sbom`` — the Software Bill Of Materials aspect (typically a
|
|
98
|
+
``*-sbom.pcs`` plant).
|
|
99
|
+
|
|
100
|
+
A CBS composes these aspects into the complete specification of a
|
|
101
|
+
Capability. ``dnsCap`` can be used on its own (as shown below) or as an
|
|
102
|
+
ingredient invoked from within a CBS. For the Capability concept itself,
|
|
103
|
+
see `bisos.capability <https://github.com/bisos-pip/capability>`__.
|
|
104
|
+
|
|
105
|
+
Part of BISOS — ByStar Internet Services Operating System
|
|
106
|
+
=========================================================
|
|
107
|
+
|
|
108
|
+
Layered on top of Debian, **BISOS** (By\* Internet Services Operating
|
|
109
|
+
System) is a unified and universal framework for developing both
|
|
110
|
+
internet services and software-service continuums that use internet
|
|
111
|
+
services. See `Bootstrapping ByStar, BISOS and
|
|
112
|
+
Blee <https://github.com/bxGenesis/start>`__ for information about
|
|
113
|
+
getting started with BISOS.
|
|
114
|
+
|
|
115
|
+
**BISOS** is a foundation for **The Libre-Halaal ByStar Digital
|
|
116
|
+
Ecosystem** which is described as a cure for losses of autonomy and
|
|
117
|
+
privacy in a book titled: `Nature of
|
|
118
|
+
Polyexistentials <https://github.com/bxplpc/120033>`__
|
|
119
|
+
|
|
120
|
+
*bisos.dnsCap* is part of BISOS. It is a standalone package that can be
|
|
121
|
+
used independently of the full BISOS environment.
|
|
122
|
+
|
|
123
|
+
bisos.dnsCap is a Command-Only PyCS Facility
|
|
124
|
+
============================================
|
|
125
|
+
|
|
126
|
+
bisos.dnsCap is a command-line tool. It is a PyCS single-unit command
|
|
127
|
+
service. PyCS is a framework that converges development of CLI tools and
|
|
128
|
+
services. PyCS is an alternative to FastAPI, Typer and Click.
|
|
129
|
+
|
|
130
|
+
bisos.dnsCap uses the PyCS-Framework to provide the DNS aspect of a
|
|
131
|
+
BISOS Capability:
|
|
132
|
+
|
|
133
|
+
#. Update ``/etc/hosts`` with the DNS entries for a ``.here`` fqdn (via
|
|
134
|
+
the ``bisos.banna`` dblock machinery).
|
|
135
|
+
#. Verify that ``/etc/hosts`` contains the expected banna dblock
|
|
136
|
+
markers.
|
|
137
|
+
#. Resolve and ping a managed fqdn to confirm the entry is in effect.
|
|
138
|
+
|
|
139
|
+
The core of PyCS-Framework is the *bisos.b* package (the
|
|
140
|
+
PyCS-Foundation). See `bisos.b <https://github.com/bisos-pip/b>`__ for
|
|
141
|
+
an overview.
|
|
142
|
+
|
|
143
|
+
Installation
|
|
144
|
+
============
|
|
145
|
+
|
|
146
|
+
The sources for the bisos.dnsCap pip package are maintained at:
|
|
147
|
+
https://github.com/bisos-pip/dnsCap.
|
|
148
|
+
|
|
149
|
+
The bisos.dnsCap pip package is available at PYPI as
|
|
150
|
+
https://pypi.org/project/bisos.dnsCap
|
|
151
|
+
|
|
152
|
+
You can install bisos.dnsCap with pip or pipx.
|
|
153
|
+
|
|
154
|
+
Installation With pip
|
|
155
|
+
---------------------
|
|
156
|
+
|
|
157
|
+
If you need access to bisos.dnsCap as a python module, you can install
|
|
158
|
+
it with pip:
|
|
159
|
+
|
|
160
|
+
.. code:: bash
|
|
161
|
+
|
|
162
|
+
pip install bisos.dnsCap
|
|
163
|
+
|
|
164
|
+
Installation With pipx
|
|
165
|
+
----------------------
|
|
166
|
+
|
|
167
|
+
If you only need access to bisos.dnsCap on command-line, you can install
|
|
168
|
+
it with pipx:
|
|
169
|
+
|
|
170
|
+
.. code:: bash
|
|
171
|
+
|
|
172
|
+
pipx install bisos.dnsCap
|
|
173
|
+
|
|
174
|
+
Usage
|
|
175
|
+
=====
|
|
176
|
+
|
|
177
|
+
Example: managing airflow.here in /etc/hosts
|
|
178
|
+
--------------------------------------------
|
|
179
|
+
|
|
180
|
+
A plant such as ``airflow-here-dns.pcs`` names the fqdn and the DNS
|
|
181
|
+
backend:
|
|
182
|
+
|
|
183
|
+
.. code:: python
|
|
184
|
+
|
|
185
|
+
from bisos.dnsCap import dnsCap_seedInfo
|
|
186
|
+
cntrlInfo = dnsCap_seedInfo.cmndsControlInfo
|
|
187
|
+
cntrlInfo.dnsSpecMethod = dnsCap_seedInfo.DnsSpecMethod.etcHosts
|
|
188
|
+
cntrlInfo.fqdn = "airflow.here"
|
|
189
|
+
|
|
190
|
+
With that plant in place, the full cycle is:
|
|
191
|
+
|
|
192
|
+
.. code:: bash
|
|
193
|
+
|
|
194
|
+
bin/airflow-here-dns.pcs -i dnsCap_update
|
|
195
|
+
|
|
196
|
+
bin/airflow-here-dns.pcs -i dnsCap_verify
|
|
197
|
+
|
|
198
|
+
bin/airflow-here-dns.pcs -i dnsCap_resolve airflow.here
|
|
199
|
+
bin/airflow-here-dns.pcs -i dnsCap_fqdnPing airflow.here
|
|
200
|
+
|
|
201
|
+
After ``dnsCap_update``, ``/etc/hosts`` contains a banna-generated
|
|
202
|
+
block, e.g.:
|
|
203
|
+
|
|
204
|
+
.. code:: text
|
|
205
|
+
|
|
206
|
+
####+BEGIN: bx:dblock:global:run-result-stdout :command "bannaInfo.cs -i bannaForEtcHosts"
|
|
207
|
+
127.0.22.100 airflow.here # port=24006
|
|
208
|
+
127.0.22.101 csLineInvoker.here # port=24002
|
|
209
|
+
127.0.22.102 csLineInvoker_dev.here # port=25002
|
|
210
|
+
127.0.22.103 csPlayerPerf.here # port=23001
|
|
211
|
+
127.0.22.104 csPlayerPerf_dev.here # port=23501
|
|
212
|
+
127.0.22.105 csPlayerUi.here # port=24001
|
|
213
|
+
127.0.22.106 csPlayerUi_dev.here # port=25001
|
|
214
|
+
127.0.22.107 sonCliLineInvoker.here # port=24004
|
|
215
|
+
127.0.22.108 sonCliLineInvoker_dev.here # port=25004
|
|
216
|
+
127.0.22.109 sonCliPlayerUi.here # port=24003
|
|
217
|
+
127.0.22.110 sonCliPlayerUi_dev.here # port=25003
|
|
218
|
+
127.0.22.111 starterSidebar.here # port=24005
|
|
219
|
+
127.0.22.112 starterSidebar_dev.here # port=25005
|
|
220
|
+
|
|
221
|
+
####+END:
|
|
222
|
+
|
|
223
|
+
and ``ping airflow.here`` then resolves to ``127.0.22.100``.
|
|
224
|
+
|
|
225
|
+
Commands
|
|
226
|
+
--------
|
|
227
|
+
|
|
228
|
+
+---------------------+-----------------------------------------------+
|
|
229
|
+
| Command | What it does |
|
|
230
|
+
+=====================+===============================================+
|
|
231
|
+
| ``dnsCap_update`` | Safe-copy ``/etc/hosts``, then rewrite its |
|
|
232
|
+
| | banna dblock (sudo). |
|
|
233
|
+
+---------------------+-----------------------------------------------+
|
|
234
|
+
| ``dnsCap_verify`` | Check that ``/etc/hosts`` has the banna |
|
|
235
|
+
| | dblock BEGIN/END markers. |
|
|
236
|
+
+---------------------+-----------------------------------------------+
|
|
237
|
+
| ``dnsCap_resolve`` | Resolve the fqdn via ``getent hosts``. |
|
|
238
|
+
+---------------------+-----------------------------------------------+
|
|
239
|
+
| ``dnsCap_fqdnPing`` | Ping the fqdn once to confirm the entry is in |
|
|
240
|
+
| | effect. |
|
|
241
|
+
+---------------------+-----------------------------------------------+
|
|
242
|
+
|
|
243
|
+
Key Files
|
|
244
|
+
=========
|
|
245
|
+
|
|
246
|
+
- ``py3/bin/dnsCap_seed.cs`` — the seed entry point.
|
|
247
|
+
- ``py3/bin/airflow-here-dns.pcs`` — example plant for
|
|
248
|
+
``airflow.here``.
|
|
249
|
+
- ``py3/bin/exmpl-here-dns.pcs`` — example plant for ``exmpl.here``.
|
|
250
|
+
- ``py3/bisos/dnsCap/dnsCap_csu.py`` — the four ``dnsCap_*`` commands.
|
|
251
|
+
- ``py3/bisos/dnsCap/dnsCap_seedInfo.py`` — ``DnsSpecMethod`` enum
|
|
252
|
+
(``etcHosts``, ``tinydns``) and the ``fqdn`` / ``dnsSpecMethod``
|
|
253
|
+
control info.
|
|
254
|
+
|
|
255
|
+
Documentation and Blee-Panels
|
|
256
|
+
=============================
|
|
257
|
+
|
|
258
|
+
bisos.dnsCap is part of ByStar Digital Ecosystem http://www.by-star.net.
|
|
259
|
+
|
|
260
|
+
This module's primary documentation is in the form of Blee-Panels.
|
|
261
|
+
|
|
262
|
+
See
|
|
263
|
+
`file:./panels/bisos.dnsCap/_nodeBase_/fullUsagePanel-en.org <./panels/bisos.dnsCap/_nodeBase_/fullUsagePanel-en.org>`__
|
|
264
|
+
for a starting point.
|
|
265
|
+
|
|
266
|
+
Support
|
|
267
|
+
=======
|
|
268
|
+
|
|
269
|
+
| For support, criticism, comments and questions; please contact the
|
|
270
|
+
author/maintainer
|
|
271
|
+
| `Mohsen Banan <http://mohsen.1.banan.byname.net>`__ at:
|
|
272
|
+
http://mohsen.1.banan.byname.net/contact
|
|
273
|
+
|
|
274
|
+
Planned Improvements
|
|
275
|
+
====================
|
|
276
|
+
|
|
277
|
+
- Implement the ``tinydns`` backend (``DnsSpecMethod.tinydns`` is
|
|
278
|
+
currently a placeholder).
|
|
279
|
+
- Handle ``dnsCap_update`` on a fresh ``/etc/hosts`` with no
|
|
280
|
+
pre-existing dblock markers.
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
==============================================================
|
|
2
|
+
bisos.dnsCap: DNS Management Facilities for BISOS Capabilities
|
|
3
|
+
==============================================================
|
|
4
|
+
|
|
5
|
+
.. contents::
|
|
6
|
+
:depth: 3
|
|
7
|
+
..
|
|
8
|
+
|
|
9
|
+
Overview
|
|
10
|
+
========
|
|
11
|
+
|
|
12
|
+
*bisos.dnsCap* provides DNS management facilities that contribute to
|
|
13
|
+
BISOS **Capabilities**. In BISOS, a **Capability** is a specific
|
|
14
|
+
concept, specified and realized through *bisos.capability*. ``dnsCap``
|
|
15
|
+
is not itself a Capability; it is one ingredient — the DNS aspect — of a
|
|
16
|
+
full **CBS** (Capability Bundle Specification), alongside sibling
|
|
17
|
+
aspects such as ``webCap`` and ``sbom``.
|
|
18
|
+
|
|
19
|
+
Concretely, ``dnsCap`` supplies the DNS naming an application needs. Its
|
|
20
|
+
first backend maintains ``/etc/hosts`` entries for the ``.here`` domain
|
|
21
|
+
(e.g. ``airflow.here``), using the ``bisos.banna`` dblock machinery to
|
|
22
|
+
keep those entries in sync.
|
|
23
|
+
|
|
24
|
+
``dnsCap_seed.cs`` is a seed. Common usages take the form of a
|
|
25
|
+
``<name>-here-dns.pcs`` plant that names the fqdn to manage.
|
|
26
|
+
|
|
27
|
+
.. _table-of-contents:
|
|
28
|
+
|
|
29
|
+
Table of Contents TOC
|
|
30
|
+
=====================
|
|
31
|
+
|
|
32
|
+
- `Overview <#overview>`__
|
|
33
|
+
- `Relation to BISOS Capabilities <#relation-to-bisos-capabilities>`__
|
|
34
|
+
- `Part of BISOS — ByStar Internet Services Operating
|
|
35
|
+
System <#part-of-bisos--bystar-internet-services-operating-system>`__
|
|
36
|
+
- `bisos.dnsCap is a Command-Only PyCS
|
|
37
|
+
Facility <#bisosdnscap-is-a-command-only-pycs-facility>`__
|
|
38
|
+
- `Installation <#installation>`__
|
|
39
|
+
|
|
40
|
+
- `Installation With pip <#installation-with-pip>`__
|
|
41
|
+
- `Installation With pipx <#installation-with-pipx>`__
|
|
42
|
+
|
|
43
|
+
- `Usage <#usage>`__
|
|
44
|
+
|
|
45
|
+
- `Example: managing airflow.here in
|
|
46
|
+
/etc/hosts <#example-managing-airflowhere-in-etchosts>`__
|
|
47
|
+
- `Commands <#commands>`__
|
|
48
|
+
|
|
49
|
+
- `Key Files <#key-files>`__
|
|
50
|
+
- `Documentation and Blee-Panels <#documentation-and-blee-panels>`__
|
|
51
|
+
- `Support <#support>`__
|
|
52
|
+
- `Planned Improvements <#planned-improvements>`__
|
|
53
|
+
|
|
54
|
+
Relation to BISOS Capabilities
|
|
55
|
+
==============================
|
|
56
|
+
|
|
57
|
+
A BISOS **Capability** is specified and realized by *bisos.capability*
|
|
58
|
+
as a **CBS** (Capability Bundle Specification) — a bundle of component
|
|
59
|
+
aspects. ``dnsCap`` is the DNS aspect of that bundle. Its sibling
|
|
60
|
+
aspects include:
|
|
61
|
+
|
|
62
|
+
- ``dnsCap`` — DNS naming (this package): ``/etc/hosts`` and, later,
|
|
63
|
+
other DNS backends.
|
|
64
|
+
- ``webCap`` — the web-service aspect.
|
|
65
|
+
- ``sbom`` — the Software Bill Of Materials aspect (typically a
|
|
66
|
+
``*-sbom.pcs`` plant).
|
|
67
|
+
|
|
68
|
+
A CBS composes these aspects into the complete specification of a
|
|
69
|
+
Capability. ``dnsCap`` can be used on its own (as shown below) or as an
|
|
70
|
+
ingredient invoked from within a CBS. For the Capability concept itself,
|
|
71
|
+
see `bisos.capability <https://github.com/bisos-pip/capability>`__.
|
|
72
|
+
|
|
73
|
+
Part of BISOS — ByStar Internet Services Operating System
|
|
74
|
+
=========================================================
|
|
75
|
+
|
|
76
|
+
Layered on top of Debian, **BISOS** (By\* Internet Services Operating
|
|
77
|
+
System) is a unified and universal framework for developing both
|
|
78
|
+
internet services and software-service continuums that use internet
|
|
79
|
+
services. See `Bootstrapping ByStar, BISOS and
|
|
80
|
+
Blee <https://github.com/bxGenesis/start>`__ for information about
|
|
81
|
+
getting started with BISOS.
|
|
82
|
+
|
|
83
|
+
**BISOS** is a foundation for **The Libre-Halaal ByStar Digital
|
|
84
|
+
Ecosystem** which is described as a cure for losses of autonomy and
|
|
85
|
+
privacy in a book titled: `Nature of
|
|
86
|
+
Polyexistentials <https://github.com/bxplpc/120033>`__
|
|
87
|
+
|
|
88
|
+
*bisos.dnsCap* is part of BISOS. It is a standalone package that can be
|
|
89
|
+
used independently of the full BISOS environment.
|
|
90
|
+
|
|
91
|
+
bisos.dnsCap is a Command-Only PyCS Facility
|
|
92
|
+
============================================
|
|
93
|
+
|
|
94
|
+
bisos.dnsCap is a command-line tool. It is a PyCS single-unit command
|
|
95
|
+
service. PyCS is a framework that converges development of CLI tools and
|
|
96
|
+
services. PyCS is an alternative to FastAPI, Typer and Click.
|
|
97
|
+
|
|
98
|
+
bisos.dnsCap uses the PyCS-Framework to provide the DNS aspect of a
|
|
99
|
+
BISOS Capability:
|
|
100
|
+
|
|
101
|
+
#. Update ``/etc/hosts`` with the DNS entries for a ``.here`` fqdn (via
|
|
102
|
+
the ``bisos.banna`` dblock machinery).
|
|
103
|
+
#. Verify that ``/etc/hosts`` contains the expected banna dblock
|
|
104
|
+
markers.
|
|
105
|
+
#. Resolve and ping a managed fqdn to confirm the entry is in effect.
|
|
106
|
+
|
|
107
|
+
The core of PyCS-Framework is the *bisos.b* package (the
|
|
108
|
+
PyCS-Foundation). See `bisos.b <https://github.com/bisos-pip/b>`__ for
|
|
109
|
+
an overview.
|
|
110
|
+
|
|
111
|
+
Installation
|
|
112
|
+
============
|
|
113
|
+
|
|
114
|
+
The sources for the bisos.dnsCap pip package are maintained at:
|
|
115
|
+
https://github.com/bisos-pip/dnsCap.
|
|
116
|
+
|
|
117
|
+
The bisos.dnsCap pip package is available at PYPI as
|
|
118
|
+
https://pypi.org/project/bisos.dnsCap
|
|
119
|
+
|
|
120
|
+
You can install bisos.dnsCap with pip or pipx.
|
|
121
|
+
|
|
122
|
+
Installation With pip
|
|
123
|
+
---------------------
|
|
124
|
+
|
|
125
|
+
If you need access to bisos.dnsCap as a python module, you can install
|
|
126
|
+
it with pip:
|
|
127
|
+
|
|
128
|
+
.. code:: bash
|
|
129
|
+
|
|
130
|
+
pip install bisos.dnsCap
|
|
131
|
+
|
|
132
|
+
Installation With pipx
|
|
133
|
+
----------------------
|
|
134
|
+
|
|
135
|
+
If you only need access to bisos.dnsCap on command-line, you can install
|
|
136
|
+
it with pipx:
|
|
137
|
+
|
|
138
|
+
.. code:: bash
|
|
139
|
+
|
|
140
|
+
pipx install bisos.dnsCap
|
|
141
|
+
|
|
142
|
+
Usage
|
|
143
|
+
=====
|
|
144
|
+
|
|
145
|
+
Example: managing airflow.here in /etc/hosts
|
|
146
|
+
--------------------------------------------
|
|
147
|
+
|
|
148
|
+
A plant such as ``airflow-here-dns.pcs`` names the fqdn and the DNS
|
|
149
|
+
backend:
|
|
150
|
+
|
|
151
|
+
.. code:: python
|
|
152
|
+
|
|
153
|
+
from bisos.dnsCap import dnsCap_seedInfo
|
|
154
|
+
cntrlInfo = dnsCap_seedInfo.cmndsControlInfo
|
|
155
|
+
cntrlInfo.dnsSpecMethod = dnsCap_seedInfo.DnsSpecMethod.etcHosts
|
|
156
|
+
cntrlInfo.fqdn = "airflow.here"
|
|
157
|
+
|
|
158
|
+
With that plant in place, the full cycle is:
|
|
159
|
+
|
|
160
|
+
.. code:: bash
|
|
161
|
+
|
|
162
|
+
bin/airflow-here-dns.pcs -i dnsCap_update
|
|
163
|
+
|
|
164
|
+
bin/airflow-here-dns.pcs -i dnsCap_verify
|
|
165
|
+
|
|
166
|
+
bin/airflow-here-dns.pcs -i dnsCap_resolve airflow.here
|
|
167
|
+
bin/airflow-here-dns.pcs -i dnsCap_fqdnPing airflow.here
|
|
168
|
+
|
|
169
|
+
After ``dnsCap_update``, ``/etc/hosts`` contains a banna-generated
|
|
170
|
+
block, e.g.:
|
|
171
|
+
|
|
172
|
+
.. code:: text
|
|
173
|
+
|
|
174
|
+
####+BEGIN: bx:dblock:global:run-result-stdout :command "bannaInfo.cs -i bannaForEtcHosts"
|
|
175
|
+
127.0.22.100 airflow.here # port=24006
|
|
176
|
+
127.0.22.101 csLineInvoker.here # port=24002
|
|
177
|
+
127.0.22.102 csLineInvoker_dev.here # port=25002
|
|
178
|
+
127.0.22.103 csPlayerPerf.here # port=23001
|
|
179
|
+
127.0.22.104 csPlayerPerf_dev.here # port=23501
|
|
180
|
+
127.0.22.105 csPlayerUi.here # port=24001
|
|
181
|
+
127.0.22.106 csPlayerUi_dev.here # port=25001
|
|
182
|
+
127.0.22.107 sonCliLineInvoker.here # port=24004
|
|
183
|
+
127.0.22.108 sonCliLineInvoker_dev.here # port=25004
|
|
184
|
+
127.0.22.109 sonCliPlayerUi.here # port=24003
|
|
185
|
+
127.0.22.110 sonCliPlayerUi_dev.here # port=25003
|
|
186
|
+
127.0.22.111 starterSidebar.here # port=24005
|
|
187
|
+
127.0.22.112 starterSidebar_dev.here # port=25005
|
|
188
|
+
|
|
189
|
+
####+END:
|
|
190
|
+
|
|
191
|
+
and ``ping airflow.here`` then resolves to ``127.0.22.100``.
|
|
192
|
+
|
|
193
|
+
Commands
|
|
194
|
+
--------
|
|
195
|
+
|
|
196
|
+
+---------------------+-----------------------------------------------+
|
|
197
|
+
| Command | What it does |
|
|
198
|
+
+=====================+===============================================+
|
|
199
|
+
| ``dnsCap_update`` | Safe-copy ``/etc/hosts``, then rewrite its |
|
|
200
|
+
| | banna dblock (sudo). |
|
|
201
|
+
+---------------------+-----------------------------------------------+
|
|
202
|
+
| ``dnsCap_verify`` | Check that ``/etc/hosts`` has the banna |
|
|
203
|
+
| | dblock BEGIN/END markers. |
|
|
204
|
+
+---------------------+-----------------------------------------------+
|
|
205
|
+
| ``dnsCap_resolve`` | Resolve the fqdn via ``getent hosts``. |
|
|
206
|
+
+---------------------+-----------------------------------------------+
|
|
207
|
+
| ``dnsCap_fqdnPing`` | Ping the fqdn once to confirm the entry is in |
|
|
208
|
+
| | effect. |
|
|
209
|
+
+---------------------+-----------------------------------------------+
|
|
210
|
+
|
|
211
|
+
Key Files
|
|
212
|
+
=========
|
|
213
|
+
|
|
214
|
+
- ``py3/bin/dnsCap_seed.cs`` — the seed entry point.
|
|
215
|
+
- ``py3/bin/airflow-here-dns.pcs`` — example plant for
|
|
216
|
+
``airflow.here``.
|
|
217
|
+
- ``py3/bin/exmpl-here-dns.pcs`` — example plant for ``exmpl.here``.
|
|
218
|
+
- ``py3/bisos/dnsCap/dnsCap_csu.py`` — the four ``dnsCap_*`` commands.
|
|
219
|
+
- ``py3/bisos/dnsCap/dnsCap_seedInfo.py`` — ``DnsSpecMethod`` enum
|
|
220
|
+
(``etcHosts``, ``tinydns``) and the ``fqdn`` / ``dnsSpecMethod``
|
|
221
|
+
control info.
|
|
222
|
+
|
|
223
|
+
Documentation and Blee-Panels
|
|
224
|
+
=============================
|
|
225
|
+
|
|
226
|
+
bisos.dnsCap is part of ByStar Digital Ecosystem http://www.by-star.net.
|
|
227
|
+
|
|
228
|
+
This module's primary documentation is in the form of Blee-Panels.
|
|
229
|
+
|
|
230
|
+
See
|
|
231
|
+
`file:./panels/bisos.dnsCap/_nodeBase_/fullUsagePanel-en.org <./panels/bisos.dnsCap/_nodeBase_/fullUsagePanel-en.org>`__
|
|
232
|
+
for a starting point.
|
|
233
|
+
|
|
234
|
+
Support
|
|
235
|
+
=======
|
|
236
|
+
|
|
237
|
+
| For support, criticism, comments and questions; please contact the
|
|
238
|
+
author/maintainer
|
|
239
|
+
| `Mohsen Banan <http://mohsen.1.banan.byname.net>`__ at:
|
|
240
|
+
http://mohsen.1.banan.byname.net/contact
|
|
241
|
+
|
|
242
|
+
Planned Improvements
|
|
243
|
+
====================
|
|
244
|
+
|
|
245
|
+
- Implement the ``tinydns`` backend (``DnsSpecMethod.tinydns`` is
|
|
246
|
+
currently a placeholder).
|
|
247
|
+
- Handle ``dnsCap_update`` on a fresh ``/etc/hosts`` with no
|
|
248
|
+
pre-existing dblock markers.
|