ominfra 0.0.0.dev368__py3-none-any.whl → 0.0.0.dev501__py3-none-any.whl
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.
Potentially problematic release.
This version of ominfra might be problematic. Click here for more details.
- ominfra/{.manifests.json → .omlish-manifests.json} +6 -6
- ominfra/README.md +26 -0
- ominfra/__about__.py +6 -3
- ominfra/clouds/aws/auth.py +1 -0
- ominfra/clouds/aws/instancetypes/cache.json.gz +0 -0
- ominfra/clouds/aws/instancetypes/cli.py +1 -1
- ominfra/clouds/aws/journald2aws/cursor.py +5 -1
- ominfra/clouds/aws/journald2aws/driver.py +4 -1
- ominfra/clouds/aws/journald2aws/main.py +1 -1
- ominfra/clouds/aws/journald2aws/poster.py +5 -1
- ominfra/clouds/aws/models/{base.py → base/__init__.py} +7 -2
- ominfra/clouds/aws/models/base/_dataclasses.py +721 -0
- ominfra/clouds/aws/models/gen/cli.py +2 -1
- ominfra/clouds/aws/models/gen/gen.py +16 -7
- ominfra/clouds/aws/models/services/{ec2.py → ec2/__init__.py} +227 -1
- ominfra/clouds/aws/models/services/ec2/_dataclasses.py +30654 -0
- ominfra/clouds/aws/models/services/{lambda_.py → lambda_/__init__.py} +139 -1
- ominfra/clouds/aws/models/services/lambda_/_dataclasses.py +4182 -0
- ominfra/clouds/aws/models/services/{rds.py → rds/__init__.py} +254 -78
- ominfra/clouds/aws/models/services/rds/_dataclasses.py +8231 -0
- ominfra/clouds/aws/models/services/{s3.py → s3/__init__.py} +9 -1
- ominfra/clouds/aws/models/services/s3/_dataclasses.py +5014 -0
- ominfra/commands/runners.py +2 -0
- ominfra/commands/ssh.py +3 -0
- ominfra/journald/messages.py +4 -1
- ominfra/journald/tailer.py +13 -10
- ominfra/manage/bootstrap_.py +1 -1
- ominfra/manage/commands/base.py +7 -6
- ominfra/manage/deploy/commands.py +4 -1
- ominfra/manage/deploy/conf/specs.py +2 -2
- ominfra/manage/deploy/paths/owners.py +3 -2
- ominfra/manage/deploy/paths/paths.py +4 -3
- ominfra/manage/deploy/tags.py +8 -8
- ominfra/manage/inject.py +2 -1
- ominfra/manage/main.py +5 -3
- ominfra/manage/remote/_main.py +5 -1
- ominfra/manage/remote/channel.py +2 -1
- ominfra/manage/remote/execution.py +10 -6
- ominfra/manage/remote/spawning.py +2 -1
- ominfra/manage/system/commands.py +4 -1
- ominfra/manage/system/packages.py +2 -1
- ominfra/manage/system/platforms.py +7 -4
- ominfra/manage/targets/bestpython.sh +1 -1
- ominfra/manage/targets/connection.py +2 -1
- ominfra/manage/targets/targets.py +5 -5
- ominfra/scripts/journald2aws.py +5386 -2425
- ominfra/scripts/manage.py +10604 -7389
- ominfra/scripts/supervisor.py +7168 -4002
- ominfra/supervisor/configs.py +6 -6
- ominfra/supervisor/dispatchers.py +3 -0
- ominfra/supervisor/dispatchersimpl.py +9 -3
- ominfra/supervisor/events.py +13 -6
- ominfra/supervisor/groups.py +3 -0
- ominfra/supervisor/groupsimpl.py +3 -0
- ominfra/supervisor/http.py +1 -1
- ominfra/supervisor/inject.py +3 -0
- ominfra/supervisor/io.py +4 -1
- ominfra/supervisor/main.py +4 -4
- ominfra/supervisor/pipes.py +3 -0
- ominfra/supervisor/privileges.py +3 -0
- ominfra/supervisor/processimpl.py +4 -1
- ominfra/supervisor/setup.py +4 -2
- ominfra/supervisor/setupimpl.py +4 -1
- ominfra/supervisor/signals.py +7 -1
- ominfra/supervisor/spawning.py +3 -0
- ominfra/supervisor/supervisor.py +4 -1
- ominfra/supervisor/types.py +9 -8
- ominfra/supervisor/utils/collections.py +7 -2
- ominfra/supervisor/utils/diag.py +3 -0
- ominfra/supervisor/utils/fds.py +3 -0
- ominfra/supervisor/utils/fs.py +3 -0
- ominfra/supervisor/utils/os.py +3 -2
- ominfra/supervisor/utils/strings.py +1 -0
- ominfra/threadworkers.py +6 -2
- ominfra/tools/listresources.py +1 -1
- ominfra-0.0.0.dev501.dist-info/METADATA +54 -0
- {ominfra-0.0.0.dev368.dist-info → ominfra-0.0.0.dev501.dist-info}/RECORD +81 -75
- ominfra-0.0.0.dev368.dist-info/METADATA +0 -23
- {ominfra-0.0.0.dev368.dist-info → ominfra-0.0.0.dev501.dist-info}/WHEEL +0 -0
- {ominfra-0.0.0.dev368.dist-info → ominfra-0.0.0.dev501.dist-info}/entry_points.txt +0 -0
- {ominfra-0.0.0.dev368.dist-info → ominfra-0.0.0.dev501.dist-info}/licenses/LICENSE +0 -0
- {ominfra-0.0.0.dev368.dist-info → ominfra-0.0.0.dev501.dist-info}/top_level.txt +0 -0
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
"file": "ominfra/clouds/aws/__main__.py",
|
|
6
6
|
"line": 4,
|
|
7
7
|
"value": {
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
8
|
+
"!omdev.cli.types.CliModule": {
|
|
9
|
+
"name": "aws",
|
|
10
|
+
"module": "ominfra.clouds.aws.__main__"
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
},
|
|
@@ -17,12 +17,12 @@
|
|
|
17
17
|
"file": "ominfra/tailscale/cli.py",
|
|
18
18
|
"line": 118,
|
|
19
19
|
"value": {
|
|
20
|
-
"
|
|
21
|
-
"
|
|
20
|
+
"!omdev.cli.types.CliModule": {
|
|
21
|
+
"name": [
|
|
22
22
|
"tailscale",
|
|
23
23
|
"ts"
|
|
24
24
|
],
|
|
25
|
-
"
|
|
25
|
+
"module": "ominfra.tailscale.cli"
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
}
|
ominfra/README.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Overview
|
|
2
|
+
|
|
3
|
+
Infrastructure and cloud code.
|
|
4
|
+
|
|
5
|
+
# Notable packages
|
|
6
|
+
|
|
7
|
+
- **[clouds.aws](https://github.com/wrmsr/omlish/blob/master/ominfra/clouds/aws)** - boto-less aws tools, including
|
|
8
|
+
authentication and generated service dataclasses.
|
|
9
|
+
|
|
10
|
+
- **[journald2aws](https://github.com/wrmsr/omlish/blob/master/ominfra/clouds/aws/journald2aws)**
|
|
11
|
+
([amalg](https://github.com/wrmsr/omlish/blob/master/ominfra/scripts/journald2aws.py)) - a self-contained little tool
|
|
12
|
+
that forwards journald to cloudwatch.
|
|
13
|
+
|
|
14
|
+
- **[pyremote](https://github.com/wrmsr/omlish/blob/master/ominfra/pyremote.py)** - does the
|
|
15
|
+
[mitogen trick](https://mitogen.networkgenomics.com/howitworks.html) to facilitate remote execution of python code.
|
|
16
|
+
due to amalgamation, import shenanigans aren't required to do useful work.
|
|
17
|
+
|
|
18
|
+
- **[manage](https://github.com/wrmsr/omlish/blob/master/ominfra/manage)**
|
|
19
|
+
([amalg](https://github.com/wrmsr/omlish/blob/master/ominfra/scripts/manage.py)) - a remote system management tool,
|
|
20
|
+
including a code deployment system. inspired by things like [mitogen](https://mitogen.networkgenomics.com/),
|
|
21
|
+
[pyinfra](https://github.com/pyinfra-dev/pyinfra), [piku](https://github.com/piku/piku). uses pyremote.
|
|
22
|
+
|
|
23
|
+
- **[supervisor](https://github.com/wrmsr/omlish/blob/master/ominfra/supervisor)**
|
|
24
|
+
([amalg](https://github.com/wrmsr/omlish/blob/master/ominfra/scripts/supervisor.py)) - an overhauled,
|
|
25
|
+
[amalgamated](https://github.com/wrmsr/omlish/blob/master/omdev#amalgamation) fork of
|
|
26
|
+
[supervisor](https://github.com/Supervisor/supervisor)
|
ominfra/__about__.py
CHANGED
|
@@ -8,15 +8,18 @@ class Project(ProjectBase):
|
|
|
8
8
|
description = 'ominfra'
|
|
9
9
|
|
|
10
10
|
dependencies = [
|
|
11
|
-
f'omdev == {__version__}',
|
|
12
11
|
f'omlish == {__version__}',
|
|
13
12
|
]
|
|
14
13
|
|
|
15
14
|
optional_dependencies = {
|
|
15
|
+
'omdev': [
|
|
16
|
+
f'omdev == {__version__}',
|
|
17
|
+
],
|
|
18
|
+
|
|
16
19
|
'ssh': [
|
|
17
|
-
'paramiko ~=
|
|
20
|
+
'paramiko ~= 4.0', # !! LGPL
|
|
18
21
|
|
|
19
|
-
'asyncssh ~= 2.
|
|
22
|
+
'asyncssh ~= 2.22', # cffi
|
|
20
23
|
],
|
|
21
24
|
}
|
|
22
25
|
|
ominfra/clouds/aws/auth.py
CHANGED
|
Binary file
|
|
@@ -31,7 +31,7 @@ def _get_secrets() -> sec.Secrets:
|
|
|
31
31
|
return load_secrets()
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
def get_ec2_instance_types(session: boto3.Session) -> dict[str, dict[str, ta.Any]]:
|
|
34
|
+
def get_ec2_instance_types(session: 'boto3.Session') -> dict[str, dict[str, ta.Any]]:
|
|
35
35
|
ec2 = session.client('ec2')
|
|
36
36
|
next_token = None
|
|
37
37
|
dct = {}
|
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
import os.path
|
|
3
3
|
import typing as ta
|
|
4
4
|
|
|
5
|
-
from omlish.
|
|
5
|
+
from omlish.logs.modules import get_module_logger
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
log = get_module_logger(globals()) # noqa
|
|
6
9
|
|
|
7
10
|
|
|
8
11
|
##
|
|
@@ -16,6 +19,7 @@ class JournalctlToAwsCursor:
|
|
|
16
19
|
ensure_locked: ta.Optional[ta.Callable[[], None]] = None,
|
|
17
20
|
) -> None:
|
|
18
21
|
super().__init__()
|
|
22
|
+
|
|
19
23
|
self._cursor_file = cursor_file
|
|
20
24
|
self._ensure_locked = ensure_locked
|
|
21
25
|
|
|
@@ -40,8 +40,8 @@ import typing as ta
|
|
|
40
40
|
from omlish.lite.cached import cached_nullary
|
|
41
41
|
from omlish.lite.check import check
|
|
42
42
|
from omlish.lite.contextmanagers import ExitStacked
|
|
43
|
-
from omlish.lite.logs import log
|
|
44
43
|
from omlish.lite.runtime import is_debugger_attached
|
|
44
|
+
from omlish.logs.modules import get_module_logger
|
|
45
45
|
from omlish.os.pidfiles.pidfile import Pidfile
|
|
46
46
|
|
|
47
47
|
from ....journald.messages import JournalctlMessage # noqa
|
|
@@ -53,6 +53,9 @@ from .cursor import JournalctlToAwsCursor
|
|
|
53
53
|
from .poster import JournalctlToAwsPosterWorker
|
|
54
54
|
|
|
55
55
|
|
|
56
|
+
log = get_module_logger(globals()) # noqa
|
|
57
|
+
|
|
58
|
+
|
|
56
59
|
##
|
|
57
60
|
|
|
58
61
|
|
|
@@ -9,7 +9,7 @@ import time
|
|
|
9
9
|
import typing as ta
|
|
10
10
|
import urllib.request
|
|
11
11
|
|
|
12
|
-
from omlish.
|
|
12
|
+
from omlish.logs.modules import get_module_logger
|
|
13
13
|
|
|
14
14
|
from ....journald.messages import JournalctlMessage # noqa
|
|
15
15
|
from ....threadworkers import ThreadWorker
|
|
@@ -18,6 +18,9 @@ from ..logs import AwsPutLogEventsResponse
|
|
|
18
18
|
from .cursor import JournalctlToAwsCursor
|
|
19
19
|
|
|
20
20
|
|
|
21
|
+
log = get_module_logger(globals()) # noqa
|
|
22
|
+
|
|
23
|
+
|
|
21
24
|
##
|
|
22
25
|
|
|
23
26
|
|
|
@@ -34,6 +37,7 @@ class JournalctlToAwsPosterWorker(ThreadWorker):
|
|
|
34
37
|
**kwargs: ta.Any,
|
|
35
38
|
) -> None:
|
|
36
39
|
super().__init__(**kwargs)
|
|
40
|
+
|
|
37
41
|
self._queue = queue
|
|
38
42
|
self._builder = builder
|
|
39
43
|
self._cursor = cursor
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import abc
|
|
2
1
|
import typing as ta
|
|
3
2
|
|
|
4
3
|
from omlish import cached
|
|
@@ -8,6 +7,12 @@ from omlish import dataclasses as dc
|
|
|
8
7
|
from omlish import lang
|
|
9
8
|
|
|
10
9
|
|
|
10
|
+
dc.init_package(
|
|
11
|
+
globals(),
|
|
12
|
+
codegen=True,
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
|
|
11
16
|
DateTime = ta.NewType('DateTime', str)
|
|
12
17
|
MillisecondDateTime = ta.NewType('MillisecondDateTime', str)
|
|
13
18
|
|
|
@@ -29,7 +34,7 @@ TagList: ta.TypeAlias = ta.Sequence[Tag]
|
|
|
29
34
|
##
|
|
30
35
|
|
|
31
36
|
|
|
32
|
-
class ValueType(
|
|
37
|
+
class ValueType(lang.Abstract):
|
|
33
38
|
pass
|
|
34
39
|
|
|
35
40
|
|