rbx 3.18.5__tar.gz → 3.18.6.dev166__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.
Files changed (45) hide show
  1. {rbx-3.18.5 → rbx-3.18.6.dev166}/PKG-INFO +1 -1
  2. {rbx-3.18.5 → rbx-3.18.6.dev166}/pyproject.toml +2 -2
  3. rbx-3.18.6.dev166/rbx/__init__.py +1 -0
  4. {rbx-3.18.5 → rbx-3.18.6.dev166}/rbx/buildtools/cli.py +1 -10
  5. {rbx-3.18.5 → rbx-3.18.6.dev166}/rbx.egg-info/PKG-INFO +1 -1
  6. {rbx-3.18.5 → rbx-3.18.6.dev166}/rbx.egg-info/SOURCES.txt +0 -1
  7. rbx-3.18.5/rbx/__init__.py +0 -1
  8. rbx-3.18.5/rbx/buildtools/tasks/apprunner.py +0 -136
  9. {rbx-3.18.5 → rbx-3.18.6.dev166}/LICENSE +0 -0
  10. {rbx-3.18.5 → rbx-3.18.6.dev166}/README.md +0 -0
  11. {rbx-3.18.5 → rbx-3.18.6.dev166}/rbx/auth/__init__.py +0 -0
  12. {rbx-3.18.5 → rbx-3.18.6.dev166}/rbx/auth/decorators.py +0 -0
  13. {rbx-3.18.5 → rbx-3.18.6.dev166}/rbx/auth/keystore.py +0 -0
  14. {rbx-3.18.5 → rbx-3.18.6.dev166}/rbx/auth/mock.py +0 -0
  15. {rbx-3.18.5 → rbx-3.18.6.dev166}/rbx/aws/__init__.py +0 -0
  16. {rbx-3.18.5 → rbx-3.18.6.dev166}/rbx/aws/s3.py +0 -0
  17. {rbx-3.18.5 → rbx-3.18.6.dev166}/rbx/buildtools/__init__.py +0 -0
  18. {rbx-3.18.5 → rbx-3.18.6.dev166}/rbx/buildtools/tasks/__init__.py +0 -0
  19. {rbx-3.18.5 → rbx-3.18.6.dev166}/rbx/buildtools/tasks/ec2.py +0 -0
  20. {rbx-3.18.5 → rbx-3.18.6.dev166}/rbx/buildtools/tasks/image.py +0 -0
  21. {rbx-3.18.5 → rbx-3.18.6.dev166}/rbx/buildtools/tasks/misc.py +0 -0
  22. {rbx-3.18.5 → rbx-3.18.6.dev166}/rbx/clients/__init__.py +0 -0
  23. {rbx-3.18.5 → rbx-3.18.6.dev166}/rbx/clients/adsquare.py +0 -0
  24. {rbx-3.18.5 → rbx-3.18.6.dev166}/rbx/clients/broadsign.py +0 -0
  25. {rbx-3.18.5 → rbx-3.18.6.dev166}/rbx/clients/oxr.py +0 -0
  26. {rbx-3.18.5 → rbx-3.18.6.dev166}/rbx/clients/panels.py +0 -0
  27. {rbx-3.18.5 → rbx-3.18.6.dev166}/rbx/clients/reporting.py +0 -0
  28. {rbx-3.18.5 → rbx-3.18.6.dev166}/rbx/clients/retry.py +0 -0
  29. {rbx-3.18.5 → rbx-3.18.6.dev166}/rbx/exceptions.py +0 -0
  30. {rbx-3.18.5 → rbx-3.18.6.dev166}/rbx/gcp/__init__.py +0 -0
  31. {rbx-3.18.5 → rbx-3.18.6.dev166}/rbx/gcp/cloud_tasks.py +0 -0
  32. {rbx-3.18.5 → rbx-3.18.6.dev166}/rbx/gcp/pubsub.py +0 -0
  33. {rbx-3.18.5 → rbx-3.18.6.dev166}/rbx/gcp/storage.py +0 -0
  34. {rbx-3.18.5 → rbx-3.18.6.dev166}/rbx/logging.py +0 -0
  35. {rbx-3.18.5 → rbx-3.18.6.dev166}/rbx/settings.py +0 -0
  36. {rbx-3.18.5 → rbx-3.18.6.dev166}/rbx/utils/__init__.py +0 -0
  37. {rbx-3.18.5 → rbx-3.18.6.dev166}/rbx/utils/mdm.py +0 -0
  38. {rbx-3.18.5 → rbx-3.18.6.dev166}/rbx/utils/vast.py +0 -0
  39. {rbx-3.18.5 → rbx-3.18.6.dev166}/rbx/web/__init__.py +0 -0
  40. {rbx-3.18.5 → rbx-3.18.6.dev166}/rbx/web/handlers.py +0 -0
  41. {rbx-3.18.5 → rbx-3.18.6.dev166}/rbx.egg-info/dependency_links.txt +0 -0
  42. {rbx-3.18.5 → rbx-3.18.6.dev166}/rbx.egg-info/entry_points.txt +0 -0
  43. {rbx-3.18.5 → rbx-3.18.6.dev166}/rbx.egg-info/requires.txt +0 -0
  44. {rbx-3.18.5 → rbx-3.18.6.dev166}/rbx.egg-info/top_level.txt +0 -0
  45. {rbx-3.18.5 → rbx-3.18.6.dev166}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rbx
