rocketdoo 2.2.2__tar.gz → 2.2.4__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 (55) hide show
  1. {rocketdoo-2.2.2 → rocketdoo-2.2.4}/LICENSE +1 -1
  2. {rocketdoo-2.2.2/rocketdoo.egg-info → rocketdoo-2.2.4}/PKG-INFO +3 -3
  3. {rocketdoo-2.2.2 → rocketdoo-2.2.4}/README.md +1 -1
  4. {rocketdoo-2.2.2 → rocketdoo-2.2.4}/pyproject.toml +1 -1
  5. {rocketdoo-2.2.2 → rocketdoo-2.2.4}/rocketdoo/core/deploy/vps.py +40 -6
  6. rocketdoo-2.2.4/rocketdoo/templates/install_dependencies.sh +53 -0
  7. {rocketdoo-2.2.2 → rocketdoo-2.2.4/rocketdoo.egg-info}/PKG-INFO +3 -3
  8. rocketdoo-2.2.2/rocketdoo/templates/install_dependencies.sh +0 -35
  9. {rocketdoo-2.2.2 → rocketdoo-2.2.4}/MANIFEST.in +0 -0
  10. {rocketdoo-2.2.2 → rocketdoo-2.2.4}/rocketdoo/__init__.py +0 -0
  11. {rocketdoo-2.2.2 → rocketdoo-2.2.4}/rocketdoo/cli.py +0 -0
  12. {rocketdoo-2.2.2 → rocketdoo-2.2.4}/rocketdoo/config.py +0 -0
  13. {rocketdoo-2.2.2 → rocketdoo-2.2.4}/rocketdoo/core/__init__.py +0 -0
  14. {rocketdoo-2.2.2 → rocketdoo-2.2.4}/rocketdoo/core/config_loader.py +0 -0
  15. {rocketdoo-2.2.2 → rocketdoo-2.2.4}/rocketdoo/core/deploy/__init__.py +0 -0
  16. {rocketdoo-2.2.2 → rocketdoo-2.2.4}/rocketdoo/core/deploy/base.py +0 -0
  17. {rocketdoo-2.2.2 → rocketdoo-2.2.4}/rocketdoo/core/deploy/config_manager.py +0 -0
  18. {rocketdoo-2.2.2 → rocketdoo-2.2.4}/rocketdoo/core/deploy/module_packager.py +0 -0
  19. {rocketdoo-2.2.2 → rocketdoo-2.2.4}/rocketdoo/core/deploy/odoo_sh.py +0 -0
  20. {rocketdoo-2.2.2 → rocketdoo-2.2.4}/rocketdoo/core/edition_setup.py +0 -0
  21. {rocketdoo-2.2.2 → rocketdoo-2.2.4}/rocketdoo/core/generator.py +0 -0
  22. {rocketdoo-2.2.2 → rocketdoo-2.2.4}/rocketdoo/core/gitman_config.py +0 -0
  23. {rocketdoo-2.2.2 → rocketdoo-2.2.4}/rocketdoo/core/module_scanner.py +0 -0
  24. {rocketdoo-2.2.2 → rocketdoo-2.2.4}/rocketdoo/core/port_validation.py +0 -0
  25. {rocketdoo-2.2.2 → rocketdoo-2.2.4}/rocketdoo/core/ssh_manager.py +0 -0
  26. {rocketdoo-2.2.2 → rocketdoo-2.2.4}/rocketdoo/core/utils.py +0 -0
  27. {rocketdoo-2.2.2 → rocketdoo-2.2.4}/rocketdoo/delete_identifiers.py +0 -0
  28. {rocketdoo-2.2.2 → rocketdoo-2.2.4}/rocketdoo/deploy_cli.py +0 -0
  29. {rocketdoo-2.2.2 → rocketdoo-2.2.4}/rocketdoo/docker_cli.py +0 -0
  30. {rocketdoo-2.2.2 → rocketdoo-2.2.4}/rocketdoo/init_project.py +0 -0
  31. {rocketdoo-2.2.2 → rocketdoo-2.2.4}/rocketdoo/main.py +0 -0
  32. {rocketdoo-2.2.2 → rocketdoo-2.2.4}/rocketdoo/project_info.py +0 -0
  33. {rocketdoo-2.2.2 → rocketdoo-2.2.4}/rocketdoo/rocketdoo.py +0 -0
  34. {rocketdoo-2.2.2 → rocketdoo-2.2.4}/rocketdoo/scaffold.py +0 -0
  35. {rocketdoo-2.2.2 → rocketdoo-2.2.4}/rocketdoo/templates/.devcontainer/devcontainer.json +0 -0
  36. {rocketdoo-2.2.2 → rocketdoo-2.2.4}/rocketdoo/templates/.devcontainer/docker-compose.yaml +0 -0
  37. {rocketdoo-2.2.2 → rocketdoo-2.2.4}/rocketdoo/templates/.vscode/launch.json +0 -0
  38. {rocketdoo-2.2.2 → rocketdoo-2.2.4}/rocketdoo/templates/.vscode/launch.json.jinja +0 -0
  39. {rocketdoo-2.2.2 → rocketdoo-2.2.4}/rocketdoo/templates/.vscode/settings.json +0 -0
  40. {rocketdoo-2.2.2 → rocketdoo-2.2.4}/rocketdoo/templates/Dockerfile.jinja +0 -0
  41. {rocketdoo-2.2.2 → rocketdoo-2.2.4}/rocketdoo/templates/addons/.gitkeep +0 -0
  42. {rocketdoo-2.2.2 → rocketdoo-2.2.4}/rocketdoo/templates/config/odoo.conf +0 -0
  43. {rocketdoo-2.2.2 → rocketdoo-2.2.4}/rocketdoo/templates/config/odoo.conf.jinja +0 -0
  44. {rocketdoo-2.2.2 → rocketdoo-2.2.4}/rocketdoo/templates/deploy/.deployignore +0 -0
  45. {rocketdoo-2.2.2 → rocketdoo-2.2.4}/rocketdoo/templates/deploy/deploy.yaml +0 -0
  46. {rocketdoo-2.2.2 → rocketdoo-2.2.4}/rocketdoo/templates/deploy/deploy.yaml.jinja +0 -0
  47. {rocketdoo-2.2.2 → rocketdoo-2.2.4}/rocketdoo/templates/docker-compose.yaml.jinja +0 -0
  48. {rocketdoo-2.2.2 → rocketdoo-2.2.4}/rocketdoo/templates/odoo_pg_pass +0 -0
  49. {rocketdoo-2.2.2 → rocketdoo-2.2.4}/rocketdoo/welcome.py +0 -0
  50. {rocketdoo-2.2.2 → rocketdoo-2.2.4}/rocketdoo.egg-info/SOURCES.txt +0 -0
  51. {rocketdoo-2.2.2 → rocketdoo-2.2.4}/rocketdoo.egg-info/dependency_links.txt +0 -0
  52. {rocketdoo-2.2.2 → rocketdoo-2.2.4}/rocketdoo.egg-info/entry_points.txt +0 -0
  53. {rocketdoo-2.2.2 → rocketdoo-2.2.4}/rocketdoo.egg-info/requires.txt +0 -0
  54. {rocketdoo-2.2.2 → rocketdoo-2.2.4}/rocketdoo.egg-info/top_level.txt +0 -0
  55. {rocketdoo-2.2.2 → rocketdoo-2.2.4}/setup.cfg +0 -0
@@ -57,7 +57,7 @@ If the Library as you received it specifies that a proxy can decide whether futu
57
57
  <div RKD as ROCKETDOO V2=""></div>
58
58
 
59
59
  Licencia: LGPL-3.0+
60
- Versión: "2.2.2"
60
+ Versión: "2.2.4"
61
61
  Autor: Horacio Montaño, Elias Braceras
62
62
  Fecha: 16/10/2024
63
63
  Descripción: Framework to development Odoo
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rocketdoo
3
- Version: 2.2.2
3
+ Version: 2.2.4
4
4
  Summary: Framework for creating Odoo development environments with Docker and custom templates.
5
5
  Author-email: Horacio Montaño <horaciomontano@hdmsoft.com.ar>
6
6
  License: GNU LESSER GENERAL PUBLIC LICENSE
@@ -62,7 +62,7 @@ License: GNU LESSER GENERAL PUBLIC LICENSE
62
62
  <div RKD as ROCKETDOO V2=""></div>
63
63
 
64
64
  Licencia: LGPL-3.0+
65
- Versión: "2.2.2"
65
+ Versión: "2.2.4"
66
66
  Autor: Horacio Montaño, Elias Braceras
67
67
  Fecha: 16/10/2024
68
68
  Descripción: Framework to development Odoo
@@ -95,7 +95,7 @@ Odoo Development Framework
95
95
  - "Horacio Montaño" and "Elias Braceras"
96
96
 
97
97
  ## Version:
98
- - "2.2.2"
98
+ - "2.2.4"
99
99
 
100
100
  ----------------------------------------------------------------------------------------------------------------------------------------------------------
101
101
 
@@ -15,7 +15,7 @@ Odoo Development Framework
15
15
  - "Horacio Montaño" and "Elias Braceras"
16
16
 
17
17
  ## Version:
18
- - "2.2.2"
18
+ - "2.2.4"
19
19
 
20
20
  ----------------------------------------------------------------------------------------------------------------------------------------------------------
21
21
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "rocketdoo"
3
- version = "2.2.2"
3
+ version = "2.2.4"
4
4
  description = "Framework for creating Odoo development environments with Docker and custom templates."
5
5
  authors = [
6
6
  { name = "Horacio Montaño", email = "horaciomontano@hdmsoft.com.ar" }
@@ -179,6 +179,7 @@ class VPSDeployer(BaseDeployer):
179
179
  - SSH connectivity
180
180
  - Remote paths exist
181
181
  - Required commands available
182
+ - Sudo permissions (if needed)
182
183
 
183
184
  Returns:
184
185
  True if all checks pass
@@ -194,6 +195,29 @@ class VPSDeployer(BaseDeployer):
194
195
 
195
196
  self.log("✓ SSH connection established", "success")
196
197
 
198
+ # Check sudo permissions if using native deployment with restart enabled
199
+ if (self.deployment_type == 'native' and
200
+ self.post_deploy_config.get('restart_service', False)):
201
+ self.log("Checking sudo permissions...", "info")
202
+
203
+ # Test sudo without password (passwordless sudo)
204
+ result = self._run_ssh_command("sudo -n true 2>&1")
205
+
206
+ if result.returncode != 0:
207
+ if self.auth_method == 'password':
208
+ self.log("✓ Sudo requires password (will use authentication password)", "info")
209
+ else:
210
+ self.log(
211
+ "⚠️ Sudo requires password but SSH key authentication is used.\n"
212
+ " Configure passwordless sudo for service restart or disable 'restart_service'.\n"
213
+ " Run on server: sudo visudo\n"
214
+ f" Add: {self.user} ALL=(ALL) NOPASSWD: /bin/systemctl restart {self.service_name}",
215
+ "warning"
216
+ )
217
+ # Don't fail, just warn
218
+ else:
219
+ self.log("✓ Passwordless sudo available", "success")
220
+
197
221
  # Check if remote path exists
198
222
  if self.deployment_type == 'docker':
199
223
  remote_path = f"{self.compose_path}"
@@ -206,7 +230,7 @@ class VPSDeployer(BaseDeployer):
206
230
  self.log(f"Warning: Remote path {remote_path} does not exist", "warning")
207
231
  # Try to create it
208
232
  self.log(f"Attempting to create {remote_path}...", "info")
209
- create_result = self._run_ssh_command(f"sudo mkdir -p {remote_path}")
233
+ create_result = self._run_ssh_command(f"sudo mkdir -p {remote_path}", use_sudo=True)
210
234
  if create_result.returncode != 0:
211
235
  self.log(f"Failed to create remote path: {create_result.stderr}", "error")
212
236
  return False
@@ -268,7 +292,6 @@ class VPSDeployer(BaseDeployer):
268
292
  local_path = temp_dir / module_name
269
293
  remote_module_path = f"{target_path}/{module_name}"
270
294
 
271
- # ✅ SIMPLIFICADO: Siempre actualiza (rsync con --delete ya hace esto)
272
295
  # Upload module
273
296
  success = self._upload_directory(local_path, remote_module_path)
274
297
 
@@ -332,9 +355,10 @@ class VPSDeployer(BaseDeployer):
332
355
  message="Failed to restart Docker container"
333
356
  )
334
357
  else:
335
- # Restart systemd service
358
+ # Restart systemd service with sudo (handles password if needed)
336
359
  result = self._run_ssh_command(
337
- f"sudo systemctl restart {self.service_name}"
360
+ f"systemctl restart {self.service_name}",
361
+ use_sudo=True
338
362
  )
339
363
 
340
364
  if result.returncode != 0:
@@ -397,17 +421,27 @@ class VPSDeployer(BaseDeployer):
397
421
  message=f"Post-deploy error: {e}"
398
422
  )
399
423
 
400
- def _run_ssh_command(self, command: str, timeout: int = 300) -> subprocess.CompletedProcess:
424
+ def _run_ssh_command(self, command: str, timeout: int = 300, use_sudo: bool = False) -> subprocess.CompletedProcess:
401
425
  """
402
426
  Execute command on remote server via SSH
403
427
 
404
428
  Args:
405
429
  command: Command to execute
406
430
  timeout: Command timeout in seconds
431
+ use_sudo: If True, prepend sudo to command and handle password if needed
407
432
 
408
433
  Returns:
409
434
  CompletedProcess with result
410
435
  """
436
+ # Handle sudo with password authentication
437
+ if use_sudo:
438
+ if self.auth_method == 'password' and self.password:
439
+ # Use echo password | sudo -S for password-based sudo
440
+ command = f"echo '{self.password}' | sudo -S {command}"
441
+ else:
442
+ # Try passwordless sudo or rely on SSH key having sudo access
443
+ command = f"sudo {command}"
444
+
411
445
  ssh_cmd = ['ssh']
412
446
 
413
447
  # Add SSH options
@@ -606,7 +640,7 @@ class VPSDeployer(BaseDeployer):
606
640
  if self.deployment_type == 'docker':
607
641
  self._run_ssh_command(f"cd {self.compose_path} && docker-compose restart {self.container_name}")
608
642
  else:
609
- self._run_ssh_command(f"sudo systemctl restart {self.service_name}")
643
+ self._run_ssh_command(f"systemctl restart {self.service_name}", use_sudo=True)
610
644
 
611
645
  self.log("✓ Rollback completed", "success")
612
646
 
@@ -0,0 +1,53 @@
1
+ #!/bin/bash
2
+
3
+ file_to_check="$PWD/requirements.txt"
4
+
5
+ if [ -f "$file_to_check" ]; then
6
+ # Verificar si el archivo tiene contenido (ignorando líneas vacías y comentarios)
7
+ if grep -q '^[^#[:space:]]' "$file_to_check"; then
8
+ echo "The file $file_to_check exists. Installing python dependencies"
9
+
10
+ # Detectar la versión de pip para decidir si usar --break-system-packages
11
+ pip_version=$(pip --version | awk '{print $2}')
12
+ pip_major=$(echo "$pip_version" | cut -d. -f1)
13
+ pip_minor=$(echo "$pip_version" | cut -d. -f2)
14
+
15
+ # Usar --break-system-packages solo si pip >= 22.1
16
+ if [ "$pip_major" -gt 22 ] || ([ "$pip_major" -eq 22 ] && [ "$pip_minor" -ge 1 ]); then
17
+ output=$(pip install --break-system-packages -r "$file_to_check" 2>&1)
18
+ else
19
+ # Para versiones antiguas de pip, usar sin la opción
20
+ output=$(pip install -r "$file_to_check" 2>&1)
21
+ fi
22
+
23
+ exit_code=$?
24
+
25
+ if [ $exit_code -ne 0 ]; then
26
+ echo ""
27
+ echo "=========================================="
28
+ echo "WARNING: Unable to install dependencies"
29
+ echo "=========================================="
30
+ echo "File: $file_to_check"
31
+ echo ""
32
+ echo "Error details:"
33
+ echo "$output"
34
+ echo ""
35
+ echo "ACTION REQUIRED:"
36
+ echo "Please log into the container and install the dependencies manually:"
37
+ echo " docker exec -it <container_name> bash"
38
+ echo " pip install -r $file_to_check"
39
+ echo ""
40
+ echo "Or modify your Dockerfile/docker-compose to handle these dependencies."
41
+ echo "=========================================="
42
+ echo ""
43
+ # No detenemos el proceso, solo advertimos
44
+ exit 0
45
+ else
46
+ echo "All dependencies installed successfully!"
47
+ fi
48
+ else
49
+ echo "The file $file_to_check exists but is empty or contains only comments. Skipping installation."
50
+ fi
51
+ else
52
+ echo "The file $file_to_check does not exist. Skipping installation."
53
+ fi
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rocketdoo
3
- Version: 2.2.2
3
+ Version: 2.2.4
4
4
  Summary: Framework for creating Odoo development environments with Docker and custom templates.
5
5
  Author-email: Horacio Montaño <horaciomontano@hdmsoft.com.ar>
6
6
  License: GNU LESSER GENERAL PUBLIC LICENSE
@@ -62,7 +62,7 @@ License: GNU LESSER GENERAL PUBLIC LICENSE
62
62
  <div RKD as ROCKETDOO V2=""></div>
63
63
 
64
64
  Licencia: LGPL-3.0+
65
- Versión: "2.2.2"
65
+ Versión: "2.2.4"
66
66
  Autor: Horacio Montaño, Elias Braceras
67
67
  Fecha: 16/10/2024
68
68
  Descripción: Framework to development Odoo
@@ -95,7 +95,7 @@ Odoo Development Framework
95
95
  - "Horacio Montaño" and "Elias Braceras"
96
96
 
97
97
  ## Version:
98
- - "2.2.2"
98
+ - "2.2.4"
99
99
 
100
100
  ----------------------------------------------------------------------------------------------------------------------------------------------------------
101
101
 
@@ -1,35 +0,0 @@
1
- #!/bin/bash
2
-
3
- file_to_check="$PWD/requirements.txt"
4
-
5
- if [ -f "$file_to_check" ]; then
6
- # Verificar si el archivo tiene contenido (ignorando líneas vacías y comentarios)
7
- if grep -q '^[^#[:space:]]' "$file_to_check"; then
8
- echo "The file $file_to_check exists. Installing python dependencies"
9
- output=$(pip install --break-system-packages -r "$file_to_check" 2>&1)
10
- exit_code=$?
11
-
12
- if [ $exit_code -ne 0 ]; then
13
- echo "Warning: Unable to install at least one dependency of $file_to_check."
14
- echo "$output"
15
- echo "Please log into the container and install them manually or modify the dockerfile or docker compose."
16
- echo "(script returned an error)"
17
-
18
- # Preguntar si se debe continuar o usar --force
19
- if [[ "$*" == *"--force"* ]]; then
20
- echo "Continuing due to --force flag..."
21
- exit 0
22
- else
23
- echo ""
24
- echo "Run again with '--force' to ignore script errors"
25
- exit 1
26
- fi
27
- else
28
- echo "All dependencies installed successfully!"
29
- fi
30
- else
31
- echo "The file $file_to_check exists but is empty or contains only comments. Skipping installation."
32
- fi
33
- else
34
- echo "The file $file_to_check does not exist. Skipping installation."
35
- fi
File without changes
File without changes
File without changes
File without changes
File without changes