rbx 3.28.1.dev211__tar.gz → 3.28.1.dev212__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 (48) hide show
  1. {rbx-3.28.1.dev211/rbx.egg-info → rbx-3.28.1.dev212}/PKG-INFO +1 -3
  2. {rbx-3.28.1.dev211 → rbx-3.28.1.dev212}/pyproject.toml +2 -4
  3. rbx-3.28.1.dev212/rbx/__init__.py +1 -0
  4. rbx-3.28.1.dev212/rbx/buildtools/tasks/ec2.py +52 -0
  5. {rbx-3.28.1.dev211 → rbx-3.28.1.dev212}/rbx/buildtools/tasks/image.py +1 -2
  6. rbx-3.28.1.dev212/rbx/web/__init__.py +0 -0
  7. {rbx-3.28.1.dev211 → rbx-3.28.1.dev212/rbx.egg-info}/PKG-INFO +1 -3
  8. {rbx-3.28.1.dev211 → rbx-3.28.1.dev212}/rbx.egg-info/requires.txt +0 -2
  9. rbx-3.28.1.dev211/rbx/__init__.py +0 -1
  10. rbx-3.28.1.dev211/rbx/buildtools/__init__.py +0 -3
  11. rbx-3.28.1.dev211/rbx/buildtools/tasks/ec2.py +0 -72
  12. {rbx-3.28.1.dev211 → rbx-3.28.1.dev212}/LICENSE +0 -0
  13. {rbx-3.28.1.dev211 → rbx-3.28.1.dev212}/README.md +0 -0
  14. {rbx-3.28.1.dev211 → rbx-3.28.1.dev212}/rbx/auth/__init__.py +0 -0
  15. {rbx-3.28.1.dev211 → rbx-3.28.1.dev212}/rbx/auth/decorators.py +0 -0
  16. {rbx-3.28.1.dev211 → rbx-3.28.1.dev212}/rbx/auth/id_token.py +0 -0
  17. {rbx-3.28.1.dev211 → rbx-3.28.1.dev212}/rbx/auth/keystore.py +0 -0
  18. {rbx-3.28.1.dev211 → rbx-3.28.1.dev212}/rbx/auth/mock.py +0 -0
  19. {rbx-3.28.1.dev211 → rbx-3.28.1.dev212}/rbx/aws/__init__.py +0 -0
  20. {rbx-3.28.1.dev211 → rbx-3.28.1.dev212}/rbx/aws/s3.py +0 -0
  21. {rbx-3.28.1.dev211/rbx/buildtools/tasks → rbx-3.28.1.dev212/rbx/buildtools}/__init__.py +0 -0
  22. {rbx-3.28.1.dev211 → rbx-3.28.1.dev212}/rbx/buildtools/cli.py +0 -0
  23. {rbx-3.28.1.dev211/rbx/gcp → rbx-3.28.1.dev212/rbx/buildtools/tasks}/__init__.py +0 -0
  24. {rbx-3.28.1.dev211 → rbx-3.28.1.dev212}/rbx/buildtools/tasks/misc.py +0 -0
  25. {rbx-3.28.1.dev211 → rbx-3.28.1.dev212}/rbx/clients/__init__.py +0 -0
  26. {rbx-3.28.1.dev211 → rbx-3.28.1.dev212}/rbx/clients/adsquare.py +0 -0
  27. {rbx-3.28.1.dev211 → rbx-3.28.1.dev212}/rbx/clients/broadsign.py +0 -0
  28. {rbx-3.28.1.dev211 → rbx-3.28.1.dev212}/rbx/clients/oxr.py +0 -0
  29. {rbx-3.28.1.dev211 → rbx-3.28.1.dev212}/rbx/clients/panels.py +0 -0
  30. {rbx-3.28.1.dev211 → rbx-3.28.1.dev212}/rbx/clients/place_exchange.py +0 -0
  31. {rbx-3.28.1.dev211 → rbx-3.28.1.dev212}/rbx/clients/reporting.py +0 -0
  32. {rbx-3.28.1.dev211 → rbx-3.28.1.dev212}/rbx/clients/retry.py +0 -0
  33. {rbx-3.28.1.dev211 → rbx-3.28.1.dev212}/rbx/exceptions.py +0 -0
  34. {rbx-3.28.1.dev211/rbx/web → rbx-3.28.1.dev212/rbx/gcp}/__init__.py +0 -0
  35. {rbx-3.28.1.dev211 → rbx-3.28.1.dev212}/rbx/gcp/cloud_tasks.py +0 -0
  36. {rbx-3.28.1.dev211 → rbx-3.28.1.dev212}/rbx/gcp/pubsub.py +0 -0
  37. {rbx-3.28.1.dev211 → rbx-3.28.1.dev212}/rbx/gcp/storage.py +0 -0
  38. {rbx-3.28.1.dev211 → rbx-3.28.1.dev212}/rbx/logging.py +0 -0
  39. {rbx-3.28.1.dev211 → rbx-3.28.1.dev212}/rbx/settings.py +0 -0
  40. {rbx-3.28.1.dev211 → rbx-3.28.1.dev212}/rbx/utils/__init__.py +0 -0
  41. {rbx-3.28.1.dev211 → rbx-3.28.1.dev212}/rbx/utils/mdm.py +0 -0
  42. {rbx-3.28.1.dev211 → rbx-3.28.1.dev212}/rbx/utils/vast.py +0 -0
  43. {rbx-3.28.1.dev211 → rbx-3.28.1.dev212}/rbx/web/handlers.py +0 -0
  44. {rbx-3.28.1.dev211 → rbx-3.28.1.dev212}/rbx.egg-info/SOURCES.txt +0 -0
  45. {rbx-3.28.1.dev211 → rbx-3.28.1.dev212}/rbx.egg-info/dependency_links.txt +0 -0
  46. {rbx-3.28.1.dev211 → rbx-3.28.1.dev212}/rbx.egg-info/entry_points.txt +0 -0
  47. {rbx-3.28.1.dev211 → rbx-3.28.1.dev212}/rbx.egg-info/top_level.txt +0 -0
  48. {rbx-3.28.1.dev211 → rbx-3.28.1.dev212}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rbx
3
- Version: 3.28.1.dev211
3
+ Version: 3.28.1.dev212
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.1.dev211"
7
+ version = "3.28.1.dev212"
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.1.dev211"
79
+ current_version = "3.28.1.dev212"
82
80
  commit = true
83
81
  parse = """
84
82
  (?P<major>\\d+)\\.
@@ -0,0 +1 @@
1
+ __version__ = "3.28.1.dev212"
@@ -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
+ )
@@ -3,9 +3,8 @@ from os import getcwd, path
3
3
 
4
4
  import click
5
5
 
6
- from .. import REGISTRY
7
-
8
6
  BASEPATH = path.basename(getcwd())
7
+ REGISTRY = "474071279654.dkr.ecr.eu-west-1.amazonaws.com"
9
8
 
10
9
 
11
10
  @click.command()
File without changes
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rbx
3
- Version: 3.28.1.dev211
3
+ Version: 3.28.1.dev212
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,3 +0,0 @@
1
- REGISTRY = "474071279654.dkr.ecr.eu-west-1.amazonaws.com"
2
- REGION = "eu-west-1"
3
- CONFIGURATIONS = "s3://474071279654-eu-west-1-configurations"
@@ -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