3
- Version: 3.18.5
3
+ Version: 3.18.6.dev166
4
4
  Summary: A collection of common tools for Scoota services.
5
5
  Author-email: The Scoota Engineering Team <engineering@scoota.com>
6
6
  License:
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "rbx"
7
- version = "3.18.5"
7
+ version = "3.18.6.dev166"
8
8
  description = "A collection of common tools for Scoota services."
9
9
  authors = [
10
10
  { name = "The Scoota Engineering Team", email = "engineering@scoota.com" }
@@ -80,7 +80,7 @@ homepage = "https://github.com/rockabox/rbx"
80
80
  repository = "https://github.com/rockabox/rbx.git"
81
81
 
82
82
  [tool.bumpversion]
83
- current_version = "3.18.5"
83
+ current_version = "3.18.6.dev166"
84
84
  commit = true
85
85
  parse = """
86
86
  (?P<major>\\d+)\\.
@@ -0,0 +1 @@
1
+ __version__ = "3.18.6.dev166"
@@ -1,6 +1,6 @@
1
1
  import click
2
2
 
3
- from .tasks import apprunner, ec2, image, misc
3
+ from .tasks import ec2, image, misc
4
4
 
5
5
 
6
6
  from rbx import __version__
@@ -20,15 +20,6 @@ def cli():
20
20
  cli.add_command(ec2.deploy)
21
21
 
22
22
 
23
- @cli.group(name="apprunner")
24
- def apprunner_group():
25
- """Manage AppRunner services."""
26
-
27
-
28
- apprunner_group.add_command(apprunner.submit)
29
- apprunner_group.add_command(apprunner.deploy)
30
-
31
-
32
23
  @cli.group(name="image")
33
24
  def image_group():
34
25
  """Manage images on Amazon Container Registry."""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rbx
3
- Version: 3.18.5
3
+ Version: 3.18.6.dev166
4
4
  Summary: A collection of common tools for Scoota services.
5
5
  Author-email: The Scoota Engineering Team <engineering@scoota.com>
6
6
  License:
@@ -20,7 +20,6 @@ rbx/aws/s3.py
20
20
  rbx/buildtools/__init__.py
21
21
  rbx/buildtools/cli.py
22
22
  rbx/buildtools/tasks/__init__.py
23
- rbx/buildtools/tasks/apprunner.py
24
23
  rbx/buildtools/tasks/ec2.py
25
24
  rbx/buildtools/tasks/image.py
26
25
  rbx/buildtools/tasks/misc.py
@@ -1 +0,0 @@
1
- __version__ = "3.18.5"
@@ -1,136 +0,0 @@
1
- import subprocess
2
- from pathlib import Path
3
- from textwrap import dedent
4
-
5
- import click
6
- from jinja2 import Environment
7
-
8
- from .. import REGION, REGISTRY
9
-
10
-
11
- @click.command()
12
- @click.argument("app")
13
- @click.option("-s", "--source", default=".")
14
- @click.option("-v", "--version", default="latest")
15
- def submit(app, source, version):
16
- """Submit a local Docker build and push the image to AWS ECR."""
17
- tag = f"{REGISTRY}/{app}:{version}"
18
-
19
- # Login to the Amazon Container Registry
20
- subprocess.run(
21
- "aws ecr get-login-password | docker login"
22
- f" --username AWS --password-stdin {REGISTRY}",
23
- shell=True,
24
- )
25
-
26
- # Build image
27
- subprocess.run(f"docker build -t {tag} {source}", shell=True)
28
-
29
- # Push image
30
- subprocess.run(f"docker push {tag}", shell=True)
31
-
32
-
33
- @click.command()
34
- @click.argument("app")
35
- @click.option("--env", multiple=True)
36
- @click.option("--secret", multiple=True)
37
- @click.option("--name")
38
- @click.option("--port", type=int, default=8000)
39
- @click.option("-s", "--source", default=".")
40
- @click.option("-v", "--version", default="latest")
41
- def deploy(ctx, app, env, secret, name, port, source, version):
42
- """Deploy an image to App Runner."""
43
- config_file = Path("apprunner.yaml")
44
- source_file = Path(source) / "apprunner.yaml"
45
-
46
- if not source_file.exists():
47
- raise click.Abort("Cannot find source apprunner.yaml file")
48
-
49
- if source_file != config_file and config_file.exists():
50
- raise click.Abort(
51
- "Conflicting apprunner.yaml files (found file both at root and source)"
52
- )
53
-
54
- delete_on_exit = source_file != config_file
55
-
56
- with source_file.open() as fp:
57
- config = fp.read()
58
-
59
- with config_file.open("w") as fp:
60
- fp.write(config)
61
-
62
- if delete_on_exit:
63
- config_file.unlink()
64
-
65
- environments = dict([tuple(kv.split("=")) for kv in env])
66
- secrets = dict([tuple(kv.split("=")) for kv in secret])
67
-
68
- template = Environment(lstrip_blocks=True).from_string(
69
- dedent(
70
- """\
71
- {
72
- "ImageRepository": {
73
- "ImageIdentifier": "{{tag}}",
74
- "ImageRepositoryType": "ECR",
75
- "ImageConfiguration": {
76
- "Port": "{{port}}",
77
- "RuntimeEnvironmentVariables": {
78
- {%- for key, value in environments.items() %}
79
- "{{key}}": "{{value}}"{% if loop.last %}{% else %},{% endif %}
80
- {%- endfor %}
81
- },
82
- "RuntimeEnvironmentSecrets": {
83
- {%- for key, value in secrets.items() %}
84
- "{{key}}": "{{value}}"{% if loop.last %}{% else %},{% endif %}
85
- {%- endfor %}
86
- }
87
- }
88
- },
89
- "AutoDeploymentsEnabled": false,
90
- "AuthenticationConfiguration": {
91
- "AccessRoleArn": "arn:aws:iam::474071279654:role/Service"
92
- }
93
- }
94
- """
95
- )
96
- )
97
-
98
- configuration = template.render(
99
- environments=environments,
100
- port=port,
101
- secrets=secrets,
102
- tag=f"{REGISTRY}/{app}:{version}",
103
- )
104
-
105
- name = name or app
106
-
107
- # Does the service already exist?
108
- query = f"ServiceSummaryList[?ServiceName == '{name}'].ServiceArn | [0]"
109
- command = subprocess.run(
110
- f'aws apprunner list-services --query "{query}"',
111
- shell=True,
112
- capture_output=True,
113
- )
114
- arn = command.stdout.strip().strip('"')
115
-
116
- if arn == "null":
117
- # Create service
118
- subprocess.run(
119
- "aws apprunner create-service"
120
- f" --region {REGION}"
121
- f" --service-name {name}"
122
- f" --source-configuration '{configuration}'"
123
- " --instance-configuration 'InstanceRoleArn=arn:aws:iam::474071279654:role/Service'"
124
- " --no-cli-pager",
125
- shell=True,
126
- )
127
- else:
128
- # Update service
129
- subprocess.run(
130
- "aws apprunner update-service"
131
- f" --region {REGION}"
132
- f" --service-arn {arn}"
133
- f" --source-configuration '{configuration}'"
134
- " --no-cli-pager",
135
- shell=True,
136
- )
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes