rbx 3.28.1.dev211__tar.gz → 3.28.2__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.
- {rbx-3.28.1.dev211/rbx.egg-info → rbx-3.28.2}/PKG-INFO +1 -3
- {rbx-3.28.1.dev211 → rbx-3.28.2}/pyproject.toml +2 -4
- rbx-3.28.2/rbx/__init__.py +1 -0
- rbx-3.28.2/rbx/buildtools/tasks/ec2.py +52 -0
- {rbx-3.28.1.dev211 → rbx-3.28.2}/rbx/buildtools/tasks/image.py +1 -2
- rbx-3.28.2/rbx/web/__init__.py +0 -0
- {rbx-3.28.1.dev211 → rbx-3.28.2/rbx.egg-info}/PKG-INFO +1 -3
- {rbx-3.28.1.dev211 → rbx-3.28.2}/rbx.egg-info/requires.txt +0 -2
- rbx-3.28.1.dev211/rbx/__init__.py +0 -1
- rbx-3.28.1.dev211/rbx/buildtools/__init__.py +0 -3
- rbx-3.28.1.dev211/rbx/buildtools/tasks/ec2.py +0 -72
- {rbx-3.28.1.dev211 → rbx-3.28.2}/LICENSE +0 -0
- {rbx-3.28.1.dev211 → rbx-3.28.2}/README.md +0 -0
- {rbx-3.28.1.dev211 → rbx-3.28.2}/rbx/auth/__init__.py +0 -0
- {rbx-3.28.1.dev211 → rbx-3.28.2}/rbx/auth/decorators.py +0 -0
- {rbx-3.28.1.dev211 → rbx-3.28.2}/rbx/auth/id_token.py +0 -0
- {rbx-3.28.1.dev211 → rbx-3.28.2}/rbx/auth/keystore.py +0 -0
- {rbx-3.28.1.dev211 → rbx-3.28.2}/rbx/auth/mock.py +0 -0
- {rbx-3.28.1.dev211 → rbx-3.28.2}/rbx/aws/__init__.py +0 -0
- {rbx-3.28.1.dev211 → rbx-3.28.2}/rbx/aws/s3.py +0 -0
- {rbx-3.28.1.dev211/rbx/buildtools/tasks → rbx-3.28.2/rbx/buildtools}/__init__.py +0 -0
- {rbx-3.28.1.dev211 → rbx-3.28.2}/rbx/buildtools/cli.py +0 -0
- {rbx-3.28.1.dev211/rbx/gcp → rbx-3.28.2/rbx/buildtools/tasks}/__init__.py +0 -0
- {rbx-3.28.1.dev211 → rbx-3.28.2}/rbx/buildtools/tasks/misc.py +0 -0
- {rbx-3.28.1.dev211 → rbx-3.28.2}/rbx/clients/__init__.py +0 -0
- {rbx-3.28.1.dev211 → rbx-3.28.2}/rbx/clients/adsquare.py +0 -0
- {rbx-3.28.1.dev211 → rbx-3.28.2}/rbx/clients/broadsign.py +0 -0
- {rbx-3.28.1.dev211 → rbx-3.28.2}/rbx/clients/oxr.py +0 -0
- {rbx-3.28.1.dev211 → rbx-3.28.2}/rbx/clients/panels.py +0 -0
- {rbx-3.28.1.dev211 → rbx-3.28.2}/rbx/clients/place_exchange.py +0 -0
- {rbx-3.28.1.dev211 → rbx-3.28.2}/rbx/clients/reporting.py +0 -0
- {rbx-3.28.1.dev211 → rbx-3.28.2}/rbx/clients/retry.py +0 -0
- {rbx-3.28.1.dev211 → rbx-3.28.2}/rbx/exceptions.py +0 -0
- {rbx-3.28.1.dev211/rbx/web → rbx-3.28.2/rbx/gcp}/__init__.py +0 -0
- {rbx-3.28.1.dev211 → rbx-3.28.2}/rbx/gcp/cloud_tasks.py +0 -0
- {rbx-3.28.1.dev211 → rbx-3.28.2}/rbx/gcp/pubsub.py +0 -0
- {rbx-3.28.1.dev211 → rbx-3.28.2}/rbx/gcp/storage.py +0 -0
- {rbx-3.28.1.dev211 → rbx-3.28.2}/rbx/logging.py +0 -0
- {rbx-3.28.1.dev211 → rbx-3.28.2}/rbx/settings.py +0 -0
- {rbx-3.28.1.dev211 → rbx-3.28.2}/rbx/utils/__init__.py +0 -0
- {rbx-3.28.1.dev211 → rbx-3.28.2}/rbx/utils/mdm.py +0 -0
- {rbx-3.28.1.dev211 → rbx-3.28.2}/rbx/utils/vast.py +0 -0
- {rbx-3.28.1.dev211 → rbx-3.28.2}/rbx/web/handlers.py +0 -0
- {rbx-3.28.1.dev211 → rbx-3.28.2}/rbx.egg-info/SOURCES.txt +0 -0
- {rbx-3.28.1.dev211 → rbx-3.28.2}/rbx.egg-info/dependency_links.txt +0 -0
- {rbx-3.28.1.dev211 → rbx-3.28.2}/rbx.egg-info/entry_points.txt +0 -0
- {rbx-3.28.1.dev211 → rbx-3.28.2}/rbx.egg-info/top_level.txt +0 -0
- {rbx-3.28.1.dev211 → rbx-3.28.2}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: rbx
|
|
3
|
-
Version: 3.28.
|
|
3
|
+
Version: 3.28.2
|
|
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-Expression: AGPL-3.0-or-later
|
|
@@ -25,7 +25,6 @@ Requires-Dist: lxml<6,>=5.3.0
|
|
|
25
25
|
Requires-Dist: requests>=2.31.0
|
|
26
26
|
Provides-Extra: all
|
|
27
27
|
Requires-Dist: boto3; extra == "all"
|
|
28
|
-
Requires-Dist: fabric~=3.2.0; extra == "all"
|
|
29
28
|
Requires-Dist: google-cloud-error-reporting<2,>=1.9.2; extra == "all"
|
|
30
29
|
Requires-Dist: google-cloud-firestore<3,>=2.3; extra == "all"
|
|
31
30
|
Requires-Dist: google-cloud-pubsub<3,>=2.9; extra == "all"
|
|
@@ -41,7 +40,6 @@ Requires-Dist: google-cloud-firestore<3,>=2.3; extra == "auth"
|
|
|
41
40
|
Provides-Extra: buildtools
|
|
42
41
|
Requires-Dist: bump-my-version; extra == "buildtools"
|
|
43
42
|
Requires-Dist: check-manifest; extra == "buildtools"
|
|
44
|
-
Requires-Dist: fabric~=3.2.0; extra == "buildtools"
|
|
45
43
|
Requires-Dist: Jinja2==3.1.2; extra == "buildtools"
|
|
46
44
|
Requires-Dist: twine; extra == "buildtools"
|
|
47
45
|
Provides-Extra: notifications
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "rbx"
|
|
7
|
-
version = "3.28.
|
|
7
|
+
version = "3.28.2"
|
|
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" }
|
|
@@ -35,7 +35,6 @@ dependencies = [
|
|
|
35
35
|
[project.optional-dependencies]
|
|
36
36
|
all = [
|
|
37
37
|
"boto3",
|
|
38
|
-
"fabric~=3.2.0",
|
|
39
38
|
"google-cloud-error-reporting>=1.9.2,<2",
|
|
40
39
|
"google-cloud-firestore>=2.3,<3",
|
|
41
40
|
"google-cloud-pubsub>=2.9,<3",
|
|
@@ -53,7 +52,6 @@ auth = [
|
|
|
53
52
|
buildtools = [
|
|
54
53
|
"bump-my-version",
|
|
55
54
|
"check-manifest",
|
|
56
|
-
"fabric~=3.2.0",
|
|
57
55
|
"Jinja2==3.1.2",
|
|
58
56
|
"twine",
|
|
59
57
|
]
|
|
@@ -78,7 +76,7 @@ homepage = "https://github.com/rockabox/rbx"
|
|
|
78
76
|
repository = "https://github.com/rockabox/rbx.git"
|
|
79
77
|
|
|
80
78
|
[tool.bumpversion]
|
|
81
|
-
current_version = "3.28.
|
|
79
|
+
current_version = "3.28.2"
|
|
82
80
|
commit = true
|
|
83
81
|
parse = """
|
|
84
82
|
(?P<major>\\d+)\\.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "3.28.2"
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import click
|
|
2
|
+
import subprocess
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
@click.command()
|
|
6
|
+
@click.argument("instance")
|
|
7
|
+
@click.argument("service")
|
|
8
|
+
@click.argument("environment")
|
|
9
|
+
@click.option("--sandboxed/--no-sandboxed", default=True)
|
|
10
|
+
@click.option("-v", "--version", default="latest")
|
|
11
|
+
def deploy(instance, service, environment, sandboxed, version):
|
|
12
|
+
"""Deploy to EC2.
|
|
13
|
+
|
|
14
|
+
Download a Docker image and start the container on a Remote EC2 instance.
|
|
15
|
+
"""
|
|
16
|
+
command = f"/home/ec2-user/deploy.sh {service} {environment} --version {version}"
|
|
17
|
+
if not sandboxed:
|
|
18
|
+
command += " --no-sandboxed"
|
|
19
|
+
|
|
20
|
+
result = subprocess.run(
|
|
21
|
+
[
|
|
22
|
+
"aws",
|
|
23
|
+
"ssm",
|
|
24
|
+
"send-command",
|
|
25
|
+
"--document-name",
|
|
26
|
+
"AWS-RunShellScript",
|
|
27
|
+
"--parameters",
|
|
28
|
+
f'commands=["{command}"]',
|
|
29
|
+
"--targets",
|
|
30
|
+
f"Key=instanceids,Values={instance}",
|
|
31
|
+
"--query",
|
|
32
|
+
"Command.CommandId",
|
|
33
|
+
"--output",
|
|
34
|
+
"text",
|
|
35
|
+
],
|
|
36
|
+
capture_output=True,
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
command_id = result.stdout.strip()
|
|
40
|
+
|
|
41
|
+
subprocess.run(
|
|
42
|
+
[
|
|
43
|
+
"aws",
|
|
44
|
+
"ssm",
|
|
45
|
+
"wait",
|
|
46
|
+
"command-executed",
|
|
47
|
+
"--command-id",
|
|
48
|
+
command_id,
|
|
49
|
+
"--instance-id",
|
|
50
|
+
instance,
|
|
51
|
+
]
|
|
52
|
+
)
|
|
File without changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: rbx
|
|
3
|
-
Version: 3.28.
|
|
3
|
+
Version: 3.28.2
|
|
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-Expression: AGPL-3.0-or-later
|
|
@@ -25,7 +25,6 @@ Requires-Dist: lxml<6,>=5.3.0
|
|
|
25
25
|
Requires-Dist: requests>=2.31.0
|
|
26
26
|
Provides-Extra: all
|
|
27
27
|
Requires-Dist: boto3; extra == "all"
|
|
28
|
-
Requires-Dist: fabric~=3.2.0; extra == "all"
|
|
29
28
|
Requires-Dist: google-cloud-error-reporting<2,>=1.9.2; extra == "all"
|
|
30
29
|
Requires-Dist: google-cloud-firestore<3,>=2.3; extra == "all"
|
|
31
30
|
Requires-Dist: google-cloud-pubsub<3,>=2.9; extra == "all"
|
|
@@ -41,7 +40,6 @@ Requires-Dist: google-cloud-firestore<3,>=2.3; extra == "auth"
|
|
|
41
40
|
Provides-Extra: buildtools
|
|
42
41
|
Requires-Dist: bump-my-version; extra == "buildtools"
|
|
43
42
|
Requires-Dist: check-manifest; extra == "buildtools"
|
|
44
|
-
Requires-Dist: fabric~=3.2.0; extra == "buildtools"
|
|
45
43
|
Requires-Dist: Jinja2==3.1.2; extra == "buildtools"
|
|
46
44
|
Requires-Dist: twine; extra == "buildtools"
|
|
47
45
|
Provides-Extra: notifications
|
|
@@ -7,7 +7,6 @@ requests>=2.31.0
|
|
|
7
7
|
|
|
8
8
|
[all]
|
|
9
9
|
boto3
|
|
10
|
-
fabric~=3.2.0
|
|
11
10
|
google-cloud-error-reporting<2,>=1.9.2
|
|
12
11
|
google-cloud-firestore<3,>=2.3
|
|
13
12
|
google-cloud-pubsub<3,>=2.9
|
|
@@ -25,7 +24,6 @@ google-cloud-firestore<3,>=2.3
|
|
|
25
24
|
[buildtools]
|
|
26
25
|
bump-my-version
|
|
27
26
|
check-manifest
|
|
28
|
-
fabric~=3.2.0
|
|
29
27
|
Jinja2==3.1.2
|
|
30
28
|
twine
|
|
31
29
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "3.28.1.dev211"
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import click
|
|
2
|
-
from fabric import Connection
|
|
3
|
-
|
|
4
|
-
from .. import CONFIGURATIONS, REGISTRY
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
@click.command()
|
|
8
|
-
@click.argument("host")
|
|
9
|
-
@click.argument("user")
|
|
10
|
-
@click.argument("key_filename")
|
|
11
|
-
@click.argument("service")
|
|
12
|
-
@click.argument("environment")
|
|
13
|
-
@click.option("--sandboxed/--no-sandboxed", default=True)
|
|
14
|
-
@click.option("-v", "--version", default="latest")
|
|
15
|
-
def deploy(host, user, key_filename, service, environment, sandboxed, version):
|
|
16
|
-
"""Deploy to EC2.
|
|
17
|
-
|
|
18
|
-
Download a Docker image and start the container on a Remote Server.
|
|
19
|
-
"""
|
|
20
|
-
connection = Connection(
|
|
21
|
-
host=host, user=user, connect_kwargs={"key_filename": key_filename}
|
|
22
|
-
)
|
|
23
|
-
|
|
24
|
-
# Login to Scoota Docker Registry
|
|
25
|
-
connection.run(
|
|
26
|
-
"aws ecr get-login-password | docker login"
|
|
27
|
-
f" --username AWS --password-stdin {REGISTRY}",
|
|
28
|
-
echo=True,
|
|
29
|
-
)
|
|
30
|
-
|
|
31
|
-
# Get the latest configuration for the Server we are deploying to.
|
|
32
|
-
# Valid configurations are located at '/<Service>/<Env>/'
|
|
33
|
-
connection.run(
|
|
34
|
-
f"aws s3 sync {CONFIGURATIONS}/{service}/{environment} {service}"
|
|
35
|
-
" --exact-timestamps --delete",
|
|
36
|
-
echo=True,
|
|
37
|
-
)
|
|
38
|
-
|
|
39
|
-
# Pull the new version before restarting the services.
|
|
40
|
-
connection.run(
|
|
41
|
-
f"docker-compose -p {service}{environment} -f {service}/docker-compose.yml pull",
|
|
42
|
-
echo=True,
|
|
43
|
-
env={
|
|
44
|
-
"SANDBOXED": sandboxed,
|
|
45
|
-
"VERSION": version,
|
|
46
|
-
},
|
|
47
|
-
)
|
|
48
|
-
|
|
49
|
-
# Restart the Docker container forcing recreate so that new version is used.
|
|
50
|
-
# Using `force-recreate` alone doesn't seem to be enough to use the latest version. So we
|
|
51
|
-
# do `down` and then `up`.
|
|
52
|
-
connection.run(
|
|
53
|
-
f"docker-compose -p {service}{environment} -f {service}/docker-compose.yml down"
|
|
54
|
-
" --volumes --remove-orphans",
|
|
55
|
-
echo=True,
|
|
56
|
-
env={
|
|
57
|
-
"SANDBOXED": sandboxed,
|
|
58
|
-
"VERSION": version,
|
|
59
|
-
},
|
|
60
|
-
warn=True,
|
|
61
|
-
)
|
|
62
|
-
connection.run(
|
|
63
|
-
f"docker-compose -p {service}{environment} -f {service}/docker-compose.yml up -d",
|
|
64
|
-
echo=True,
|
|
65
|
-
env={
|
|
66
|
-
"SANDBOXED": sandboxed,
|
|
67
|
-
"VERSION": version,
|
|
68
|
-
},
|
|
69
|
-
)
|
|
70
|
-
|
|
71
|
-
# Remove all unused Docker Images
|
|
72
|
-
connection.run("docker system prune --all --force", echo=True)
|
|
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
|
|
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
|