opsmith-cli 0.4.2b0__tar.gz → 0.4.4b0__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.
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/PKG-INFO +20 -22
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/deployment_strategies/base.py +48 -41
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/deployment_strategies/monolithic.py +34 -8
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/git_repo.py +16 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/frontend_deploy/aws/main.yml +1 -1
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/pyproject.toml +22 -22
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/uv.lock +439 -867
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/.flake8 +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/.github/workflows/python-publish.yml +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/.gitignore +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/.pre-commit-config.yaml +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/CONVENTIONS.md +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/LICENSE.txt +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/README.md +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/__init__.py +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/agent.py +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/cloud_providers/__init__.py +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/cloud_providers/aws.py +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/cloud_providers/base.py +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/cloud_providers/gcp.py +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/constants.py +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/deployment_strategies/__init__.py +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/exceptions.py +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/infra_provisioners/__init__.py +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/infra_provisioners/ansible_provisioner.py +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/infra_provisioners/base_provisioner.py +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/infra_provisioners/terraform_provisioner.py +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/main.py +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/models.py +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/prompts.py +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/queries/tree-sitter-languages/README.md +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/queries/tree-sitter-languages/arduino-tags.scm +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/queries/tree-sitter-languages/c-tags.scm +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/queries/tree-sitter-languages/c_sharp-tags.scm +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/queries/tree-sitter-languages/chatito-tags.scm +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/queries/tree-sitter-languages/commonlisp-tags.scm +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/queries/tree-sitter-languages/cpp-tags.scm +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/queries/tree-sitter-languages/csharp-tags.scm +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/queries/tree-sitter-languages/d-tags.scm +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/queries/tree-sitter-languages/dart-tags.scm +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/queries/tree-sitter-languages/elisp-tags.scm +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/queries/tree-sitter-languages/elixir-tags.scm +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/queries/tree-sitter-languages/elm-tags.scm +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/queries/tree-sitter-languages/gleam-tags.scm +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/queries/tree-sitter-languages/go-tags.scm +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/queries/tree-sitter-languages/hcl-tags.scm +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/queries/tree-sitter-languages/java-tags.scm +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/queries/tree-sitter-languages/javascript-tags.scm +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/queries/tree-sitter-languages/kotlin-tags.scm +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/queries/tree-sitter-languages/lua-tags.scm +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/queries/tree-sitter-languages/ocaml-tags.scm +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/queries/tree-sitter-languages/ocaml_interface-tags.scm +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/queries/tree-sitter-languages/php-tags.scm +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/queries/tree-sitter-languages/pony-tags.scm +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/queries/tree-sitter-languages/properties-tags.scm +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/queries/tree-sitter-languages/python-tags.scm +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/queries/tree-sitter-languages/ql-tags.scm +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/queries/tree-sitter-languages/r-tags.scm +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/queries/tree-sitter-languages/racket-tags.scm +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/queries/tree-sitter-languages/ruby-tags.scm +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/queries/tree-sitter-languages/rust-tags.scm +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/queries/tree-sitter-languages/scala-tags.scm +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/queries/tree-sitter-languages/solidity-tags.scm +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/queries/tree-sitter-languages/swift-tags.scm +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/queries/tree-sitter-languages/typescript-tags.scm +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/queries/tree-sitter-languages/udev-tags.scm +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/repo_map.py +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/service_detector.py +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/settings.py +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/cloud_storage_cleanup/aws/main.yml +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/cloud_storage_cleanup/gcp/main.yml +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/container_registry/aws/main.tf +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/container_registry/aws/outputs.tf +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/container_registry/aws/variables.tf +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/container_registry/gcp/main.tf +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/container_registry/gcp/outputs.tf +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/container_registry/gcp/variables.tf +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/docker_build_push/aws/main.yml +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/docker_build_push/gcp/main.yml +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/docker_compose_deploy/aws/inventory.yml +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/docker_compose_deploy/aws/main.yml +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/docker_compose_deploy/gcp/inventory.yml +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/docker_compose_deploy/gcp/main.yml +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/docker_compose_run/aws/inventory.yml +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/docker_compose_run/aws/main.yml +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/docker_compose_run/gcp/inventory.yml +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/docker_compose_run/gcp/main.yml +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/docker_compose_snippets/base.yml +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/docker_compose_snippets/elasticsearch.yml +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/docker_compose_snippets/kafka.yml +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/docker_compose_snippets/mongodb.yml +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/docker_compose_snippets/mysql.yml +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/docker_compose_snippets/postgresql.yml +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/docker_compose_snippets/rabbitmq.yml +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/docker_compose_snippets/redis.yml +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/docker_compose_snippets/services/backend_api.yml +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/docker_compose_snippets/services/backend_worker.yml +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/docker_compose_snippets/services/full_stack.yml +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/docker_compose_snippets/traefik.yml +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/docker_compose_snippets/weaviate.yml +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/dockerfiles/python_backend_api +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/dockerfiles/python_backend_worker +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/fetch_remote_files/aws/inventory.yml +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/fetch_remote_files/aws/main.yml +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/fetch_remote_files/gcp/inventory.yml +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/fetch_remote_files/gcp/main.yml +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/frontend_bucket_cert/aws/main.tf +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/frontend_bucket_cert/aws/outputs.tf +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/frontend_bucket_cert/aws/variables.tf +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/frontend_bucket_cert/gcp/main.tf +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/frontend_bucket_cert/gcp/outputs.tf +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/frontend_bucket_cert/gcp/variables.tf +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/frontend_cdn/aws/main.tf +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/frontend_cdn/aws/outputs.tf +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/frontend_cdn/aws/variables.tf +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/frontend_cdn/gcp/main.tf +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/frontend_cdn/gcp/outputs.tf +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/frontend_cdn/gcp/variables.tf +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/frontend_deploy/gcp/main.yml +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/virtual_machine/aws/main.tf +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/virtual_machine/aws/outputs.tf +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/virtual_machine/aws/variables.tf +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/virtual_machine/gcp/main.tf +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/virtual_machine/gcp/outputs.tf +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/virtual_machine/gcp/variables.tf +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/virtual_machine_setup/aws/inventory.yml +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/virtual_machine_setup/aws/main.yml +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/virtual_machine_setup/gcp/inventory.yml +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/templates/virtual_machine_setup/gcp/main.yml +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/tests/__init__.py +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/tests/test_service_detector.py +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/types.py +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/opsmith/utils.py +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/resources/deploy_demo.gif +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/resources/deploy_demo.svg +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/resources/setup_demo.gif +0 -0
- {opsmith_cli-0.4.2b0 → opsmith_cli-0.4.4b0}/resources/setup_demo.svg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: opsmith-cli
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.4b0
|
|
4
4
|
Summary: Opsmith is an AI devops engineer in your terminal
|
|
5
5
|
License-Expression: GPL-3.0-only
|
|
6
6
|
License-File: LICENSE.txt
|
|
@@ -14,27 +14,25 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.12
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.13
|
|
16
16
|
Classifier: Topic :: Software Development
|
|
17
|
-
Requires-Python: >=3.
|
|
18
|
-
Requires-Dist: ansible
|
|
19
|
-
Requires-Dist:
|
|
20
|
-
Requires-Dist:
|
|
21
|
-
Requires-Dist:
|
|
22
|
-
Requires-Dist: google-
|
|
23
|
-
Requires-Dist: google-cloud-
|
|
24
|
-
Requires-Dist:
|
|
25
|
-
Requires-Dist:
|
|
26
|
-
Requires-Dist:
|
|
27
|
-
Requires-Dist:
|
|
28
|
-
Requires-Dist:
|
|
29
|
-
Requires-Dist:
|
|
30
|
-
Requires-Dist:
|
|
31
|
-
Requires-Dist:
|
|
32
|
-
Requires-Dist:
|
|
33
|
-
Requires-Dist:
|
|
34
|
-
Requires-Dist:
|
|
35
|
-
Requires-Dist:
|
|
36
|
-
Requires-Dist: tree-sitter-language-pack>=0.7.3
|
|
37
|
-
Requires-Dist: typer>=0.16.0
|
|
17
|
+
Requires-Python: >=3.11
|
|
18
|
+
Requires-Dist: ansible==12.3.0
|
|
19
|
+
Requires-Dist: gitpython==3.1.45
|
|
20
|
+
Requires-Dist: google-api-python-client==2.187.0
|
|
21
|
+
Requires-Dist: google-cloud-compute==1.40.0
|
|
22
|
+
Requires-Dist: google-cloud-resource-manager==1.15.0
|
|
23
|
+
Requires-Dist: google-cloud-storage==3.7.0
|
|
24
|
+
Requires-Dist: grep-ast==0.9.0
|
|
25
|
+
Requires-Dist: inquirer==3.4.1
|
|
26
|
+
Requires-Dist: jinja2==3.1.6
|
|
27
|
+
Requires-Dist: networkx==3.6.1
|
|
28
|
+
Requires-Dist: pick==2.4.0
|
|
29
|
+
Requires-Dist: pydantic-ai==1.37.0
|
|
30
|
+
Requires-Dist: pydantic==2.12.5
|
|
31
|
+
Requires-Dist: python-dotenv==1.2.1
|
|
32
|
+
Requires-Dist: pyyaml==6.0.3
|
|
33
|
+
Requires-Dist: tqdm==4.67.1
|
|
34
|
+
Requires-Dist: tree-sitter-language-pack==0.13.0
|
|
35
|
+
Requires-Dist: typer==0.20.1
|
|
38
36
|
Description-Content-Type: text/markdown
|
|
39
37
|
|
|
40
38
|
# Opsmith: An AI devops engineer in your terminal
|
|
@@ -14,6 +14,7 @@ from rich import print
|
|
|
14
14
|
|
|
15
15
|
from opsmith.agent import AgentDeps
|
|
16
16
|
from opsmith.cloud_providers.base import BaseCloudProvider, MachineType
|
|
17
|
+
from opsmith.git_repo import GitRepo
|
|
17
18
|
from opsmith.infra_provisioners.ansible_provisioner import AnsibleProvisioner
|
|
18
19
|
from opsmith.infra_provisioners.terraform_provisioner import TerraformProvisioner
|
|
19
20
|
from opsmith.settings import settings
|
|
@@ -105,6 +106,7 @@ class BaseDeploymentStrategy(abc.ABC):
|
|
|
105
106
|
self.src_dir = src_dir
|
|
106
107
|
self.deployments_path = src_dir.joinpath(settings.deployments_dir)
|
|
107
108
|
self.templates_dir = Path(__file__).parent.parent / "templates"
|
|
109
|
+
self.git_repo = GitRepo(self.src_dir)
|
|
108
110
|
|
|
109
111
|
def _get_env_state_path(self, environment_name: str) -> Path:
|
|
110
112
|
return self.deployments_path / "environments" / environment_name / "state.yml"
|
|
@@ -176,54 +178,59 @@ class BaseDeploymentStrategy(abc.ABC):
|
|
|
176
178
|
ServiceTypeEnum.BACKEND_WORKER,
|
|
177
179
|
]
|
|
178
180
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
# This logic is from generate_dockerfiles
|
|
184
|
-
service_dir_slug = service.name_slug
|
|
185
|
-
dockerfile_path_abs = self.deployments_path / "docker" / service_dir_slug / "Dockerfile"
|
|
181
|
+
with self.git_repo.git_archive_context() as clean_context_path:
|
|
182
|
+
for service in deployment_config.services:
|
|
183
|
+
if service.service_type not in buildable_service_types:
|
|
184
|
+
continue
|
|
186
185
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
186
|
+
# This logic is from generate_dockerfiles
|
|
187
|
+
service_dir_slug = service.name_slug
|
|
188
|
+
dockerfile_path_abs = (
|
|
189
|
+
self.deployments_path / "docker" / service_dir_slug / "Dockerfile"
|
|
191
190
|
)
|
|
192
|
-
continue
|
|
193
|
-
|
|
194
|
-
image_name_slug = service_dir_slug
|
|
195
191
|
|
|
196
|
-
|
|
192
|
+
if not dockerfile_path_abs.exists():
|
|
193
|
+
print(
|
|
194
|
+
f"[bold yellow]Dockerfile for {service_dir_slug} not found at"
|
|
195
|
+
f" {dockerfile_path_abs}, skipping build.[/bold yellow]"
|
|
196
|
+
)
|
|
197
|
+
continue
|
|
197
198
|
|
|
198
|
-
|
|
199
|
-
self.deployments_path
|
|
200
|
-
/ "environments"
|
|
201
|
-
/ environment.name
|
|
202
|
-
/ "docker_build_push"
|
|
203
|
-
/ image_name_slug
|
|
204
|
-
)
|
|
205
|
-
|
|
206
|
-
ansible_runner = AnsibleProvisioner(working_dir=build_infra_path)
|
|
207
|
-
|
|
208
|
-
provider_name = environment.cloud_provider_detail.name.lower()
|
|
199
|
+
image_name_slug = service_dir_slug
|
|
209
200
|
|
|
210
|
-
|
|
211
|
-
"docker_path": str(self.agent_deps.src_dir),
|
|
212
|
-
"dockerfile_path": str(dockerfile_path_abs),
|
|
213
|
-
"image_name_slug": image_name_slug,
|
|
214
|
-
"image_tag_name": "latest",
|
|
215
|
-
"registry_url": registry_url,
|
|
216
|
-
}
|
|
217
|
-
extra_vars.update(environment.cloud_provider_instance.provider_detail_dump)
|
|
218
|
-
ansible_runner.copy_template("docker_build_push", provider_name)
|
|
219
|
-
outputs = ansible_runner.run_playbook("main.yml", extra_vars)
|
|
201
|
+
print(f"\n[bold]Building and pushing image for {image_name_slug}...[/bold]")
|
|
220
202
|
|
|
221
|
-
|
|
203
|
+
build_infra_path = (
|
|
204
|
+
self.deployments_path
|
|
205
|
+
/ "environments"
|
|
206
|
+
/ environment.name
|
|
207
|
+
/ "docker_build_push"
|
|
208
|
+
/ image_name_slug
|
|
209
|
+
)
|
|
222
210
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
211
|
+
ansible_runner = AnsibleProvisioner(working_dir=build_infra_path)
|
|
212
|
+
|
|
213
|
+
provider_name = environment.cloud_provider_detail.name.lower()
|
|
214
|
+
|
|
215
|
+
extra_vars = {
|
|
216
|
+
"docker_path": str(clean_context_path),
|
|
217
|
+
"dockerfile_path": str(dockerfile_path_abs),
|
|
218
|
+
"image_name_slug": image_name_slug,
|
|
219
|
+
"image_tag_name": "latest",
|
|
220
|
+
"registry_url": registry_url,
|
|
221
|
+
}
|
|
222
|
+
extra_vars.update(environment.cloud_provider_instance.provider_detail_dump)
|
|
223
|
+
ansible_runner.copy_template("docker_build_push", provider_name)
|
|
224
|
+
outputs = ansible_runner.run_playbook("main.yml", extra_vars)
|
|
225
|
+
|
|
226
|
+
print(f"[green]Successfully built and pushed image for {image_name_slug}[/green]")
|
|
227
|
+
|
|
228
|
+
if "image_url" in outputs:
|
|
229
|
+
images[image_name_slug] = outputs["image_url"]
|
|
230
|
+
else:
|
|
231
|
+
print(
|
|
232
|
+
f"[bold red]Could not determine image URL for {image_name_slug}[/bold red]"
|
|
233
|
+
)
|
|
227
234
|
|
|
228
235
|
return images
|
|
229
236
|
|
|
@@ -906,22 +906,48 @@ class MonolithicDeploymentStrategy(BaseDeploymentStrategy):
|
|
|
906
906
|
|
|
907
907
|
if other_services:
|
|
908
908
|
if env_state.virtual_machine:
|
|
909
|
-
self._build_and_push_images(
|
|
909
|
+
images = self._build_and_push_images(
|
|
910
|
+
deployment_config, environment, env_state.registry_url
|
|
911
|
+
)
|
|
910
912
|
|
|
911
|
-
|
|
913
|
+
ansible_user = env_state.virtual_machine.user
|
|
914
|
+
env_file_path = f"/home/{ansible_user}/app/.env"
|
|
915
|
+
docker_compose_file_path = f"/home/{ansible_user}/app/docker-compose.yml"
|
|
912
916
|
fetched_files = self._fetch_remote_deployment_files(
|
|
913
917
|
deployment_config,
|
|
914
918
|
environment,
|
|
915
919
|
env_state.virtual_machine,
|
|
916
|
-
[env_file_path],
|
|
920
|
+
[env_file_path, docker_compose_file_path],
|
|
917
921
|
)
|
|
922
|
+
existing_env_content = fetched_files[0]
|
|
923
|
+
existing_compose_content = fetched_files[1]
|
|
918
924
|
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
env_state,
|
|
923
|
-
fetched_files[0],
|
|
925
|
+
docker_compose_content = DockerComposeContent(
|
|
926
|
+
content=existing_compose_content,
|
|
927
|
+
env_file_content=existing_env_content,
|
|
924
928
|
)
|
|
929
|
+
|
|
930
|
+
is_successful, reason, _, confirmed_env_content = (
|
|
931
|
+
self._deploy_validate_docker_compose(
|
|
932
|
+
deployment_config,
|
|
933
|
+
environment,
|
|
934
|
+
env_state,
|
|
935
|
+
docker_compose_content,
|
|
936
|
+
)
|
|
937
|
+
)
|
|
938
|
+
|
|
939
|
+
if is_successful:
|
|
940
|
+
print("[bold green]Release deployed successfully.[/bold green]")
|
|
941
|
+
else:
|
|
942
|
+
print(f"[red]Deployment validation failed:[/red] {reason}")
|
|
943
|
+
print("\n[bold blue]Regenerating docker-compose configuration...[/bold blue]")
|
|
944
|
+
self._generate_docker_compose(
|
|
945
|
+
deployment_config,
|
|
946
|
+
environment,
|
|
947
|
+
images,
|
|
948
|
+
env_state,
|
|
949
|
+
existing_env_content=confirmed_env_content,
|
|
950
|
+
)
|
|
925
951
|
else:
|
|
926
952
|
# This can happen if only frontend was deployed
|
|
927
953
|
print(
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import io
|
|
2
|
+
import tarfile
|
|
3
|
+
import tempfile
|
|
4
|
+
from contextlib import contextmanager
|
|
1
5
|
from pathlib import Path
|
|
2
6
|
from typing import List
|
|
3
7
|
|
|
@@ -65,6 +69,18 @@ class GitRepo:
|
|
|
65
69
|
absolute_paths = [git_root / p for p in relative_paths if p]
|
|
66
70
|
return absolute_paths
|
|
67
71
|
|
|
72
|
+
@contextmanager
|
|
73
|
+
def git_archive_context(self):
|
|
74
|
+
"""Creates a clean build context from git-tracked files only."""
|
|
75
|
+
print("Creating build context from git-tracked files...")
|
|
76
|
+
with tempfile.TemporaryDirectory() as temp_dir:
|
|
77
|
+
buf = io.BytesIO()
|
|
78
|
+
self.repo.archive(buf, format="tar")
|
|
79
|
+
buf.seek(0)
|
|
80
|
+
with tarfile.open(fileobj=buf) as tar:
|
|
81
|
+
tar.extractall(path=temp_dir)
|
|
82
|
+
yield Path(temp_dir)
|
|
83
|
+
|
|
68
84
|
def ensure_gitignore(self):
|
|
69
85
|
"""Ensures that Terraform state files are included in .gitignore."""
|
|
70
86
|
gitignore_path = Path(self.repo.working_dir) / ".gitignore"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "opsmith-cli"
|
|
3
|
-
version = "0.4.
|
|
3
|
+
version = "0.4.4b"
|
|
4
4
|
description = "Opsmith is an AI devops engineer in your terminal"
|
|
5
5
|
readme = {file = "README.md", content-type = "text/markdown"}
|
|
6
6
|
classifiers = [
|
|
@@ -16,28 +16,26 @@ classifiers = [
|
|
|
16
16
|
"Topic :: Software Development",
|
|
17
17
|
]
|
|
18
18
|
license = "GPL-3.0-only"
|
|
19
|
-
requires-python = ">=3.
|
|
19
|
+
requires-python = ">=3.11"
|
|
20
20
|
dependencies = [
|
|
21
|
-
"ansible
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"google-
|
|
26
|
-
"google-cloud-
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"tree-sitter-language-pack>=0.7.3",
|
|
40
|
-
"typer>=0.16.0",
|
|
21
|
+
"ansible==12.3.0",
|
|
22
|
+
"gitpython==3.1.45",
|
|
23
|
+
"google-api-python-client==2.187.0",
|
|
24
|
+
"google-cloud-compute==1.40.0",
|
|
25
|
+
"google-cloud-resource-manager==1.15.0",
|
|
26
|
+
"google-cloud-storage==3.7.0",
|
|
27
|
+
"grep-ast==0.9.0",
|
|
28
|
+
"inquirer==3.4.1",
|
|
29
|
+
"jinja2==3.1.6",
|
|
30
|
+
"networkx==3.6.1",
|
|
31
|
+
"pick==2.4.0",
|
|
32
|
+
"pydantic==2.12.5",
|
|
33
|
+
"pydantic-ai==1.37.0",
|
|
34
|
+
"python-dotenv==1.2.1",
|
|
35
|
+
"pyyaml==6.0.3",
|
|
36
|
+
"tqdm==4.67.1",
|
|
37
|
+
"tree-sitter-language-pack==0.13.0",
|
|
38
|
+
"typer==0.20.1",
|
|
41
39
|
]
|
|
42
40
|
|
|
43
41
|
[project.scripts]
|
|
@@ -59,6 +57,8 @@ build-backend = "hatchling.build"
|
|
|
59
57
|
[dependency-groups]
|
|
60
58
|
dev = [
|
|
61
59
|
"pytest>=8.4.1",
|
|
60
|
+
"black>=25.1.0",
|
|
61
|
+
"boto3-stubs==1.38.36",
|
|
62
62
|
]
|
|
63
63
|
|
|
64
64
|
[tool.black]
|